/* Holiday Loop Themes - Automatic Holiday Styling */
/* Subtle, beautiful themes that enhance without interfering */

/* ========================================
   HOLIDAY BANNER - Auto-displays greeting
   ======================================== */
.holiday-banner {
    position: fixed;
    top: 65px;
    left: -300px;
    z-index: 9999;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, rgba(10, 15, 35, 0.95), rgba(20, 25, 45, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 2px solid rgba(0, 247, 255, 0.3);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 247, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    transform: translateY(0) translateZ(0);
    will-change: transform, opacity;
}

.holiday-banner.show {
    left: 185px;
    opacity: 1;
    pointer-events: auto;
}

.holiday-banner.show.banner-hidden {
    transform: translateY(-150px) translateZ(0) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.holiday-banner-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.holiday-greeting {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    animation: bannerGradient 3s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(0, 247, 255, 0.5);
    white-space: nowrap;
}

.holiday-emoji {
    font-size: 1.1rem;
    animation: emojiFloat 3s ease-in-out infinite;
    display: inline-block;
    transform: translateZ(0);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

@keyframes bannerGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes emojiFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.1); }
}

/* Day theme banner */
[data-theme="day"] .holiday-banner {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 245, 250, 0.95));
    border-color: rgba(255, 107, 53, 0.4);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(255, 107, 53, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="day"] .holiday-greeting {
    background: linear-gradient(45deg, #ff6b35, #ff1744, #ffd700);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   HOLIDAY POPUP - Interactive Info Display
   ======================================== */
.holiday-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.holiday-popup.active {
    opacity: 1;
}

.holiday-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    pointer-events: auto;
}

.holiday-popup-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: linear-gradient(135deg, rgba(10, 15, 35, 0.98), rgba(20, 25, 45, 0.98));
    border-radius: 30px;
    padding: 2.5rem 2rem;
    border: 3px solid var(--holiday-primary, #00f7ff);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 80px var(--holiday-primary, rgba(0, 247, 255, 0.4)),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: scale(0.8) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    cursor: default;
}

.holiday-popup.active .holiday-popup-content {
    transform: scale(1) translateY(0);
}

.holiday-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    z-index: 10;
}

