/* ========================================
   YULETIDE PROJECTOR STYLES
   ======================================== */

/* Custom Fonts */
@font-face {
    font-family: 'Midruns Sans';
    src: url('../fonts/Midruns Sans.woff2') format('woff2'),
         url('../fonts/Midruns Sans.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Midruns Script';
    src: url('../fonts/Midruns - Script.woff2') format('woff2'),
         url('../fonts/Midruns - Script.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #000;
    overscroll-behavior: none;
    font-family: 'Midruns Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* Video elements should behave like images */
video {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.grecaptcha-badge {
    display: none !important;
}

/* ===== PRELOADER ===== */
.yule-preloader {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    color: #fff;
    font-family: 'Midruns Sans', system-ui, sans-serif;
}

.yule-preloader-title {
    font-size: 48px;
    font-weight: 800;
    color: #ff6b35;
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(255,107,53,0.5);
}

.yule-preloader-status {
    font-size: 24px;
    margin-bottom: 20px;
}

.yule-preloader-bar {
    width: 400px;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.yule-preloader-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff6b35, #ff9f1c);
    border-radius: 4px;
    transition: width 0.2s ease;
}

.yule-preloader-detail {
    font-size: 14px;
    color: #888;
    height: 20px;
}

/* ===== FULLSCREEN CONTAINER ===== */
.yule-fullscreen {
    position: fixed;
    inset: 0;
    margin: 0;
    padding: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
}

.yule-projector {
    width: 100%;
    min-height: 100%;
    color: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000;
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ===== DESKTOP LAYOUT - FLEXIBLE 2 ROW ===== */
.yule-wrap {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* ROW 1: Main Content Area - takes remaining space */
.yule-row-main {
    flex: 1;
    display: flex;
    flex-direction: row;
    padding: 20px;
    gap: 20px;
    min-height: 0;
    box-sizing: border-box;
}

/* Heat columns - fixed width */
.yule-col-heat1,
.yule-col-heat2 {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.yule-heat-title {
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 2px;
    font-weight: 800;
    font-size: 24px;
    flex-shrink: 0;
}

.yule-heat-tiles {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
    padding: 10px;
    margin: -10px;
}

/* Center column - fills remaining space */
.yule-col-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.yule-brand {
    flex-shrink: 0;
    text-align: center;
    margin-bottom: 10px;
}

.yule-brand img {
    display: block;
    margin: 0 auto;
    max-width: 350px;
    max-height: 150px;
    height: auto;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,.45));
}

/* ROW 2: Footer - fixed height */
.yule-row-footer {
    height: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    box-sizing: border-box;
}

.yule-footer-left,
.yule-footer-right {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.yule-footer-left img,
.yule-footer-right img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.yule-footer-center {
    flex: 1;
    text-align: center;
}

.yule-band-tile {
    background: #000;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    opacity: 0.9;
    transition: none !important;
    box-shadow: 0 0 8px rgba(0,0,0,0.8);
    animation: none !important;
    transform: none !important;
    will-change: auto;
}

/* Only the ACTIVE tile (currently playing) gets the pulse animation */
.yule-band-tile.active {
    opacity: 1;
    outline: 3px solid #ffffff;
    box-shadow: 0 0 20px rgba(255,0,0,0.9), 0 0 40px rgba(255,0,0,0.6), 0 0 60px rgba(139,0,0,0.4);
    animation: activePulse 3s ease-in-out infinite !important;
}

/* Played tiles - dimmed, NO animation */
.yule-band-tile.played {
    opacity: 0.5;
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

/* Not yet played - ensure NO animation */
.yule-band-tile:not(.active):not(.played):not(.next-up) {
    opacity: 0.9;
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

/* Next up during changeover - white stroke, red glow, NO animation */
.yule-band-tile.next-up {
    opacity: 1;
    outline: 3px solid #ffffff;
    box-shadow: 0 0 20px rgba(255,0,0,0.9), 0 0 40px rgba(255,0,0,0.6), 0 0 60px rgba(139,0,0,0.4);
    animation: none !important;
    transform: none !important;
}

@keyframes activePulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        box-shadow: 0 0 20px rgba(255,0,0,0.9), 0 0 40px rgba(255,0,0,0.6), 0 0 60px rgba(139,0,0,0.4);
    }
    25% { 
        transform: scale(1.03) rotate(0.5deg); 
        box-shadow: 0 0 25px rgba(255,0,0,1), 0 0 50px rgba(255,0,0,0.7), 0 0 80px rgba(139,0,0,0.5);
    }
    50% { 
        transform: scale(1) rotate(0deg); 
        box-shadow: 0 0 20px rgba(255,0,0,0.9), 0 0 40px rgba(255,0,0,0.6), 0 0 60px rgba(139,0,0,0.4);
    }
    75% { 
        transform: scale(1.03) rotate(-0.5deg); 
        box-shadow: 0 0 25px rgba(255,0,0,1), 0 0 50px rgba(255,0,0,0.7), 0 0 80px rgba(139,0,0,0.5);
    }
}

/* Old played rule - removed, now above */

/* Just drawn band - entrance animation */
.yule-band-tile.just-drawn {
    animation: bandDraw 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

@keyframes bandDraw {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
        filter: blur(10px) brightness(2);
    }
    30% {
        opacity: 1;
        transform: scale(1.15) rotate(3deg);
        filter: blur(0) brightness(1.5);
        box-shadow: 0 0 40px rgba(255,215,0,1), 0 0 80px rgba(255,215,0,0.6);
    }
    50% {
        transform: scale(0.95) rotate(-2deg);
        box-shadow: 0 0 30px rgba(255,215,0,0.8), 0 0 60px rgba(255,215,0,0.4);
    }
    70% {
        transform: scale(1.05) rotate(1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
        filter: blur(0) brightness(1);
        box-shadow: 0 0 8px rgba(0,0,0,0.8);
    }
}

/* Pre-draw shuffle - 50% opacity until locked */
.yule-band-tile.shuffling {
    opacity: 0.5;
}

/* Locked bands (previously drawn) - solid black glow */
.yule-band-tile.locked {
    opacity: 1;
    box-shadow: 0 0 20px rgba(0,0,0,1), 0 0 40px rgba(0,0,0,0.8);
}

/* Just locked band (most recently drawn) - elastic scale + bounce + gold glow + particle burst + spotlight + electric crackle */
.yule-band-tile.locked.just-locked {
    animation: elasticPop 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards, 
               crazyBounce 0.6s ease-in-out 0.8s 5,
               subtlePulse 2s ease-in-out 4s infinite;
    box-shadow: 0 0 35px rgba(255,215,0,1), 0 0 70px rgba(255,215,0,0.6);
    position: relative;
    overflow: hidden; /* Changed to hidden to contain the sheen effect */
    z-index: 10;
}

/* Particle burst container - ::before */
.yule-band-tile.locked.just-locked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    animation: particleBurst1 0.8s ease-out forwards;
    box-shadow:
        0 0 0 3px #ffd700, 0 0 10px 3px rgba(255,215,0,0.8),
        -40px -30px 0 2px #ff4444, -40px -30px 8px 2px rgba(255,68,68,0.6),
        40px -35px 0 2px #ffd700, 40px -35px 8px 2px rgba(255,215,0,0.6),
        -50px 20px 0 2px #ff6600, -50px 20px 8px 2px rgba(255,102,0,0.6),
        50px 25px 0 2px #ff4444, 50px 25px 8px 2px rgba(255,68,68,0.6),
        -20px -50px 0 2px #ffd700, -20px -50px 8px 2px rgba(255,215,0,0.6),
        25px 45px 0 2px #ff6600, 25px 45px 8px 2px rgba(255,102,0,0.6);
}

/* Spotlight sweep - ::after - contained within tile */
.yule-band-tile.locked.just-locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    border-radius: 10px; /* Match tile border radius */
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,215,0,0.1) 30%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,215,0,0.1) 70%,
        transparent 100%
    );
    pointer-events: none;
    animation: spotlightSweep 4s ease-in-out 1s infinite;
    z-index: 20;
}

/* Electric crackle border effect - uses a wrapper element we'll add via JS */
.yule-band-tile.locked.just-locked .electric-crackle {
    position: absolute;
    inset: -3px;
    border-radius: 13px;
    pointer-events: none;
    z-index: 15;
    opacity: 1;
    animation: electricFadeIn 0.3s ease-out forwards, electricCrackle 0.15s ease-in-out infinite;
}

.yule-band-tile.locked.just-locked .electric-crackle::before,
.yule-band-tile.locked.just-locked .electric-crackle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 13px;
    pointer-events: none;
}

.yule-band-tile.locked.just-locked .electric-crackle::before {
    border: 2px solid transparent;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,215,0,0.8) 20%, 
        rgba(255,255,255,1) 25%, 
        rgba(255,215,0,0.8) 30%,
        transparent 50%,
        rgba(100,200,255,0.8) 70%,
        rgba(255,255,255,1) 75%,
        rgba(100,200,255,0.8) 80%,
        transparent 100%
    ) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: electricBorderMove 0.5s linear infinite;
}

