/*
 * Theme: Watercolor
 * Soft, elegant aesthetic with creamy paper backgrounds
 */

/* SatsukiGendaiMincho Font */
@font-face {
    font-family: 'SatsukiGendaiMincho';
    src: url('/fonts/SatsukiGendaiMincho-M.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'BostonAngel';
    src: url('/fonts/Boston Angel Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Background Colors */
body {
    background-color: #F3EDDE;
    background-image: url('/wedding_theme_elements/watercolor_background.webp');
    background-size: cover;
    background-attachment: fixed;
    --watercolor-anim-duration: 2s;
}

/* Question Slide Backgrounds (Admin Dashboard) */
.question-slide {
    background-color: #F3EDDE;
    background-image: url('/wedding_theme_elements/watercolor_background.webp');
    background-size: cover;
    border: none;
    box-shadow: none;
    overflow: hidden;
    /* Ensure elements don't spill out */
    position: relative;
}

/* Disable old pseudo-elements */
.question-slide::before,
.question-slide::after,
.question-slide .question-input-container::before,
.question-slide .question-input-container::after {
    content: none;
    display: none;
}

/* Decor Elements */
.theme-decor {
    position: absolute;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
    display: block;
}

/* Bouquet Top Left */
.theme-decor.decor-1 {
    left: -104px;
    top: -151px;
    width: 411px;
    height: 431px;
    transform: rotate(66.5deg);
    z-index: 10;
    background-image: url('/wedding_theme_elements/corner_bouquet.png');
}

/* Bouquet Top Right */
.theme-decor.decor-2 {
    left: 655px;
    top: -83px;
    width: 337px;
    height: 361px;
    transform: rotate(161deg);
    z-index: 10;
    background-image: url('/wedding_theme_elements/corner_bouquet.png');
}

/* Ink Splash Left */
.theme-decor.decor-3 {
    left: -145px;
    top: -33px;
    width: 356px;
    height: 320px;
    transform: rotate(99.5deg);
    z-index: 1;
    background-image: url('/wedding_theme_elements/watercolor_blue_ink_splash.webp');
    opacity: 0.7;
}

/* Ink Splash Right */
.theme-decor.decor-4 {
    left: 548px;
    top: -199px;
    width: 337px;
    height: 340px;
    transform: rotate(0deg);
    z-index: 1;
    background-image: url('/wedding_theme_elements/watercolor_blue_ink_splash.webp');
    opacity: 0.7;
}

/* Question Input Container */
.question-slide .question-input-container {
    /* Reset to relative flow */
    position: relative;
    left: auto;
    top: auto;
    width: 612px;
    /* Keep width preference */
    height: auto;
    transform: none;
    transform: none;
    z-index: 30;
    margin: 1rem auto;
    /* Center horizontally with margin */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Font Override */
.question-slide .question-input {
    font-family: 'SatsukiGendaiMincho', serif !important;
    text-shadow: none;
    color: #4a4a4a;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    /* Override font size if necessary to fit? The user container is 48px high. 
       Standard font is 1.75rem (~28px). Should fit. */
}

.question-slide .answer-input {
    font-family: 'SatsukiGendaiMincho', serif !important;
    color: #4a4a4a;
}

/* Global Override for animation sprites in this theme */
.animation-sprite {
    animation-duration: var(--watercolor-anim-duration) !important;
}

/* Media Layout Container */
.question-slide .media-layout-container {
    /* Reset to relative flow */
    position: relative;
    left: auto;
    top: auto;
    width: 413px;
    height: auto;
    transform: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    /* Center horizontally */
}

/* Ensure inner media elements fill container or center */
.question-slide .media-selection-grid,
.question-slide .filled-media-wrapper,
.question-slide .media-upload-area {
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: auto !important;
}

/* For media selection grid specifically, ensure 2 cols fill height */
.question-slide .media-selection-grid {
    height: 100%;
    align-items: stretch;
}

.question-slide .media-option {
    aspect-ratio: auto !important;
    height: auto !important;
}

/* Answers Grid - Reset to allow absolute children */
.question-slide .answers-grid {
    display: block;
    /* Not grid */
    position: static;
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
}

/* Answer Cards with Watercolor Option Box */
.question-slide .answer-card {
    position: absolute;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    min-height: 0;
    /* User set fixed heights */
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
}

/* Re-implement Shape via mask-image on pseudo-element or container?
   In CSS we can't easily add a new div, but we can use ::before.
   User playground used .answer-card-bg div. We have to stick to ::before on .answer-card.
*/
.question-slide .answer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;

    -webkit-mask-image: url('/wedding_theme_elements/watercolor_option_select_box.png');
    mask-image: url('/wedding_theme_elements/watercolor_option_select_box.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    background-color: rgba(255, 255, 255, 0.5);
}

/* Option 1 */
.question-slide .answer-card.choice-1 {
    left: 114px;
    top: 276px;
    width: 370px;
    height: 144px;
    transform: rotate(0deg);
    z-index: 10;
}

.question-slide .answer-card.choice-1 .correct-indicator {
    left: 80%;
    right: auto;
}

.question-slide .answer-card.choice-1::before {
    background-color: rgba(240, 98, 146, 0.5);
}

/* Option 2 - FLIPPED H&V */
.question-slide .answer-card.choice-2 {
    left: 434px;
    top: 280px;
    width: 374px;
    height: 138px;
    transform: scaleX(-1) scaleY(-1);
    z-index: 10;
}

/* Counter-transform for content */
.question-slide .answer-card.choice-2 .answer-input,
.question-slide .answer-card.choice-2 .correct-indicator {
    transform: scaleX(-1) scaleY(-1);
}

.question-slide .answer-card.choice-2 .correct-indicator {
    left: 10%;
    right: auto;
    /* Ensure transform is combined if tick has other transforms? 
       Actually correct-indicator usually has translateY(-50%). 
       We must include it. */
    transform: translateY(-50%) scaleX(-1) scaleY(-1);
}

.question-slide .answer-card.choice-2 .answer-input {
    /* Input flipped back + vertical offset to align with choice-1 */
    transform: scaleX(-1) scaleY(-1) translateY(-11px) translateX(5px);
    direction: ltr;
    /* Ensure text direction is correct? */
}

.question-slide .answer-card.choice-2::before {
    background-color: rgba(174, 213, 129, 0.5);
    /* No need to flip here if parent is flipped, UNLESS we want double flip? 
       No, we flipped the parent which flips everything including ::before. 
       So ::before is already flipped. */
}

/* Option 3 - Flip V */
.question-slide .answer-card.choice-3 {
    left: 106px;
    top: 389px;
    width: 369px;
    height: 144px;
    transform: scaleY(-1);
    z-index: 10;
}

/* Counter-transform */
.question-slide .answer-card.choice-3 .answer-input {
    transform: scaleY(-1) translateY(-1px) translateX(5px);
    /* Included y offset from config */
}

.question-slide .answer-card.choice-3 .correct-indicator {
    left: 82%;
    right: auto;
    transform: translateY(-50%) scaleY(-1);
}

.question-slide .answer-card.choice-3::before {
    background-color: rgba(255, 183, 77, 0.5);
    /* mask flip controlled by parent now */
}

/* Option 4 - Flip V */
.question-slide .answer-card.choice-4 {
    left: 440px;
    top: 386px;
    width: 359px;
    height: 146px;
    transform: scaleY(-1);
    z-index: 10;
}

/* Counter-transform */
.question-slide .answer-card.choice-4 .answer-input {
    transform: scaleY(-1) translateY(-2px);
    /* Included y offset from config */
}

.question-slide .answer-card.choice-4 .correct-indicator {
    left: 83%;
    right: auto;
    transform: translateY(-50%) scaleY(-1);
}

.question-slide .answer-card.choice-4::before {
    background-color: rgba(77, 182, 172, 0.5);
}

/* Answer Input Text Styling */
.question-slide .answer-card .answer-input {
    color: #4a4a4a !important;
    text-shadow: none;
    font-size: 1.8rem;
    background: transparent !important;
}

.question-slide .answer-card .answer-input::placeholder {
    color: rgba(74, 74, 74, 0.5) !important;
}

/* Correct indicator styling for watercolor */
.question-slide .correct-indicator {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(74, 74, 74, 0.3);
}

.question-slide .correct-indicator.selected {
    background: rgba(56, 142, 60, 0.7);
    border-color: #388E3C;
}

/* Slide Preview Thumbnails */
/* Need to ensure previews also look vaguely correct? 
   Previews use scaling. Absolute positioning works relative to scaled container.
   But previews might lack the 'theme-decor' elements unless we add them there too.
   For now, just focus on main slide.
*/
.slide-preview {
    background: #F3EDDE;
}

/* Lobby/Waiting Screens */
.lobby-screen,
#lobby,
#waiting-screen,
#get-ready-screen {
    background-color: #F3EDDE;
    background-image: url('/wedding_theme_elements/watercolor_background.webp');
    background-size: cover;
    background-position: center;
}

/* Question ideas button */
.question-slide .question-ideas-btn {
    font-family: 'SatsukiGendaiMincho', serif !important;
    background: rgba(243, 237, 222, 0.8);
    border: 2px solid rgba(74, 74, 74, 0.2);
    margin-top: 5px;
}

/* Fix Flattened Sprite Animation in Media Container */
.question-slide .animation-preview {
    width: auto !important;
    height: 100% !important;
    aspect-ratio: 4/3 !important;
    max-width: none !important;
    flex: none !important;
}

/* Ensure wrapper hugs the content (animation width) instead of filling 413px */
.question-slide .filled-media-wrapper {
    width: auto !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 auto !important;
    /* Center the wrapper */
}

/* Make the container flexible to fill remaining height after buttons */
.question-slide .filled-media-container {
    flex: 1 1 auto !important;
    width: auto !important;
    height: auto !important;
    /* Let flex handle height */
    aspect-ratio: 4/3 !important;
    /* Enforce ratio at container level too to drive width */
    min-height: 0 !important;
}

/* Buttons bar should just match the width */
.question-slide .media-action-bar {
    width: 100% !important;
    /* Match the wrapper width */
    height: 48px !important;
    flex: 0 0 48px !important;
    box-sizing: border-box !important;
}

/* Couple Question Specific Layout */
.question-slide .couple-display-container {
    padding: 0;
    gap: 4rem;
    align-items: flex-end;
    height: 100%;
}

.question-slide .couple-sprite-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 250px;
}

.question-slide .couple-sprite-view {
    overflow: hidden;
    /* Keep hidden to show only one frame */
    /* Remove scale to match default style */
    transform: none;
    transform-origin: bottom center;
    margin-bottom: 0;
}

.question-slide .couple-inner-crop {
    width: 100%;
    height: 100%;
    transform: scale(1.1);
    transform-origin: center center;
}

.question-slide .couple-sprite-sheet {
    animation-duration: var(--watercolor-anim-duration) !important;
}

.question-slide .couple-label {
    /* Reset label position to flow naturally below sprite */
    position: static;
    bottom: auto;
    font-family: 'SatsukiGendaiMincho', serif !important;
    font-size: 1.5rem !important;
    padding: 8px 30px !important;
    background: transparent !important;
    color: #4a4a4a !important;
    border: none !important;
    box-shadow: none !important;
    min-width: unset;
    z-index: 20;
    margin-top: 10px;
}

/* Groom Label Style */
.question-slide .couple-sprite-box:first-child .couple-label {
    background-color: transparent !important;
    color: #4a4a4a !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: bold;
}

.question-slide .couple-sprite-box:last-child .couple-label {
    background: transparent !important;
    color: #4a4a4a !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: bold;
}

/* ============================================
   MOBILE RESPONSIVE STYLES (DASHBOARD)
   ============================================ */
@media (max-width: 768px) {
    .question-slide {
        height: auto;
        min-height: 100vh;
        /* Allow it to grow */
        aspect-ratio: auto;
        /* Remove fixed aspect ratio */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 10px;
        overflow-y: auto;
        /* Allow scrolling if needed */
    }

    /* Adjust Decor for Mobile (Scale down or hide if obstructive) */
    .theme-decor.decor-1 {
        /* Top Left */
        width: 150px;
        height: 150px;
        left: -20px;
        top: -20px;
    }

    .theme-decor.decor-2 {
        /* Top Right */
        width: 120px;
        height: 120px;
        right: -20px;
        left: auto;
        /* Reset left */
        top: -10px;
    }

    .theme-decor.decor-3,
    .theme-decor.decor-4 {
        display: none;
        /* Hide ink splashes on mobile to save space */
    }

    /* Reposition Question Input */
    .question-slide .question-input-container {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 95%;
        margin-top: 40px;
        /* Space for top decor */
        margin-bottom: 20px;
        height: auto;
    }

    /* Reposition Media Container */
    .question-slide .media-layout-container {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 300px;
        height: auto;
        margin-bottom: 20px;
        display: flex;
        justify-content: center;
    }

    /* Adjust Answers Grid */
    .question-slide .answers-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 10px;
        height: 30vh;
        width: 100%;
        margin-top: auto;
        /* Push to bottom if space permits */
    }

    /* Reset Answer Cards */
    .question-slide .answer-card {
        position: relative;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0;
        margin: 0;
        transform: none !important;
        /* Remove flips for readability on small screens? Or keep them? */
        /* If we remove flips, we must also reset the inner counter-transforms */
    }

    /* Reset Choice 2 inner transforms */
    /* Reset Choice 2 inner transforms */
    .question-slide .answer-card.choice-2 .answer-input {
        transform: none;
    }

    .question-slide .answer-card.choice-2 .correct-indicator {
        transform: translateY(-50%);
    }

    /* Force media wrapper to fill the container on mobile */
    .question-slide .filled-media-wrapper {
        width: 80% !important;
        max-width: 100% !important;
    }

    .question-slide .answer-card.choice-2 .correct-indicator {
        left: auto;
        right: 10px;
        /* Standardize tick position */
    }

    /* Reset Choice 3 inner transforms */
    .question-slide .answer-card.choice-3 .answer-input {
        transform: none;
    }

    .question-slide .answer-card.choice-3 .correct-indicator {
        transform: translateY(-50%);
        left: auto;
        right: 10px;
    }

    /* Reset Choice 4 inner transforms */
    .question-slide .answer-card.choice-4 .answer-input {
        transform: none;
    }

    .question-slide .answer-card.choice-4 .correct-indicator {
        transform: translateY(-50%);
        left: auto;
        right: 10px;
    }

    /* Adjust font sizes for mobile */
    .question-slide .question-input {
        font-size: 1.8rem !important;
    }

    .question-slide .answer-card .answer-input {
        font-size: 1.1rem;
    }

    .question-slide .couple-sprite-view {
        transform: scale(1.5) !important;
    }
}


/* ============================================
   GAME SCREEN (HOST) WATERCOLOR THEME STYLES
   ============================================ */

/* Game Screen Background */
.game-screen {
    background-color: #F3EDDE !important;
    background-image: url('/wedding_theme_elements/watercolor_background.webp') !important;
    background-size: cover !important;
    position: relative !important;
    height: 100vh !important;
    overflow: hidden !important;
}

/* Theme Decor Elements for Game Screen */
.game-screen .theme-decor {
    position: absolute;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
    display: block;
}

/* Decor bouquet top left */
.game-screen .theme-decor.decor-1 {
    left: -10.63vw;
    top: -17.36vh;
    width: 42.99vw;
    height: 71.45vh;
    transform: rotate(66.5deg);
    z-index: 10;
    background-image: url('/wedding_theme_elements/corner_bouquet.png');
    background-position: center;
}

/* Decor bouquet top right */
.game-screen .theme-decor.decor-2 {
    left: 71.25vw;
    top: -16.67vh;
    width: 34.38vw;
    height: 65.28vh;
    transform: rotate(166.1deg);
    z-index: 10;
    background-image: url('/wedding_theme_elements/corner_bouquet.png');
    background-position: center;
}

/* Decor ink splash left */
.game-screen .theme-decor.decor-3 {
    left: -15.70vw;
    top: -20.14vh;
    width: 40.83vw;
    height: 67.69vh;
    transform: rotate(-36.2deg);
    z-index: 1;
    background-image: url('/wedding_theme_elements/watercolor_blue_ink_splash.webp');
    opacity: 0.7;
}

/* Decor ink splash right */
.game-screen .theme-decor.decor-4 {
    left: 57.97vw;
    top: -32.08vh;
    width: 38.91vw;
    height: 69.17vh;
    transform: rotate(0deg);
    z-index: 1;
    background-image: url('/wedding_theme_elements/watercolor_blue_ink_splash.webp');
    opacity: 0.7;
}

/* Question Header */
.game-screen header {
    position: absolute;
    left: 16.95vw;
    top: 6.67vh;
    width: 64.14vw;
    height: auto;
    padding: 0;
    z-index: 20;
}

.game-screen .header-content-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.game-screen h1#questionText,
.game-screen header h1 {
    font-family: 'SatsukiGendaiMincho', serif !important;
    text-shadow: none;
    color: #4a4a4a;
    width: 100%;
}

/* Skip Button */
.game-screen .skip-button {
    position: fixed !important;
    left: 89.30vw !important;
    top: 88.75vh !important;
    width: 9.06vw !important;
    height: 6.67vh !important;
    right: auto !important;
    bottom: auto !important;
    transform: none;
    z-index: 25;
    background-color: transparent !important;
    color: rgba(74, 74, 74, 0.5) !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2px 2px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-screen .skip-button:hover {
    color: rgba(74, 74, 74, 0.9) !important;
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Timer Display */
.game-screen .timer-container {
    position: absolute !important;
    left: 12.27vw;
    top: 34.5vh;
    width: 6.25vw;
    height: auto !important;
    z-index: 15;
    transform: translateY(-55%);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Timer text styling */
.game-screen .timer-value {
    background: transparent !important;
    font-family: 'SatsukiGendaiMincho', serif !important;
    color: #4a4a4a !important;
    font-size: 4rem !important;
    padding: 0;
}

/* Answer Counter */
.game-screen .counter-container {
    position: absolute !important;
    left: 81.64vw;
    top: 34.5vh;
    width: 6.25vw;
    height: auto !important;
    z-index: 15;
    transform: translateY(-50%);
    right: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.game-screen .counter-value {
    background: transparent !important;
    font-family: 'SatsukiGendaiMincho', serif !important;
    color: #4a4a4a !important;
    font-size: 4rem !important;
    padding: 0;
}

.game-screen .counter-label {
    background: transparent !important;
    font-family: 'SatsukiGendaiMincho', serif !important;
    color: #4a4a4a !important;
    font-size: 2.5rem !important;
    margin-top: 10px;
    padding: 0;
}

/* Main Area Reset */
.game-screen .main-area {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    /* Override game.css flex */
}

.game-screen .top-section {
    position: static;
    width: 100%;
    height: 100%;
    max-width: none;
}

/* Media Area */
.game-screen .media-layout-container {
    position: absolute !important;
    left: 33.59vw;
    top: 23vh;
    width: 33.59vw;
    height: 31.94vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.game-screen.image-question-layout .timer-container {
    top: 44vh !important;
}

.game-screen.image-question-layout .counter-container {
    top: 44vh !important;
}

/* ===== IMAGE QUESTION LAYOUT OVERRIDES ===== */
/* For user-uploaded image slides: larger centered image, shorter answer cards */
.game-screen.image-question-layout .media-layout-container {
    /* Override absolute positioning to center the image */
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: 20vh !important;
    width: 50vw !important;
    height: 53vh !important;
    max-height: 48vh !important;
}

.game-screen.image-question-layout .media-container {
    width: 100% !important;
    height: 100% !important;
}

.game-screen.image-question-layout .answer-card {
    /* Reduce height to max 1/5 of screen */
    height: 18vh !important;
    padding-left: 60px !important;
    /* ← Add this. Increase for more shift right */

}

.game-screen.image-question-layout .answer-card.choice-1 {
    top: 70vh !important;
    height: 16vh !important;
}

.game-screen.image-question-layout .answer-card.choice-2 {
    justify-content: flex-end !important;
    padding-right: 60px !important;
    /* ← Add this for the flipped card */
    top: 70vh !important;
    height: 16vh !important;
}

.game-screen.image-question-layout .answer-card.choice-3 {
    top: 83vh !important;
    height: 16vh !important;
}

.game-screen.image-question-layout .answer-card.choice-4 {
    top: 83vh !important;
    height: 16vh !important;
}

.game-screen .media-container {
    position: static !important;
    width: 100%;
    height: 100%;
    /* aspect-ratio: auto !important; Removed to allowing JS sizing */
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.game-screen .media-img {
    filter: none !important;
    object-fit: contain;
}

/* Couple Sprites Area */
/* Couple Sprites Area - CUSTOMIZE HERE */
/* To edit size and position, adjust the values in this section */
.game-screen .couple-display-container {
    position: absolute !important;
    z-index: 10;

    /* POSITIONING */
    top: 25vh;
    /* MAIN CONTROL: Lower value = Higher up across the screen */
    left: 50%;
    /* Horizontal center */
    transform: translateX(-50%);

    /* SPACING */
    gap: 8rem;
    /* Space between Groom (Left) and Bride (Right) */

    /* Layout - Do not typically need to change */
    width: auto;
    height: auto;
    justify-content: center;
    align-items: flex-end;
    padding: 0;
}

/* --- COUPLE SPRITE BOX (Container for sprite + label) --- */
/* VERTICAL POSITION: Adjust bottom value to move BOTH sprite and label together */
.game-screen .couple-sprite-box {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

/* --- GROOM SPRITE BOX (Left) - Position Adjustment --- */
.game-screen .couple-sprite-box:first-child {
    bottom: 80px;
    /* Move entire groom sprite + label UP. Increase to lift higher. */
}

/* --- BRIDE SPRITE BOX (Right) - Position Adjustment --- */
.game-screen .couple-sprite-box:last-child {
    bottom: 80px;
    /* Move entire bride sprite + label UP. Increase to lift higher. */
}

/* --- GROOM SPRITE VIEW (Left Character) --- */
.game-screen .couple-sprite-box:first-child .couple-sprite-view {
    /* SIZE: Adjust scale to change size */
    transform: scale(1.5);
    transform-origin: bottom center;

    /* Base Dimensions (Do not change) */
    width: 120px;
    height: 144px;
    position: relative;
    overflow: hidden;
}

/* --- BRIDE SPRITE VIEW (Right Character) --- */
.game-screen .couple-sprite-box:last-child .couple-sprite-view {
    /* SIZE: Adjust scale to change size */
    transform: scale(1.5);
    transform-origin: bottom center;

    /* Base Dimensions (Do not change) */
    width: 120px;
    height: 144px;
    position: relative;
    overflow: hidden;
}

.game-screen .couple-inner-crop {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;

    /* CROP SCALE: Matches --sprite-crop-scale in player/index.html (1.1) */
    transform: scale(1.1);
    transform-origin: center center;
}

.game-screen .couple-sprite-sheet {
    width: 480px;
    height: 576px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    image-rendering: auto;
    /* Use crisp edges if preferred */
    position: absolute;
    top: 0;
    left: 0;
    animation: couple-walk 2s steps(4) infinite;
}

/* --- LABEL STYLING --- */
.game-screen .couple-label {
    font-family: 'SatsukiGendaiMincho', serif !important;
    font-size: 2rem !important;
    color: #4a4a4a !important;

    /* GAP CONTROL: Adjust margin-top to change distance between sprite and label */
    margin-top: 1rem;
    /* Fixed gap below sprite */
}


/* Answers Grid */
.game-screen .answers-grid {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    /* Override game.css max-width: 1250px */
    grid-template-columns: none !important;
    /* Override game.css grid */
}

/* Answer Cards Common */
.game-screen .answer-card {
    position: absolute !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-family: 'SatsukiGendaiMincho', serif !important;
    color: #4a4a4a !important;
    transition: filter 2s ease, opacity 2s ease;
}

.game-screen .answer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    -webkit-mask-image: url('/wedding_theme_elements/watercolor_option_select_box.png');
    mask-image: url('/wedding_theme_elements/watercolor_option_select_box.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color 2s ease, filter 2s ease, opacity 2s ease;
}

.game-screen .answer-card:active {
    transform: none !important;
}

/* Option 1 */
.game-screen .answer-card.choice-1 {
    left: 10.55vw;
    top: 56.39vh;
    width: 42.81vw;
    height: 24.17vh;
    z-index: 10;
    justify-content: flex-start;
    padding-left: 90px;
}

.game-screen .answer-card.choice-1::before {
    background-color: rgba(240, 98, 146, 0.5);
}

/* Option 2 (FlipH, FlipV) */
.game-screen .answer-card.choice-2 {
    left: 48.05vw;
    top: 56.11vh;
    width: 40.47vw;
    height: 25.00vh;
    /* Flipped container, so we unflip content */
    transform: scaleX(-1) scaleY(-1);
    z-index: 10;
    justify-content: flex-end;
    /* Text on visual left (logical right) */
    padding-right: 90px;
}

.game-screen .answer-card.choice-2::before {
    background-color: rgba(174, 213, 129, 0.5);
}

.game-screen .answer-card.choice-2 span {
    transform: scaleX(-1) scaleY(-1);
    display: inline-block;
}

/* Option 3 (FlipV) */
.game-screen .answer-card.choice-3 {
    left: 10.39vw;
    top: 74.72vh;
    width: 42.19vw;
    height: 25.28vh;
    transform: scaleY(-1);
    z-index: 10;
    justify-content: flex-start;
    padding-left: 90px;
}

.game-screen .answer-card.choice-3::before {
    background-color: rgba(255, 183, 77, 0.5);
}

.game-screen .answer-card.choice-3 span {
    transform: scaleY(-1);
    display: inline-block;
}

/* Option 4 (FlipV) */
.game-screen .answer-card.choice-4 {
    left: 47.81vw;
    top: 74.72vh;
    width: 40.78vw;
    height: 25.28vh;
    transform: scaleY(-1);
    z-index: 10;
    justify-content: flex-start;
    padding-left: 90px;
}

.game-screen .answer-card.choice-4::before {
    background-color: rgba(77, 182, 172, 0.5);
}

.game-screen .answer-card.choice-4 span {
    transform: scaleY(-1);
    display: inline-block;
}

/* Correct Answer Opacity Increase */
.game-screen .answer-card.correct::before {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

.game-screen .answer-card.choice-1.correct::before {
    background-color: rgba(240, 98, 146, 0.9) !important;
}

.game-screen .answer-card.choice-2.correct::before {
    background-color: rgba(174, 213, 129, 0.9) !important;
}

.game-screen .answer-card.choice-3.correct::before {
    background-color: rgba(255, 183, 77, 0.9) !important;
}

.game-screen .answer-card.choice-4.correct::before {
    background-color: rgba(77, 182, 172, 0.9) !important;
}

/* Vote Counts - Independent IDs */
/* Vote Counts - Independent IDs */
.game-screen .vote-count {
    position: absolute !important;
    top: -5px !important;
    right: -15px !important;
    left: auto !important;
    bottom: auto !important;
    background: none !important;
    color: #252827;
    font-family: 'BostonAngel', sans-serif;
    font-size: 4rem;
    width: 6.25vw;
    height: 11.1vh;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 25;
    border: none !important;
    box-shadow: none !important;
    padding-bottom: 10px;
}

.game-screen .vote-count::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    -webkit-mask-image: url('/wedding_theme_elements/water_color_circle.png');
    mask-image: url('/wedding_theme_elements/water_color_circle.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.2);
    /* Default fallback */

    /* --- CONTROL OPACITY HERE --- */
    opacity: 0.7;
}

/* Specific Vote Positions & Colors (Solid RGB) */

/* Vote 1 (Choice 1 - Pink) */
.game-screen #vote-0 {
    /* Position handled by parent class */
}

.game-screen #vote-0::before {
    background-color: rgb(240, 98, 146);
}

/* Vote 2 (Choice 2 - Green) */
.game-screen #vote-1 {
    /* Position handled by parent class */
}

.game-screen #vote-1::before {
    background-color: rgb(174, 213, 129);
}

/* Vote 3 (Choice 3 - Orange) */
.game-screen #vote-2 {
    /* Position handled by parent class */
}

.game-screen #vote-2::before {
    background-color: rgb(255, 183, 77);
}

/* Vote 4 (Choice 4 - Teal) */
.game-screen #vote-3 {
    /* Position handled by parent class */
}

.game-screen #vote-3::before {
    background-color: rgb(77, 182, 172);
}

/* Correct State Overrides - Unified Opacity */
.game-screen .answer-card.correct .vote-count::before {
    /* --- CONTROL REVEAL OPACITY HERE --- */
    opacity: 0.9 !important;
}

/* Incorrect State - Match answer card dimming */
.game-screen .answer-card.incorrect .vote-count,
.game-screen .answer-card.dimmed .vote-count {
    filter: grayscale(75%) opacity(70%);
}

.game-screen .vote-count.visible {
    display: flex !important;
}

/* Common text styling tweaks */
.game-screen .timer-value,
.game-screen .counter-value,
.game-screen .counter-label,
.game-screen .skip-button {
    font-family: 'SatsukiGendaiMincho', serif !important;
}

/* Transition Screen */
.transition-screen {
    background-color: #F3EDDE !important;
    background-image: url('/wedding_theme_elements/watercolor_background.webp') !important;
    background-size: cover !important;
}

.transition-screen h1,
.transition-screen .transition-question {
    font-family: 'SatsukiGendaiMincho', serif !important;
    text-shadow: none;
    color: #4a4a4a;
}

.transition-screen .transition-timer {
    font-family: 'SatsukiGendaiMincho', serif !important;
    background-color: rgba(74, 74, 74, 0.9);
}

/* Leaderboard Screen */
.leaderboard-screen {
    background-color: #F3EDDE !important;
    background-image: url('/wedding_theme_elements/watercolor_background.webp') !important;
    background-size: cover !important;
}

.leaderboard-screen h1,
.leaderboard-screen .leaderboard-item {
    font-family: 'SatsukiGendaiMincho', serif !important;
}

/* Podium Screen */
.podium-screen {
    background-color: #F3EDDE !important;
    background-image: url('/wedding_theme_elements/watercolor_background.webp') !important;
    background-size: cover !important;
}

.podium-screen .podium-title,
.podium-screen .player-name,
.podium-screen .player-score,
.podium-screen .full-leaderboard-title,
.podium-screen .leaderboard-name,
.podium-screen .leaderboard-score {
    font-family: 'SatsukiGendaiMincho', serif !important;
}

/* ============================================
   TRANSITION SCREEN REDESIGN (WATERCOLOR)
   ============================================ */

.transition-screen {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

/* Hide legacy elements if present */
.transition-screen .transition-timer {
    display: none !important;
}

/* Decorative Elements */
.transition-decor {
    position: absolute;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10;
}

/* Bottom Corners: Bouquet */
.t-decor-1 {
    left: -10vw;
    bottom: -20vh;
    width: 60vw;
    height: 70vh;
    background-image: url('/wedding_theme_elements/corner_bouquet.png');
    transform: rotate(10deg);
}

.t-decor-2 {
    right: -7vw;
    bottom: -19vh;
    width: 60vw;
    height: 70vh;
    background-image: url('/wedding_theme_elements/corner_bouquet.png');
    transform: scaleX(-1);
}

/* Side Splashes: Blue Ink */
.t-decor-3 {
    left: -5vw;
    top: 30vh;
    width: 25vw;
    height: 40vh;
    background-image: url('/wedding_theme_elements/watercolor_blue_ink_splash.webp');
    opacity: 0.8;
    transform: rotate(-10deg);
}

.t-decor-4 {
    right: -5vw;
    top: -5vh;
    width: 25vw;
    height: 40vh;
    background-image: url('/wedding_theme_elements/watercolor_blue_ink_splash.webp');
    opacity: 0.8;
    transform: rotate(190deg);
}

/* Center Scene */
.transition-center-scene {
    position: relative;
    width: 80vw;
    height: 50vh;
    background-image: url('/wedding_theme_elements/watercolor_wedding_scene.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-top: -10vh;
    /* slightly above center */
    margin-bottom: 2vh;
    z-index: 20;
}

/* Text inside Scene */
.scene-content {
    font-family: 'SatsukiGendaiMincho', serif;
    font-size: 2rem;
    color: #4a4a4a;
    margin-bottom: 10.5vh;
    /* "bottom 70% of screen" interpreted as inside image near bottom */
    font-weight: bold;
    letter-spacing: 0.2rem;
}

/* Question Title */
.transition-question {
    font-size: 3.5rem !important;
    color: #4a4a4a !important;
    text-shadow: none !important;
    z-index: 20;
    margin: 0;
    max-width: 80%;
    margin-bottom: 3vh;
}

/* Shrinking Timer Line */
.timer-line-container {
    width: 50%;
    height: 4px;
    background: transparent;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 20;
    /* border-bottom: 1px solid rgba(0,0,0,0.1); Optional guide line */
}

.timer-line {
    background-color: #a6adad;
    /* Matching blue/green theme */
    height: 100%;
    width: 100%;
}

.timer-line.shrinking {
    animation: shrinkLine 3s linear forwards;
}

@keyframes shrinkLine {
    0% {
        width: 100%;
        opacity: 1;
    }

    95% {
        width: 0%;
        opacity: 1;
    }

    100% {
        width: 0%;
        opacity: 0;
    }
}

/* ============================================
   LOBBY SCREEN WEDDING THEME STYLES
   ============================================ */

/* 
   CUSTOMIZATION GUIDE:
   --------------------
   - To change POTISION: Adjust 'left' (horizontal) and 'top' (vertical) percentages.
     Example: left: 50vw; top: 50vh; (Centers the element)
   
   - To change SIZE: Adjust 'font-size' for text, 'width'/'height' for images/blocks.
     Example: font-size: 5rem; width: 40vw;
*/

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

.lobby-screen {
    position: relative;
    display: block;
    min-height: 100vh;
    overflow: hidden;
}

/* Decorative Elements */
.lobby-decor {
    position: absolute;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
}

/* Top Left: Corner Bouquet */
.lobby-decor-1 {
    left: -5.62vw;
    top: -5.56vh;
    width: 37.83vw;
    height: 52.34vh;
    background-image: url('/wedding_theme_elements/corner_bouquet.png');
    transform: rotate(-0.2deg) scaleY(-1);
    z-index: 1;
}

/* Top Right: Leaderboard Bouquet */
.lobby-decor-2 {
    left: 82vw;
    top: -36.53vh;
    width: 45.08vw;
    height: 86.94vh;
    background-image: url('/wedding_theme_elements/leaderboard_bouquet.png');
    transform: rotate(-51.4deg);
    z-index: 10;
}

/* Bottom Left: Ink Splash */
.lobby-decor-3 {
    left: -10.47vw;
    top: 37.08vh;
    width: 32.89vw;
    height: 44.72vh;
    background-image: url('/wedding_theme_elements/watercolor_blue_ink_splash.webp');
    transform: rotate(82.7deg);
    opacity: 1;
    z-index: 1;
}

/* Bottom Right: Ink Splash */
.lobby-decor-4 {
    left: 58.28vw;
    top: 84.86vh;
    width: 30.00vw;
    height: 35.00vh;
    background-image: url('/wedding_theme_elements/watercolor_blue_ink_splash.webp');
    transform: rotate(-30deg) scaleX(-1);
    opacity: 1;
    z-index: 1;
}

/* Top Right: Ink Splash */
.lobby-decor-5 {
    left: 70.78vw;
    top: -20.00vh;
    width: 34.53vw;
    height: 54.72vh;
    background-image: url('/wedding_theme_elements/watercolor_blue_ink_splash.webp');
    transform: rotate(18.2deg);
    opacity: 0.6;
    filter: saturate(1.5);
    z-index: 1;
}

/* Main Title - Centered at top */
/* Main Title - Centered at top */
.lobby-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 5vh;
    font-family: 'ChenYuluoyan', serif !important;
    font-size: 5rem;
    font-weight: normal !important;
    color: #4b5147;
    text-shadow: none;
    z-index: 20;
    white-space: nowrap;
    margin: 0;
    text-align: center;
}

/* Hide the old flex layout wrapper */
.lobby-content {
    display: contents;
}

.lobby-left,
.lobby-right {
    display: contents;
}

/* QR Section Heading - Left aligned with QR code */
/* QR Section Heading - Left aligned with QR code */
.lobby-left .lobby-heading {
    position: absolute;
    left: 13vw;
    /* EDIT POSITION HERE */
    top: 19.5vh;
    /* EDIT POSITION HERE */
    font-family: 'ChenYuluoyan', serif !important;
    /* CHANGED FONT */
    font-size: 3.6rem;
    /* EDIT SIZE HERE */
    color: #1f3917;
    margin: 0;
    font-weight: normal;
    text-align: left;
    z-index: 10;
}

/* Thai-specific: Smaller heading for longer Thai text */
html[lang="th"] .lobby-left .lobby-heading {
    font-size: 4rem;
    top: 18vh;
    /* Move down to align bottom with player count */
}

/* QR Code Container - No Padding, Fill Space */
.lobby-qrcode {
    position: absolute;
    left: 13vw;
    /* EDIT POSITION HERE */
    top: 29vh;
    /* EDIT POSITION HERE */
    width: 37vw !important;
    /* EDIT SIZE HERE */
    height: 60vh;
    /* EDIT SIZE HERE */
    background: transparent;
    padding: 0;
    border-radius: 4px;
    display: flex;
    justify-content: flex-start;
    /* Left align the QR code image */
    align-items: flex-start;
    /* Ensure top alignment matches player grid */
    z-index: 10;
    overflow: hidden;
}

.lobby-qrcode img,
.lobby-qrcode canvas,
.lobby-qrcode svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top left;
}

/* Watercolor Underline */
.lobby-underline {
    position: absolute;
    left: 10vw;
    top: 89vh;
    width: 45vw;
    height: 10vh;
    background-image: url('/wedding_theme_elements/watercolor_underline.png');

    /* CHANGE THESE TWO LINES: */
    background-size: 100% 100%;
    /* This allows it to stretch */
    background-position: left;
    /* This anchors it to the left */

    background-repeat: no-repeat;
    filter: saturate(1.5);
    z-index: 10;
}

/* Manual Join Elements - Removed as per request */

/* Player Count - Aligned with 掃碼加入 heading */
.lobby-player-count {
    position: absolute;
    left: 57.03vw;
    /* EDIT POSITION HERE */
    top: 15vh;
    /* Same as .lobby-left .lobby-heading */
    font-family: 'ChenYuluoyan', serif !important;
    /* CHANGED FONT */
    font-size: 6rem;
    /* EDIT SIZE HERE */
    color: #1f3917;
    z-index: 10;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.lobby-player-count #playerCount {
    font-size: 7rem;
    /* EDIT SIZE HERE */
    font-weight: bold;
    color: #1f3917;
    transform: translateY(0.8rem);
}

.lobby-player-label {
    /* "位玩家已加入" text */
    font-size: 4rem;
    /* EDIT SIZE HERE */
    color: #607e75;
    /* EDIT POSITION: This element follows the number. Move the whole ".lobby-player-count" block to change position. */
}

/* Player Grid - 2 columns, max 5 per column, no border */
.lobby-player-grid {
    position: absolute;
    left: 57.03vw;
    /* EDIT POSITION HERE */
    top: 30vh;
    /* Below player count */
    width: 35vw;
    /* EDIT SIZE HERE */
    max-height: 68vh;
    columns: 2;
    column-gap: 2rem;
    overflow: visible;
    z-index: 10;
    border: none;
    border-radius: 0;
    padding: 0;
    box-sizing: border-box;
}

.lobby-empty-message {
    column-span: all;
    height: 55vh;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;

    font-family: 'ChenYuluoyan', serif;
    color: #4a4a4a;
    font-size: 4rem;
    pointer-events: none;
}

@keyframes fadeInPlayer {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lobby-player-name {
    font-size: 3rem;
    /* EDIT SIZE HERE */
    color: #1f3917;
    padding: 0 4px;
    background: transparent;
    border-radius: 4px;
    white-space: normal;
    word-break: break-word;
    display: block;
    margin-bottom: 2rem;
    break-inside: avoid;
    height: auto;
    text-align: left;
    line-height: 1;
    animation: fadeInPlayer 1s ease-out forwards;
}

/* Start Button - Discreet in bottom right */
.lobby-start-btn {
    position: absolute;
    right: auto;
    left: 85.94vw;
    /* EDIT POSITION HERE */
    bottom: auto;
    top: 91.67vh;
    /* EDIT POSITION HERE */
    font-family: 'SatsukiGendaiMincho-M', serif !important;
    /* CHANGED FONT */
    font-size: 1.35rem;
    font-weight: bold;
    padding: 11px 27px;
    background: transparent;
    color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(74, 85, 104, 0.3);
    border-radius: 4px;
    cursor: pointer;
    z-index: 1000 !important;
    /* Ensure it is above all decor */
    transition: all 0.3s ease;
}

.lobby-start-btn:hover {
    background: rgba(31, 57, 23, 0.1);
    color: rgba(0, 0, 0, 0.8);
    border-color: rgba(31, 57, 23, 0.5);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .lobby-left .lobby-heading {
        font-size: 3rem;
    }

    .lobby-player-count {
        font-size: 3rem;
    }

    .lobby-player-count #playerCount {
        font-size: 3rem;
    }

    .lobby-player-label {
        font-size: 2rem;
    }

    .lobby-player-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 900px) {
    .lobby-left .lobby-heading {
        left: 10vw;
        font-size: 2.5rem;
    }

    .lobby-qrcode {
        left: 10vw;
        width: 35vw;
        height: auto;
    }

    .lobby-underline {
        left: 8vw;
        width: 40vw;
    }

    .lobby-player-count {
        left: 52vw;
        font-size: 2.5rem;
    }

    .lobby-player-count #playerCount {
        font-size: 2.5rem;
    }

    .lobby-player-label {
        font-size: 1.8rem;
    }

    .lobby-player-grid {
        left: 52vw;
        width: 42vw;
        gap: 0.5rem 1rem;
    }

    .lobby-player-name {
        font-size: 1.3rem;
    }
}

