/* vietnamese */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 500;
    src: url("../fonts/quicksand/6xKtdSZaM9iE8KbpRA_hJFQNcOM.woff2") format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 500;
    src: url("../fonts/quicksand/6xKtdSZaM9iE8KbpRA_hJVQNcOM.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 500;
    src: url("../fonts/quicksand/6xKtdSZaM9iE8KbpRA_hK1QN.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 600;
    src: url("../fonts/quicksand/6xKtdSZaM9iE8KbpRA_hJFQNcOM.woff2") format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 600;
    src: url("../fonts/quicksand/6xKtdSZaM9iE8KbpRA_hJVQNcOM.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 600;
    src: url("../fonts/quicksand/6xKtdSZaM9iE8KbpRA_hK1QN.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 700;
    src: url("../fonts/quicksand/6xKtdSZaM9iE8KbpRA_hJFQNcOM.woff2") format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 700;
    src: url("../fonts/quicksand/6xKtdSZaM9iE8KbpRA_hJVQNcOM.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 700;
    src: url("../fonts/quicksand/6xKtdSZaM9iE8KbpRA_hK1QN.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/baloo2/wXKrE3kTposypRyd51fcANwr.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/baloo2/wXKrE3kTposypRyd51bcANwr.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/baloo2/wXKrE3kTposypRyd51jcAA.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/baloo2/wXKrE3kTposypRyd51ncANwr.woff2") format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}

/* =============================================
   🍭 CANDY NEON THEME — Kẹo ngọt điện quang
   Palette: tím sâu · hồng neon · xanh điện · vàng neon
   ============================================= */

:root {
    --c-neon-pink:  #ff2d78;
    --c-neon-cyan:  #00f5ff;
    --c-neon-lime:  #c6ff00;
    --c-neon-pur:   #bf00ff;
    --c-neon-yell:  #ffe600;
    --c-neon-orange:#ff6d00;
    --bg-deep:      #12004d;
    --bg-mid:       #2d0080;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }

body {
    font-family: "Quicksand", Arial, sans-serif;
    background: linear-gradient(160deg, #1a0050 0%, #2d0080 50%, #00003a 100%);
    color: #fff;
}

/* ---- Welcome & Help screens ---- */
#welcomeScreen,
#helpScreen {
    position: fixed;
    inset: 0; z-index: 99999;
    display: flex; flex-direction: column;
    width: 100%; min-height: 100vh;
    overflow: hidden; color: #fff;
    /* Deep candy purple background */
    background: linear-gradient(145deg, #12004d 0%, #2d0080 40%, #4a0080 70%, #1a0050 100%);
}
#helpScreen { z-index: 99998; display: none; }

#welcomeScreen.fade-out,
#helpScreen.fade-out {
    pointer-events: none; opacity: 0; transform: scale(1.06);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* ---- Neon emoji decorations ---- */
#welcomeScreen::before {
    content: "🍭";
    position: absolute; top: 6%; right: 8%;
    font-size: 3.8rem; z-index: 1;
    animation: floatEmoji 5s ease-in-out infinite; animation-delay: 0.3s;
    filter: drop-shadow(0 0 12px rgba(255,45,120,0.9));
}
#welcomeScreen::after {
    content: "🎪";
    position: absolute; bottom: 14%; left: 6%;
    font-size: 3.2rem; z-index: 1;
    animation: floatEmoji 7s ease-in-out infinite; animation-delay: 1.5s;
    filter: drop-shadow(0 0 12px rgba(0,245,255,0.9));
}

@keyframes floatEmoji {
    0%,100% { transform: translateY(0) rotate(-6deg); }
    50%      { transform: translateY(-18px) rotate(6deg); }
}

/* ---- Neon glowing bubbles ---- */
.stars {
    position: absolute; top: 0; left: 0;
    z-index: 0; width: 100%; height: 100%;
    overflow: hidden; pointer-events: none;
}
.stars::before, .stars::after {
    content: "";
    position: absolute; border-radius: 50%;
    animation: floatNeon 10s ease-in-out infinite;
}

.stars1::before {
    width: 100px; height: 100px; left: 8%; top: 18%;
    background: radial-gradient(circle, rgba(255,45,120,0.4) 0, transparent 70%);
    box-shadow: 0 0 40px rgba(255,45,120,0.6), 0 0 80px rgba(255,45,120,0.3);
    animation-duration: 8s; animation-delay: 0s;
}
.stars1::after {
    width: 60px; height: 60px; left: 82%; top: 72%;
    background: radial-gradient(circle, rgba(0,245,255,0.4) 0, transparent 70%);
    box-shadow: 0 0 30px rgba(0,245,255,0.7), 0 0 60px rgba(0,245,255,0.3);
    animation-duration: 12s; animation-delay: 2s;
}
.stars2::before {
    width: 70px; height: 70px; left: 58%; top: 8%;
    background: radial-gradient(circle, rgba(198,255,0,0.35) 0, transparent 70%);
    box-shadow: 0 0 35px rgba(198,255,0,0.7), 0 0 70px rgba(198,255,0,0.3);
    animation-duration: 14s; animation-delay: 1s;
}
.stars2::after {
    width: 50px; height: 50px; left: 22%; top: 80%;
    background: radial-gradient(circle, rgba(191,0,255,0.4) 0, transparent 70%);
    box-shadow: 0 0 30px rgba(191,0,255,0.7), 0 0 60px rgba(191,0,255,0.3);
    animation-duration: 9s; animation-delay: 3s;
}
.stars3::before {
    width: 80px; height: 80px; left: 91%; top: 38%;
    background: radial-gradient(circle, rgba(255,230,0,0.35) 0, transparent 70%);
    box-shadow: 0 0 40px rgba(255,230,0,0.6), 0 0 80px rgba(255,230,0,0.3);
    animation-duration: 13s; animation-delay: 0.5s;
}
.stars3::after {
    width: 42px; height: 42px; left: 46%; top: 90%;
    background: radial-gradient(circle, rgba(255,109,0,0.4) 0, transparent 70%);
    box-shadow: 0 0 25px rgba(255,109,0,0.7), 0 0 50px rgba(255,109,0,0.3);
    animation-duration: 7s; animation-delay: 4s;
}

@keyframes floatNeon {
    0%,100% { transform: translateY(0) scale(1); opacity: 0.7; }
    50%      { transform: translateY(-45px) scale(1.12); opacity: 1; }
}

/* ---- Header / Logo ---- */
.ws-header {
    position: absolute; top: 0; left: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 1rem;
}
.ws-logo-container {
    position: relative; display: flex;
    align-items: center; justify-content: center;
    margin-top: 15px; margin-left: 15px;
}
.ws-logo-container::before {
    content: "";
    position: absolute; top: 50%; left: 50%; z-index: -1;
    width: 150px; height: 150px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,45,120,0.5) 0, rgba(0,245,255,0.25) 50%, transparent 70%);
    filter: blur(16px);
    transform: translate(-50%,-50%);
    animation: pulseGlow 3s ease-in-out infinite alternate;
}
.ws-logo {
    max-width: 120px; height: auto;
    filter: drop-shadow(0 0 15px rgba(255,45,120,0.8)) drop-shadow(0 0 30px rgba(0,245,255,0.4));
    animation: floatLogo 6s ease-in-out infinite;
}
@keyframes pulseGlow {
    from { opacity: 0.5; transform: translate(-50%,-50%) scale(0.85); }
    to   { opacity: 1;   transform: translate(-50%,-50%) scale(1.15); }
}
@keyframes floatLogo {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

/* ---- Layout ---- */
.ws-main {
    position: relative; z-index: 1;
    display: flex; flex: 1; flex-direction: column;
    align-items: center; justify-content: center; padding: 1rem;
}
.ws-content-wrapper {
    width: 100%; max-width: 1000px;
    padding: 2rem; text-align: center;
    animation: fadeInScale 1s ease-out forwards;
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* ---- Title — Neon flicker gradient ---- */
.ws-game-title {
    margin: 0;
    font-family: "Baloo 2","Quicksand",Arial,sans-serif;
    font-size: clamp(2.4rem,7vw,5rem); line-height: 1.15;
    background: linear-gradient(90deg,
        var(--c-neon-yell),
        var(--c-neon-pink),
        var(--c-neon-cyan),
        var(--c-neon-lime),
        var(--c-neon-yell));
    background-size: 300% auto;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(255,45,120,0.7));
    animation: neonText 5s linear infinite;
}
#helpScreen .ws-game-title { font-size: clamp(2rem,6vw,3rem); }
@keyframes neonText {
    from { background-position: 0 center; }
    to   { background-position: 300% center; }
}

/* ---- Subtitle ---- */
.ws-game-subtitle {
    max-width: 740px; margin: 0.6rem auto 0;
    color: rgba(255,255,255,0.8);
    font-size: clamp(1rem,3vw,1.25rem); font-weight: 700; line-height: 1.6;
    opacity: 0; animation: fadeUp 1.5s ease-out 0.4s forwards;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Button group ---- */
.ws-button-group {
    display: flex; flex-direction: column;
    align-items: center; gap: 1rem; margin-top: 2.5rem;
}

/* ---- Primary Button — Neon glow ---- */
.ws-btn-primary-cosmic {
    position: relative; z-index: 1;
    min-height: 60px; padding: 1rem 2.8rem;
    color: #fff;
    font-family: "Baloo 2","Quicksand",Arial,sans-serif;
    font-size: clamp(1rem,4vw,1.5rem); font-weight: 800;
    background: linear-gradient(135deg, var(--c-neon-pink) 0%, var(--c-neon-pur) 50%, var(--c-neon-cyan) 100%);
    background-size: 200% auto;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50px; cursor: pointer;
    box-shadow:
        0 0 20px rgba(255,45,120,0.7),
        0 0 40px rgba(255,45,120,0.3),
        0 6px 24px rgba(0,0,0,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: none;
    animation: shimmerBtn 3s linear infinite;
}
.ws-btn-primary-cosmic::before,
.ws-btn-primary-cosmic::after { display: none; }
.ws-btn-primary-cosmic span {
    position: relative; z-index: 2; display: inline-block;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    transition: transform 0.2s;
}
.ws-btn-primary-cosmic:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 0 30px rgba(255,45,120,0.9), 0 0 60px rgba(0,245,255,0.4), 0 10px 30px rgba(0,0,0,0.4);
}
.ws-btn-primary-cosmic:active { transform: scale(0.96); }
@keyframes shimmerBtn {
    0%   { background-position: 0 center; }
    100% { background-position: 200% center; }
}

/* ---- Help screen buttons ---- */
#helpScreen .btn-fullscreen,
#helpScreen .btn-play {
    min-height: 52px; color: #fff;
    font-family: "Baloo 2","Quicksand",Arial,sans-serif;
    font-size: 1.05rem; font-weight: 800;
    border: 2px solid rgba(255,255,255,0.2); cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
}
#helpScreen .btn-fullscreen::before, #helpScreen .btn-fullscreen::after,
#helpScreen .btn-play::before,       #helpScreen .btn-play::after { display: none; }
#helpScreen .btn-fullscreen {
    background: linear-gradient(135deg, #00c9d4, var(--c-neon-lime));
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(0,245,255,0.6), 0 4px 14px rgba(0,0,0,0.3);
    color: #12004d;
}
#helpScreen .btn-play {
    background: linear-gradient(135deg, var(--c-neon-pink), var(--c-neon-yell));
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(255,45,120,0.6), 0 4px 14px rgba(0,0,0,0.3);
}
#helpScreen .btn-fullscreen span,
#helpScreen .btn-play span { position: relative; z-index: 2; display: inline-block; }
#helpScreen .btn-fullscreen:hover,
#helpScreen .btn-play:hover { transform: translateY(-3px) scale(1.03); }

/* ---- More games link ---- */
.ws-more-games-link {
    display: inline-block; padding: 0.5rem 1.25rem;
    color: rgba(255,255,255,0.8); font-size: 1rem; font-weight: 700;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.25); border-radius: 50px;
    background: rgba(255,255,255,0.08); transition: all 0.3s ease;
}
.ws-more-games-link:hover {
    color: #12004d;
    background: var(--c-neon-lime); border-color: var(--c-neon-lime);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(198,255,0,0.7);
}

/* ---- Credit ---- */
.ws-credit {
    position: absolute; bottom: 1rem; left: 0;
    z-index: 10; width: 100%;
    color: rgba(255,255,255,0.35); font-size: 0.9rem; text-align: center;
}
.ws-credit a { color: var(--c-neon-cyan); font-weight: 700; text-decoration: none; }

/* ---- Instruction box ---- */
.instruction-box,
.question-count {
    border: 2px solid rgba(255,45,120,0.35); border-radius: 20px;
    background: rgba(255,255,255,0.07); backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(255,45,120,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
}
#helpScreen h5 { color: var(--c-neon-cyan); text-shadow: 0 0 8px rgba(0,245,255,0.7); }
#helpScreen .text-white-50 { color: rgba(255,255,255,0.75) !important; opacity: 1; }
.instruction-box h5, .instruction-box p { overflow-wrap: anywhere; }

/* ============================================================
   🎁 HỘP QUÀ BÍ ẨN — Game-Specific Styles
   ============================================================ */

/* ---- Game Screen Layout ---- */
.game-screen-root {
    display: none;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    font-family: 'Quicksand', 'Segoe UI', sans-serif;
    overflow: hidden;
    flex-direction: row;
}
.game-screen-root.active, #gameScreen:not([style*="display: none"]) {
    display: flex !important;
}

/* ---- Left Panel ---- */
.left-panel {
    width: 260px;
    min-width: 220px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.panel-header {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.panel-header h3 {
    color: #ff6ec7;
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 4px;
    text-shadow: 0 0 12px rgba(255,110,199,0.6);
}
.student-count {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
}
.student-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    flex: 1;
}
.student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.student-item:hover {
    background: rgba(255,110,199,0.15);
    transform: translateX(4px);
}
.student-item.active {
    background: linear-gradient(135deg, rgba(255,110,199,0.3), rgba(120,115,245,0.3));
    border: 1px solid rgba(255,110,199,0.5);
}
.student-item.blocked {
    opacity: 0.4;
    text-decoration: line-through;
}
.student-item.played {
    opacity: 0.5;
}
.s-name { font-weight: 600; }
.s-score { color: #ffd700; font-weight: 700; font-size: 13px; }

.panel-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.top3-section h4 {
    color: #ffd700;
    font-size: 14px;
    margin: 0 0 8px;
    text-align: center;
}
.top3-section ul {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}
.top3-section li {
    color: #fff;
    font-size: 13px;
    padding: 4px 0;
}
.btn-reset-game {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-reset-game:hover { transform: scale(1.02); filter: brightness(1.1); }

/* Settings button */
.btn-settings {
    background: linear-gradient(135deg, #7873f5, #ff6ec7) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700 !important;
}

#settingsModal {
    z-index: 100001 !important;
}
.modal-backdrop {
    z-index: 100000 !important;
}

/* ---- Main Area ---- */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ============================================================
   VÒNG 1: HỘP QUÀ BÍ ẨN
   ============================================================ */
.round1-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
    height: 100%;
}
.gift-stage { perspective: 1000px; }
.gift-container {
    display: grid;
    grid-template-columns: repeat(5, 120px);
    gap: 20px 30px;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    padding: 20px;
}

/* Gift Box */
.gift-box {
    width: 120px;
    height: 140px;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.5) translateY(40px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gift-box.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}
.gift-box:hover {
    transform: scale(1.08) translateY(-6px);
}
.gift-lid {
    width: 130px;
    height: 30px;
    margin-left: -5px;
    border-radius: 6px 6px 0 0;
    position: relative;
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}
.gift-lid::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 100%;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}
.gift-body {
    width: 120px;
    height: 110px;
    border-radius: 0 0 8px 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: brightness(0.85);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.gift-ribbon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 100%;
    background: rgba(255,255,255,0.25);
}
.gift-ribbon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30px;
    width: 86px;
    height: 26px;
    background: rgba(255,255,255,0.25);
    top: 50%;
    transform: translateY(-50%);
}
.gift-qmark {
    font-size: 36px;
    font-weight: 900;
    color: rgba(255,255,255,0.8);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1;
    transition: all 0.5s;
}
.gift-qmark.revealed {
    font-size: 18px;
    color: #fff;
    text-shadow: 0 0 20px rgba(255,255,255,0.8);
}

/* Opening animation */
.gift-box.opening .gift-lid {
    transform: translateY(-30px) rotateX(-30deg);
    opacity: 0.7;
}
.gift-box.opened .gift-lid {
    transform: translateY(-60px) rotateX(-60deg) scale(0.8);
    opacity: 0;
}
.gift-box.opened .gift-body {
    animation: giftGlow 1s ease infinite alternate;
}
@keyframes giftGlow {
    from { box-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 0 20px rgba(255,215,0,0.3); }
    to   { box-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 0 40px rgba(255,215,0,0.6); }
}

/* Open button */
.btn-open-gift {
    padding: 16px 48px;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff6ec7, #7873f5);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 30px rgba(255,110,199,0.4);
    font-family: 'Quicksand', sans-serif;
}
.btn-open-gift:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(255,110,199,0.6);
}
.btn-open-gift:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   CONGRATS MODAL
   ============================================================ */