.yule-band-tile.locked.just-locked .electric-crackle::after {
    box-shadow: 
        inset 0 0 8px rgba(255,215,0,0.4),
        inset 0 0 20px rgba(100,200,255,0.2),
        0 0 15px rgba(255,215,0,0.3),
        0 0 30px rgba(100,200,255,0.15);
    animation: electricGlow 0.2s ease-in-out infinite alternate;
}

/* Subtle persistent crackle after initial burst - add .subtle class via JS after 3s */
.yule-band-tile.locked.just-locked .electric-crackle.subtle {
    animation: electricCrackleSubtle 0.4s ease-in-out infinite;
    opacity: 0.4;
}

.yule-band-tile.locked.just-locked .electric-crackle.subtle::before {
    animation: electricBorderMoveSlow 2s linear infinite;
}

.yule-band-tile.locked.just-locked .electric-crackle.subtle::after {
    animation: electricGlowSubtle 0.5s ease-in-out infinite alternate;
}

@keyframes particleBurst1 {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

@keyframes particleBurst2 {
    0% {
        transform: translate(-50%, -50%) scale(0.2) rotate(30deg);
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.8) rotate(60deg);
        opacity: 0;
    }
}

/* Elastic pop-in animation - starts at 1.5x, snaps down to 1x */
@keyframes elasticPop {
    0% { transform: scale(1.5); }
    30% { transform: scale(0.9); }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.97); }
    85% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes crazyBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    15% { transform: scale(1.06) rotate(-1.5deg); }
    30% { transform: scale(0.96) rotate(1.5deg); }
    45% { transform: scale(1.04) rotate(-1deg); }
    60% { transform: scale(0.98) rotate(1deg); }
    75% { transform: scale(1.02) rotate(-0.5deg); }
    90% { transform: scale(1) rotate(0.5deg); }
}

