:root {
    --bg: #050510;
    --cyan: #4bd7a0;
    --cyan2: #4bd7a0;
    --pink: #ff6be8;
    --green: #63ff9b;
    --gold: #ffd76a;
    --danger: #fe0000;
    --text: rgba(255, 255, 255, 1);
    --muted: rgba(255, 255, 255, 1);
    --line: rgba(255, 255, 255, 0.2);
    --panel: rgba(10, 14, 42, 0.58);
    --panelStrong: rgba(11, 16, 50, 0.78);
    --shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
    --radius: 22px;
    --screenMax: 430px;
    --safeTop: env(safe-area-inset-top, 0px);
    --safeBottom: env(safe-area-inset-bottom, 0px);
    --fontSizeButton: clamp(15px, 3.8vw, 18px);
    --fontSizeTitle: clamp(17px, 5vw, 21px);
    --fontSizeText: clamp(14px, 3.2vw, 18px);
    --fontSizeSmall: clamp(11px, 4vw, 13px);
    --fontCountdown: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: auto;
    background: var(--bg);
    color: var(--text);
    font-family:
        "Space Grotesk",
        Poppins,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    /* font-family: "Space Grotesk", sans-serif; */
    overscroll-behavior: none;
    font-size: var(--fontSizeText);

    -webkit-user-select: none;
    /* Safari, iOS Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE 10+ và Edge cũ */
    user-select: none;
    /* Chuẩn chung cho Chrome, Edge mới, Opera */
}

button,
input,
textarea,
select {
    font: inherit;
}