@media (max-width: 600px) {

    /* Stack layout vertically on mobile */
    .lobby-left .lobby-heading {
        left: 50%;
        transform: translateX(-50%);
        top: 5vh;
        text-align: center;
    }

    .lobby-qrcode {
        left: 50%;
        transform: translateX(-50%);
        top: 12vh;
        width: 60vw;
        height: 35vh;
    }

    .lobby-underline {
        left: 50%;
        transform: translateX(-50%);
        top: 48vh;
        width: 65vw;
    }

    .lobby-player-count {
        left: 50%;
        transform: translateX(-50%);
        top: 55vh;
        font-size: 2rem;
    }

    .lobby-player-count #playerCount {
        font-size: 2rem;
    }

    .lobby-player-label {
        font-size: 1.5rem;
    }

    .lobby-player-grid {
        left: 50%;
        transform: translateX(-50%);
        top: 62vh;
        width: 85vw;
        max-height: 30vh;
    }

    .lobby-player-name {
        font-size: 1.2rem;
    }

    .lobby-start-btn {
        left: 50%;
        transform: translateX(-50%);
        top: 93vh;
    }

    .lobby-empty-message {
        height: 30vh;
        /* Match mobile grid max-height */
    }
}

/* ============================================
   LEADERBOARD SCREEN WATERCOLOR THEME STYLES
   ============================================ */