@keyframes glowFade {
    0% { box-shadow: 0 0 35px rgba(255,215,0,1), 0 0 70px rgba(255,215,0,0.6); }
    40% { box-shadow: 0 0 28px rgba(220,180,0,0.7), 0 0 50px rgba(180,130,0,0.4); }
    70% { box-shadow: 0 0 22px rgba(100,80,0,0.4), 0 0 35px rgba(50,40,0,0.2); }
    100% { box-shadow: 0 0 20px rgba(0,0,0,1), 0 0 40px rgba(0,0,0,0.8); }
}

/* Subtle pulse after crazy bounce ends */
@keyframes subtlePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 25px rgba(255,215,0,0.3), 0 0 50px rgba(255,215,0,0.15); }
    50% { transform: scale(1.02); box-shadow: 0 0 30px rgba(255,215,0,0.4), 0 0 60px rgba(255,215,0,0.2); }
}

/* Spotlight sweep animation */
@keyframes spotlightSweep {
    0% { left: -100%; opacity: 0; }
    10% { opacity: 1; }
    45% { left: 150%; opacity: 1; }
    50% { left: 150%; opacity: 0; }
    55% { left: -100%; opacity: 0; }
    60% { opacity: 1; }
    95% { left: 150%; opacity: 1; }
    100% { left: 150%; opacity: 0; }
}

