﻿/* ============================================================
   ALVA QUIZ â€” style.css
   Target: 1080 x 1920 portrait kiosk
   ============================================================ */

@font-face {
    font-family: 'MadeOuterSans';
    src: url('../assets/fonts/made_outer_sans_thin.otf') format('opentype');
    font-weight: 100;
    font-style: normal;
}
@font-face {
    font-family: 'MadeOuterSans';
    src: url('../assets/fonts/made_outer_sans_light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'MadeOuterSans';
    src: url('../assets/fonts/made_outer_sans_regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'MadeOuterSans';
    src: url('../assets/fonts/made_outer_sans_medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'MadeOuterSans';
    src: url('../assets/fonts/made_outer_sans_bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'MadeOuterSans';
    src: url('../assets/fonts/made_outer_sans_black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

/* ---- Reset & Base ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --w: 1080px;
    --h: 1920px;
    --green:  #f70000;
    --green2: #cc0000;
    --blue:   #f70000;
    --dark:   #050a14;
    --glass:  rgba(5, 10, 20, 0.72);
    --glass2: rgba(247, 0, 0, 0.08);
    --border: rgba(247, 0, 0, 0.25);
    --radius: 28px;
    --font:   'MadeOuterSans', sans-serif;
}

html, body {
    width: var(--w);
    height: var(--h);
    overflow: hidden;
    background: #000;
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

/* ---- Screen Layer ---------------------------------------- */
.screen {
    position: absolute;
    inset: 0;
    width: var(--w);
    height: var(--h);
    display: none;
    overflow: hidden;
}
.screen.active { display: block; }

#s1 {
    opacity: 0;
    transition: opacity 1s ease;
}
#s1.active {
    display: block;
}
#s1.fade-in-done {
    opacity: 1;
}

/* ---- Video Background ------------------------------------ */
.video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* ---- Dark Gradient Overlay ------------------------------- */
.overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 120px;
    background: linear-gradient(
        to top,
        rgba(5,10,20,0.92) 0%,
        rgba(5,10,20,0.55) 45%,
        transparent 100%
    );
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#s-loading {
    background: #000;
    z-index: 100;
    transition: opacity 0.8s ease;
}
#s-loading.fade-out {
    opacity: 0;
    pointer-events: none;
}
.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 80px;
}
.loading-logo {
    width: 280px;
    opacity: 0.9;
}
.loading-title {
    font-size: 36px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    letter-spacing: 8px;
    text-transform: uppercase;
}
.loading-bar-wrap {
    width: 700px;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}
.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--green), var(--blue));
    border-radius: 3px;
    transition: width 0.3s ease;
}
.loading-status {
    font-size: 30px;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
    letter-spacing: 2px;
}
.loading-pct {
    font-size: 80px;
    font-weight: 900;
    color: var(--green);
    text-shadow: 0 0 40px rgba(247,0,0,0.5);
    line-height: 1;
}

/* ============================================================
   STATE 0 â€” IDLE
   ============================================================ */
/* ============================================================
   STATE 2-5 â€” QUESTION
   ============================================================ */
.question-overlay {
    justify-content: center;
    background: transparent;
    padding: 80px;
    padding-bottom: 80px; /* Override the 120px bottom padding from .overlay */
    gap: 40px;
}

.question-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(255,255,255,0.1);
    z-index: 10;
}
.question-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--blue));
    transition: width 0.5s ease;
}

.question-counter {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}
.question-num {
    font-size: 96px;
    font-weight: 900;
    color: var(--green);
    line-height: 1;
    text-shadow: 0 0 40px rgba(247,0,0,0.5);
}
.question-of {
    font-size: 40px;
    font-weight: 400;
    color: rgba(0,0,0,0.5);
}

.question-text {
    font-size: 52px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    text-align: left;
    width: 100%;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}

.choices-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
}