/* Leaderboard Screen Container */
.leaderboard-screen {
    background-color: #F3EDDE !important;
    background-image: url('/wedding_theme_elements/watercolor_background.webp') !important;
    background-size: cover !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Use 100% to avoid scrollbar width issues */
    height: 100vh;
    z-index: 100;
    overflow: hidden;
    display: none;
    /* Controlled by JS */
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8vh 0 0 0 !important;
    /* Remove side padding to ensure clean centering */
}

/* Common Decor Styles */
.leaderboard-decor {
    position: absolute;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10;
}

/* 1. Top Left Ink Splash */
.leaderboard-decor.decor-top-left {
    top: -15vh;
    left: -10vw;
    width: 50vw;
    height: 50vh;
    background-image: url('/wedding_theme_elements/watercolor_blue_ink_splash.webp');
    transform: rotate(-15deg);
    opacity: 1;
    z-index: 1;
}

/* 2. Top Right Ink Splash */
.leaderboard-decor.decor-top-right {
    top: -40vh;
    right: -27vw;
    width: 65vw;
    height: 65vh;
    background-image: url('/wedding_theme_elements/watercolor_blue_ink_splash.webp');
    transform: rotate(-90deg);
    opacity: 1;
    z-index: 1;
}

/* 3. Left Side Bouquet (Leaderboard Bouquet) 
   "Place a leaderboard_bouquet.png on the left of the screen. 
   Make sure it spans from the top to the bottom of the page...
   left half is out of view" -> visible part is right half.
*/
.leaderboard-decor.decor-left-side {
    top: 15vh;
    left: -30vw;
    /* Pull left to hide left half */
    width: 50vw;
    /* Assume wide enough */
    height: 100vh;
    background-image: url('/wedding_theme_elements/leaderboard_bouquet.png');
    background-position: center right;
    /* Align so we see the right side? */
    /* If the image is the bouquet itself, just positioning it left:-X should work */
    background-size: cover;
    z-index: 15;
}