.congrats-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,12,41,0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.congrats-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 480px;
    max-width: 90vw;
    background: #ffffff;
    border-radius: 28px;
    padding: 44px 40px 36px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 4px #f9a8d4, 0 0 0 8px #fde68a, 0 0 0 12px #86efac, 0 30px 80px rgba(0,0,0,0.18);
    animation: congratsPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes congratsPop {
    0% { transform: scale(0.7) translateY(40px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
.congrats-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, #f472b6, #fb923c, #facc15, #4ade80, #60a5fa, #a78bfa, #f472b6);
    background-size: 200% 100%;
    animation: rainbowSlide 3s linear infinite;
}
@keyframes rainbowSlide {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}
.congrats-close-x {
    position: absolute; top: 14px; right: 16px;
    font-size: 22px; color: #94a3b8; cursor: pointer;
    width: 32px; height: 32px; background: #f1f5f9; border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.congrats-close-x:hover { background: #fee2e2; color: #ef4444; transform: rotate(90deg); }
.congrats-trophy { font-size: 68px; margin-bottom: 4px; filter: drop-shadow(0 6px 16px rgba(251,191,36,0.45)); animation: trophyBounce 1.8s ease-in-out infinite; }
@keyframes trophyBounce { 0%,100% { transform: translateY(0); } 45% { transform: translateY(-10px) scale(1.06); } }
.congrats-stars { display: flex; gap: 8px; font-size: 20px; margin-bottom: 10px; animation: starPulse 2s ease-in-out infinite; }
.congrats-stars span:nth-child(2) { font-size: 26px; }
@keyframes starPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.congrats-sub { color: #7c3aed; font-size: 15px; font-weight: 700; margin: 0 0 12px; text-transform: uppercase; background: linear-gradient(135deg, #a855f7, #ec4899); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.congrats-name-wrap { background: linear-gradient(135deg, #fef3c7, #fde68a, #fecaca); border-radius: 16px; padding: 12px 28px; margin-bottom: 24px; border: 2px solid #fbbf24; }
.congrats-name { font-size: 36px; font-weight: 900; margin: 0; color: #92400e; text-align: center; word-break: break-word; }
.congrats-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.congrats-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px;
    border-radius: 50px; border: none; background: linear-gradient(135deg, #f472b6, #fb923c);
    color: #fff; font-size: 17px; font-weight: 800; font-family: 'Quicksand', sans-serif;
    cursor: pointer; transition: all 0.25s; box-shadow: 0 6px 20px rgba(244,114,182,0.4);
}
.congrats-btn:hover { transform: translateY(-3px) scale(1.04); }
.congrats-btn-close { background: linear-gradient(135deg, #60a5fa, #a78bfa); box-shadow: 0 6px 20px rgba(96,165,250,0.35); }

/* ============================================================
   VÒNG 2A: CANDY GRID (from lnolympia)
   ============================================================ */
.round2-area {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}
.candy-header {
    text-align: center;
    margin-bottom: 20px;
}
.candy-header h3 {
    color: #ff6ec7;
    font-size: 22px;
    font-weight: 800;
    text-shadow: 0 0 16px rgba(255,110,199,0.6);
    margin: 0 0 4px;
}
.candy-header span {
    color: #ffd700;
    font-size: 16px;
    font-weight: 700;
}
.candy-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 25px;
    justify-content: center;
    align-content: flex-start;
    width: 100%;
    max-width: 100%;
    overflow-y: auto;
    flex: 1;
    padding: 10px 40px;
}

/* ---- Candy Gift Boxes in Vòng 2 ---- */
.candy-gift {
    width: 100px;
    height: 120px;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.candy-gift.show {
    opacity: 1;
    transform: scale(1);
}
.candy-gift:hover {
    transform: scale(1.1) translateY(-4px);
}
.candy-gift .gift-lid {
    width: 110px;
    height: 26px;
    margin-left: -5px;
    border-radius: 4px 4px 0 0;
    position: relative;
    z-index: 2;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}
.candy-gift .gift-body {
    width: 100px;
    height: 94px;
    border-radius: 0 0 6px 6px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: brightness(0.85);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.candy-gift .gift-ribbon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 100%;
    background: rgba(255,255,255,0.25);
}
.candy-gift .gift-ribbon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -25px;
    width: 70px;
    height: 20px;
    background: rgba(255,255,255,0.25);
    top: 50%;
    transform: translateY(-50%);
}
.candy-gift .gift-qmark {
    font-size: 28px;
    font-weight: 900;
    color: rgba(255,255,255,0.8);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1;
}
.candy-gift.disappear {
    transform: scale(0) rotateZ(180deg);
    opacity: 0;
}
.candy-gift.used {
    visibility: hidden;
    pointer-events: none;
}
.candy {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 800;
    font-family: 'Quicksand', sans-serif;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: scale(0.3);
    background: linear-gradient(135deg, #ff6ec7, #7873f5);
    box-shadow: 0 4px 15px rgba(255,110,199,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}
.candy::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    pointer-events: none;
}
.candy.show {
    opacity: 1;
    transform: scale(1);
}
.candy:hover {
    transform: scale(1.15) translateY(-4px);
    box-shadow: 0 8px 25px rgba(255,110,199,0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}
.candy.disappear {
    transform: scale(0) rotateZ(180deg);
    opacity: 0;
}
.candy.used {
    visibility: hidden;
    pointer-events: none;
}

/* ============================================================
   VÒNG 2B: QUESTION AREA (from ddkt1) — Full 6 types
   ============================================================ */
#questionOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    z-index: 899;
}
#questionArea {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw; height: 90vh;
    max-width: none;
    z-index: 900;
    border-radius: 28px;
    background: linear-gradient(135deg, #fff5fa 0%, #f0f7ff 50%, #eefcff 100%);
    color: #1e293b;
    box-shadow: 0 30px 80px rgba(0,0,0,0.25), 0 0 40px rgba(255,110,199,0.15), 0 0 0 1px rgba(255,255,255,0.5) inset;
    border: 3px solid rgba(255, 110, 199, 0.3);
    font-family: 'Quicksand', sans-serif;
    overflow: hidden;
    flex-direction: column;
    animation: modalPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 30px;
}
@keyframes modalPopIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Timer */
#qTimerDisplay {
    position: absolute; top: 14px; right: 16px;
    font-size: 22px; font-weight: 900; color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    padding: 6px 18px; border-radius: 50px; min-width: 72px;
    text-align: center; z-index: 5;
    box-shadow: 0 4px 14px rgba(239,68,68,0.35);
    animation: timerPulse 1s ease-in-out infinite;
}
#qTimerDisplay:empty { display: none; }
@keyframes timerPulse {
    0%,100% { box-shadow: 0 4px 14px rgba(239,68,68,0.35); transform: scale(1); }
    50% { box-shadow: 0 6px 20px rgba(239,68,68,0.55); transform: scale(1.04); }
}

/* Badge */
.q-badge { padding: 6px 18px; border-radius: 30px; font-size: 13px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.badge-mc { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.badge-sa { background: linear-gradient(135deg, #06b6d4, #22d3ee); color: #fff; }
.badge-es { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; }
.badge-fb { background: linear-gradient(135deg, #10b981, #34d399); color: #fff; }
.badge-tf { background: linear-gradient(135deg, #14b8a6, #2dd4bf); color: #fff; }
.badge-ma { background: linear-gradient(135deg, #f43f5e, #fb7185); color: #fff; }

.q-header-row { display: flex; gap: 10px; position: absolute; top: 20px; left: 30px; right: 30px; }
.q-progress-badge { padding: 6px 16px; border-radius: 30px; font-size: 13px; font-weight: 700; background: rgba(99,102,241,0.12); color: #6366f1; border: 1.5px solid rgba(99,102,241,0.3); }

/* Question title */
.q-title {
    font-size: clamp(22px, 2.8vw, 36px); font-weight: 800; line-height: 1.5;
    padding: 16px 28px; margin-top: 36px; color: #2d0080; text-align: center;
    background: rgba(255, 255, 255, 0.75);
    border: 2.5px dashed rgba(120, 115, 245, 0.4);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(120, 115, 245, 0.08);
    flex-grow: 1; display: flex; justify-content: center; align-items: center;
    margin-left: auto; margin-right: auto; max-width: 900px;
}
.q-title img { vertical-align: middle; }
mjx-container { margin-left: 10px; margin-right: 10px; }

/* Question image */
.q-img { text-align: center; padding: 0 32px 12px; position: relative; }
.q-img img { max-width: 100%; max-height: 30vh; border-radius: 16px; position: absolute; top: 0; left: 0; }
.q-content-with-img { display: flex; flex-direction: row; align-items: center; gap: 20px; padding: 30px 8px 0; flex-grow: 1; }
.q-content-with-img .q-title { flex: 1 1 50%; min-width: 0; margin: 0; text-align: left; justify-content: flex-start; height: 100%; }
.q-content-with-img .q-img { flex: 0 0 50%; max-width: 50%; padding: 0; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; }
.q-content-with-img .q-img img { height: auto; width: auto; object-fit: contain; max-height: 100%; max-width: 100%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* Body */
.q-body { overflow-y: auto; padding: 30px 10px; text-align: center; }

/* Multiple Choice */
.q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; margin: 0 auto; }
.optBtn {
    display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 20px;
    border: 2px solid #e2e8f0; border-radius: 16px; background: #fff;
    font-size: 16px; font-weight: 600; font-family: 'Quicksand', sans-serif;
    color: #334155; cursor: pointer; transition: all 0.25s ease; text-align: left;
}
.optBtn:nth-child(4n+1) {
    background: linear-gradient(135deg, #eefcff 0%, #dcf8ff 100%);
    border-color: #a5f3fc;
    color: #0891b2;
}
.optBtn:nth-child(4n+1) .opt-letter {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}
.optBtn:nth-child(4n+2) {
    background: linear-gradient(135deg, #fff5f5 0%, #ffebeb 100%);
    border-color: #fecaca;
    color: #dc2626;
}
.optBtn:nth-child(4n+2) .opt-letter {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
}
.optBtn:nth-child(4n+3) {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: #ddd6fe;
    color: #7c3aed;
}
.optBtn:nth-child(4n+3) .opt-letter {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.optBtn:nth-child(4n+4) {
    background: linear-gradient(135deg, #fdfbf7 0%, #fef3c7 100%);
    border-color: #fde68a;
    color: #d97706;
}
.optBtn:nth-child(4n+4) .opt-letter {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}
.optBtn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); filter: brightness(0.98); }
.opt-letter {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
    font-size: 15px; font-weight: 800; flex-shrink: 0; margin-right: 10px;
}
.opt-text { flex: 1; }
.optBtn.opt-correct { background: linear-gradient(135deg, #d1fae5, #a7f3d0) !important; border-color: #10b981 !important; color: #065f46 !important; animation: pulseCorrect 0.5s ease, glowCorrect 1.2s ease-in-out 0.5s infinite alternate; }
.optBtn.opt-correct .opt-letter { background: linear-gradient(135deg, #10b981, #059669) !important; }
.optBtn.opt-wrong { background: linear-gradient(135deg, #fee2e2, #fecaca) !important; border-color: #ef4444 !important; color: #7f1d1d !important; animation: shakeWrong 0.4s ease; }
.optBtn.opt-wrong .opt-letter { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }
@keyframes pulseCorrect { 0%,100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes shakeWrong { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes glowCorrect { from { box-shadow: 0 0 0 0 rgba(16,185,129,0.3); } to { box-shadow: 0 0 0 8px rgba(16,185,129,0); } }

/* Action Buttons */
.q-btn-show, .q-btn-correct, .q-btn-wrong, .q-btn-confirm, .q-btn-next,
#questionArea .btn_boqua, #questionArea .markBtn, #questionArea #showAnsBtn,
#questionArea #skipQBtn, #qNextBtn {
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    gap: 8px !important; padding: 13px 32px !important; border-radius: 50px !important; border: none !important;
    color: #fff !important; font-size: 16px !important; font-weight: 800 !important;
    font-family: 'Quicksand', sans-serif !important; cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18) !important;
}
.q-btn-show:hover, .q-btn-correct:hover, .q-btn-wrong:hover, .q-btn-confirm:hover, .q-btn-next:hover,
#questionArea .btn_boqua:hover, #qNextBtn:hover {
    transform: translateY(-2px) scale(1.04) !important; filter: brightness(1.08);
}
.q-btn-confirm:disabled { opacity: 0.45 !important; cursor: not-allowed !important; }
.q-btn-show, #questionArea #showAnsBtn { background: linear-gradient(135deg, #6366f1, #8b5cf6) !important; }
.q-btn-correct, #questionArea .markBtn[data-correct="true"] { background: linear-gradient(135deg, #10b981, #34d399) !important; }
.q-btn-wrong, #questionArea .markBtn[data-correct="false"] { background: linear-gradient(135deg, #ef4444, #f87171) !important; }
.q-btn-confirm { background: linear-gradient(135deg, #6366f1, #8b5cf6) !important; }
.q-btn-next, #qNextBtn { background: linear-gradient(135deg, #10b981, #06b6d4) !important; animation: nextBtnSlideIn 0.35s ease both; }
#questionArea .btn_boqua, #questionArea #skipQBtn { background: linear-gradient(135deg, #f59e0b, #fb923c) !important; }
@keyframes nextBtnSlideIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.q-ans-container { display: none; margin-top: 16px; }
.q-ans-box { background: linear-gradient(135deg, #f0fdf4, #ecfdf5); padding: 20px 24px; border-radius: 16px; border: 1px solid #10b981; font-size: clamp(24px, 3vw, 36px); font-weight: 700; color: #065f46; text-align: center; line-height: 1.6; }
.q-mark-btns { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }

/* True/False */
.tf-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; margin: 0 auto; }
.tf-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; transition: all 0.3s; }
.tf-row:nth-child(even) { border: 2px solid #bae6fd; background: #f0f9ff; }
.tf-row:nth-child(odd) { border: 2px solid #fbcfe8; background: #fdf2f8; }
.tf-text { flex: 1; font-size: clamp(16px, 2.5vw, 22px); font-weight: 600; color: #334155; text-align: left; line-height: 1.5; }
.tf-btns { display: flex; gap: 8px; flex-shrink: 0; }
.tf-btn { width: 44px; height: 44px; border-radius: 12px; border: 2px solid #e2e8f0; background: #f8fafc; font-size: 16px; font-weight: 800; cursor: pointer; transition: all 0.25s; font-family: 'Quicksand', sans-serif; }
.tf-btn:hover { transform: scale(1.1); }
.tf-true { color: #10b981; }
.tf-false { color: #ef4444; }
.tf-btn.selected { color: #fff; transform: scale(1.1); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.tf-true.selected { background: linear-gradient(135deg, #10b981, #34d399); border-color: #10b981; }
.tf-false.selected { background: linear-gradient(135deg, #ef4444, #f87171); border-color: #ef4444; }
.tf-row.tf-correct { background: linear-gradient(135deg, #d1fae5, #a7f3d0) !important; border-color: #10b981 !important; }
.tf-row.tf-wrong { background: linear-gradient(135deg, #fee2e2, #fecaca) !important; border-color: #ef4444 !important; animation: shakeWrong 0.4s ease; }
.tf-btn.tf-timeout-correct { background: linear-gradient(135deg, #d1fae5, #a7f3d0); border-color: #86efac; animation: pulseCorrect 0.5s ease, glowCorrect 1.2s ease-in-out 0.5s infinite alternate; }

/* Matching */
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 72px; position: relative; margin: 0 auto; }
.match-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; overflow: visible; }
.match-item { padding: 12px 16px; border-radius: 14px; font-size: clamp(16px, 2.5vw, 22px); font-weight: 600; color: #334155; transition: all 0.2s; position: relative; line-height: 1.4; display: flex; align-items: center; min-height: 52px; cursor: pointer; user-select: none; }
.match-item:nth-child(4n+1) { border: 2px solid #a5f3fc; background: #f0fdfa; color: #0f766e; }
.match-item:nth-child(4n+2) { border: 2px solid #fecaca; background: #fff5f5; color: #be123c; }
.match-item:nth-child(4n+3) { border: 2px solid #ddd6fe; background: #faf5ff; color: #6d28d9; }
.match-item:nth-child(4n+4) { border: 2px solid #fde68a; background: #fdfdf2; color: #b45309; }
.match-l { padding-right: 28px; }
.match-r { padding-left: 28px; }
.match-item.selected { border-color: #6366f1 !important; background: linear-gradient(135deg, #eef2ff, #f5f3ff) !important; box-shadow: 0 0 0 3px rgba(99,102,241,0.2) !important; }
.match-item.paired { border-color: #3b82f6 !important; background: linear-gradient(135deg, #eff6ff, #dbeafe) !important; }
.match-dot { width: 14px; height: 14px; border-radius: 50%; background: #6366f1; border: 2.5px solid #fff; box-shadow: 0 0 0 2px #6366f1; position: absolute; z-index: 10; transition: all 0.15s; pointer-events: none; }
.match-dot-r { right: -7px; top: 50%; transform: translateY(-50%); }
.match-dot-l { left: -7px; top: 50%; transform: translateY(-50%); }
.match-dot.dot-selected { background: #f59e0b !important; box-shadow: 0 0 0 4px rgba(245,158,11,0.4) !important; transform: translateY(-50%) scale(1.3); }
.match-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-size: 13px; font-weight: 800; margin-right: 10px; flex-shrink: 0; }
.match-num-r { margin-right: 0; margin-left: 10px; background: linear-gradient(135deg, #0ea5e9, #06b6d4); }
.match-text { flex: 1; }

/* Bottom bar */
.q-bottom-bar { display: flex; flex-direction: column; align-items: center; gap: 10px; position: sticky; bottom: 0; z-index: 2; }
.q-action-row, .q-nav-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; width: 100%; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .left-panel { width: 100%; min-width: unset; height: auto; max-height: 30vh; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .game-screen-root { flex-direction: column; }
    #questionArea { width: 96vw; height: 96vh; border-radius: 18px; }
    .tf-list { grid-template-columns: 1fr; }
    .q-opts { grid-template-columns: 1fr; }
    .gift-container { grid-template-columns: repeat(5, 90px); gap: 12px 15px; }
    .gift-box { width: 90px; height: 110px; }
    .gift-lid { width: 100px; height: 24px; }
    .gift-body { width: 90px; height: 86px; }
    .candy { width: 50px; height: 50px; font-size: 15px; }
    .candy-gift { width: 80px; height: 96px; }
    .candy-gift .gift-lid { width: 88px; height: 22px; margin-left: -4px; }
    .candy-gift .gift-body { width: 80px; height: 74px; }
    .candy-gift .gift-qmark { font-size: 22px; }
}
.instruction-box p { opacity: 0.85; }
.check-icon { margin-top: 2px; color: var(--c-neon-lime); font-size: 1.4rem; filter: drop-shadow(0 0 6px rgba(198,255,0,0.8)); }
.question-count { color: #fff; font-weight: 700; font-size: 1.05rem; }

/* ---- Game screen ---- */
.game-screen-root {
    min-height: 100vh; padding: 2rem;
    background: linear-gradient(160deg, #1a0050 0%, #2d0080 50%, #00003a 100%);
}
.game-placeholder {
    display: flex; min-height: calc(100vh - 4rem);
    flex-direction: column; align-items: center;
    justify-content: center; gap: 1rem; text-align: center; color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 575.98px) {
    .ws-logo-container { margin-top: 4px; margin-left: 4px; }
    .ws-logo { max-width: 96px; }
    .ws-content-wrapper { padding: 1rem; }
    .instruction-box { padding: 1.25rem !important; }
    .ws-credit { font-size: 0.8rem; }
}

/* Decorative Elements in Question Modal */
.q-deco {
    position: absolute;
    pointer-events: none;
    user-select: none;
    opacity: 0.45;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    transition: all 0.3s;
}
.q-deco-candy-1 {
    bottom: 15%;
    left: 4%;
    font-size: 36px;
    animation: floatSlow 6s ease-in-out infinite;
}
.q-deco-candy-2 {
    top: 25%;
    right: 4%;
    font-size: 32px;
    animation: floatSlow 5s ease-in-out infinite alternate;
}
.q-deco-gift {
    bottom: 8%;
    right: 3%;
    font-size: 40px;
    animation: spinSlow 20s linear infinite;
}
.q-deco-star-1 {
    top: 15%;
    left: 5%;
    font-size: 28px;
    animation: pulseStar 3s ease-in-out infinite alternate;
}
.q-deco-star-2 {
    bottom: 25%;
    right: 5%;
    font-size: 30px;
    animation: floatSlow 7s ease-in-out infinite;
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(15deg); }
}
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes pulseStar {
    0% { transform: scale(1) rotate(0deg); opacity: 0.15; }
    100% { transform: scale(1.2) rotate(15deg); opacity: 0.3; }
}

/* ---- Global Settings Button ---- */
.btn-global-settings {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 100002;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7873f5, #ff6ec7);
    border: 2px solid rgba(255,255,255,0.4);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255,110,199,0.5);
    transition: all 0.3s ease;
}
.btn-global-settings:hover {
    transform: rotate(30deg) scale(1.1);
    box-shadow: 0 0 25px rgba(255,110,199,0.8);
    color: #fff;
}