/* wrapper = border layer dengan clip-path */
.choice-btn-wrap {
    width: 100%;
    padding: 2px;
    background: rgba(0,0,0,0.75);
    clip-path: polygon(
        15px 0%, calc(100% - 15px) 0%,
        100% 15px, 100% calc(100% - 15px),
        calc(100% - 15px) 100%, 15px 100%,
        0% calc(100% - 15px), 0% 15px
    );
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.choice-btn-wrap.selected {
    background: var(--green);
    box-shadow: 0 0 50px rgba(247,0,0,0.5);
}

/* button = konten di dalam wrapper */
.choice-btn {
    width: 100%;
    min-height: 130px;
    padding: 20px 48px;
    border: none;
    border-radius: 0;
    background: var(--glass);
    backdrop-filter: blur(20px);
    color: #fff;
    font-family: var(--font);
    font-size: 38px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 36px;
    clip-path: polygon(
        13px 0%, calc(100% - 13px) 0%,
        100% 13px, 100% calc(100% - 13px),
        calc(100% - 13px) 100%, 13px 100%,
        0% calc(100% - 13px), 0% 13px
    );
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.choice-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--green2), var(--blue));
    opacity: 0;
    transition: opacity 0.2s ease;
}
.choice-btn:active::before { opacity: 0.15; }
.choice-btn:active { transform: scale(0.98); }
.choice-btn-wrap.selected .choice-btn {
    background: rgba(247,0,0,0.15);
}

.choice-label {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
    color: var(--dark);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.choice-text {
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

/* ============================================================
   STATE 7 â€” RESULT SCREEN
   ============================================================ */
#s7 {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.result-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 80px 40px;
    background: transparent;
    text-align: center;
    overflow: hidden;
}
.result-badge {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--green);
    border: 2px solid var(--border);
    padding: 14px 44px;
    border-radius: 60px;
    margin-bottom: 28px;
    background: var(--glass2);
}
.result-motor-img {
    width: 760px;
    height: 340px;
    object-fit: contain;
    filter: drop-shadow(0 0 50px rgba(247,0,0,0.45));
    margin-bottom: 20px;
}
.result-motor-name {
    font-size: 76px;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    text-shadow: 0 0 60px rgba(247,0,0,0.4), 2px 4px 16px rgba(0,0,0,0.9);
    margin-bottom: 14px;
}
.result-tagline {
    font-size: 38px;
    font-weight: 600;
    color: var(--green);
    text-shadow: 2px 4px 16px rgba(0,0,0,0.9);
    margin-bottom: 16px;
}
.result-desc {
    font-size: 30px;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    text-shadow: 1px 2px 10px rgba(0,0,0,0.9);
    line-height: 1.45;
    max-width: 860px;
    margin-bottom: 28px;
}
/* Answers section */
.result-answers-section {
    width: 100%;
    max-width: 920px;
    margin-bottom: 32px;
}
.result-answers-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 6px;
    color: var(--green);
    text-transform: uppercase;
    margin-bottom: 18px;
    opacity: 0.85;
}
.result-answers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* wrapper border untuk answer item */
.result-answer-wrap {
    width: 100%;
    padding: 1px;
    background: rgba(247,0,0,0.25);
    clip-path: polygon(
        10px 0%, calc(100% - 10px) 0%,
        100% 10px, 100% calc(100% - 10px),
        calc(100% - 10px) 100%, 10px 100%,
        0% calc(100% - 10px), 0% 10px
    );
}
.result-answer-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(247,0,0,0.06);
    border: none;
    border-radius: 0;
    padding: 16px 28px;
    text-align: left;
    clip-path: polygon(
        9px 0%, calc(100% - 9px) 0%,
        100% 9px, 100% calc(100% - 9px),
        calc(100% - 9px) 100%, 9px 100%,
        0% calc(100% - 9px), 0% 9px
    );
}
.answer-num {
    font-size: 20px;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    min-width: 48px;
}
.answer-key-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), var(--blue));
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    flex-shrink: 0;
}
.answer-text-val {
    font-size: 26px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    line-height: 1.3;
}

/* ============================================================
   STATE 8 â€” PHOTO BOOTH
   ============================================================ */