select {
    /* Xóa bỏ giao diện mặc định của trình duyệt */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

button {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.loading-result {
    animation: resultIn 0.25s ease;
}

.loading-orbit {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 14px;
    position: relative;
    border: 2px solid rgba(25, 216, 255, 0.22);
    box-shadow: 0 0 20px rgba(25, 216, 255, 0.35);
}

.loading-orbit::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #19d8ff;
    border-right-color: #ff6be8;
    animation: spin 1s linear infinite;
}

.loading-orbit span {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: radial-gradient(circle, #19d8ff, transparent 70%);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

.hint-active button {
    width: 49%;
}

.timer-ring {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 16px auto;
    display: grid;
    place-items: center;
    position: relative;

    /* progress */
    background: conic-gradient(#19d8ff var(--progress, 100%), rgba(255, 255, 255, 0.15) 0);
}

/* nền trong */
.timer-ring::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: #0f1535;
}

/* text luôn nằm trên */
.timer-seconds {
    position: relative;
    z-index: 2;
    font-size: 22px;
    font-weight: 800;
    color: #19d8ff;
    text-shadow: 0 0 12px #19d8ff;
}

.timer-ring.danger {
    background: conic-gradient(#ff4d6d var(--progress, 100%), rgba(255, 255, 255, 0.15) 0);
}

.timer-ring.danger>.timer-seconds {
    color: #ff4d6d;
    text-shadow: 0 0 25px #ff4d6d;
}

.planet-img {
    width: 100%;
    height: 100%;
    background: transparent;
}

.planet-img.alpha-webm {
    mix-blend-mode: normal;
    filter: none;
}

.start-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.start-game-btn {
    border: 0;
    border-radius: 999px;
    padding: 18px 34px;
    color: #fff;
    font-size: var(--fontSizeButton);
    font-weight: 900;
    background: linear-gradient(90deg, #19d8ff, #006de8);
    box-shadow: 0 0 28px rgba(25, 216, 255, 0.55);
}

.video-save-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + var(--safeBottom));
    z-index: 9995;
    max-width: 540px;
    margin: 0 auto;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(25, 216, 255, 0.4);
    background: linear-gradient(180deg, rgba(6, 11, 35, 0.95), rgba(9, 15, 46, 0.9));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.video-save-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.video-save-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.video-save-text {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.video-save-percent {
    min-width: 40px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: #9ff3ff;
}

.video-save-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.16);
}

.video-save-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #19d8ff, #63ff9b);
    transition: width 0.22s ease;
}

.trade-wrap {
    height: 100%;
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 20px 0px;
}

.trade-badge {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(25, 216, 255, 0.14);
    border: 1px solid rgba(25, 216, 255, 0.38);
    color: #9ff3ff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 0 22px rgba(25, 216, 255, 0.18);
}

.trade-title {
    font-size: 30px;
    font-weight: 900;
    text-shadow: 0 0 24px rgba(25, 216, 255, 0.45);
}

.trade-card {
    width: 100%;
    /* max-width: 390px; */
    padding: 24px 20px;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(14px);
    box-shadow:
        0 22px 50px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.trade-icon {
    width: 120px;
    height: auto;
    padding: 12px 20px;
    margin: 10px auto;
    display: grid;
    place-items: center;
    border-radius: 40px;
    font-size: 38px;
    background: linear-gradient(135deg, #63ff9b, #19d8ff);
    box-shadow: 0 0 28px rgba(99, 255, 155, 0.35);
}

.trade-label {
    color: rgba(255, 255, 255, 0.75);
    /* font-size: 13px; */
    font-weight: 700;
    text-transform: uppercase;
}

.trade-money {
    margin: 6px 0 10px;
    font-size: 26px;
    font-weight: 900;
    color: #63ff9b;
    text-shadow: 0 0 18px rgba(99, 255, 155, 0.45);
}

.trade-from {
    color: rgba(255, 255, 255, 0.82);
    /* font-size: clamp(12px, 3.2vw, 14px); */
    line-height: 1.5;
}

/* .trade-from b {
    color: #fff;
} */

.trade-message {
    width: 100%;
    max-width: 390px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    text-align: left;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.45;
}

.trade-message span {
    font-size: 24px;
}

@keyframes flashWin {
    0% {
        opacity: 0;
    }

    30% {
        opacity: 0.6;
    }

    100% {
        opacity: 0;
    }
}

.win-card {
    transform: scale(0.85);
    opacity: 0;
    animation: winPop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes winPop {
    0% {
        transform: scale(0.85);
        opacity: 0;
    }

    60% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.hint-card {
    animation: hintGlow 1.5s ease-in-out infinite;
}

@keyframes hintGlow {

    0%,
    100% {
        box-shadow: 0 0 12px rgba(99, 255, 155, 0.3);
    }

    50% {
        box-shadow: 0 0 35px rgba(99, 255, 155, 0.8);
    }
}

.ok-btn {
    opacity: 0;
    transform: translateY(20px);
    animation: btnIn 0.4s ease 0.4s forwards;
}

@keyframes btnIn {
    to {
        opacity: 1;
        transform: none;
    }
}

.confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1000;
}

.confetti span {
    position: absolute;
    top: -30px;
    opacity: 0.95;
    animation: confettiFall linear forwards;
    will-change: transform, opacity;
}

.confetti .paper {
    width: 7px;
    height: 14px;
    border-radius: 2px;
}

.confetti .star {
    font-size: 14px;
    line-height: 1;
    filter: drop-shadow(0 0 6px currentColor);
}

.confetti .coin {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff6a8, #ffd76a 45%, #d99000);
    box-shadow: 0 0 10px rgba(255, 215, 106, 0.55);
}

.confetti .coin::before {
    content: "$";
    color: #8a5a00;
    font-size: 11px;
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

@keyframes confettiFall {
    0% {
        transform: translate3d(0, -30px, 0) rotate(0deg) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate3d(var(--x), 110vh, 0) rotate(var(--r)) scale(0.9);
        opacity: 0;
    }
}

.auction-price {
    display: block;
    font-size: clamp(30px, 9vw, 50px);
    color: #ffd76a;
    font-weight: 900;
    margin-bottom: 8px;
    text-shadow: 0 0 16px rgba(255, 215, 106, 0.4);
}

.trade-user-screen {
    height: 100%;
    padding: 24px 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.modal-fullscreen {
    overflow: auto;
    padding: 0px !important;
    background: none !important;
    /* Loại bỏ nền ở lớp cha */
    z-index: 100;
}

.notify-modal {
    z-index: 200;
}

.notify-disconnected {
    z-index: 10000 !important;
}

.modal-fullscreen::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    /* Đẩy lớp nền này xuống dưới cùng */

    /* Chuyển toàn bộ các dải màu và hình ảnh của bạn xuống đây */
    background:
        radial-gradient(circle at 50% 14%, rgba(255, 107, 232, 0.32), transparent 24%),
        radial-gradient(circle at 13% 48%, rgba(25, 216, 255, 0.24), transparent 27%),
        radial-gradient(circle at 88% 60%, rgba(0, 118, 255, 0.22), transparent 24%),
        linear-gradient(rgba(4, 5, 24, 0.16), rgba(5, 5, 22, 0.66)),
        url(../img/bg-game.png?auto=format&fit=crop&w=1800&q=86) center / cover no-repeat;

    opacity: 1;
    /* Thay đổi độ mờ của toàn bộ tổ hợp nền ở đây (0.6 tương đương 60%) */
    pointer-events: none;
    /* Đảm bảo lớp nền không cản trở các thao tác click chuột */
}

.modal-fullscreen .modal-card {
    background: transparent;
    box-shadow: unset;
    border: unset;
    padding: 0;
    overflow: unset !important;
}

.trade-user-modal .trade-user-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.trade-user-modal .trade-user-screen {
    height: auto;
    min-height: 0;
    padding: 4px 0;
    gap: 12px;
}

.trade-user-modal .privilege-use-card {
    width: 100%;
}

.trade-confirm-modal .trade-confirm-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.trade-confirm-modal .trade-wrap {
    height: auto;
    min-height: 0;
    padding: 4px 0;
}

.trade-result-modal .trade-result-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.trade-result-modal .trade-wrap {
    height: auto;
    min-height: 0;
    padding: 4px 0;
}

.trade-user-screen .group {
    margin-bottom: 5px;
}

.trade-screen .row {
    justify-items: center;
    width: 100%;
    justify-content: space-between;
}

.trade-screen .btn {
    width: 49%;
}

.win-screen {
    height: 100%;
    padding: 24px 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* justify-content: center; */
    gap: 18px;
    text-align: center;
    /* overflow: auto; */
}

.privilege-money-modal .privilege-money-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.privilege-money-modal .win-screen {
    height: auto;
    min-height: 0;
    padding: 4px 0;
}

.result-bid-success-modal .result-bid-success-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.result-bid-success-modal .win-screen {
    height: auto;
    min-height: 0;
    padding: 4px 0;
}

.result-bid-failed-modal .result-bid-failed-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.result-bid-failed-modal .win-screen {
    height: auto;
    min-height: 0;
    padding: 4px 0;
}

.time-pact-modal .time-pact-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.time-pact-modal .win-screen {
    height: auto;
    min-height: 0;
    padding: 4px 0;
}

.planet-reward-modal .planet-reward-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.planet-reward-modal .win-screen {
    height: auto;
    min-height: 0;
    padding: 4px 0;
}

.planet-earn-deducted-modal .planet-earn-deducted-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.planet-earn-deducted-modal .win-screen {
    height: auto;
    min-height: 0;
    padding: 4px 0;
}

.planet-spend-select-modal .planet-spend-select-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.planet-spend-select-modal .privilege-use-screen {
    height: auto;
    min-height: 0;
    padding: 4px 0;
    gap: 12px;
}

.planet-spend-reward-modal .planet-spend-reward-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.planet-spend-reward-modal .win-screen {
    height: auto;
    min-height: 0;
    padding: 4px 0;
}

.reward-hint-modal .reward-hint-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.reward-hint-modal .win-screen {
    height: auto;
    min-height: 0;
    padding: 4px 0;
}

.privilege-time-modal .privilege-time-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.privilege-time-modal .privilege-use-screen {
    height: auto;
    min-height: 0;
    padding: 4px 0;
    gap: 12px;
}

.privilege-time-reward-modal .privilege-time-reward-card {
    width: min(94vw, var(--screenMax));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.privilege-time-reward-modal .win-screen {
    height: auto;
    min-height: 0;
    padding: 4px 0;
}

.win-screen .list-hint {
    overflow: auto;
}

.win-screen .privilege-icon-wrap,
.privilege-use-screen .privilege-use-icon-wrap {
    width: 130px;
    margin: 25px auto 30px;
}

.win-badge {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(25, 216, 255, 0.14);
    border: 1px solid rgba(25, 216, 255, 0.45);
    color: #9ff3ff;
    font-size: var(--fontSizeButton);
    font-weight: 700;
    box-shadow: 0 0 24px rgba(25, 216, 255, 0.18);
}

.win-badge.badge-danger {
    background: rgba(255, 77, 109, 0.16);
    border: 1px solid rgba(255, 77, 109, 0.55);
    color: #ff9fb1;
    box-shadow: 0 0 24px rgba(255, 77, 109, 0.22);
}

.win-screen h1 {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 0.2px;
    text-shadow: 0 0 22px rgba(25, 216, 255, 0.45);
}

.win-card {
    width: 100%;
    /* max-width: 380px; */
    padding: 22px 20px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(14px);
    box-shadow:
        0 22px 50px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.win-icon {
    width: 80px;
    height: 80px;
    padding: 10px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    font-size: 38px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ffe66d, #ff9f1c);
    box-shadow: 0 0 28px rgba(255, 214, 106, 0.45);
}

.win-card p {
    /* font-size: clamp(12px, 3.2vw, 14px); */
    /* color: rgba(255, 255, 255, .84); */
    margin-bottom: 6px;
}

.win-card strong {
    display: block;
    font-size: clamp(30px, 9vw, 50px);
    color: #ffd76a;
    font-weight: 900;
    margin-bottom: 8px;
    text-shadow: 0 0 16px rgba(255, 215, 106, 0.4);
}

.win-card span {
    display: block;
    /* font-size: clamp(12px, 3.2vw, 14px); */
    /* color: rgba(255, 255, 255, .72); */
    line-height: 1.5;
}

.hint-card {
    width: 100%;
    /* max-width: 380px; */
    position: relative;
    margin-top: 18px;
    padding: 34px 22px 24px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(56, 255, 129, 0.18), rgba(56, 255, 129, 0.08));
    border: 1px solid rgba(99, 255, 155, 0.55);
    box-shadow:
        0 0 30px rgba(99, 255, 155, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hint-tag {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 22px;
    border-radius: 999px;
    background: linear-gradient(90deg, #63ff9b, #1bd67b);
    color: #063b24;
    font-weight: 900;
    font-size: 14px;
    box-shadow: 0 0 20px rgba(99, 255, 155, 0.35);
}

.hint-card p {
    color: #caffdc;
    font-weight: 800;
    line-height: 1.45;
    text-transform: uppercase;
    font-size: clamp(12px, 3.2vw, 14px);
}

.ok-btn {
    width: 100%;
    max-width: 380px;
    margin-top: 10px;
    border-radius: 999px;
}

.ok-btn {
    width: 120px;
    max-width: 120px;
    margin-top: 20px;
}

.fade-out {
    animation: fadeOut 0.25s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    animation: fadeIn 0.35s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.result-box {
    margin-top: 10px;
}

.hint-box {
    margin-top: 10px;
}

.hint-box .title {
    font-size: var(--fontSizeButton);
}

.list-hint {
    width: 100%;
    background: linear-gradient(180deg, rgba(25, 216, 255, 0.12), rgba(255, 255, 255, 0.05)), var(--panelStrong);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(12px, 3.4vw, 16px);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.list-hint .hint {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-direction: column;
}

.list-hint .divider {
    width: 100%;
    max-width: 80%;
}

.list-hint .hint-result {
    line-height: 1.45;
    margin: 10px auto;
}

.hint-title {
    color: var(--muted);
    font-size: var(--fontSizeSmall);
}

.hint-title span {
    font-weight: unset;
}

.title {
    text-transform: uppercase;
}

.display-none {
    display: none;
}

.btn-wrap {
    display: flex;
    justify-content: center;
}

.error-icon {
    animation: pop 0.3s ease;
}

@keyframes pop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.error-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff5f5f, #d80027);
    position: relative;
    margin: 16px auto;
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.45);
}

/* dấu X */
.error-icon::before,
.error-icon::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 6px;
    background: white;
    top: 50%;
    left: 50%;
    transform-origin: center;
    border-radius: 4px;
}

.error-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.error-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #18c79c;
    position: relative;
    margin: 16px auto;
    box-shadow: 0 0 18px rgba(24, 199, 156, 0.45);
}

.success-icon::before {
    content: "";
    position: absolute;
    width: 28px;
    height: 14px;
    border-left: 7px solid white;
    border-bottom: 7px solid white;
    transform: rotate(-45deg);
    left: 17px;
    top: 19px;
    border-radius: 3px;
}

.deactive {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);

    filter: grayscale(1);
    opacity: 0.6;

    pointer-events: none;
}

.countdown {
    font-family: var(--fontCountdown);
    font-size: 72px;
    font-weight: 800;
    text-align: center;
}

#countNum {
    display: inline-block;
    transition:
        transform 0.25s ease,
        opacity 0.25s ease,
        color 0.25s ease;
    color: #19d8ff;
    text-shadow: 0 0 30px #19d8ff;
}

/* khi <= 5s */
#countNum.danger {
    color: #ff4d6d;
    text-shadow: 0 0 25px #ff4d6d;
}

/* hiệu ứng pop */
.count-animate {
    transform: scale(1.4);
    opacity: 0;
}

.celebrate-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

.celebrate-particles i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #19d8ff;
    box-shadow: 0 0 12px currentColor;
    animation: particleBurst 1.4s ease-out infinite;
    opacity: 0;
}

.celebrate-particles i:nth-child(2) {
    background: #ffd76a;
    animation-delay: 0.08s;
    --x: -80px;
    --y: -120px;
}

.celebrate-particles i:nth-child(3) {
    background: #ff6be8;
    animation-delay: 0.16s;
    --x: 90px;
    --y: -110px;
}

.celebrate-particles i:nth-child(4) {
    background: #63ff9b;
    animation-delay: 0.24s;
    --x: -120px;
    --y: -40px;
}

.celebrate-particles i:nth-child(5) {
    background: #fff;
    animation-delay: 0.32s;
    --x: 120px;
    --y: -20px;
}

.celebrate-particles i:nth-child(6) {
    background: #19d8ff;
    animation-delay: 0.4s;
    --x: -60px;
    --y: 70px;
}

.celebrate-particles i:nth-child(7) {
    background: #ffd76a;
    animation-delay: 0.48s;
    --x: 70px;
    --y: 80px;
}

.celebrate-particles i:nth-child(8) {
    background: #ff6be8;
    animation-delay: 0.56s;
    --x: -20px;
    --y: -150px;
}

.celebrate-particles i:nth-child(9) {
    background: #63ff9b;
    animation-delay: 0.64s;
    --x: 30px;
    --y: -130px;
}

.celebrate-particles i:nth-child(10) {
    background: #fff;
    animation-delay: 0.72s;
    --x: 0px;
    --y: 110px;
}

@keyframes particleBurst {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.2);
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--x, 180px)), calc(-50% + var(--y, -240px))) scale(1.2);
    }
}

.gift-icon {
    /* margin: 18px auto; */
    /* margin: -15px auto; */
    display: grid;
    place-items: center;
    /* font-size: 58px; */
    position: relative;
    filter: drop-shadow(0 0 18px #19d8ff);
    /* animation: giftFloat 2.2s ease-in-out infinite; */
}

.gift-icon::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(25, 216, 255, 0.35), transparent 15%);
    animation: giftPulse 1.6s ease-in-out infinite;
    z-index: -1;
}

.gift-icon span {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(25, 216, 255, 0.55);
    animation: giftRing 2.4s linear infinite;
}

