/**
 * Christmas Animations CSS
 * Styles for snow effects and Santa animations
 */

/* Snow Container */
#christmas-snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* Santa Container */
#christmas-santa-container {
    position: fixed;
    z-index: 9998;
    cursor: pointer;
    transition: transform 0.3s ease;
    /* Default position: bottom-left */
    bottom: 20px;
    left: 20px;
}

#christmas-santa-container:hover {
    transform: scale(1.1);
}

/* Santa Fallback Animation */
@keyframes santaBounce {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    25% { 
        transform: translateY(-5px) rotate(-2deg); 
    }
    50% { 
        transform: translateY(-10px) rotate(0deg); 
    }
    75% { 
        transform: translateY(-5px) rotate(2deg); 
    }
}

.santa-fallback {
    animation: santaBounce 2s ease-in-out infinite;
}

.santa-fallback:hover {
    animation-duration: 1s;
}

/* Ho Ho Ho Text Effect */
@keyframes hohoFade {
    0% { 
        opacity: 0; 
        transform: translateY(20px) scale(0.8); 
    }
    20% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
    80% { 
        opacity: 1; 
        transform: translateY(-10px) scale(1); 
    }
    100% { 
        opacity: 0; 
        transform: translateY(-30px) scale(0.8); 
    }
}

/* Sparkle Effect */
@keyframes sparkleAnimation {
    0% { 
        opacity: 1; 
        transform: translate(0, 0) scale(0.5); 
    }
    50% { 
        opacity: 1; 
        transform: translate(var(--sparkle-x), var(--sparkle-y)) scale(1); 
    }
    100% { 
        opacity: 0; 
        transform: translate(calc(var(--sparkle-x) * 1.5), calc(var(--sparkle-y) * 1.5)) scale(0.2); 
    }
}

/* Christmas Theme Colors */
:root {
    --christmas-red: #ff4444;
    --christmas-green: #228B22;
    --christmas-gold: #FFD700;
    --christmas-white: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    #christmas-santa-container {
        width: 60px !important;
        height: 60px !important;
        bottom: 10px !important;
        right: 10px !important;
    }
    
    .santa-fallback {
        font-size: 24px !important;
    }
}

@media (max-width: 480px) {
    #christmas-santa-container {
        width: 50px !important;
        height: 50px !important;
    }
    
    .santa-fallback {
        font-size: 20px !important;
    }
    
    /* Reduce snow intensity on mobile */
    #christmas-snow-container {
        opacity: 0.7;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    #christmas-snow-container,
    #christmas-santa-container,
    .santa-fallback {
        animation: none !important;
        transition: none !important;
    }
    
    #christmas-snow-container {
        display: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .santa-fallback {
        border: 2px solid #000;
    }
}

/* Print styles */
@media print {
    #christmas-snow-container,
    #christmas-santa-container {
        display: none !important;
    }
}

/* Loading state */
.christmas-loading {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.christmas-loaded {
    opacity: 1;
}

/* Christmas cursor effect (optional) */
.christmas-cursor {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><text y="16" font-size="16">❄️</text></svg>'), auto;
}

/* Festive glow effect */
.christmas-glow {
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.6);
    animation: christmasGlow 2s ease-in-out infinite alternate;
}

@keyframes christmasGlow {
    from { box-shadow: 0 0 20px rgba(255, 68, 68, 0.6); }
    to { box-shadow: 0 0 30px rgba(255, 68, 68, 0.8), 0 0 40px rgba(34, 139, 34, 0.4); }
}

/* Christmas border decoration */
.christmas-border {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, var(--christmas-red), var(--christmas-green), var(--christmas-gold)) border-box;
    border-radius: 8px;
}

/* Snowflake variations */
.snowflake-1::before { content: '❄'; }
.snowflake-2::before { content: '❅'; }
.snowflake-3::before { content: '❆'; }
.snowflake-4::before { content: '✻'; }
.snowflake-5::before { content: '✼'; }
.snowflake-6::before { content: '❋'; }

/* Christmas notification styles */
.christmas-notification {
    background: linear-gradient(135deg, var(--christmas-red), var(--christmas-green));
    color: white;
    border-radius: 25px;
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideInFromRight 0.5s ease-out;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Christmas button styles */
.btn-christmas {
    background: linear-gradient(135deg, var(--christmas-red), #ff6666);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.btn-christmas:hover {
    background: linear-gradient(135deg, #ff6666, var(--christmas-red));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4);
    color: white;
}

.btn-christmas:active {
    transform: translateY(0);
}

/* Christmas card styles */
.christmas-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 1px solid rgba(255, 68, 68, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.christmas-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--christmas-red), var(--christmas-green), var(--christmas-gold));
}

/* Christmas text effects */
.christmas-text {
    background: linear-gradient(45deg, var(--christmas-red), var(--christmas-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

/* Festive animations */
@keyframes jingleBell {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.jingle-bell {
    animation: jingleBell 2s ease-in-out infinite;
}

/* Christmas theme toggle */
.christmas-theme-active {
    --primary-color: var(--christmas-red);
    --secondary-color: var(--christmas-green);
    --accent-color: var(--christmas-gold);
}

/* Utility classes */
.christmas-hidden {
    display: none !important;
}

.christmas-visible {
    display: block !important;
}

.christmas-fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}