.photobooth-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 60px;
}
.webcam-frame {
    width: 800px;
    height: 800px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid var(--green);
    box-shadow: 0 0 80px rgba(247,0,0,0.5);
    position: relative;
    background: #000;
}
#webcam-live {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}
.countdown-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    z-index: 5;
}
.countdown-overlay.hidden { display: none; }
#countdown-num {
    font-size: 280px;
    font-weight: 900;
    color: var(--green);
    text-shadow: 0 0 80px rgba(247,0,0,0.8);
    animation: countdown-pop 1s ease-in-out;
}
@keyframes countdown-pop {
    0%   { transform: scale(1.4); opacity: 0; }
    30%  { transform: scale(1);   opacity: 1; }
    80%  { transform: scale(1);   opacity: 1; }
    100% { transform: scale(0.6); opacity: 0; }
}

.btn-capture {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 6px solid var(--green);
    background: var(--glass);
    backdrop-filter: blur(20px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 60px rgba(247,0,0,0.4);
    transition: all 0.2s ease;
}
.btn-capture:active {
    transform: scale(0.92);
    box-shadow: 0 0 30px rgba(247,0,0,0.3);
}
.btn-capture svg { width: 100px; height: 100px; fill: var(--green); }
.capture-hint {
    font-size: 36px;
    color: rgba(0,0,0,0.7);
    font-weight: 400;
    letter-spacing: 2px;
}

/* ============================================================
   STATE 8b â€” PHOTO PREVIEW
   ============================================================ */
.photo-preview-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 50px;
    background: rgba(5,10,20,0.7);
    backdrop-filter: blur(10px);
}
/* btn-process override */
#btn-process {
    font-size: 38px;
}
.preview-label {
    font-size: 48px;
    font-weight: 700;
    color: #111;
    letter-spacing: 4px;
    text-transform: uppercase;
}
#photo-canvas {
    width: 700px;
    height: 700px;
    border-radius: 32px;
    border: 4px solid var(--border);
    object-fit: cover;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

/* ============================================================
   STATE 9 â€” PROCESSING
   ============================================================ */