.gift-icon .planet {
    max-width: 300px;
}

.gift-icon .planet.selected::after {
    content: unset;
}

@keyframes giftFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.04);
    }
}

@keyframes giftPulse {

    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

@keyframes giftRing {
    from {
        transform: rotate(0deg) scale(0.9);
    }

    to {
        transform: rotate(360deg) scale(1.05);
    }
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
}

.modal-backdrop.show {
    display: grid;
}

.modal-card {
    width: min(92vw, 420px);
    background: linear-gradient(180deg, rgba(25, 216, 255, 0.14), rgba(255, 255, 255, 0.06)), rgba(9, 14, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    text-align: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-text {
    /* font-size: 13px; */
    line-height: 1.55;
    color: var(--muted);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.modal-actions .btn {
    margin-top: 0;
    max-width: none;
}

.modal-actions button {
    width: 50%;
}

.modal-actions.algin-center {
    justify-content: center;
}

.modal-actions.algin-center button {
    width: auto;
    min-width: 120px;
}

.effect-freeze-screen {
    height: 100%;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    text-align: center;
    overflow: auto;
}

.effect-freeze {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    pointer-events: none;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(175, 230, 255, 0.22), rgba(80, 152, 220, 0.26)),
        url("../img/bg-freeze.png") center/cover no-repeat;
    backdrop-filter: blur(2.8px) saturate(0.92);
    -webkit-backdrop-filter: blur(2.8px) saturate(0.92);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.effect-freeze.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.effect-freeze__content {
    /* position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); */
    width: min(92vw, var(--screenMax));
    padding: 20px 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(228, 247, 255, 0.26), rgba(155, 212, 245, 0.18));
    border: 1px solid rgba(219, 246, 255, 0.55);
    box-shadow:
        0 14px 34px rgba(0, 26, 46, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    text-align: center;
    z-index: 2;
    /* pointer-events: none; */
}

.effect-freeze-screen .key-choice-box {
    width: min(92vw, 390px);
    padding: 10px;
}

.effect-freeze__title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.45;
    color: #ffffff;
    text-shadow:
        0 1px 4px rgba(0, 20, 50, 0.8),
        0 0 18px rgba(30, 180, 255, 0.6);
}

.effect-freeze__timer-label {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    /* text-transform: uppercase; */
    letter-spacing: 0.9px;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 20, 50, 0.75);
}

.effect-freeze__countdown {
    margin-top: 8px;
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
    color: #ffffff;
    text-shadow:
        0 2px 6px rgba(0, 20, 50, 0.85),
        0 0 28px rgba(72, 207, 255, 0.9);
}

.effect-freeze__spark {
    position: absolute;
    width: 45px;
    height: 45px;
    background: url("../img/snowflakes.png") center/contain no-repeat;
    filter: drop-shadow(0 0 12px rgba(220, 245, 255, 0.75));
    transform-origin: center;
    opacity: 0;
    animation: freezeSpark 5.2s ease-in-out infinite;
    will-change: transform, opacity;
    pointer-events: none;
}

.effect-freeze__spark.s1 {
    top: 14%;
    left: 18%;
    animation-duration: 3.6s;
    animation-delay: -0.5s;
}

.effect-freeze__spark.s2 {
    top: 26%;
    right: 14%;
    width: 33px;
    height: 33px;
    animation-duration: 5.8s;
    animation-delay: -1.4s;
}

.effect-freeze__spark.s3 {
    bottom: 22%;
    left: 24%;
    width: 39px;
    height: 39px;
    animation-duration: 6.2s;
    animation-delay: -2.1s;
}

.effect-freeze__spark.s4 {
    bottom: 16%;
    right: 21%;
    width: 36px;
    height: 36px;
    animation-duration: 6s;
    animation-delay: -1s;
}

.effect-freeze .key-choice-box {
    width: min(92vw, var(--screenMax));
    background: linear-gradient(180deg, rgba(14, 43, 74, 0.98), rgba(21, 30, 56, 0.9));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

@keyframes freezeSweep {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(-36px, 24px, 0) scale(1.05);
    }
}

@keyframes freezePulse {
    0% {
        transform: scale(1);
        opacity: 0.52;
    }

    100% {
        transform: scale(1.08);
        opacity: 0.8;
    }
}

@keyframes freezeSpark {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.85);
        opacity: 0;
    }

    20% {
        opacity: 0.75;
    }

    64% {
        opacity: 0.42;
    }

    84% {
        opacity: 0;
    }

    100% {
        transform: translateY(-80px) rotate(220deg) scale(1.16);
        opacity: 0;
    }
}

.app {
    width: 100%;
    height: 100svh;
    height: 100dvh;
    position: relative;
    overflow: auto;
    background:
        radial-gradient(circle at 50% 14%, rgba(255, 107, 232, 0.32), transparent 24%),
        radial-gradient(circle at 13% 48%, rgba(25, 216, 255, 0.24), transparent 27%),
        radial-gradient(circle at 88% 60%, rgba(0, 118, 255, 0.22), transparent 24%),
        linear-gradient(rgba(4, 5, 24, 0.16), rgba(5, 5, 22, 0.66)),
        url("../img/bg-game.png?auto=format&fit=crop&w=1800&q=86") center/cover no-repeat;
}

.app::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at center, transparent 50%, rgba(0, 0, 0, 0.5)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.42));
    z-index: 0;
}

.app::after {
    content: "";
    position: fixed;
    inset: -20%;
    pointer-events: none;
    opacity: 0.22;
    background-image: radial-gradient(circle, rgba(25, 216, 255, 0.6) 0 1px, transparent 1.3px);
    background-size:
        72px 72px,
        118px 118px;
    animation: spaceDrift 34s linear infinite;
    z-index: 0;
}

@keyframes spaceDrift {
    to {
        transform: translate3d(-72px, 72px, 0);
    }
}

.shell {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: calc(10px + var(--safeTop)) 14px calc(10px + var(--safeBottom));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    /* gap: 8px; */
    /* overflow: hidden; */
    padding-bottom: 0px;
}

.hud {
    width: 100%;
    max-width: var(--screenMax);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: clamp(10px, 3.2vw, 16px);
    line-height: 1.35;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
    min-height: 0;
}

.hud-chip {
    min-width: 0;
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition:
        background 0.3s,
        border-color 0.3s;
}

.hud-chip.danger {
    background: rgba(220, 38, 38, 0.25);
    border-color: rgba(220, 38, 38, 0.7);
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.45);
}

.hud b {
    /* color: var(--gold); */
    font-weight: 800;
    white-space: nowrap;
}

.hud .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hud-row {
    display: flex;
    width: 100%;
    align-items: center;
}

.hud-left,
.hud-center,
.hud-right {
    flex: 1;
    display: flex;
    /* Biến từng khối con thành Flex container để căn chỉnh các phần tử bên trong */
}

.hud-left {
    justify-content: flex-start;
}

.hud-center {
    justify-content: center;
}

.hud-right {
    justify-content: flex-end;
    flex: 0;
}

.hud-row-1 {
    justify-content: space-between;
    align-items: center;
}

.hud-row-2 {
    justify-content: center;
}

.hud-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.hud-info-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
    min-width: 130px;
}

.hud-info-top {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.hud-name {
    /* font-weight: 700; */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    color: var(--text);
}

.hud-priv-wrap {
    position: relative;
    flex: 0 0 auto;
}

.hud-hope-star {
    display: flex;
    width: 20px;
    height: auto;
    margin-right: 5px;
    transform: translateY(-1px);
}

.hud-hope-star img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0px 0px 12px rgba(255, 215, 106, 0.9));
}

.hud-btn-trade {
    border: 0;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #09d151, #15c4e7);
    box-shadow: 0 0 28px rgba(99, 255, 155, 0.35);
    transition:
        transform 0.14s ease,
        filter 0.14s ease,
        opacity 0.14s ease;
    flex: 0 0 auto;
    width: auto;
    padding: 16px 26px;
    border-radius: 18px;
    font-size: var(--fontSizeText);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.85);
    position: relative;
}

.hud-btn-trade:disabled {
    filter: grayscale(100%) brightness(0.6);
    opacity: 0.6;
    pointer-events: none;
    box-shadow: none;
    cursor: not-allowed;
}

.hud-icon-trade {
    width: 32px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn:hover {
    filter: brightness(1.06);
}

.btn:active {
    transform: translateY(1px) scale(0.99);
}

.hud-privilege-btn {
    width: 24px;
    height: auto;
    padding: 0;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: transparent;
    border: none;
    margin-right: 5px;
}

.hud-privilege-btn img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0px 0px 10px rgba(255, 215, 106, 0.67));
}

.hud-privilege-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    --hud-arrow-left: 50%;
    width: min(300px, calc(100vw - 28px));
    border-radius: 18px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(11, 16, 50, 0.95);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    z-index: 30;
}

.hud-privilege-popup::before,
.hud-privilege-popup::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
}

.hud-privilege-popup::before {
    top: -9px;
    left: var(--hud-arrow-left);
    transform: translateX(-50%);
    border-bottom: 9px solid rgba(255, 255, 255, 0.24);
}

.hud-privilege-popup::after {
    top: -7px;
    left: var(--hud-arrow-left);
    transform: translateX(-50%);
    border-bottom: 9px solid rgba(11, 16, 50, 0.95);
}

.hud-privilege-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    display: grid;
    place-items: center;
    padding: 0;
}

.hud-privilege-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hud-privilege-popup.hide {
    display: none;
}

.hud-privilege-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.hud-privilege-icon {
    width: 44px;
    height: auto;
    filter: drop-shadow(0 0 12px rgba(255, 215, 106, 0.75));
}

.hud-privilege-name {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    color: #ffd76a;
    text-shadow: 0 0 14px #ffd76a;
    text-transform: uppercase;
}

.hud-privilege-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.45;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--screenMax);
    display: flex;
    flex-direction: column;
}