/* 4. Bottom Bouquet (Leaderboard Bouquet)
   "Bottom of the page, oriented horizontally with only 1/4 of it visible, rest beyond the page."
*/
.leaderboard-decor.decor-bottom {
    bottom: -40vh;
    /* Hide most of it */
    left: 50%;
    transform: translateX(-50%) rotate(-90deg);
    /* Rotate to make horizontal if it's vertical source */
    width: 120vh;
    /* Make it long */
    height: 60vw;
    background-image: url('/wedding_theme_elements/leaderboard_bouquet.png');
    background-size: contain;
    z-index: 15;
    transform-origin: center;
}

/* 5. Bottom Right Bouquet (Corner Bouquet, Flipped) */
.leaderboard-decor.decor-bottom-right {
    bottom: -10vh;
    right: -8vw;
    width: 40vw;
    height: 60vh;
    background-image: url('/wedding_theme_elements/corner_bouquet.png');
    transform: scaleX(-1);
    z-index: 15;
}

/* Wrapper for Intrinsic Sizing */
.leaderboard-wrapper {
    display: flex;
    flex-direction: column;
    width: 60vw;
    min-width: 600px;
    max-width: 90vw;
    margin: 0 auto;
    align-items: stretch;
    position: relative;
    z-index: 20;
}