#s9 {
    background: var(--dark);
}
.processing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    text-align: center;
    padding: 80px;
    transform: scale(0.8);
    transform-origin: center center;
}
.ai-spinner {
    width: 200px;
    height: 200px;
    border: 8px solid rgba(247,0,0,0.15);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.processing-title {
    font-size: 64px;
    font-weight: 800;
    color: #fff;
    text-shadow: 2px 4px 16px rgba(0,0,0,0.9);
}
.processing-subtitle {
    font-size: 40px;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    text-shadow: 1px 2px 10px rgba(0,0,0,0.9);
    max-width: 800px;
    line-height: 1.4;
}
.progress-bar-wrap {
    width: 800px;
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--blue));
    border-radius: 6px;
    animation: progress-anim 90s ease-out forwards;
}
@keyframes progress-anim {
    0%   { width: 0%; }
    20%  { width: 40%; }
    50%  { width: 70%; }
    75%  { width: 85%; }
    90%  { width: 92%; }
    100% { width: 95%; }
}
#processing-status {
    font-size: 36px;
    color: var(--green);
    font-weight: 500;
    text-shadow: 1px 2px 10px rgba(0,0,0,0.9);
}
.ai-error-box {
    margin-top: 32px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 16px;
    padding: 28px 36px;
    text-align: center;
    max-width: 700px;
}
.ai-error-msg {
    font-size: 28px;
    color: #fca5a5;
    margin-bottom: 24px;
    line-height: 1.5;
}
.ai-error-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-retry {
    padding: 18px 40px;
    font-size: 26px;
    font-weight: 700;
    background: var(--green);
    color: #000;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}
.btn-retry:hover { opacity: 0.85; }
.btn-retake-err {
    padding: 18px 40px;
    font-size: 26px;
    font-weight: 700;
    background: #334155;
    color: #e2e8f0;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}
.btn-retake-err:hover { opacity: 0.85; }
.btn-cancel-err {
    padding: 18px 40px;
    font-size: 26px;
    font-weight: 700;
    background: #7f1d1d;
    color: #fca5a5;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}
.btn-cancel-err:hover { opacity: 0.85; }
.hidden { display: none !important; }

/* ============================================================
   STATE 10 â€” FINAL RESULT
   ============================================================ */
#s10 {
    background: #fff;
}
.final-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 60px 60px;
    gap: 40px;
    background: none;
}
.final-title {
    font-size: 42px;
    font-weight: 700;
    color: #111;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    flex-shrink: 0;
}
.ai-result-frame {
    width: 80%;
    height: auto;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 0 60px rgba(247,0,0,0.3);
    flex-shrink: 0;
}
#ai-result-img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   SHARED BUTTONS
   ============================================================ */
.btn-primary-wrap {
    padding: 2px;
    background: var(--green);
    clip-path: polygon(
        15px 0%, calc(100% - 15px) 0%,
        100% 15px, 100% calc(100% - 15px),
        calc(100% - 15px) 100%, 15px 100%,
        0% calc(100% - 15px), 0% 15px
    );
    box-shadow: 0 0 60px rgba(247,0,0,0.5);
    transition: all 0.15s ease;
    display: inline-block;
}
.btn-primary-wrap:active {
    transform: scale(0.96);
    box-shadow: 0 0 30px rgba(247,0,0,0.3);
}
.btn-primary {
    width: 800px;
    height: 140px;
    border: none;
    border-radius: 0;
    font-family: var(--font);
    font-size: 50px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--dark);
    background: linear-gradient(135deg, var(--green) 0%, var(--blue) 100%);
    cursor: pointer;
    clip-path: polygon(
        13px 0%, calc(100% - 13px) 0%,
        100% 13px, 100% calc(100% - 13px),
        calc(100% - 13px) 100%, 13px 100%,
        0% calc(100% - 13px), 0% 13px
    );
    transition: all 0.15s ease;
}
.btn-primary:active {
    transform: scale(0.96);
}
.btn-secondary {
    background: transparent;
    border: 2px solid rgba(0,0,0,0.3);
    border-radius: 70px;
    font-family: var(--font);
    font-size: 38px;
    font-weight: 600;
    color: rgba(0,0,0,0.7);
    padding: 28px 80px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-secondary:active {
    border-color: var(--green);
    color: var(--green);
}
.btn-restart {
    width: 600px;
    height: 110px;
    border: 3px solid var(--green);
    border-radius: 55px;
    background: transparent;
    font-family: var(--font);
    font-size: 38px;
    font-weight: 600;
    color: #111;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 2px;
}
.btn-restart:active {
    background: rgba(247,0,0,0.08);
    color: var(--green);
}

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }

/* State 9 â€” needs flex not block */
.s9-flex.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   WORLD CUP 2026 — QUESTION SCREEN ADDITIONS
   ============================================================ */

/* Group badge shown above question text (Q1–Q12) */
.group-badge {
    display: inline-block;
    font-size: 30px;
    font-weight: 800;
    color: var(--green);
    background: rgba(247,0,0,0.10);
    border: 2px solid var(--border);
    border-radius: 40px;
    padding: 10px 44px;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(247,0,0,0.4);
    margin-bottom: 10px;
    align-self: flex-start;
}