.stage {
    width: 100%;
    max-width: var(--screenMax);
    margin: 0 auto;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* overflow: hidden */
}

.screen {
    display: none;
    height: 100%;
    min-height: 0;
    /* overflow: hidden; */
    animation: fadeSlide 0.22s ease both;
}

.screen.active {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: scale(0.99);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.content-center {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    /* overflow: hidden */
}

.title {
    text-align: center;
    font-size: var(--fontSizeTitle);
    font-weight: 800;
    letter-spacing: 0.15px;
    margin: 6px 0 8px;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.85);
    flex: 0 0 auto;
    color: cyan;
}

.subtitle {
    text-align: center;
    color: var(--muted);
    line-height: 1.45;
    margin: 0 auto 10px;
    max-width: 36em;
    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.75);
    flex: 0 0 auto;
}

.card {
    width: 100%;
    /* background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .06)), var(--panel); */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(12px, 3.4vw, 16px);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    min-height: 0;
    /* overflow: hidden */
}

.card.strong {
    background: linear-gradient(180deg, rgba(25, 216, 255, 0.12), rgba(255, 255, 255, 0.05)), var(--panelStrong);
}

.label {
    color: var(--muted);
    margin: 7px 2px 5px;
    font-weight: 600;
}

.input,
.textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.94);
    color: #10172f;
    border-radius: 15px;
    padding: 11px 12px;
    line-height: 1.4;
    font-weight: 700;
    outline: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.input:focus,
.textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(25, 216, 255, 0.2);
}

/* Safari select center-align fix */
.select-center-wrap {
    position: relative;
    width: 100%;
}

.select-center-wrap select {
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.select-center-wrap select option {
    color: #10172f;
    -webkit-text-fill-color: #10172f;
}

.select-center-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font: inherit;
    font-weight: 700;
    color: #10172f;
    padding: 11px 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.select-center-overlay.is-placeholder {
    color: rgba(16, 23, 47, 0.45);
    font-weight: 400;
}

.textarea {
    min-height: 76px;
    resize: none;
}

.btn {
    font-size: var(--fontSizeButton);
    width: 100%;
    border: 0;
    border-radius: 20px;
    padding: 12px 14px;
    margin-top: 18px;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.18px;
    background: linear-gradient(90deg, var(--cyan), var(--cyan2));
    box-shadow:
        0 0 18px rgba(25, 216, 255, 0.34),
        0 12px 26px rgba(0, 0, 0, 0.28);
    transition:
        transform 0.14s ease,
        filter 0.14s ease,
        opacity 0.14s ease;
    flex: 0 0 auto;
}

.btn:hover {
    filter: brightness(1.06);
}

.btn:active {
    transform: translateY(1px) scale(0.99);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: none;
}

.btn.btn-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: none;
    color: rgba(255, 255, 255, 0.92);
}

.btn.btn-close:hover {
    background: rgba(255, 255, 255, 0.16);
    filter: none;
}

.btn.danger {
    background: linear-gradient(90deg, var(--danger), #a855f7);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.row {
    display: flex;
    gap: 8px;
}

.row .btn {
    margin-top: 0;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    margin: 10px 0;
}

.small {
    color: var(--muted);
    line-height: 1.45;
    font-size: var(--fontSizeText);
}

.result {
    /* font-size: clamp(11px, 3.15vw, 13px); */
    text-align: center;
    line-height: 1.45;
}

.result-wrap {
    margin-top: 10px;
}

.result-hint-answer {
    font-size: var(--fontSizeButton);
    text-transform: uppercase;
}

.center {
    text-align: center;
}

.green {
    color: var(--green);
    font-weight: 800;
}

.red {
    color: var(--danger);
    font-weight: 800;
}

.cyan {
    color: var(--cyan);
    font-weight: 800;
}

.pink {
    color: var(--pink);
    font-weight: 800;
}

.gold {
    color: var(--gold);
    font-weight: 800;
}

.full-width {
    width: 100%;
}

.big-number {
    font-size: clamp(30px, 9vw, 50px);
    font-weight: 800;
    text-align: center;
    text-shadow: 0 0 22px rgba(25, 216, 255, 0.42);
}

.progress {
    /* display: flex; */
    display: none;
    gap: 6px;
    justify-content: center;
    margin: 5px 0 10px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.3);
}

.dot.active {
    width: 24px;
    background: var(--cyan);
    box-shadow: 0 0 14px var(--cyan);
}

.steps {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 6px 0 10px;
}

.step {
    width: clamp(42px, 12vw, 48px);
    height: clamp(42px, 12vw, 48px);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: #101010;
    display: grid;
    place-items: center;
    font-size: clamp(23px, 7vw, 28px);
    font-weight: 800;
    font-family: "Space Grotesk", Georgia, serif;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.step.active {
    outline: 3px solid var(--cyan);
    background: #fff;
    box-shadow: 0 0 22px rgba(25, 216, 255, 0.5);
}

.brand-logo {
    width: clamp(104px, 150vw, 160px);
    height: auto;
    margin: 4px auto 6px;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.brand-name {
    font-size: clamp(13px, 3.6vw, 16px);
    font-weight: 800;
    color: #fff;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.75);
    margin-bottom: 2px;
    text-align: left;
    width: 100%;
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
}

.question {
    text-align: center;
    line-height: 1.45;
    color: var(--text);
    margin: 6px 0 10px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
    overflow-wrap: anywhere;
}

.key-note {
    text-align: center;
    color: rgba(242, 0, 2, 1);
    font-style: italic;
    font-weight: bold;
    font-size: clamp(14px, 3.6vw, 18px);
    margin-top: 8px;
}

.answer-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 9px 0;
    /* max-width: calc(8 * clamp(28px, 8.3vw, 31px) + 7 * 6px); */
    margin-left: auto;
    margin-right: auto;
}

.answer-boxes input {
    width: clamp(28px, 8.3vw, 31px);
    height: clamp(28px, 8.3vw, 31px);
    border-radius: 8px;
    border: 0;
    background: #fff;
    text-align: center;
    font-weight: 800;
    color: #10172f;
    text-transform: uppercase;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
}

.list-key {
    --key-progress: 0%;
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 35px;
    /* margin: 0 12px; */
    padding: 8px 0;
    font-size: clamp(10px, 2.5vw, 15px);
}

.list-key::before,
.list-key::after {
    content: "";
    position: absolute;
    left: calc(100% / 6);
    right: calc(100% / 6);
    top: 50%;
    height: 4px;
    border-radius: 999px;
    transform: translateY(-50%);
    z-index: 0;
}

.list-key::before {
    background: rgba(255, 255, 255, 0.2);
}

.list-key::after {
    width: var(--key-progress);
    background: linear-gradient(90deg, var(--green), var(--cyan));
    box-shadow: 0 0 14px rgba(25, 216, 255, 0.45);
    right: auto;
}

.list-key.progress-1 {
    --key-progress: 0%;
}

.list-key.progress-2 {
    --key-progress: 30%;
}

.list-key.progress-3 {
    --key-progress: 60%;
}

.key-step {
    position: relative;
    z-index: 1;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.78);
    /* font-weight: 800; */
    letter-spacing: 0.2px;
    transition:
        transform 0.14s ease,
        filter 0.14s ease,
        box-shadow 0.14s ease;
    text-transform: uppercase;
}

.key-step.is-active {
    background: linear-gradient(90deg, var(--cyan), var(--cyan2));
    border-color: rgba(25, 216, 255, 0.8);
    color: #fff;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: 0 0 18px rgba(25, 216, 255, 0.35);
}

.key-step.is-active:hover {
    filter: brightness(1.08);
}

.key-step.is-done {
    background: linear-gradient(90deg, #4e664e, #3f5344);
    border-color: rgba(99, 255, 155, 0.8);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(99, 255, 155, 0.35);
    opacity: 0.96;
}

.key-step.is-done:hover {
    filter: brightness(1.08);
}

.key-step.is-done:active {
    transform: translateY(1px) scale(0.99);
}

.key-step.is-unlock {
    background: linear-gradient(90deg, #66654e, #51533f);
    border-color: rgba(255, 210, 106, 0.75);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(255, 193, 7, 0.35);
    opacity: 0.96;
}

.key-step.is-unlock:hover {
    filter: brightness(1.08);
}

.key-step.is-unlock:active {
    transform: translateY(1px) scale(0.99);
}

.key-step.is-locked {
    background: linear-gradient(90deg, #4e5566, #3f4553);
    border-color: rgba(170, 178, 194, 0.35);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.9;
    filter: grayscale(1);
}

.planet-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 30px 10px;
    justify-items: center;
    margin: 12px 0 45px;
    padding: 0 6px;
}

.planet {
    width: 100%;
    max-width: 108px;
    grid-column: span 2;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: clamp(22px, 7.8vw, 30px);
    color: #fff;
    background: transparent;
    box-shadow: none;
    border: 0;
    position: relative;
    transform: scale(1);
    transition:
        transform 0.2s ease,
        filter 0.2s ease;
}

.planet:nth-child(4) {
    grid-column: 2 / span 2;
}

.planet:nth-child(5) {
    grid-column: 4 / span 2;
}

.planet::after {
    content: attr(data-name);
    text-transform: uppercase;
    position: absolute;
    bottom: -20px;
    font-size: 16px;
    font-weight: bold;
    color: var(--muted);
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 2px 10px;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.planet.selected {
    outline: 0;
    box-shadow: none;
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(99, 255, 155, 0.35));
}

.planet.selected::after {
    color: var(--green);
    border-color: rgba(99, 255, 155, 0.85);
    background: rgba(99, 255, 155, 0.12);
    box-shadow: 0 0 12px rgba(99, 255, 155, 0.35);
}

.planet-desc {
    margin-top: 22px;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    line-height: 1.5;
}

.planet-desc-name {
    text-transform: uppercase;
    font-size: clamp(21px, 4vw, 28px);
    font-weight: 900;
    color: var(--cyan);
    text-shadow: 0 0 16px rgba(25, 216, 255, 0.45);
    line-height: 1.15;
}

.planet-desc-text {
    font-size: clamp(12px, 3.2vw, 14px);
    color: var(--text);
    /* max-width: 34ch; */
    line-height: 1.45;
}

.planet.locked {
    filter: grayscale(1);
    opacity: 0.46;
}

.gift-icon {
    margin-bottom: -50px;
    margin-top: -25px;
    /* font-size: clamp(58px, 18vw, 76px);
    text-align: center;
    filter: drop-shadow(0 0 22px var(--cyan));
    margin: 8px 0 */
}

.gift-icon .planet {
    max-height: 250px;
}

.countdown {
    font-size: clamp(68px, 20vw, 120px);
    font-weight: 800;
    text-align: center;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 34px var(--cyan);
    margin: 16px 0;
}

.timer-ring {
    width: clamp(92px, 26vw, 112px);
    height: clamp(92px, 26vw, 112px);
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 8px auto;
    background: conic-gradient(var(--cyan) var(--progress, 72%), rgba(255, 255, 255, 0.15) 0);
    box-shadow: 0 0 26px rgba(25, 216, 255, 0.36);
}

.timer-ring div {
    width: 74%;
    height: 74%;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.48);
    display: grid;
    place-items: center;
    font-size: clamp(20px, 6vw, 24px);
    font-weight: 800;
}

.rank-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    height: 100%;
}

