/* ============================================================
   Ai Là Triệu Phú — Millionaire game styles (scoped)
   Premium game-show look: deep blue stage + gold accents.
   ============================================================ */
#millionaire-screen {
    --mil-navy: #0a1747;
    --mil-navy2: #142a6e;
    --mil-gold: #f4c430;
    --mil-gold2: #ffe082;
    --mil-blue: #1b3a8f;
    --mil-line: #f4c430;
    --mil-soft: rgba(244, 196, 48, .4);
}
#millionaire-screen .mil-container {
    background:
        radial-gradient(120% 80% at 50% -10%, #2a3f93 0%, transparent 55%),
        radial-gradient(circle at 50% 38%, #1c2f78 0%, var(--mil-navy) 55%, #050a24 100%);
    min-height: 100vh;
    color: #fff;
}
#millionaire-screen .top-bar-title {
    color: var(--mil-gold2);
    text-shadow: 0 0 18px rgba(244, 196, 48, .5);
    letter-spacing: .5px;
}

.mil-main {
    padding: 6px 16px 32px;
    max-width: 680px;
    margin: 0 auto;
}
.mil-stage { width: 100%; }

/* Top row: timer + prize */
.mil-toprow {
    display: flex; align-items: center; gap: 14px;
    margin: 8px 0 16px;
}
.mil-timer { position: relative; width: 58px; height: 58px; flex-shrink: 0; }
.mil-timer svg { width: 100%; height: 100%; display: block; }
.mil-timer-bg { fill: none; stroke: rgba(255, 255, 255, .13); stroke-width: 4; }
.mil-timer-ring {
    fill: none; stroke: var(--mil-gold); stroke-width: 4; stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke .3s;
    filter: drop-shadow(0 0 4px rgba(244, 196, 48, .6));
}
.mil-timer > span {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.15rem; color: var(--mil-gold2);
}
.mil-timer.low .mil-timer-ring { stroke: #ff5252; filter: drop-shadow(0 0 6px rgba(255, 82, 82, .7)); }
.mil-timer.low > span { color: #ff7b7b; animation: milPulse .7s ease-in-out infinite; }
@keyframes milPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

.mil-prize {
    flex: 1; text-align: center;
    font-weight: 900; font-size: 1.1rem; color: var(--mil-navy);
    background: linear-gradient(180deg, var(--mil-gold2), var(--mil-gold));
    border-radius: 999px; padding: 9px 18px;
    box-shadow: 0 4px 18px rgba(244, 196, 48, .4), inset 0 1px 0 rgba(255, 255, 255, .6);
}

/* Lifelines */
.mil-lifelines { display: flex; gap: 14px; justify-content: center; margin-bottom: 18px; }
.mil-ll {
    min-width: 62px; height: 50px;
    border-radius: 14px;
    border: 2.5px solid var(--mil-line);
    background: radial-gradient(circle at 50% 30%, #2550b0, #0a1747);
    color: var(--mil-gold2);
    font-weight: 800; font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
    transition: transform .12s, box-shadow .15s, opacity .15s;
}
.mil-ll:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(244, 196, 48, .35); }
.mil-ll.used, .mil-ll:disabled { opacity: .3; cursor: default; }
.mil-ll.used { text-decoration: line-through; }

/* Question panel */
.mil-question {
    position: relative;
    background: linear-gradient(180deg, var(--mil-blue), var(--mil-navy));
    border: 3px solid var(--mil-line);
    border-radius: 18px;
    padding: 26px 22px;
    text-align: center;
    font-size: 1.25rem; font-weight: 800; line-height: 1.55;
    min-height: 70px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .4), 0 0 24px rgba(244, 196, 48, .18),
                inset 0 1px 0 rgba(255, 255, 255, .12);
}

/* Options 2x2 */
.mil-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.mil-option {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    text-align: left;
    padding: 15px 18px;
    border-radius: 14px;
    border: 2.5px solid var(--mil-line);
    background: linear-gradient(180deg, #1b3a8f 0%, #0a1747 100%);
    color: #fff;
    font-size: 1.02rem; font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .1);
    transition: transform .1s, box-shadow .15s, background .15s, border-color .15s;
}
.mil-option:hover:not(:disabled) {
    transform: translateY(-2px);
    background: linear-gradient(180deg, #2a55bb 0%, #142a6e 100%);
    box-shadow: 0 8px 22px rgba(244, 196, 48, .3);
}
.mil-option-key {
    flex-shrink: 0;
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(244, 196, 48, .15);
    color: var(--mil-gold); font-weight: 900;
}
.mil-option-text { flex: 1; }
.mil-option.correct {
    background: linear-gradient(180deg, #1ea64f, #0e6e33); border-color: #7CFFA6;
    box-shadow: 0 0 22px rgba(46, 204, 113, .55);
}
.mil-option.correct .mil-option-key { background: rgba(255, 255, 255, .25); color: #fff; }
.mil-option.wrong {
    background: linear-gradient(180deg, #cf3a2b, #7d241a); border-color: #ff9b8e;
    box-shadow: 0 0 22px rgba(231, 76, 60, .5);
}
.mil-option.wrong .mil-option-key { background: rgba(255, 255, 255, .25); color: #fff; }
.mil-option.removed { opacity: .16; pointer-events: none; }
.mil-option:disabled { cursor: default; }

/* Audience poll bar inside an option */
.mil-audience-bar {
    position: relative; flex-basis: 100%;
    height: 8px; margin-top: 8px;
    background: rgba(255, 255, 255, .14); border-radius: 5px;
}
.mil-audience-bar span { display: block; height: 100%; background: var(--mil-gold); border-radius: 5px; transition: width .5s; }
.mil-audience-bar em { position: absolute; right: 2px; top: -17px; font-size: .74rem; color: var(--mil-gold2); font-style: normal; font-weight: 800; }

.mil-host { text-align: center; margin-top: 18px; color: #c7d2fe; font-size: .95rem; min-height: 22px; font-weight: 600; }

/* Progress dots (compact — replaces the bulky side ladder) */
.mil-ladder {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 7px; margin: 2px 0 16px;
}
.mil-seg {
    width: 14px; height: 14px; border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    border: 2px solid transparent;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .62rem; font-weight: 900; color: transparent;
    transition: all .2s;
}
.mil-seg.passed { background: #2ecc71; }
.mil-seg.safe { border-color: var(--mil-gold); }
.mil-seg.safe:not(.current):not(.passed) { color: var(--mil-gold); }
.mil-seg.passed.safe { color: rgba(255, 255, 255, .9); }
.mil-seg.current {
    width: 26px; height: 26px;
    background: linear-gradient(180deg, var(--mil-gold2), var(--mil-gold));
    color: var(--mil-navy); font-size: .8rem;
    box-shadow: 0 0 14px rgba(244, 196, 48, .7);
}

/* Overlay */
.mil-overlay {
    position: fixed; inset: 0; z-index: 500;
    display: none; align-items: center; justify-content: center;
    background: rgba(4, 8, 26, .85); backdrop-filter: blur(5px);
}
.mil-overlay-card {
    background: linear-gradient(180deg, var(--mil-navy2), var(--mil-navy));
    border: 3px solid var(--mil-gold);
    border-radius: 22px; padding: 30px 26px; text-align: center;
    max-width: 390px; width: 90%;
    box-shadow: 0 16px 60px rgba(0, 0, 0, .55), 0 0 40px rgba(244, 196, 48, .25);
}
.mil-ov-icon { font-size: 3.4rem; }
.mil-ov-title { font-size: 1.35rem; font-weight: 900; color: #fff; margin: 8px 0; }
.mil-ov-money { font-size: 2rem; font-weight: 900; color: var(--mil-gold); margin: 6px 0; text-shadow: 0 0 20px rgba(244, 196, 48, .5); }
.mil-ov-xp { font-size: .92rem; color: #c7d2fe; margin-bottom: 20px; }
.mil-ov-actions { display: flex; gap: 12px; }
.mil-ov-btn {
    flex: 1; padding: 13px; border-radius: 13px; border: none; cursor: pointer;
    font-weight: 800; font-size: 1rem;
    background: linear-gradient(180deg, var(--mil-gold2), var(--mil-gold)); color: var(--mil-navy);
    box-shadow: 0 4px 14px rgba(244, 196, 48, .4);
}
.mil-ov-btn.ghost { background: transparent; border: 2px solid var(--mil-soft); color: var(--mil-gold2); box-shadow: none; }

/* Mobile */
@media (max-width: 720px) {
    .mil-options { grid-template-columns: 1fr; }
    .mil-question { font-size: 1.12rem; padding: 20px 16px; }
    .mil-seg { width: 12px; height: 12px; gap: 5px; }
    .mil-seg.current { width: 22px; height: 22px; }
}