/* Flag image as choice label */
.choice-flag-label {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(247,0,0,0.08);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.choice-flag-label .fi {
    width: 86px !important;
    height: 64px !important;
    background-size: cover !important;
    border-radius: 0;
    flex-shrink: 0;
}

/* Confederation sub-label inside choice button */
.choice-confederation {
    display: block;
    font-size: 22px;
    font-weight: 400;
    color: rgba(255,255,255,0.45);
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ============================================================
   WORLD CUP 2026 — CHAMPION SELECTION SCREEN (Q13)
   ============================================================ */
.champion-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 40px 40px;
    gap: 24px;
    background: none;
    transform: scale(0.7);
    transform-origin: center center;
}

.champion-header {
    width: 100%;
    text-align: center;
    flex-shrink: 0;
}

.champion-title {
    font-size: 80px;
    font-weight: 900;
    color: var(--green);
    text-shadow: 0 0 50px rgba(247,0,0,0.6), 0 4px 20px rgba(0,0,0,0.9);
    line-height: 1;
    margin: 12px 0 16px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.champion-subtitle {
    font-size: 34px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    line-height: 1.4;
    text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}
.champion-subtitle strong {
    color: #fff;
    font-weight: 900;
}

/* 3-column × 4-row grid */
.champion-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    width: 100%;
    flex: 1;
    align-content: stretch;
}

/* Beveled border wrapper */
.champion-card-wrap {
    padding: 2px;
    background: rgba(255,255,255,0.9);
    clip-path: polygon(
        12px 0%, calc(100% - 12px) 0%,
        100% 12px, 100% calc(100% - 12px),
        calc(100% - 12px) 100%, 12px 100%,
        0% calc(100% - 12px), 0% 12px
    );
    transition: background 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.champion-card-wrap:active { transform: scale(0.97); }
.champion-card-wrap.selected {
    background: var(--green);
    box-shadow: 0 0 45px rgba(247,0,0,0.55);
}

/* Inner card */
.champion-card {
    height: 100%;
    min-height: 280px;
    background: #000;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 12px;
    clip-path: polygon(
        10px 0%, calc(100% - 10px) 0%,
        100% 10px, 100% calc(100% - 10px),
        calc(100% - 10px) 100%, 10px 100%,
        0% calc(100% - 10px), 0% 10px
    );
    transition: background 0.2s ease;
    position: relative;
}
.champion-card-wrap.selected .champion-card {
    background: rgba(247,0,0,0.14);
}

.champion-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.champion-flag .fi {
    width: 96px !important;
    height: 72px !important;
    background-size: cover !important;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.champion-team-name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.champion-group-badge {
    font-size: 18px;
    font-weight: 600;
    color: var(--green);
    background: rgba(247,0,0,0.10);
    padding: 4px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    letter-spacing: 2px;
}

/* ============================================================
   WORLD CUP 2026 — RESULT SCREEN
   ============================================================ */
.wc-result-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 16px;
    filter: drop-shadow(0 8px 30px rgba(0,0,0,0.5));
    animation: flagPop 0.6s cubic-bezier(0.175,0.885,0.32,1.275) forwards;
}
.wc-result-flag .fi {
    width: 280px !important;
    height: 210px !important;
    background-size: cover !important;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
@keyframes flagPop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.wc-result-champion-name {
    font-size: 80px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 60px rgba(247,0,0,0.45), 2px 4px 20px rgba(0,0,0,0.9);
    text-align: center;
    line-height: 1.1;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.wc-result-label {
    font-size: 28px;
    font-weight: 500;
    color: rgba(0,0,0,0.55);
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.wc-prize-section {
    width: 100%;
    max-width: 900px;
    background: var(--glass2);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 60px;
    text-align: center;
    margin-bottom: 44px;
}

.wc-prize-label {
    font-size: 24px;
    font-weight: 600;
    color: rgba(0,0,0,0.5);
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.wc-prize-name {
    font-size: 40px;
    font-weight: 800;
    color: var(--green);
    text-shadow: 0 0 30px rgba(247,0,0,0.55);
    line-height: 1.3;
}

/* ============================================================
   IDLE SCREEN — LIVE VOTING STATS
   ============================================================ */
.idle-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 70px 60px 0;
    background: rgba(255,255,255,0.96);
}

/* --- Header --- */
.idle-header {
    text-align: center;
    flex-shrink: 0;
    margin-bottom: 44px;
}
.idle-wc-eyebrow {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 6px;
    color: var(--green);
    text-transform: uppercase;
    margin-bottom: 14px;
    opacity: 0.85;
}
.idle-title {
    font-size: 106px;
    font-weight: 900;
    line-height: 1;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 18px;
}
.idle-subtitle {
    font-size: 30px;
    font-weight: 400;
    color: rgba(0,0,0,0.45);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* --- Board Container --- */
.idle-board {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.idle-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    flex-shrink: 0;
}
.idle-board-label {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
    color: rgba(0,0,0,0.4);
    text-transform: uppercase;
}
.idle-total-badge {
    font-size: 22px;
    font-weight: 700;
    color: var(--green);
    background: rgba(247,0,0,0.12);
    border: 1px solid rgba(247,0,0,0.3);
    padding: 6px 20px;
    border-radius: 40px;
    letter-spacing: 1px;
}

/* --- Stats List --- */
.idle-stats-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
}
.idle-stats-empty {
    text-align: center;
    color: rgba(0,0,0,0.3);
    font-size: 28px;
    padding: 60px 0;
    letter-spacing: 2px;
}

/* --- Single stat row --- */
.idle-stat-row {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 16px 24px;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}
.idle-stat-row.rank-1 { border-color: rgba(247,0,0,0.5); background: rgba(247,0,0,0.07); }
.idle-stat-row.rank-2 { border-color: rgba(150,150,150,0.4); background: rgba(0,0,0,0.03); }
.idle-stat-row.rank-3 { border-color: rgba(205,127,50,0.4); background: rgba(205,127,50,0.05); }

.idle-stat-rank {
    font-size: 36px;
    font-weight: 900;
    width: 52px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1;
}
.rank-1 .idle-stat-rank { color: var(--green); text-shadow: 0 0 20px rgba(247,0,0,0.6); }
.rank-2 .idle-stat-rank { color: #888; }
.rank-3 .idle-stat-rank { color: #cd7f32; }
.idle-stat-rank.no-medal { color: rgba(0,0,0,0.25); font-size: 26px; }

.idle-stat-flag {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.idle-stat-flag .fi {
    width: 72px !important;
    height: 54px !important;
    background-size: cover !important;
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.5);
}

.idle-stat-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.idle-stat-names {
    display: flex;
    align-items: baseline;
    gap: 14px;
}
.idle-stat-name {
    font-size: 34px;
    font-weight: 800;
    color: #111;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.idle-stat-group {
    font-size: 18px;
    font-weight: 500;
    color: rgba(0,0,0,0.35);
    letter-spacing: 1px;
    flex-shrink: 0;
}

/* Progress bar */
.idle-stat-bar-track {
    height: 10px;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}
.idle-stat-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--green2), var(--green));
    width: 0%;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}
.idle-stat-bar-fill::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
    filter: blur(2px);
}
.rank-1 .idle-stat-bar-fill {
    background: linear-gradient(90deg, #cc0000, #f70000, #ff4444);
    box-shadow: 0 0 14px rgba(247,0,0,0.5);
}

.idle-stat-pct {
    font-size: 20px;
    font-weight: 900;
    color: #111;
    width: 110px;
    text-align: right;
    flex-shrink: 0;
    line-height: 1;
    letter-spacing: -1px;
}
.idle-stat-votes {
    font-size: 18px;
    font-weight: 500;
    color: rgba(0,0,0,0.35);
    text-align: right;
    line-height: 1;
    margin-top: 4px;
}

/* --- CTA Footer --- */
.idle-cta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 0 70px;
    gap: 28px;
}
.idle-total-label {
    font-size: 28px;
    font-weight: 500;
    color: rgba(0,0,0,0.5);
    letter-spacing: 2px;
    text-align: center;
    min-height: 34px;
}
.btn-start {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 680px;
    height: 130px;
    background: var(--green);
    border: none;
    border-radius: 20px;
    color: #fff;
    font-family: var(--font);
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 50px rgba(247,0,0,0.45), 0 2px 10px rgba(0,0,0,0.6);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.btn-start:active { transform: scale(0.96); }
.btn-start-icon {
    font-size: 30px;
    line-height: 1;
}
.btn-start-pulse {
    animation: pulse-red 2.2s ease-in-out infinite;
}
@keyframes pulse-red {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 50px rgba(247,0,0,0.45), 0 2px 10px rgba(0,0,0,0.6);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 8px 80px rgba(247,0,0,0.75), 0 2px 20px rgba(0,0,0,0.6);
    }
}
.idle-cta-hint {
    font-size: 24px;
    color: rgba(0,0,0,0.35);
    letter-spacing: 1px;
    text-align: center;
}