.list-rank {
    width: 100%;
}

.rank {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    margin: 6px 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: clamp(11px, 3.15vw, 13px);
}

.rank-1 {
    background: linear-gradient(90deg, rgba(255, 217, 87, 0.36), rgba(255, 255, 255, 0.1));
    border-color: rgba(255, 217, 87, 0.4);
}

.rank-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.36), rgba(255, 255, 255, 0.1));
    border-color: rgba(192, 192, 192, 0.4);
}

/* .rank-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, .36), rgba(255, 255, 255, .10));
    border-color: rgba(205, 127, 50, .4)
} */

.rank .left {
    text-align: left;
}

.rank small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-top: 1px;
}

.nav {
    width: 100%;
    max-width: var(--screenMax);
    margin: 0 auto;
    display: flex;
    gap: 20px;
    z-index: 5;
    flex: 0 0 auto;
}

.nav button {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 5px;
    color: #fff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(10px);
}

.nav button.primary {
    background: linear-gradient(90deg, var(--cyan), var(--cyan2));
    border: 0;
}

.screen-no {
    text-align: center;
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
    margin: 4px auto 0;
    max-width: var(--screenMax);
    line-height: 1;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(85px + var(--safeBottom));
    transform: translateX(-50%) translateY(16px);
    background: rgba(6, 12, 34, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.35;
    color: #fff;
    box-shadow: var(--shadow);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: 0.22s;
    max-width: min(92vw, 390px);
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.screen-scroll {
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: none;
}

.screen-scroll::-webkit-scrollbar {
    display: none;
}

.scroll-card {
    max-height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
}

.scroll-card::-webkit-scrollbar {
    display: none;
}

.privilege-card {
    position: relative;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.privilege-spin-icon {
    width: 90px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0px 0px 10px rgba(255, 215, 106, 0.67));
    animation: privilegeFloat 2.8s ease-in-out infinite;
    transform-origin: center;
}

.privilege-spin-name {
    font-size: var(--fontSizeTitle);
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #ffd76a;
    text-shadow: 0 0 14px #ffd76a;
}

.privilege-result {
    display: none;
    width: 100%;
}

.privilege-icon-wrap {
    width: 90px;
    height: auto;
    margin: 25px auto 15px;
    display: grid;
    place-items: center;
    background: transparent;
}

.privilege-icon {
    width: 100%;
    height: auto;
    filter: drop-shadow(0px 0px 10px rgba(255, 215, 106, 0.67));
    animation: privilegeFloat 2.8s ease-in-out infinite;
    transform-origin: center;
}

@keyframes privilegeFloat {
    0% {
        transform: translateY(0) rotate(-4deg) scale(1);
        filter: drop-shadow(0 4px 10px rgba(255, 215, 106, 0.55));
    }

    25% {
        transform: translateY(-8px) rotate(0deg) scale(1.06);
        filter: drop-shadow(0 12px 22px rgba(255, 215, 106, 0.85));
    }

    50% {
        transform: translateY(0) rotate(4deg) scale(1);
        filter: drop-shadow(0 4px 10px rgba(255, 215, 106, 0.55));
    }

    75% {
        transform: translateY(-5px) rotate(0deg) scale(1.04);
        filter: drop-shadow(0 10px 18px rgba(255, 215, 106, 0.75));
    }

    100% {
        transform: translateY(0) rotate(-4deg) scale(1);
        filter: drop-shadow(0 4px 10px rgba(255, 215, 106, 0.55));
    }
}

.privilege-name {
    font-size: var(--fontSizeTitle);
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #ffd76a;
    text-shadow: 0 0 14px #ffd76a;
    text-transform: uppercase;
}

.privilege-desc {
    margin-top: 10px;
    line-height: 1.65;
    text-align: center;
}

.privilege-accept-btn {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.privilege-use-screen {
    height: 100%;
    padding: 24px 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
}

.privilege-use-card {
    width: 100%;
    /* max-width: 390px; */
    padding: 22px 20px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(14px);
    box-shadow:
        0 22px 50px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.privilege-use-icon-wrap {
    width: 90px;
    height: auto;
    margin: 20px auto 30px;
    display: grid;
    place-items: center;
}

.privilege-use-icon {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0px 0px 10px rgba(255, 215, 106, 0.67));
    animation: privilegeFloat 2.8s ease-in-out infinite;
    transform-origin: center;
}

.privilege-use-name {
    font-size: var(--fontSizeTitle);
    font-weight: 900;
    letter-spacing: 0.8px;
    /* color: #63ff9b;
    text-shadow: 0 0 14px rgba(99, 255, 155, 1); */
    color: #ffd76a;
    text-shadow: 0 0 14px #ffd76a;
    border-color: #63ff9b;
    margin-bottom: 8px;
}

.privilege-use-desc {
    /* font-size: clamp(12px, 3.2vw, 14px); */
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.86);
}

.privilege-use-label {
    display: block;
    margin: 16px 0 8px;
    /* font-size: 12px; */
    font-weight: 800;
    color: rgba(255, 255, 255, 0.82);
    /* text-transform: uppercase; */
    letter-spacing: 0.5px;
}

.privilege-use-select {
    width: 100%;
    border-radius: 15px;
    padding: 12px 14px;
    font-weight: 700;
    outline: 0;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: none;
    color: rgba(255, 255, 255, 0.92);
}

.privilege-use-select:hover {
    border-color: rgba(99, 255, 155, 0.75);
    box-shadow: 0 0 16px rgba(99, 255, 155, 0.18);
}

.privilege-use-select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(99, 255, 155, 0.18);
}

.privilege-use-select option {
    /* background: #fff; */
    color: #10172f;
    /* padding: 10px 14px;
    font-weight: 700; */
}

/* .privilege-use-select option:checked {
    background: #e8fff3;
    color: #0a7a3e;
} */

.privilege-use-note {
    margin-top: 10px;
    font-size: clamp(12px, 3.2vw, 14px);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

.claim-rights-head {
    text-align: center;
}

.claim-rights-title {
    /* font-size: 14px; */
    font-weight: 800;
    color: #ffd76a;
    letter-spacing: 0.15px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.claim-rights-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.4;
}

.claim-rights-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 0;
}

.claim-button {
    position: relative;
    width: 80px;
    height: 80px;
    border: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 28% 24%, #ff9d9d 0%, #ff5f5f 18%, #df2121 46%, #9d0505 100%);
    color: #fff;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translateY(0) perspective(420px) rotateX(14deg);
    transform-style: preserve-3d;
    border: 1px solid rgba(255, 200, 200, 0.45);
    box-shadow:
        0 3px 0 #7c0000,
        0 8px 0 #5d0000,
        0 16px 18px rgba(83, 0, 0, 0.5),
        0 0 30px rgba(255, 66, 66, 0.58),
        inset 0 4px 6px rgba(255, 255, 255, 0.36),
        inset 0 -10px 12px rgba(72, 0, 0, 0.5);
    transition:
        transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.26s ease,
        filter 0.26s ease,
        background 0.26s ease;
    outline: none;
    padding: 0;
    overflow: visible;
    isolation: isolate;
}

.claim-button::before {
    content: "";
    position: absolute;
    inset: 8px 11px auto;
    height: 15px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
    filter: blur(0.5px);
    opacity: 0.9;
    pointer-events: none;
}

.claim-button::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.claim-button-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 124, 124, 0.68);
    background: transparent;
    animation: claimPulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    transform: translateZ(-1px);
    pointer-events: none;
}