/* Header Section */
.leaderboard-header {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-bottom: 4vh;
    width: 100%;
    /* Fill wrapper */
}

.leaderboard-header .header-icon {
    height: 12vh;
    width: auto;
    margin-right: 2rem;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.1));
}

.leaderboard-header .header-text {
    font-family: 'SatsukiGendaiMincho', serif;
    font-size: 5rem;
    color: #4a5a3a;
    /* Dark olive/green standard for watercolor text usually, or #4a4a4a */
    color: #444;
    letter-spacing: 0.1em;
    font-weight: normal;
    text-transform: uppercase;
    margin: 0;
    text-shadow: none;
    white-space: nowrap;
    /* Prevent wrapping */
}

/* Content Wrapper */
/* Content Wrapper */
.leaderboard-content {
    position: relative;
    width: 100%;
    /* Fill wrapper */
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* List Styling */
.leaderboard-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    /* Align baseline? Center is safer */
    align-items: center;
    padding: 1rem 0;
    border-bottom: 2px solid #555;
    background: transparent !important;
    border: none !important;
    /* Reset inherited borders */
    border-bottom: 3px solid #6b705c !important;
    /* Watercolorish dark line */
    /* Watercolorish dark line */
    box-shadow: none !important;
    margin: 0 !important;
    max-width: none !important;
    /* Allow stretch */
    width: 100% !important;
}