/* Electric crackle animations */
@keyframes electricFadeIn {
    0% { opacity: 0; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes electricCrackle {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(1px, -1px) scale(1.002); }
    50% { transform: translate(-1px, 1px) scale(0.998); }
    75% { transform: translate(1px, 1px) scale(1.001); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes electricCrackleSubtle {
    0% { transform: translate(0, 0); }
    50% { transform: translate(0.5px, -0.5px); }
    100% { transform: translate(0, 0); }
}

@keyframes electricBorderMove {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes electricBorderMoveSlow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes electricGlow {
    0% { 
        box-shadow: 
            inset 0 0 8px rgba(255,215,0,0.4),
            inset 0 0 20px rgba(100,200,255,0.2),
            0 0 15px rgba(255,215,0,0.3),
            0 0 30px rgba(100,200,255,0.15);
    }
    100% { 
        box-shadow: 
            inset 0 0 12px rgba(255,215,0,0.6),
            inset 0 0 25px rgba(100,200,255,0.3),
            0 0 20px rgba(255,215,0,0.5),
            0 0 40px rgba(100,200,255,0.25);
    }
}

@keyframes electricGlowSubtle {
    0% { 
        box-shadow: 
            inset 0 0 4px rgba(255,215,0,0.15),
            inset 0 0 10px rgba(100,200,255,0.08),
            0 0 8px rgba(255,215,0,0.1),
            0 0 15px rgba(100,200,255,0.05);
    }
    100% { 
        box-shadow: 
            inset 0 0 6px rgba(255,215,0,0.2),
            inset 0 0 12px rgba(100,200,255,0.1),
            0 0 10px rgba(255,215,0,0.15),
            0 0 20px rgba(100,200,255,0.08);
    }
}

.yule-band-logo {
    width: 52px;
    height: 52px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yule-band-logo img,
.yule-band-logo video {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.yule-band-text {
    display: flex;
    flex-direction: column;
}

.yule-band-name {
    font-size: 20px;
    line-height: 1.15;
    font-weight: 800;
}

.yule-band-time {
    font-size: 20px;
    opacity: 0.8;
}

/* ===== CENTER AREA ===== */
/* Note: .yule-center class no longer used, replaced by .yule-col-center */

/* ===== CORNER LOGOS (now in footer row) ===== */
/* Legacy corner logo styles kept for backward compatibility */
.yule-corner-logo {
    position: absolute;
    width: 150px;
    height: 150px;
    z-index: 50;
    pointer-events: none;
}

.yule-corner-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.yule-corner-logo.bottom-left {
    left: 22px;
    bottom: 22px;
}

.yule-corner-logo.bottom-right {
    right: 22px;
    bottom: 22px;
}

.yule-main-logo {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yule-main-logo > img,
.yule-main-logo > video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Phase videos (changeover, intermission) should cover the space */
.yule-main-logo > video {
    object-fit: cover;
}

/* Hide mobile view on desktop */
.yule-mobile-view {
    display: none;
}

.yule-mobile-timer-bar {
    display: none;
}

/* ===== FOOTER TIMER (DESKTOP) ===== */
.yule-footer {
    text-align: center;
    font-size: 18px;
    margin-top: 14px;
}

.yule-timer {
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 140px;
    line-height: 1;
    transition: color 0.3s;
}

.yule-timer.over {
    color: #ff3b30;
}

/* ===== MOBILE TOP TIMER (hidden on desktop) ===== */
.yule-top-timer {
    display: none;
    text-align: center;
    font-weight: 900;
    letter-spacing: 1px;
    margin-top: 6px;
}

.yule-top-timer.over {
    color: #ff3b30;
}

/* ========================================
   MOBILE (Portrait & Landscape) - Vertical Scrolling Stacked Layout
   ======================================== */
@media (max-width: 900px) {
    html, body {
        height: auto !important;
        min-height: 100vh;
        overflow-y: scroll !important;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .yule-fullscreen {
        height: auto !important;
        min-height: 100vh !important;
        position: static !important;
    }
    
    .yule-projector {
        height: auto !important;
        min-height: 100vh !important;
        position: static !important;
    }
    
    .yule-wrap {
        height: auto !important;
        min-height: 100vh !important;
    }
    
    .yule-mobile-view {
        display: none !important;
    }
    
    .yule-corner-logo {
        display: none !important;
    }
    
    .yule-desktop-view {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        padding: 20px 16px 40px;
        gap: 24px;
    }
    
    .yule-row-main {
        display: contents;
        height: auto !important;
    }
    
    .yule-row-footer {
        display: contents;
        height: auto !important;
    }
    
    /* Order: Brand → Band Image → Timer → Heat1 → Heat2 → Footer Logos */
    .yule-col-center {
        order: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        width: 100%;
    }
    
    .yule-brand img {
        max-height: 70px !important;
    }
    
    .yule-main-logo {
        width: 70vw;
        max-width: 280px;
        aspect-ratio: 1;
        border-radius: 20px;
        overflow: hidden;
        position: relative;
    }
    
    /* On mobile, elf overlay fills the already-square parent completely */
    .yule-elf-overlay {
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        height: 100%;
        aspect-ratio: unset;
    }
    
    .yule-footer-center {
        order: 2;
        width: 100%;
        text-align: center;
    }
    
    .yule-timer {
        font-size: 56px !important;
    }
    
    .yule-col-heat1 {
        order: 3;
        width: 100%;
        max-width: 420px;
    }
    
    .yule-col-heat2 {
        order: 4;
        width: 100%;
        max-width: 420px;
    }
    
    .yule-heat-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .yule-heat-tiles {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .yule-band-tile {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        padding: 12px 14px !important;
        gap: 14px;
        height: auto !important;
        width: 100% !important;
        aspect-ratio: unset !important;
        margin: 0 !important;
    }
    
    /* Preserve active animation on mobile */
    .yule-band-tile.active {
        animation: activePulse 3s ease-in-out infinite !important;
    }
    
    .yule-tile-slot {
        display: block !important;
        position: static !important;
        font-size: 14px;
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }
    
    .yule-tile-logo {
        width: 50px !important;
        height: 50px !important;
        flex-shrink: 0;
    }
    
    .yule-band-logo {
        width: 50px !important;
        height: 50px !important;
    }
    
    .yule-band-text {
        flex: 1;
        min-width: 0;
    }
    
    .yule-tile-name,
    .yule-band-name {
        font-size: 16px !important;
        opacity: 1 !important;
        position: static !important;
        padding: 0 !important;
        background: none !important;
        text-align: left !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .yule-tile-time,
    .yule-band-time {
        font-size: 13px !important;
        opacity: 0.7 !important;
        position: static !important;
        transform: none !important;
        bottom: auto !important;
        left: auto !important;
        text-align: left !important;
    }
    
    .yule-footer-left {
        order: 5;
        width: auto !important;
        height: auto !important;
        margin-top: 20px;
    }
    
    .yule-footer-left img {
        height: 60px !important;
        width: auto !important;
    }
    
    .yule-footer-right {
        order: 6;
        width: auto !important;
        height: auto !important;
    }
    
    .yule-footer-right img {
        height: 60px !important;
        width: auto !important;
    }
}

/* ========================================
   FULL-SCREEN OVERLAYS
   ======================================== */
.yule-overlay-wrap {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    pointer-events: none;
}

.yule-overlay-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Spitfire overlay - sits under presents, fills screen without cropping */
.yule-overlay-spitfire {
    z-index: 99998;
    background: #000;
}

.yule-overlay-spitfire img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

/* Presents overlay - on top, flashes, stays contained */
.yule-overlay-presents {
    z-index: 99999;
    transition: opacity 0.15s ease;
}

.yule-overlay-presents.hidden,
.yule-overlay-spitfire.hidden,
.yule-overlay-thankyou.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Bogue Eye overlay hidden state */
.yule-eye-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Elf mode - covers the band logo area with solid background, maintains square aspect ratio */
.yule-elf-overlay {
    position: absolute;
    /* Center within parent, maintain square aspect ratio */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Square aspect ratio - use smaller of width/height */
    width: min(100%, calc(100vh - 400px));  /* Account for header/footer */
    max-width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: #000;
    transition: opacity 0.15s ease;
    overflow: hidden;
}

.yule-elf-overlay img,
.yule-elf-overlay video {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* Contain, not cover, to prevent cropping */
    object-position: center;
}

.yule-elf-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Elf mode text overlay - neon effect */
.yule-elf-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    width: 90%;
    padding: 5%;
    box-sizing: border-box;
    text-align: center;
    font-family: 'Midruns Script', cursive;
    font-size: clamp(48px, 8vw, 120px);
    color: var(--text-color, #ff00ff);
    -webkit-text-stroke: 3px var(--stroke-color, #000000);
    paint-order: stroke fill;
    text-shadow: 
        0 0 5px var(--glow-color, #ff00ff),
        0 0 10px var(--glow-color, #ff00ff),
        0 0 20px var(--glow-color, #ff00ff),
        0 0 40px var(--glow-color, #ff00ff),
        0 0 80px var(--glow-color, #ff00ff);
    animation: neonPulse 2s ease-in-out infinite alternate;
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    pointer-events: none;
}

@keyframes neonPulse {
    0% {
        text-shadow: 
            0 0 5px var(--glow-color, #ff00ff),
            0 0 10px var(--glow-color, #ff00ff),
            0 0 20px var(--glow-color, #ff00ff),
            0 0 40px var(--glow-color, #ff00ff);
    }
    100% {
        text-shadow: 
            0 0 10px var(--glow-color, #ff00ff),
            0 0 20px var(--glow-color, #ff00ff),
            0 0 40px var(--glow-color, #ff00ff),
            0 0 80px var(--glow-color, #ff00ff),
            0 0 120px var(--glow-color, #ff00ff);
    }
}

/* Changeover text overlay */
.yule-changeover-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    width: auto;
    max-width: 90%;
    padding: 15px 30px;
    box-sizing: border-box;
    text-align: center;
    font-family: 'Bebas Neue', 'Impact', sans-serif;
    font-size: clamp(32px, 5vw, 72px);
    font-weight: bold;
    color: var(--text-color, #ffffff);
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    pointer-events: none;
    background: color-mix(in srgb, var(--bg-color, #000000) 70%, transparent);
    border-radius: 8px;
    transition: opacity 0.15s ease;
}

.yule-changeover-text.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Message Text Overlay - same styling as changeover text */
.yule-message-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    width: auto;
    max-width: 90%;
    padding: 15px 30px;
    box-sizing: border-box;
    text-align: center;
    font-family: 'Bebas Neue', 'Impact', sans-serif;
    font-size: clamp(32px, 5vw, 72px);
    font-weight: bold;
    color: var(--text-color, #ffffff);
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    pointer-events: none;
    background: color-mix(in srgb, var(--bg-color, #000000) 70%, transparent);
    border-radius: 8px;
    transition: opacity 0.15s ease;
}

.yule-message-text.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===== VIDEO EFFECTS ===== */
.yule-main-logo.video-grayscale video {
    filter: grayscale(100%);
}

.yule-main-logo.video-high-contrast video {
    filter: contrast(1.4);
}

.yule-main-logo.video-brightness-crush video {
    filter: contrast(1.6) brightness(0.85);
}

.yule-main-logo.video-desaturate video {
    filter: saturate(0.3);
}

/* Combine filters when multiple are active */
.yule-main-logo[data-video-filters] video {
    filter: var(--video-filter, none);
}

/* Noise/grain overlay - only when video is present */
.yule-main-logo.video-noise.has-video::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.12;
    mix-blend-mode: overlay;
    pointer-events: none;
    animation: noiseShift 0.1s steps(2) infinite;
}

@keyframes noiseShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(1px, 1px); }
}

/* Color channel shift / glitch */
.yule-main-logo.video-glitch video {
    animation: glitchShift 3s ease-in-out infinite;
}

@keyframes glitchShift {
    0%, 90%, 100% { filter: none; }
    92% { filter: hue-rotate(20deg) saturate(1.5); }
    94% { filter: hue-rotate(-20deg) saturate(0.8); }
    96% { filter: hue-rotate(10deg) contrast(1.2); }
    98% { filter: hue-rotate(-10deg) brightness(1.1); }
}

/* Fast glitch */
.yule-main-logo.video-glitch-fast video {
    animation: glitchShiftFast 1s ease-in-out infinite;
}

@keyframes glitchShiftFast {
    0%, 85%, 100% { filter: none; }
    87% { filter: hue-rotate(30deg) saturate(1.5); }
    89% { filter: hue-rotate(-30deg) saturate(0.8); }
    91% { filter: hue-rotate(15deg) contrast(1.3); }
    93% { filter: hue-rotate(-15deg) brightness(1.1); }
    95% { filter: hue-rotate(45deg); }
    97% { filter: hue-rotate(-45deg); }
}

/* Vignette effect - only when video is present */
.yule-main-logo.video-vignette.has-video::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Scanlines effect - only when video is present */
.yule-main-logo.video-scanlines.has-video::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0,0,0,0.15) 0px,
        rgba(0,0,0,0.15) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 3;
}

/* Blend mode overlays - only when video is present */
.yule-main-logo.video-blend-multiply.has-video::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(200, 0, 0, 0.15);
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 2;
}

.yule-main-logo.video-blend-luminosity video {
    mix-blend-mode: luminosity;
}

.yule-main-logo.video-blend-color video {
    mix-blend-mode: color;
}

/* ===== PHASE IMAGES ===== */
.yule-phase-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
}

.yule-phase-overlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ===== BOGUE EYE OVERLAY ===== */
.yule-eye-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    aspect-ratio: 1;
    z-index: 20;
    pointer-events: none;
}

.bogue-eye-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.8));
}

/* Blood vessels pulse animation */
.blood-vessels {
    animation: vesselPulse 3s ease-in-out infinite;
}

@keyframes vesselPulse {
    0%, 100% { opacity: 1; filter: url(#vesselGlow); }
    50% { opacity: 0.85; }
}

/* Individual vessel animations for organic feel */
.vessel-main {
    animation: vesselThrob 2.5s ease-in-out infinite;
}

.vessel-branch {
    animation: vesselThrob 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

.vessel-thick {
    animation: vesselThrobThick 2s ease-in-out infinite;
}

@keyframes vesselThrob {
    0%, 100% { stroke-width: inherit; opacity: inherit; }
    50% { opacity: calc(inherit + 0.1); }
}

@keyframes vesselThrobThick {
    0%, 100% { stroke-width: 2; }
    50% { stroke-width: 2.5; }
}

/* Iris/pupil looking around */
.iris-group {
    animation: lookAround 8s ease-in-out infinite;
    transform-origin: 50px 50px;
}

@keyframes lookAround {
    0%, 20% { transform: translate(0, 0); }
    25% { transform: translate(5px, -3px); }
    35% { transform: translate(5px, -3px); }
    40% { transform: translate(-6px, 2px); }
    55% { transform: translate(-6px, 2px); }
    60% { transform: translate(3px, 5px); }
    70% { transform: translate(3px, 5px); }
    75% { transform: translate(-2px, -4px); }
    85% { transform: translate(-2px, -4px); }
    90%, 100% { transform: translate(0, 0); }
}

/* Pupil dilation */
.pupil {
    animation: dilate 4s ease-in-out infinite alternate;
    transform-origin: 50px 50px;
}

@keyframes dilate {
    0% { r: 9; }
    50% { r: 11; }
    100% { r: 8; }
}

/* Bloodshot intensity increases periodically */
.blood-vessels path {
    transition: stroke 0.5s ease, stroke-width 0.3s ease;
}

.blood-vessels:hover path {
    stroke: #ff2020;
}