@keyframes claimPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.3;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes claimIconBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.claim-button:hover {
    transform: translateY(-3px) perspective(420px) rotateX(17deg) scale(1.06);
    background: radial-gradient(circle at 28% 24%, #ffc2c2 0%, #ff7777 18%, #f22f2f 48%, #af0909 100%);
    box-shadow:
        0 4px 0 #850000,
        0 10px 0 #620000,
        0 20px 22px rgba(90, 0, 0, 0.56),
        0 0 38px rgba(255, 88, 88, 0.82),
        inset 0 5px 7px rgba(255, 255, 255, 0.42),
        inset 0 -11px 14px rgba(72, 0, 0, 0.52);
    filter: saturate(1.1) brightness(1.07);
}

.claim-button:active {
    transform: translateY(5px) perspective(420px) rotateX(6deg) scale(0.985);
    box-shadow:
        0 1px 0 #6e0000,
        0 4px 0 #520000,
        0 9px 12px rgba(70, 0, 0, 0.46),
        0 0 18px rgba(255, 72, 72, 0.58),
        inset 0 3px 5px rgba(255, 255, 255, 0.22),
        inset 0 -8px 11px rgba(60, 0, 0, 0.58);
}

.claim-button:focus-visible {
    box-shadow:
        0 3px 0 #7c0000,
        0 8px 0 #5d0000,
        0 16px 18px rgba(83, 0, 0, 0.5),
        0 0 0 3px rgba(255, 255, 255, 0.3),
        0 0 0 6px rgba(255, 91, 91, 0.42),
        inset 0 4px 6px rgba(255, 255, 255, 0.36),
        inset 0 -10px 12px rgba(72, 0, 0, 0.5);
}

.transparent-gif {
    /* Phép màu nằm ở dòng này: */
    mix-blend-mode: screen;
}

.key-choice-wrap {
    display: flex;
    flex-direction: column;
    /* gap: 10px; */
    margin: 10px 0;
}

.key-choice-box {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
    padding: 5px 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.key-choice-box-planet {
    min-height: 290px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.key-choice-head {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.key-choice-head .planet {
    margin: -16px 0px;
    max-width: 150px;
    width: 150px;
}

.key-choice-head .planet.selected::after {
    content: unset;
}

.key-choice-icon {
    width: 80px;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.key-choice-icon.star {
    width: 100%;
    max-width: 86px;
}

.key-choice-icon.planet {
    display: grid;
    place-items: center;
    font-size: 22px;
    background: radial-gradient(circle at 35% 30%, #fff 0 7%, var(--cyan) 20%, #6d35da 56%, #101447 84%);
}

.key-choice-title {
    /* font-size: 13px; */
    font-size: var(--fontSizeTitle);
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.key-choice-desc {
    margin-top: 8px;
    margin-bottom: 10px;
    /* font-size: 12px; */
    /* font-weight: 700; */
    color: var(--muted);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

.key-choice-text {
    text-align: center;
    /* font-size: 12px; */
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.86);
}

.key-choice-actions {
    display: flex;
    gap: 8px;
    margin: 10px auto;
    padding: 0 10px;
}

.key-choice-actions .btn {
    margin-top: 0;
    width: 49%;
    padding: 10px 12px;
    border-radius: 14px;
}

.key-choice-actions .btn.full-width {
    width: 100%;
}

/* ── Waiting Room ── */
.wr-seats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 18px 0 10px;
}

.wr-seat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--panel);
    border: 1.5px solid var(--line);
    transition:
        border-color 0.3s,
        box-shadow 0.3s;
}

.wr-seat.is-me {
    background: rgb(52, 143, 85, 0.58);
    border-color: var(--green);
    box-shadow: 0 0 14px rgba(99, 255, 155, 0.25);
}

.wr-seat.is-other {
    border-color: var(--cyan);
    box-shadow: 0 0 14px rgba(25, 216, 255, 0.25);
}

.wr-seat.is-waiting {
    border-color: var(--line);
    opacity: 0.65;
}

.wr-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid var(--line);
    background: var(--panelStrong);
    flex-shrink: 0;
}

.wr-seat.is-me .wr-avatar {
    border-color: var(--green);
}

.wr-seat.is-other .wr-avatar {
    border-color: var(--cyan);
}

.wr-info {
    display: flex;
    flex: 1;
    min-width: 0;
    text-align: left;
    flex-direction: column;
}

.wr-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wr-status {
    font-weight: 500;
}

.wr-seat.is-me .wr-name {
    color: var(--green);
}

.wr-seat.is-other .wr-name {
    color: var(--cyan);
}

.wr-seat.is-waiting .wr-name {
    color: var(--muted);
}

.wr-badge {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    margin-left: 15px;
}

.wr-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 18px;
    gap: 4px;
}

/* .wr-countdown.visible { display: flex; } */

.wr-countdown-text {
    /* font-size: 14px; */
    font-weight: 600;
    color: var(--muted);
    text-align: center;
}

.wr-countdown-number {
    font-size: 56px;
    font-weight: 900;
    line-height: 1;
    color: var(--cyan);
    text-shadow: 0 0 24px var(--cyan);
    animation: wrCountPulse 0.9s ease-in-out infinite;
}

@keyframes wrCountPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.hide {
    display: none !important;
}

.hide-opacity {
    opacity: 0 !important;
    pointer-events: none !important;
}

.middle-content {
    /* overflow: auto; */
    padding-bottom: 5px;
}

/* Privilege color classes – all privileges use gold */
/* .hud-privilege-name.privilege-1, .hud-privilege-name.privilege-2, .hud-privilege-name.privilege-3 {
    box-shadow: unset;
}

.privilege-name.privilege-1, .privilege-name.privilege-2, .privilege-name.privilege-3 {
    box-shadow: unset;
}

.privilege-name.privilege-1-result, .privilege-name.privilege-2-result, .privilege-name.privilege-3-result {
    box-shadow: unset;
}

.privilege-spin-name.privilege-1-spin, .privilege-spin-name.privilege-2-spin, .privilege-spin-name.privilege-3-spin {
    box-shadow: unset;
}

.key-choice-title.privilege-1, .key-choice-title.privilege-2, .key-choice-title.privilege-3 {
    box-shadow: unset;
} */

/* Planet color classes */
/* Kiếm (Earn) – purple */
.planet.planet-color-1.selected {
    filter: drop-shadow(0 0 10px rgba(176, 96, 255, 1));
}

.planet.planet-color-1.selected::after {
    color: #de8cff;
    border-color: rgba(176, 96, 255, 0.85);
    background: rgb(229, 177, 255, 0.12);
    box-shadow: 0 0 12px rgba(176, 96, 255, 0.35);
}

/* Tiêu (Spend) – red */
.planet.planet-color-2.selected {
    filter: drop-shadow(0 0 10px rgba(255, 95, 135, 1));
}

.planet.planet-color-2.selected::after {
    color: #fe0000;
    border-color: rgba(213, 1, 1, 0.85);
    background: rgba(255, 95, 135, 0.12);
    box-shadow: 0 0 12px rgba(255, 95, 135, 0.35);
}

/* Tích lũy (Save) – blue */
.planet.planet-color-3.selected {
    filter: drop-shadow(0 0 10px rgba(77, 166, 255, 1));
}

.planet.planet-color-3.selected::after {
    color: #4da6ff;
    border-color: rgba(77, 166, 255, 0.85);
    background: rgba(77, 166, 255, 0.12);
    box-shadow: 0 0 12px rgba(77, 166, 255, 0.35);
}

/* Đầu tư (Invest) – green */
.planet.planet-color-4.selected {
    filter: drop-shadow(0 0 10px rgba(99, 255, 155, 1));
}

.planet.planet-color-4.selected::after {
    color: #63ff9b;
    border-color: rgba(99, 255, 155, 0.85);
    background: rgba(99, 255, 155, 0.12);
    box-shadow: 0 0 12px rgba(99, 255, 155, 0.35);
}

/* Bảo toàn (Protect) – gold */
.planet.planet-color-5.selected {
    filter: drop-shadow(0 0 10px rgba(255, 215, 106, 1));
}

.planet.planet-color-5.selected::after {
    color: #ffd76a;
    border-color: rgba(255, 215, 106, 0.85);
    background: rgba(255, 215, 106, 0.12);
    box-shadow: 0 0 12px rgba(255, 215, 106, 0.35);
}

.planet-desc-name.planet-color-1 {
    color: #de8cff;
    text-shadow: 0 0 16px rgba(128, 0, 255, 0.45);
}

.planet-desc-name.planet-color-2 {
    color: #fe0000;
    text-shadow: 0 0 16px rgba(213, 1, 1, 0.45);
}

.planet-desc-name.planet-color-3 {
    color: #4da6ff;
    text-shadow: 0 0 16px rgba(77, 166, 255, 0.45);
}

.planet-desc-name.planet-color-4 {
    color: #63ff9b;
    text-shadow: 0 0 16px rgba(99, 255, 155, 0.45);
}

.planet-desc-name.planet-color-5 {
    color: #ffd76a;
    text-shadow: 0 0 16px rgba(255, 215, 106, 0.45);
}

.planet-name-color-1 {
    color: #de8cff;
    text-shadow: 0 0 16px rgba(128, 0, 255, 0.45);
}

.planet-name-color-2 {
    color: #fe0000;
    text-shadow: 0 0 16px rgba(213, 1, 1, 0.45);
}

.planet-name-color-3 {
    color: #4da6ff;
    text-shadow: 0 0 16px rgba(77, 166, 255, 0.45);
}

.planet-name-color-4 {
    color: #63ff9b;
    text-shadow: 0 0 16px rgba(99, 255, 155, 0.45);
}

.planet-name-color-5 {
    color: #ffd76a;
    text-shadow: 0 0 16px rgba(255, 215, 106, 0.45);
}

.key-choice-title.planet-color-1 {
    color: #de8cff;
    text-shadow: 0 0 14px #b060ff;
}

.key-choice-title.planet-color-2 {
    color: #fe0000;
    text-shadow: 0 0 14px #fe0000;
}

.key-choice-title.planet-color-3 {
    color: #4da6ff;
    text-shadow: 0 0 14px #4da6ff;
}

.key-choice-title.planet-color-4 {
    color: #63ff9b;
    text-shadow: 0 0 14px #63ff9b;
}

.key-choice-title.planet-color-5 {
    color: #ffd76a;
    text-shadow: 0 0 14px #ffd76a;
}

/* Star of hope badge icon */
.wr-badge-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    vertical-align: middle;
    animation: starHopePulse 2.4s ease-in-out infinite;
    transform-origin: center;
}

@keyframes starHopePulse {
    0% {
        transform: scale(1) rotate(-6deg);
        filter: drop-shadow(0 0 4px #ffd76a88);
    }

    25% {
        transform: scale(1.18) rotate(0deg);
        filter: drop-shadow(0 0 12px #ffd76acc);
    }

    50% {
        transform: scale(1) rotate(6deg);
        filter: drop-shadow(0 0 4px #ffd76a88);
    }

    75% {
        transform: scale(1.12) rotate(0deg);
        filter: drop-shadow(0 0 10px #ffd76acc);
    }

    100% {
        transform: scale(1) rotate(-6deg);
        filter: drop-shadow(0 0 4px #ffd76a88);
    }
}

/* Key step icon */
/* .key-step::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('../img/box-key.png') center / contain no-repeat;
    margin-right: 5px;
    vertical-align: middle;
    opacity: 1;
} */

/* Key title icon */
.key-title::before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 30px;
    background: url("../img/box-key.png") center / contain no-repeat;
    margin-right: 10px;
    vertical-align: middle;
    opacity: 1;
    animation: keyBounce 1.8s linear infinite;
    transform-origin: center bottom;
}

@keyframes keyBounce {

    0%,
    100% {
        transform: translateY(0) rotate(-8deg) scale(1);
        filter: drop-shadow(0 0px 4px rgba(176, 96, 255, 0.4));
    }

    20% {
        transform: translateY(-6px) rotate(0deg) scale(1.06);
        filter: drop-shadow(0 0px 14px rgba(176, 96, 255, 0.8));
    }

    40% {
        transform: translateY(0) rotate(8deg) scale(1);
        filter: drop-shadow(0 0px 4px rgba(176, 96, 255, 0.4));
    }

    60% {
        transform: translateY(-4px) rotate(0deg) scale(1.03);
        filter: drop-shadow(0 0px 10px rgba(176, 96, 255, 0.65));
    }

    80% {
        transform: translateY(0) rotate(-4deg) scale(1);
        filter: drop-shadow(0 0px 4px rgba(176, 96, 255, 0.4));
    }
}

/* Hint icon */
.hint-won .title::before,
.hint-active .title::before {
    /* content: ''; */
    display: inline-block;
    width: 52px;
    height: 32px;
    background: url(../img/hint.png) center / contain no-repeat;
    margin-right: 16px;
    vertical-align: middle;
    filter: drop-shadow(0 0 10px #fff);
    animation: hintGlowIcon 2s ease-in-out infinite;
    transform-origin: center;
}

.hint-icon-anim {
    animation: hintGlowIcon 2.8s ease-in-out infinite;
}

@keyframes hintGlowIcon {

    0%,
    100% {
        transform: scale(1) rotate(-5deg);
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
    }

    25% {
        transform: scale(1.1) rotate(0deg);
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1));
    }

    50% {
        transform: scale(1) rotate(5deg);
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
    }

    75% {
        transform: scale(1.05) rotate(0deg);
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.85));
    }
}

.player-answer {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Input box for player answer */
.fmx-auth {
    --fmx-bg-1: #040714;
    --fmx-bg-2: #0a1020;
    --fmx-text: #eef4ff;
    --fmx-muted: #8da2c4;
    --fmx-line: rgba(255, 255, 255, 0.14);
    --fmx-accent: #74eaff;
    --fmx-accent-2: #8b5cf6;
    --fmx-success: #55ffbf;
    --fmx-danger: #ff5f7d;

    margin: 0;
    /* min-height: 100vh; */
    display: grid;
    place-items: center;
    /* background:
radial-gradient(circle at 20% 20%, rgba(116,234,255,0.08), transparent 30%),
radial-gradient(circle at 80% 30%, rgba(139,92,246,0.10), transparent 30%),
radial-gradient(circle at 50% 80%, rgba(255,255,255,0.04), transparent 30%),
linear-gradient(135deg, var(--fmx-bg-1), var(--fmx-bg-2)); */
    color: var(--fmx-text);
    font-family: "Space Grotesk", Inter, system-ui, sans-serif;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.fmx-auth,
.fmx-auth * {
    box-sizing: border-box;
}

.fmx-auth::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.35;
    background-image:
        radial-gradient(2px 2px at 30px 40px, rgba(255, 255, 255, 0.55), transparent),
        radial-gradient(1.5px 1.5px at 170px 120px, rgba(116, 234, 255, 0.45), transparent),
        radial-gradient(1.5px 1.5px at 320px 70px, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1.8px 1.8px at 480px 190px, rgba(139, 92, 246, 0.35), transparent);
    background-size: 600px 280px;
    animation: fmx-stars 20s linear infinite;
    z-index: 0;
}

@keyframes fmx-stars {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(40px);
    }
}

.fmx-auth .fmx-panel {
    width: min(92vw, 440px);
    /* padding: 32px 24px; */
    position: relative;
    z-index: 1;
    padding: 0px 12px;
}

.fmx-auth .fmx-label {
    margin-bottom: 18px;
    /* font-size: 12px; */
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--fmx-muted);
}

.fmx-auth .fmx-field {
    position: relative;
    padding-bottom: 6px;
    /* margin-bottom: 22px; */
    transition:
        filter 0.35s ease,
        transform 0.35s ease;
}

.fmx-auth .fmx-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--fmx-text);
    letter-spacing: 0.08em;
    padding: 0;
    caret-color: var(--fmx-accent);
    text-align: center;
    font-size: clamp(20px, 4.5vw, 24px);
    text-transform: uppercase;
}