.leaderboard-item span {
    font-family: 'SatsukiGendaiMincho', serif;
    font-size: 2.5rem;
    color: #333;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Rank + Name */
.leaderboard-item span:first-child {
    text-align: left;
}

/* Score */
.leaderboard-item span:last-child {
    text-align: right;
    font-size: 2.5rem;
    min-width: 150px;
}

/* Skip Button */
.lb-skip-button {
    position: absolute;
    right: -150px;
    /* Outside the list */
    bottom: 0;
    background: transparent;
    border: none;
    font-family: 'SatsukiGendaiMincho', serif;
    font-size: 1.2rem;
    color: #888;
    cursor: pointer;
    padding: 10px;
    z-index: 30;
    transition: color 0.3s;
}

.lb-skip-button:hover {
    color: #333;
}

/* Reset any inherited retro styles specifically */
.leaderboard-item.top-1,
.leaderboard-item.top-2,
.leaderboard-item.top-3 {
    background: transparent !important;
    border-width: 0 !important;
    border-bottom: 3px solid #6b705c !important;
}

/* Fix for uploaded images overlapping answer cards */
.question-slide .filled-media-container.is-image {
    max-height: 130px !important;
    /* Prevent overlap with answer cards at top: 276px */
    width: auto !important;
    display: flex;
    justify-content: center;
}

.question-slide .filled-media-container.is-image img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* Media Action Bar - Minimalist */
.question-slide .media-action-bar {
    background: transparent !important;
    border: none !important;
    height: 32px !important;
    /* Smaller height */
    justify-content: center;
    gap: 10px;
}

/* Media Action Buttons */
.question-slide .media-action-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: auto !important;
    padding: 4px 8px !important;
    color: #888 !important;
    /* Low key color */
    flex: 0 0 auto !important;
    /* Don't stretch */
    font-size: 1rem !important;
}