.holiday-popup-close:hover {
    background: var(--holiday-primary, #00f7ff);
    transform: rotate(90deg);
    box-shadow: 0 0 20px var(--holiday-primary, #00f7ff);
}

.holiday-popup-close:active {
    transform: rotate(90deg) scale(0.95);
}

.holiday-popup-header {
    text-align: center;
    margin-bottom: 2rem;
}

.holiday-popup-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: popupEmojiFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px var(--holiday-primary, #00f7ff));
}

@keyframes popupEmojiFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

.holiday-popup-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(45deg, var(--holiday-primary, #00f7ff), var(--holiday-secondary, #ff00f7), var(--holiday-accent, #ffd700));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: popupGradient 3s ease-in-out infinite;
}

@keyframes popupGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.holiday-popup-date {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.holiday-popup-body {
    text-align: center;
}

.holiday-popup-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 2rem 0;
    font-family: 'Poppins', sans-serif;
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
}

.holiday-popup-decorations {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.holiday-decoration {
    font-size: 2.5rem;
    opacity: 0.6;
    animation: decorationBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px var(--holiday-secondary, #ff00f7));
}

.holiday-decoration:nth-child(1) {
    animation-delay: 0s;
}

.holiday-decoration:nth-child(2) {
    animation-delay: 0.3s;
}

.holiday-decoration:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes decorationBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Day theme popup */
[data-theme="day"] .holiday-popup-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 250, 0.98));
}

[data-theme="day"] .holiday-popup-close {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

[data-theme="day"] .holiday-popup-close:hover {
    background: var(--holiday-primary, #ff6b35);
    color: #fff;
}

[data-theme="day"] .holiday-popup-date {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="day"] .holiday-popup-description {
    color: rgba(0, 0, 0, 0.8);
}

/* Responsive popup */
@media (max-width: 768px) {
    .holiday-popup-content {
        padding: 2rem 1.5rem;
        max-width: 90%;
    }
    
    .holiday-popup-emoji {
        font-size: 3.5rem;
    }
    
    .holiday-popup-title {
        font-size: 1.8rem;
    }
    
    .holiday-popup-date {
        font-size: 0.75rem;
    }
    
    .holiday-popup-description {
        font-size: 1rem;
    }
    
    .holiday-decoration {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .holiday-popup-content {
        padding: 1.5rem 1rem;
    }
    
    .holiday-popup-emoji {
        font-size: 3rem;
    }
    
    .holiday-popup-title {
        font-size: 1.5rem;
    }
    
    .holiday-popup-decorations {
        gap: 1rem;
    }
}

/* Hover effect */
.holiday-banner.show:hover {
    transform: translateY(-2px) scale(1.02) translateZ(0);
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 247, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 247, 255, 0.5);
}

.holiday-banner.show:hover .holiday-emoji {
    animation: emojiPop 0.6s ease;
}

@keyframes emojiPop {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    75% { transform: scale(1.2) rotate(10deg); }
}

/* Responsive banner */
@media (max-width: 1200px) {
    .holiday-banner.show {
        left: 20px;
    }
}

@media (max-width: 768px) {
    .holiday-banner {
        top: 80px;
        padding: 0.4rem 1rem;
    }
    
    .holiday-banner.show {
        left: 10px;
    }
    
    .holiday-greeting {
        font-size: 0.75rem;
    }
    
    .holiday-emoji {
        font-size: 1rem;
    }
    
    .holiday-banner-content {
        gap: 0.4rem;
    }
}

@media (max-width: 480px) {
    .holiday-banner {
        padding: 0.3rem 0.8rem;
        top: 85px;
    }
    
    .holiday-greeting {
        font-size: 0.7rem;
    }
    
    .holiday-emoji {
        font-size: 0.9rem;
    }
}

/* ========================================
   NEW YEAR THEME (Dec 26 - Jan 7)
   ======================================== */
.holiday-new-year {
    --holiday-primary: #ffd700;
    --holiday-secondary: #00d4ff;
    --holiday-accent: #ff69b4;
}

.holiday-new-year::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.holiday-new-year .hero-section::after {
    content: '🎆';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.15;
    animation: sparkle 3s ease-in-out infinite;
}

/* ========================================
   VALENTINE'S DAY THEME (Feb 10-15)
   ======================================== */
.holiday-valentines {
    --holiday-primary: #ff1744;
    --holiday-secondary: #ff69b4;
    --holiday-accent: #ff4081;
}

.holiday-valentines::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 70%, rgba(255, 23, 68, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(255, 105, 180, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.holiday-valentines .hero-section::after {
    content: '💕';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.15;
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================================
   ST. PATRICK'S DAY THEME (Mar 14-18)
   ======================================== */
.holiday-st-patricks {
    --holiday-primary: #00ff00;
    --holiday-secondary: #32cd32;
    --holiday-accent: #228b22;
}

.holiday-st-patricks::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 40% 60%, rgba(0, 255, 0, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 60% 40%, rgba(50, 205, 50, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.holiday-st-patricks .hero-section::after {
    content: '🍀';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.15;
    animation: float 4s ease-in-out infinite;
}

/* ========================================
   EASTER THEME (Mar 20 - Apr 25)
   ======================================== */
.holiday-easter {
    --holiday-primary: #ff69b4;
    --holiday-secondary: #87ceeb;
    --holiday-accent: #98fb98;
}

.holiday-easter::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 25% 75%, rgba(255, 105, 180, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 75% 25%, rgba(135, 206, 235, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.holiday-easter .hero-section::after {
    content: '🐰';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.15;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ========================================
   INDEPENDENCE DAY THEME (Jul 1-7)
   ======================================== */
.holiday-independence {
    --holiday-primary: #ff0000;
    --holiday-secondary: #0000ff;
    --holiday-accent: #ffffff;
}

.holiday-independence::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 0, 0, 0.02) 0%, transparent 40%),
                radial-gradient(circle at 30% 70%, rgba(0, 0, 255, 0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

.holiday-independence .hero-section::after {
    content: '🎆';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.15;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.25; transform: scale(1.1); }
}

/* ========================================
   HALLOWEEN THEME (Oct 25 - Nov 1)
   ======================================== */
.holiday-halloween {
    --holiday-primary: #ff6600;
    --holiday-secondary: #9933ff;
    --holiday-accent: #000000;
}

.holiday-halloween::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(255, 102, 0, 0.04) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(153, 51, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.holiday-halloween .hero-section::after {
    content: '🎃';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.15;
    animation: spooky 4s ease-in-out infinite;
}

@keyframes spooky {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* ========================================
   THANKSGIVING THEME (Nov 20-28)
   ======================================== */
.holiday-thanksgiving {
    --holiday-primary: #ff8c00;
    --holiday-secondary: #8b4513;
    --holiday-accent: #ffd700;
}

.holiday-thanksgiving::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 35% 65%, rgba(255, 140, 0, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 65% 35%, rgba(139, 69, 19, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.holiday-thanksgiving .hero-section::after {
    content: '🦃';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.15;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ========================================
   CHRISTMAS THEME (Dec 15-25)
   ======================================== */
.holiday-christmas {
    --holiday-primary: #ff0000;
    --holiday-secondary: #00ff00;
    --holiday-accent: #ffd700;
}

.holiday-christmas::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 70%, rgba(255, 0, 0, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(0, 255, 0, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.holiday-christmas .hero-section::after {
    content: '🎄';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.15;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.15; filter: brightness(1); }
    50% { opacity: 0.25; filter: brightness(1.3); }
}

/* ========================================
   SUBTLE ENHANCEMENTS (All Holidays)
   ======================================== */

/* Add subtle glow to buttons during holidays */
[class*="holiday-"] .btn:hover,
[class*="holiday-"] .preview-btn-primary:hover,
[class*="holiday-"] .app-button:hover {
    box-shadow: 0 8px 25px var(--holiday-primary, rgba(0, 247, 255, 0.4));
}

/* Subtle accent on cards during holidays */
[class*="holiday-"] .project:hover,
[class*="holiday-"] .featured-app-card:hover {
    border-color: var(--holiday-primary, rgba(0, 247, 255, 0.4));
}

/* Add holiday sparkle to titles */
[class*="holiday-"] .hero-title::before {
    content: '✨';
    margin-right: 0.5rem;
    opacity: 0.3;
    animation: sparkle 2s ease-in-out infinite;
}

[class*="holiday-"] .hero-title::after {
    content: '✨';
    margin-left: 0.5rem;
    opacity: 0.3;
    animation: sparkle 2s ease-in-out infinite 1s;
}

/* Responsive - Hide decorative elements on mobile */
@media (max-width: 768px) {
    [class*="holiday-"] .hero-section::after {
        display: none;
    }
}

/* Performance optimization */
[class*="holiday-"]::before {
    will-change: opacity;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    [class*="holiday-"] .hero-section::after,
    [class*="holiday-"] .hero-title::before,
    [class*="holiday-"] .hero-title::after {
        animation: none !important;
    }
}