.fmx-auth .fmx-input::placeholder {
    color: rgba(141, 162, 196, 0.45);
}

.fmx-auth .fmx-field::before,
.fmx-auth .fmx-field::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    transition: 0.35s ease;
}

.fmx-auth .fmx-field::before {
    width: 100%;
    background: rgba(255, 255, 255, 0.14);
}

.fmx-auth .fmx-field::after {
    width: 0%;
    background: linear-gradient(90deg, var(--fmx-accent), var(--fmx-accent-2));
    box-shadow: 0 0 14px rgba(116, 234, 255, 0.4);
}

.fmx-auth .fmx-field.fmx-success .fmx-input {
    color: var(--fmx-success);
}

.fmx-auth .fmx-field.fmx-error .fmx-input {
    color: var(--fmx-danger);
}

.fmx-auth .fmx-field.fmx-focused::after {
    width: 100%;
}

.fmx-auth .fmx-field.fmx-success {
    filter: drop-shadow(0 0 14px rgba(85, 255, 191, 0.16));
}

.fmx-auth .fmx-field.fmx-success::after {
    width: 100%;
    background: linear-gradient(90deg, #55ffbf, #d9fff1, #55ffbf);
    background-size: 200% 100%;
    box-shadow:
        0 0 10px rgba(85, 255, 191, 0.45),
        0 0 22px rgba(85, 255, 191, 0.2);
    animation: fmx-successLineFlow 1s ease forwards;
}

.fmx-auth .fmx-field.fmx-error::after {
    width: 100%;
    background: linear-gradient(90deg, var(--fmx-danger), #ff9cae);
    box-shadow: 0 0 14px rgba(255, 95, 125, 0.45);
    animation: fmx-errorLine 1s ease 2;
}

.fmx-auth .fmx-input.fmx-cursor-shake {
    animation: fmx-cursorShake 0.14s linear 5;
}

@keyframes fmx-cursorShake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    50% {
        transform: translateX(2px);
    }

    75% {
        transform: translateX(-1px);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes fmx-errorLine {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes fmx-successLineFlow {
    0% {
        background-position: 200% 0;
        opacity: 0.5;
        transform: scaleX(0.92);
    }

    45% {
        background-position: 100% 0;
        opacity: 1;
        transform: scaleX(1);
    }

    100% {
        background-position: 0 0;
        opacity: 1;
        transform: scaleX(1);
    }
}

@keyframes fmx-successPulse {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    35% {
        transform: scale(1.015);
        filter: brightness(1.18);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes fmx-hintReveal {
    0% {
        opacity: 0;
        transform: translateY(6px);
        letter-spacing: 0.3em;
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: 0.18em;
    }
}

.fmx-auth .fmx-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* gap: 14px; */
    margin-top: 5px;
}

.fmx-auth .fmx-hint {
    min-height: 18px;
    color: var(--fmx-muted);
    transition: 0.25s ease;
}

.fmx-auth .fmx-hint.fmx-success {
    color: #55ffbf;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-shadow:
        0 0 10px rgba(85, 255, 191, 0.3),
        0 0 18px rgba(85, 255, 191, 0.18);
}

.fmx-auth .fmx-hint.fmx-error {
    color: var(--fmx-danger);
    text-shadow: 0 0 10px rgba(255, 95, 125, 0.24);
}

.fmx-auth .fmx-hint.fmx-hint-pop {
    animation: fmx-hintReveal 0.65s ease;
}

.fmx-auth .fmx-btn {
    position: relative;
    border: none;
    background: transparent;
    color: var(--fmx-text);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 10px 2px 12px;
    min-width: 100px;
    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}

.fmx-auth .fmx-btn span {
    position: relative;
    z-index: 1;
}

.fmx-auth .fmx-btn::before,
.fmx-auth .fmx-btn::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    transition: 0.35s ease;
}

.fmx-auth .fmx-btn::before {
    width: 100%;
    background: rgba(255, 255, 255, 0.14);
}

.fmx-auth .fmx-btn::after {
    width: 0%;
    background: linear-gradient(90deg, var(--fmx-accent), var(--fmx-accent-2));
    box-shadow: 0 0 14px rgba(116, 234, 255, 0.45);
}

.fmx-auth .fmx-btn:hover::after {
    width: 100%;
}

.fmx-auth .fmx-btn.fmx-success::after {
    width: 100%;
    background: linear-gradient(90deg, #55ffbf, #d9fff1, #55ffbf);
    background-size: 200% 100%;
    box-shadow:
        0 0 10px rgba(85, 255, 191, 0.45),
        0 0 22px rgba(85, 255, 191, 0.2);
    animation: fmx-successLineFlow 1s ease forwards;
}

.fmx-auth .fmx-btn.fmx-error::after {
    width: 100%;
    background: linear-gradient(90deg, var(--fmx-danger), #ff9cae);
    box-shadow: 0 0 14px rgba(255, 95, 125, 0.45);
    animation: fmx-errorLine 1s ease 2;
}

.fmx-auth .fmx-field.fmx-success-pop,
.fmx-auth .fmx-btn.fmx-success-pop {
    animation: fmx-successPulse 0.9s ease;
}

/* KHUNG CHỨA ĐƯỢC THÊM PREFIX ĐỂ TRÁNH TRÙNG LẶP */
#bh-star-field-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    /* Không cản trở các tương tác click chuột của UI khác */
    z-index: 1;
    /* Có thể chỉnh lại layer tùy theo cấu trúc game */
}

/* CLASS ĐƯỢC THÊM PREFIX AN TOÀN */
.bh-twinkle-star {
    position: absolute;
    background-image: url("../img/star.webp");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    width: 10px;
    height: 10px;
    animation-duration: 2s;
    animation: bh_star_blink_animation linear infinite;
}

/* ĐỔI TÊN KEYFRAMES ĐỂ KHÔNG TRÙNG VỚI CÁC HIỆU ỨNG BLINK KHÁC */
@keyframes bh_star_blink_animation {
    0% {
        opacity: 0
    }

    25% {
        opacity: 0
    }

    50% {
        opacity: 1
    }

    75% {
        opacity: 0
    }

    to {
        opacity: 0
    }
}

@media (max-height: 700px) {
    .brand-logo {
        width: clamp(82px, 23vw, 108px);
        margin: 0 auto 3px;
    }

    .brand-name {
        /* font-size: 12px; */
        margin-bottom: 0;
    }

    .shell {
        padding-top: calc(8px + var(--safeTop));
        /* padding-bottom: calc(8px + var(--safeBottom));
        gap: 6px */
    }

    .title {
        /* font-size: 16px; */
        margin: 4px 0 6px;
    }

    .key-title::before {
        width: 24px;
        height: 24px;
    }

    .subtitle {
        /* font-size: 11px; */
        line-height: 1.35;
        margin-bottom: 8px;
    }

    .card {
        padding: 11px;
        border-radius: 18px;
    }

    .btn {
        padding: 10px 12px;
        margin-top: 8px;
        border-radius: 17px;
    }

    .question {
        /* font-size: 11px; */
        line-height: 1.35;
        margin: 5px 0 8px;
    }

    .small,
    .result {
        line-height: 1.35;
    }

    .hint-box .title::before {
        width: 30px;
        height: 24px;
    }

    .divider {
        margin: 8px 0;
    }

    .steps {
        margin: 4px 0 8px;
    }

    .step {
        width: 38px;
        height: 38px;
        /* font-size: 22px; */
    }

    .countdown {
        font-size: 64px;
        margin: 10px 0;
    }

    .gift-icon {
        /* margin-top: -70px; */
        margin-bottom: -20px;
    }

    .gift-icon .planet {
        max-width: 160px;
    }

    .rank {
        padding: 8px 10px;
        margin: 4px 0;
    }

    .hud-chip {
        padding: 5px 7px;
    }

    /* .answer-boxes {
        margin: 7px 0
    } */

    .answer-boxes input {
        width: 27px;
        height: 27px;
    }

    .timer-ring {
        width: 86px;
        height: 86px;
    }

    .nav button {
        padding: 9px;
    }

    .screen-no {
        display: none;
    }

    .win-screen .privilege-icon-wrap,
    .privilege-use-screen .privilege-use-icon-wrap {
        width: 100px;
    }

    .privilege-use-screen .gift-icon {
        margin-top: -70px;
        margin-bottom: -20px;
    }

    .toast {
        width: 92vw;
    }
}

@media (min-width: 768px) {
    :root {
        --screenMax: 720px;
    }

    .shell {
        padding: calc(18px + var(--safeTop)) 32px calc(18px + var(--safeBottom));
    }

    .hud-info-group {
        min-width: 160px;
    }

    /* .hud {
        font-size: 13px;
    }

    .title {
        font-size: 24px;
    }

    .subtitle {
        font-size: 15px;
    } */

    /* .card {
        padding: 18px
    } */

    /* .question {
        font-size: 16px;
        line-height: 1.58;
    } */

    /* .small,
    .result {
        font-size: 14px;
    } */

    .btn {
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
        padding: 13px 16px;
    }

    .row .btn {
        max-width: none;
    }

    .answer-boxes input {
        width: 36px;
        height: 34px;
    }

    .planet-grid {
        gap: 16px 14px;
        padding: 0 18px;
    }

    .planet {
        max-width: 126px;
        font-size: 34px;
    }

    .steps .step {
        width: 52px;
        height: 52px;
    }

    .nav button {
        padding: 12px;
    }
}

@media (min-width: 1100px) {
    :root {
        --screenMax: 820px;
    }

    .screen.desktop-split.active {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 22px;
        align-items: center;
    }

    .screen.desktop-split .full {
        grid-column: 1/-1;
    }

    .btn {
        max-width: 420px;
    }

    .hud,
    .nav,
    .screen-no {
        max-width: 760px;
    }

    .title {
        font-size: 26px;
    }
}

@media (max-width: 320px) {
    .hud-left {
        gap: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .app::after {
        display: none;
    }
}

/* ── Support waiting room countdown ── */
.support-countdown-display {
    font-family: var(--fontCountdown);
    font-size: clamp(72px, 22vw, 120px);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #19d8ff;
    text-shadow:
        0 0 24px rgba(25, 216, 255, 0.75),
        0 0 60px rgba(25, 216, 255, 0.35);
    line-height: 1;
    margin-top: 24px;
    animation: supportCountdownPulse 1s ease-in-out infinite;
}

.support-countdown-display.danger {
    color: #ff4d6d;
    text-shadow:
        0 0 24px rgba(255, 77, 109, 0.8),
        0 0 60px rgba(255, 77, 109, 0.4);
    animation: supportCountdownDanger 0.5s ease-in-out infinite;
}

@keyframes supportCountdownPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.82;
    }
}

@keyframes supportCountdownDanger {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.75;
        transform: scale(1.04);
    }
}


/* ── Player Code Input ── */
.start-overlay {
    flex-direction: column;
    gap: 24px;
}

.player-code-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.player-fmx-auth {
    width: min(92vw, 440px);
}

/* ── Game Timeout Overlay ── */
.game-timeout-overlay {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.game-timeout-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.game-timeout-overlay .modal-card {
    padding: 44.8px 56px;
    width: fit-content;
    max-width: 95vw;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.game-timeout-text {
    color: #ff4d4d;
    font-size: clamp(30px, 8vw, 50px);
    font-weight: 900;
    letter-spacing: 0.04em;
    text-shadow: 0 0 20px rgba(255, 77, 77, 0.6);
    line-height: 1.4;
    margin: 0;
    white-space: nowrap;
}

.game-timeout-close {
    background: var(--danger);
    box-shadow: 0 0 18px rgba(25, 216, 255, 0.34), 0 12px 26px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    color: #fff;
    font-size: var(--fontSizeButton);
    padding: 8px 28px;
    cursor: pointer;
    white-space: nowrap;
    margin-top: 12px;
    align-self: center;
    font-weight: 800;
}

/* viewer-leaderboard */
.hud-btn-viewer-leaderboard {
    border: 0;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #09d151, #15c4e7);
    box-shadow: 0 0 28px rgba(99, 255, 155, 0.35);
    transition:
        transform 0.14s ease,
        filter 0.14s ease,
        opacity 0.14s ease;
    flex: 0 0 auto;
    width: auto;
    padding: 16px 26px;
    border-radius: 18px;
    font-size: var(--fontSizeText);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.85);
    position: relative;
}

.hud-icon-viewer-leaderboard {
    width: 32px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.viewer-leaderboard-card {
    width: 90vw;
    max-width: 600px;
    min-height: 50vh;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 18px;
    box-sizing: border-box;
    position: relative;
}

.viewer-leaderboard-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--fontSizeButton);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.viewer-leaderboard-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.viewer-leaderboard-my-data {
    border-top: 1px solid rgba(229, 196, 107, 1.0);
    padding: 8px;
    margin-top: 8px;
    background: rgba(85, 54, 54, 1.0);
    border-radius: 8px;
    flex-shrink: 0;
}

.rank-gold {
    background: rgba(255, 215, 0, 0.15);
    border-radius: 6px;
}

.rank-silver {
    background: rgba(192, 192, 192, 0.15);
    border-radius: 6px;
}

.rank-bronze {
    background: rgba(205, 127, 50, 0.15);
    border-radius: 6px;
}

.viewer-leaderboard-card h1 {
    flex-shrink: 0;
    margin-bottom: 0;
}

.viewer-leaderboard-card .modal-actions {
    flex-shrink: 0;
}

.viewer-leaderboard-scroll {
    overflow-y: auto;
    flex: 1;
    margin: 0;
    margin-bottom: 12px;
}

.viewer-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.viewer-leaderboard-table th,
.viewer-leaderboard-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: var(--fontSizeText);
}

.viewer-leaderboard-table th {
    font-weight: 700;
    color: var(--gold);
    text-align: center;
}

.viewer-leaderboard-my-data-row {
    display: grid;
    grid-template-columns: 15% 35% 25% 25%;
    text-align: center;
    padding: 8px 0;
    align-items: center;
}

.viewer-leaderboard-row .small {
    color: #b8956a;
    font-size: 11px;
    white-space: nowrap;
}

.viewer-leaderboard-my-data .small {
    color: #3DC16E;
    font-size: var(--fontSizeSmall);
    white-space: nowrap;
    font-weight: 800;
}

.viewer-leaderboard-my-data .normal {
    color: var(--gold);
    font-size: var(--fontSizeText);
    white-space: nowrap;
    font-weight: 800;
}

.viewer-leaderboard-th {
    font-weight: 700;
    color: var(--gold);
    padding: 8px 0;
}

.viewer-leaderboard-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 0;
}