.question-slide .media-action-btn:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #333 !important;
    transform: none !important;
    /* Remove movement */
}

.question-slide .media-action-btn.delete-btn:hover {
    background: rgba(211, 47, 47, 0.1) !important;
    color: #d32f2f !important;
}

/* ============================================
   NEW PODIUM SCREEN (WATERCOLOR REDESIGN)
   ============================================ */

/* Main Screen Override */
.podium-screen.watercolor-podium {
    background-color: #F3EDDE;
    background-image: url('/wedding_theme_elements/watercolor_background.webp');
    background-size: cover;
    justify-content: center;
    /* Center vertically */
    padding-bottom: 0;
}

/* Decorative Elements */
.podium-decor {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    transition: all 0.5s ease;
}

/* 1. Watercolor Blue Ink Splash (Top Left) */
.p-decor-1 {
    top: -5vh;
    left: -5vw;
    width: 35vw;
    height: auto;
    transform: rotate(180deg);
    opacity: 1;
}

/* 2. Watercolor Blue Ink Splash (Top Right) */
.p-decor-2 {
    top: -39vh;
    right: -10vw;
    width: 40vw;
    height: auto;
    transform: rotate(90deg);
    /* Adjust rotation for variation */
    opacity: 1;
}

/* 3. Corner Bouquet (Bottom Left) */
.p-decor-3 {
    bottom: -15vh;
    left: -10vw;
    width: 35vw;
    height: auto;
    transform: rotate(0deg);
}

/* 4. Corner Bouquet (Bottom Right) */
.p-decor-4 {
    bottom: -10vh;
    right: -8vw;
    width: 30vw;
    height: auto;
    transform: scaleX(-1);
    z-index: 5;
    /* Flip horizontally for symmetry */
}

/* Center Bottom Elements */
.p-decor-ring {
    bottom: 0vh;
    left: 50%;
    transform: translateX(-50%);
    width: 22vw;
    max-width: 330px;
    /* Cap size */
    height: auto;
}

.p-decor-center {
    bottom: -19vh;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    max-width: 750px;
    height: auto;
    z-index: 6;
}

/* Title */
.podium-title-new {
    position: absolute;
    top: 9.5vh;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'SatsukiGendaiMincho', serif;
    font-size: 4.5rem;
    color: #4a4a4a;
    /* Dark Text */
    margin: 0;
    z-index: 20;
    white-space: nowrap;
    letter-spacing: 0.5rem;
    font-weight: normal;
    /* Override browser h1 default */
}

/* Layout Container */
.podium-new-layout {
    display: flex;
    width: 80%;
    max-width: 1400px;
    height: 80vh;
    /* Occupy middle */
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 15;
    margin-top: 10vh;
    /* Push down slightly from title */
    gap: 4rem;
    /* Gap between columns */
}

/* Columns */
.podium-col-left,
.podium-col-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Changed from center to flex-start for top alignment */
    height: 100%;
    padding-top: 16vh;
    /* Push down to middle-ish area, but aligned */
}

.podium-col-left {
    align-items: flex-start;
    padding-left: 2rem;
    padding-top: 17vh;
    /* Shift down relative to right col */
}

.podium-col-right {
    align-items: flex-end;
    padding-right: 2rem;
    /* removed padding-bottom */
}

/* Typography & Lists */

/* Left Column Rows (Large Names) */
.podium-row-left {
    display: flex;
    align-items: baseline;
    margin-bottom: 3.2rem;
    font-family: 'SatsukiGendaiMincho', serif;
    color: #4a4a4a;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 1s ease;
}

.podium-row-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.p-rank {
    font-size: 3.8rem;
    /* removed font-weight: bold */
    letter-spacing: 11px;
}

.p-name {
    font-size: 3.8rem;
    /* Larger than 4rem */
    letter-spacing: 11px;
    text-transform: uppercase;
}

/* Right Column Rows (Top 5 List) */
.podium-row-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.42rem 0;
    border-bottom: 2px solid #4a4a4a;
    /* Line separator */
    margin-bottom: 0rem;
    font-family: 'SatsukiGendaiMincho', serif;
    color: #4a4a4a;
    opacity: 0;
    transform: translateX(20px);
    transition: all 1.5s ease;
    width: 100%;
    max-width: 450px;
}

.podium-row-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.podium-row-right:last-child {
    border-bottom: none;
}

.p-right-left-group {
    display: flex;
    align-items: baseline;
    min-width: 0;
    /* Flex fix */
    flex: 1;
}

.p-rank-small {
    font-size: 1.8rem;
    margin-right: 1.3rem;
    width: 3rem;
    letter-spacing: 6px;
    /* Fixed width for alignment */
}

.p-name-small {
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
}

.p-score {
    font-size: 1.8rem;
    margin-left: 1rem;
    letter-spacing: 6px;
    /* removed font-weight: bold */
}

/* ============================================
   START GAME COUNTDOWN SCREEN
   ============================================ */

.start-countdown-container {
    position: relative;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    /* Ensure it fills the screen so centering works */
    min-height: 50vh;
}

#start-count-val {
    font-family: 'SatsukiGendaiMincho', serif;
    font-size: 15rem;
    color: #4a4a4a;
    text-shadow: none;
    margin: 0;
    padding: 2rem;
    line-height: 1.2;
}

.game-screen .animation-sprite {
    transform: scale(0.75);
    /* Adjust this value to your liking */
    transform-origin: top center;
}

/* ==========================================================================
   Refined Layout Fixes for Nested Vote Counts
   ========================================================================== */

/* Counter-transforms for nested vote counts inside flipped cards */

/* Choice 2: Flipped X and Y */
/* Visual Top-Right = Logical Bottom-Left */
.game-screen .answer-card.choice-2 .vote-count {
    transform: scaleX(-1) scaleY(-1);
    top: auto !important;
    bottom: -5px !important;
    right: auto !important;
    left: -20px !important;
}

/* Choice 3 & 4: Flipped Y Only */
/* Visual Top-Right = Logical Bottom-Right */
.game-screen .answer-card.choice-3 .vote-count,
.game-screen .answer-card.choice-4 .vote-count {
    transform: scaleY(-1);
    top: auto !important;
    bottom: -30px !important;
    /* Right is unchanged */
}