/* ===== FIGMA LAYERED LAYOUT (PC 1920×1200 / MB 440×956) ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --vh: 1vh;
    --main-color: #53e07d;
    --secondary-color: #229133;
    --main-gradient: linear-gradient(to right, var(--main-color), var(--secondary-color));
    --gold: #e7c878;
    --gold-soft: #f4e6b6;
    --gold-deep: #b88a32;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    background: #05060a;
    color: #fff;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
}

.viewport {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    background: #05060a;
}

.viewport--pc {
    background: #0b3d1a;
}

.viewport--mb {
    display: none;
    background: #0b3d1a;
}

.design-frame {
    position: relative;
    flex-shrink: 0;
    transform-origin: top left;
    will-change: transform;
    overflow: hidden;
    background: #05060a;
}

.design-frame[data-w="1920"] { width: 1920px; height: 1080px; }
.design-frame[data-w="440"]  { width: 440px;  height: 956px; }
.design-frame.scene--mb { background: #0b3d1a; }

/* ---- Generic layer ---- */
.layer {
    position: absolute;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.bg-main {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* ===================== PC YG88 CHRISTMAS (Figma node 2181:3968) ===================== */
.scene--pc { background: #0b3d1a; }

.scene--pc .xmas-bg {
    left: -1px;
    top: 0;
    width: 1921px;
    height: 1080px;
    object-fit: cover;
    z-index: 1;
}

.scene--pc .xmas-garland {
    width: 658px;
    height: 592px;
    object-fit: cover;
    z-index: 3;
    pointer-events: none;
}
.scene--pc .xmas-garland--left { left: 0; top: -83px; }
.scene--pc .xmas-garland--center {
    left: 50%;
    top: -100px;
    transform: translateX(-50%);
    z-index: 4;
}
.scene--pc .xmas-garland--right { left: 1262px; top: -75px; }

.scene--pc .xmas-logo {
    left: 792px;
    top: 0;
    width: 337px;
    height: 130px;
    object-fit: contain;
    z-index: 20;
    mix-blend-mode: lighten;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35));
}

.scene--pc .xmas-tree {
    left: -135px;
    top: 473px;
    width: 458px;
    height: 664px;
    object-fit: cover;
    z-index: 6;
}

.scene--pc .xmas-card {
    /* Căn giữa khung 1920: (1920 - 986.484) / 2 */
    left: 466.758px;
    top: 160px;
    width: 986.484px;
    height: 774px;
    object-fit: cover;
    z-index: 8;
    filter: drop-shadow(0 12px 28px rgba(0,0,0,0.2));
}

.scene--pc .xmas-bow {
    /* Giữ vị trí tương đối trên card sau khi căn giữa */
    left: 1161.758px;
    top: 222px;
    width: 239px;
    height: 239px;
    object-fit: cover;
    z-index: 16;
}

.scene--pc .xmas-snowman--left {
    left: 410px;
    top: 607px;
    width: 396px;
    height: 396px;
    object-fit: cover;
    z-index: 12;
}

.scene--pc .xmas-gifts {
    left: 387px;
    top: 661px;
    width: 289px;
    height: 289px;
    object-fit: cover;
    z-index: 13;
}

.scene--pc .xmas-snowman--right {
    left: 1344px;
    top: 816px;
    width: 312px;
    height: 306px;
    object-fit: cover;
    z-index: 12;
}

.stage-wrap { position: absolute; overflow: hidden; pointer-events: none; }
.stage-img { position: absolute; max-width: none; pointer-events: none; user-select: none; }

/* ===================== MB YG88 CHRISTMAS (Figma 2181:3922, 440×956) ===================== */
.scene--mb { background: #0b3d1a; }

.scene--mb .xmas-bg-mb {
    left: 0;
    top: 0;
    width: 440px;
    height: 956px;
    object-fit: cover;
    object-position: center center;
    z-index: 1;
}

.scene--mb .xmas-garland-mb {
    left: 50%;
    top: -64px;
    width: 440px;
    height: 396px;
    transform: translateX(-50%);
    object-fit: cover;
    z-index: 3;
}

.scene--mb .xmas-logo-mb {
    left: 50%;
    top: 28px;
    width: 337px;
    height: 130px;
    transform: translateX(-50%);
    object-fit: contain;
    z-index: 20;
    mix-blend-mode: lighten;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.35));
}

.scene--mb .xmas-card-mb {
    left: 0;
    top: 182px;
    width: 436px;
    height: 342.088px;
    object-fit: cover;
    z-index: 8;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.18));
}

.scene--mb .xmas-bow-mb {
    left: 305.25px;
    top: 209.58px;
    width: 105.632px;
    height: 105.632px;
    object-fit: cover;
    z-index: 16;
}

.scene--mb .xmas-snowman-mb {
    left: -37px;
    top: 682px;
    width: 312px;
    height: 306px;
    object-fit: cover;
    z-index: 12;
}

.scene--mb .xmas-gift-mb {
    left: 295px;
    top: 557px;
    width: 221px;
    height: 221px;
    object-fit: cover;
    z-index: 13;
}

/* ===================== HOME BUTTON ===================== */
.btn-home {
    position: absolute;
    z-index: 25;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 0 18px;
    border-radius: 12px;
    text-decoration: none;
    background: linear-gradient(180deg, #2a2f36, #0d0f12);
    border: 1.5px solid rgba(231, 200, 120, 0.55);
    box-shadow: 0 6px 16px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.btn-home-text {
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}

.btn-home-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(180deg, #f4e6b6, #c79a3e);
    color: #1a1206;
}

.btn-home:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 10px 22px rgba(0,0,0,0.5), 0 0 14px rgba(231,200,120,0.25);
}

.btn-home--pc { left: 40px; top: 36px; height: 41px; z-index: 30; }
.scene--pc .btn-home-text { font-size: 18px; }
.scene--pc .btn-home-icon { width: 34px; height: 34px; font-size: 15px; }

.btn-home--yg88 {
    position: absolute;
    width: 201px;
    height: 41px;
    padding: 0 10px 0 24px;
    gap: 8px;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(180deg, #53e07d 0%, #229133 100%);
    box-shadow:
        0 10px 12px rgba(37, 144, 193, 0.45),
        inset 0 0 0 2px rgba(118, 181, 92, 0.85);
}
.btn-home--yg88::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 67%;
    background: linear-gradient(160deg, rgba(255,255,255,0.35) 0%, rgba(192,192,192,0.45) 55%, rgba(48,56,59,0.2) 100%);
    clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%);
    mix-blend-mode: screen;
    pointer-events: none;
}
.btn-home--yg88 .btn-home-text {
    position: relative;
    z-index: 2;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.5px;
}
.btn-home--yg88 .btn-home-icon {
    position: relative;
    z-index: 2;
    width: 28px;
    height: 28px;
    margin-left: auto;
    margin-right: 4px;
    background: none;
    color: #fff;
    font-size: 16px;
}
.btn-home--yg88 .btn-home-icon img {
    display: none;
}
.btn-home--yg88:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow:
        0 12px 16px rgba(37, 144, 193, 0.5),
        inset 0 0 0 2px rgba(118, 181, 92, 0.9);
}

.btn-home--mb.btn-home--yg88 {
    display: none;
    left: 12px;
    top: 12px;
    transform: none;
    width: 132px;
    height: 32px;
    padding: 0 8px 0 14px;
    z-index: 30;
}
.btn-home--mb.btn-home--yg88 .btn-home-text { font-size: 12px; }
.btn-home--mb.btn-home--yg88 .btn-home-icon { width: 22px; height: 22px; font-size: 12px; }
.btn-home--mb.btn-home--yg88:hover {
    transform: translateY(-1px);
}

/* ===================== FORM PANEL ===================== */
.panel {
    position: absolute;
    z-index: 18;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 40px 12px 40px 12px;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(70,78,92,0.45), transparent 60%),
        #1c2125;
    border: 4px solid transparent;
    background-clip: padding-box;
    box-shadow:
        0 25px 60px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.panel::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    padding: 4px;
    background: linear-gradient(144deg, #ffffff 1%, #fff5d7 4%, #f4db8d 28%, #f4db8d 74%, #fff5d7 96%, #ffffff 99%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Form căn giữa theo card: cardLeft + (cardW - panelW) / 2 */
.panel--pc { left: 613px; top: 302px; width: 694px; padding: 0; }
.panel--mb { left: 30px; top: 236px; width: 380px; padding: 22px 24px 20px; }

.panel--yg88 {
    height: 491px;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    z-index: 15;
}
.panel--yg88::before { display: none; }

.panel--yg88 .panel-title {
    position: absolute;
    top: 89px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 565px;
    color: #2bb628;
    font-size: 40.976px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.41px;
    line-height: 43.253px;
    text-shadow: 0 4.553px 4.553px rgba(0,0,0,0.25);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    white-space: nowrap;
}

.panel--yg88 .panel-form {
    position: absolute;
    top: 180px;
    left: 33px;
    width: 591px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6.4px;
    filter: drop-shadow(0 4.553px 2.276px rgba(0,0,0,0.25));
}

.panel--yg88 .panel-label {
    color: #fffd04;
    font-size: 28.258px;
    font-weight: 700;
    text-align: center;
    align-self: center;
    margin: 0;
    letter-spacing: -0.565px;
}

.panel--yg88 .field-code {
    width: 590.848px;
    max-width: 100%;
    height: 57.8px;
    border-radius: 5.691px;
    border: none;
    padding: 0 20px;
    text-align: center;
    font-size: 21.522px;
    font-weight: 500;
    color: #1f2733;
    background: linear-gradient(to bottom, #fdfeff, #eaedfc);
    box-shadow:
        0 0 5.842px rgba(69,121,188,0.25),
        inset 0 -4.612px 1.23px #fff,
        inset 0 4.612px 3.689px #fff;
}
.panel--yg88 .field-code::placeholder { color: #8da6c3; font-weight: 500; }
.panel--yg88 .field-code:focus {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(43,182,40,0.3),
        0 0 5.842px rgba(69,121,188,0.25),
        inset 0 -4.612px 1.23px #fff,
        inset 0 4.612px 3.689px #fff;
}

.panel--yg88 .btn-submit--yg88 {
    position: absolute;
    top: 298px;
    left: 199px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 259.518px;
    height: 56.912px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: 0 4.553px 2.276px rgba(0,0,0,0.25);
    overflow: visible;
    cursor: pointer;
    transform: none;
}
.panel--yg88 .btn-submit--yg88::before,
.panel--yg88 .btn-submit--yg88::after { display: none; }
.panel--yg88 .btn-submit--yg88 .btn-submit-bg,
.panel--yg88 .btn-submit--yg88 .btn-submit-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.panel--yg88 .btn-submit--yg88 .btn-submit-overlay {
    top: 10.82%;
    right: 5.89%;
    bottom: 41.87%;
    left: 5.25%;
    width: auto;
    height: auto;
    mix-blend-mode: screen;
}
.panel--yg88 .btn-submit--yg88 .btn-submit-text {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 30.69px;
    font-weight: 700;
    text-shadow: 0 1.138px 2.049px rgba(0,50,103,0.65);
    text-transform: uppercase;
    letter-spacing: -0.614px;
    line-height: 1;
}
.panel--yg88 .btn-submit--yg88:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}
.panel--yg88 .btn-submit--yg88:active {
    transform: translateY(0);
}
.panel--yg88 .btn-submit--yg88:disabled {
    cursor: wait;
    filter: brightness(0.95);
}

.panel--yg88 .panel-links {
    position: absolute;
    top: 372px;
    left: 79px;
    width: 501px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 13px;
    filter: drop-shadow(0 4.553px 2.276px rgba(0,0,0,0.25));
}

.panel--yg88 .btn-link {
    flex: 0 0 auto;
    height: auto;
    padding: 14.4px 21.25px;
    background: #65cb66;
    border: 1.138px solid #fffa01;
    border-radius: 11.382px;
    font-size: 15.935px;
    font-weight: 700;
    color: #fff;
    gap: 9px;
    box-shadow: 0 5.691px 8.537px rgba(77,166,255,0.1);
}
.panel--yg88 .btn-link:nth-child(2) { border-color: #fef501; }
.panel--yg88 .btn-link:hover {
    filter: brightness(1.1);
    box-shadow: 0 8px 12px rgba(77,166,255,0.2);
}

.panel--yg88 .btn-event {
    position: absolute;
    top: 442px;
    left: 79px;
    width: 501px;
    margin: 0;
    height: auto;
    padding: 14.4px 21.25px;
    background: rgba(150,160,170,0.4);
    border: 1.138px solid #faefb2;
    border-radius: 11.382px;
    font-size: 15.935px;
    font-weight: 700;
    color: #fff;
    gap: 9px;
    box-shadow: 0 5.691px 17.074px rgba(0,0,0,0.1);
    filter: drop-shadow(0 4.553px 2.276px rgba(0,0,0,0.25));
}
.panel--yg88 .btn-event:hover {
    filter: brightness(1.1) drop-shadow(0 4.553px 2.276px rgba(0,0,0,0.25));
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* ---- Mobile YG88 Christmas panel (Figma 2181:4228) ---- */
.panel--mb.panel--yg88 {
    left: 75px;
    top: 245px;
    width: 306.873px;
    height: 216.823px;
    padding: 0;
}

.panel--mb.panel--yg88 .panel-title {
    top: 39px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18.111px;
    letter-spacing: -0.181px;
    line-height: 19.117px;
    white-space: nowrap;
    max-width: none;
    width: auto;
}

.panel--mb.panel--yg88 .panel-form {
    top: 79.49px;
    left: 14.59px;
    width: 261.139px;
    gap: 2.838px;
    filter: drop-shadow(0 2.012px 1.006px rgba(0,0,0,0.25));
}

.panel--mb.panel--yg88 .panel-label {
    color: #fffd04;
    font-size: 12.489px;
    letter-spacing: -0.25px;
}

.panel--mb.panel--yg88 .field-code {
    width: 261.139px;
    max-width: 100%;
    height: 25.546px;
    border-radius: 2.515px;
    font-size: 9.512px;
    padding: 0 12px;
    box-shadow:
        0 0 2.582px rgba(69,121,188,0.25),
        inset 0 -2.038px 0.544px #fff,
        inset 0 2.038px 1.631px #fff;
}
.panel--mb.panel--yg88 .field-code::placeholder { color: #8da6c3; }
.panel--mb.panel--yg88 .field-code:focus {
    box-shadow:
        0 0 0 2px rgba(43,182,40,0.3),
        0 0 2.582px rgba(69,121,188,0.25),
        inset 0 -2.038px 0.544px #fff,
        inset 0 2.038px 1.631px #fff;
}

.panel--mb.panel--yg88 .btn-submit--yg88 {
    top: 131.8px;
    left: 88.04px;
    transform: none;
    width: 114.7px;
    height: 25.153px;
    box-shadow: 0 2.012px 1.006px rgba(0,0,0,0.25);
}
.panel--mb.panel--yg88 .btn-submit--yg88:hover {
    transform: translateY(-1px);
}
.panel--mb.panel--yg88 .btn-submit--yg88:active {
    transform: none;
}
.panel--mb.panel--yg88 .btn-submit--yg88 .btn-submit-text {
    /* Figma instance ~6px quá nhỏ khi scale; giữ tỉ lệ nút, tăng đọc được */
    font-size: 11px;
    letter-spacing: -0.12px;
    white-space: nowrap;
    text-shadow: 0 0.503px 0.906px rgba(0,50,103,0.65);
}

.panel--mb.panel--yg88 .panel-links {
    top: 164.5px;
    left: 34.71px;
    width: 221.351px;
    gap: 5px;
    filter: drop-shadow(0 2.012px 1.006px rgba(0,0,0,0.25));
}

.panel--mb.panel--yg88 .btn-link {
    padding: 6.374px 9.391px;
    background: #65cb66;
    border: 0.503px solid #fffa01;
    border-radius: 5.031px;
    font-size: 8px;
    gap: 4px;
    box-shadow: 0 2.515px 3.773px rgba(77,166,255,0.1);
}
.panel--mb.panel--yg88 .btn-link:nth-child(2) { border-color: #fef501; }
.panel--mb.panel--yg88 .btn-link i { font-size: 8px; }

.panel--mb.panel--yg88 .btn-event {
    top: 195.19px;
    left: 34.71px;
    width: 221.351px;
    padding: 6.374px 9.391px;
    font-size: 8px;
    border-radius: 5.031px;
    border-width: 0.503px;
    gap: 4px;
    filter: drop-shadow(0 2.012px 1.006px rgba(0,0,0,0.25));
}

/* ---- Head: badge + title + subtitle ---- */
.panel-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.panel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff6da, #f4db8d 45%, #cf9b3a 100%);
    color: #3a2600;
    box-shadow: 0 6px 16px rgba(207,155,58,0.4), inset 0 2px 3px rgba(255,255,255,0.6);
}
.scene--mb .panel:not(.panel--yg88) .panel-badge { width: 38px; height: 38px; font-size: 17px; margin-bottom: 6px; }

.panel-title {
    color: #ffffff;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
    background: linear-gradient(180deg, #ffffff 0%, #ffeeba 130%);
    -webkit-background-clip: text;
    background-clip: text;
}
.scene--mb .panel:not(.panel--yg88) .panel-title { font-size: 18px; letter-spacing: 0.2px; }

.panel-sub {
    color: rgba(255,255,255,0.55);
    text-align: center;
    font-weight: 500;
}
.scene--mb .panel:not(.panel--yg88) .panel-sub { font-size: 11px; margin-top: 3px; margin-bottom: 12px; }

.panel-label {
    align-self: flex-start;
    color: #f4db8d;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-align: left;
}
.scene--mb .panel:not(.panel--yg88) .panel-label { font-size: 13px; margin-bottom: 6px; }

/* ---- Field with leading icon ---- */
.panel-field {
    position: relative;
    width: 100%;
}
.field-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #b9892f;
    pointer-events: none;
}
.scene--pc .field-icon { left: 22px; font-size: 18px; }
.scene--mb .field-icon { left: 16px; font-size: 15px; }

.field-code {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 14px;
    background: linear-gradient(to bottom, #ffffff, #eef1fa);
    color: #1f2733;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-align: left;
    box-shadow:
        0 4px 14px rgba(0,0,0,0.25),
        inset 0 -3px 1px rgba(255,255,255,0.8),
        inset 0 3px 4px #ffffff;
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.field-code::placeholder { color: #9aa7bd; font-weight: 500; }
.field-code:focus {
    outline: none;
    border-color: #f4db8d;
    box-shadow:
        0 0 0 3px rgba(244,219,141,0.35),
        0 6px 18px rgba(231,200,120,0.35),
        inset 0 -3px 1px rgba(255,255,255,0.8),
        inset 0 3px 4px #ffffff;
}
.scene--mb .panel:not(.panel--yg88) .field-code { height: 46px; font-size: 15px; padding: 0 16px 0 42px; }

.panel-divider {
    width: 86%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(231,200,120,0.5), transparent);
}
.scene--mb .panel-divider { margin: 16px 0; }

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    border: 1px solid #ffe9a8;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff6d6 0%, #f6dd8f 42%, #e3b04f 78%, #cf9837 100%);
    color: #3a2600;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
    box-shadow: 0 8px 20px rgba(207,152,55,0.4), inset 0 2px 2px rgba(255,255,255,0.7), inset 0 -3px 4px rgba(150,100,20,0.3);
}
.btn-submit i { font-size: 0.95em; }
.btn-submit::after {
    content: "";
    position: absolute;
    top: 0; left: -60%;
    width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.6), transparent);
    transform: skewX(-20deg);
    animation: btnShine 3.4s ease-in-out infinite;
}
.btn-submit:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 12px 26px rgba(207,152,55,0.5), inset 0 2px 2px rgba(255,255,255,0.7); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { cursor: wait; filter: brightness(0.95) saturate(0.85); }
.scene--mb .panel:not(.panel--yg88) .btn-submit { height: 46px; font-size: 14px; margin-top: 12px; }

@keyframes btnShine {
    0%, 60% { left: -60%; }
    100% { left: 130%; }
}

.panel-links {
    display: flex;
    gap: 14px;
    width: 100%;
    justify-content: center;
}
.scene--mb .panel:not(.panel--yg88) .panel-links { margin-top: 12px; gap: 10px; }

.btn-link, .btn-event {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    border-radius: 10px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(77,166,255,0.3);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
    box-shadow: 0 5px 15px rgba(77,166,255,0.1);
}
.btn-link { flex: 1; }
.btn-link i, .btn-event i { color: #ffffff; transition: transform 0.16s ease; }
.btn-link:hover, .btn-event:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
    box-shadow: 0 8px 18px rgba(77,166,255,0.25);
}
.btn-link:hover i, .btn-event:hover i { transform: translateX(3px); }

.scene--mb .panel:not(.panel--yg88) .btn-link { height: 40px; font-size: 10px; padding: 0 6px; letter-spacing: 0; gap: 5px; }
.scene--mb .panel:not(.panel--yg88) .btn-link i { font-size: 9px; }

.btn-event {
    width: 100%;
    background: rgba(150,160,170,0.4);
    border: 1px solid #faefb2;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.scene--mb .panel:not(.panel--yg88) .btn-event { height: 40px; font-size: 12px; margin-top: 10px; }

/* Barcode ticket strip */
.panel-barcode {
    width: 100%;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff, #e9ecf2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.35);
}
.scene--pc .panel-barcode { height: 60px; margin-top: 16px; }
.scene--mb .panel-barcode { height: 50px; margin-top: 12px; }
.panel-barcode span {
    display: block;
    width: 82%;
    height: 62%;
    background-image: repeating-linear-gradient(90deg,
        #111 0, #111 2px, transparent 2px, transparent 4px,
        #111 4px, #111 7px, transparent 7px, transparent 9px,
        #111 9px, #111 10px, transparent 10px, transparent 13px,
        #111 13px, #111 16px, transparent 16px, transparent 18px);
}

/* ===================== ANIMATIONS ===================== */
@media (prefers-reduced-motion: no-preference) {
    .anim-float       { animation: floatY 6s ease-in-out infinite; }
    .anim-float2      { animation: floatY 7.5s ease-in-out infinite; animation-delay: -1.2s; }
    .anim-bob         { animation: bobY 5s ease-in-out infinite; }
    .anim-bob2        { animation: bobY 6.2s ease-in-out infinite; animation-delay: -0.8s; }
    .anim-float-soft  { animation: floatSoft 5.5s ease-in-out infinite; }
    .anim-fly         { animation: flyMove 8s ease-in-out infinite; }
    .anim-fly2        { animation: flyMove2 9.5s ease-in-out infinite; animation-delay: -2s; }
    .anim-twinkle     { animation: twinkle 3s ease-in-out infinite; }
    .anim-twinkle2    { animation: twinkle 4.2s ease-in-out infinite; animation-delay: -1.5s; }
    .anim-breathe     { animation: breathe 5s ease-in-out infinite; }
    .anim-breathe-slow{ animation: breathe 9s ease-in-out infinite; }
    .anim-sway        { animation: sway 7s ease-in-out infinite; }
    .anim-sway-rev    { animation: swayRev 7.5s ease-in-out infinite; }
    .anim-glow        { animation: glowPulse 4s ease-in-out infinite; }
}

@keyframes floatY {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -16px; }
}
@keyframes bobY {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -8px; }
}
@keyframes floatSoft {
    0%, 100% { translate: 0 0; scale: 1; }
    50%      { translate: 0 -8px; scale: 1.015; }
}
@keyframes flyMove {
    0%, 100% { translate: 0 0; rotate: -4deg; }
    50%      { translate: 14px -22px; rotate: 4deg; }
}
@keyframes flyMove2 {
    0%, 100% { translate: 0 0; rotate: 3deg; }
    50%      { translate: -16px -18px; rotate: -3deg; }
}
@keyframes twinkle {
    0%, 100% { opacity: 0.35; scale: 0.9; }
    50%      { opacity: 1; scale: 1.1; }
}
@keyframes breathe {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}
@keyframes sway {
    0%, 100% { rotate: -2deg; }
    50%      { rotate: 2deg; }
}
@keyframes swayRev {
    0%, 100% { rotate: 2deg; }
    50%      { rotate: -2deg; }
}
@keyframes glowPulse {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 6px rgba(231,200,120,0.4)); }
    50%      { filter: brightness(1.15) drop-shadow(0 0 18px rgba(231,200,120,0.7)); }
}
/* Modal kết quả kiểm tra code */
.result-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.result-modal-content {
    position: relative;
    background: rgba(8, 28, 12, 0.96);
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    overflow: hidden;
    padding: 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(83, 224, 125, 0.35);
    border: 1px solid rgba(83, 224, 125, 0.45);
    animation: modalFadeIn 0.4s ease;
    color: #ffffff;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s ease;
    height: 30px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
}

.close-modal:hover {
    color: #ffffff;
    background: rgba(83, 224, 125, 0.35);
    transform: scale(1.1);
}

.result-header {
    background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
    padding: 22px 20px;
    text-align: center;
    position: relative;
    border-bottom: none;
}

.result-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.result-logo {
    max-width: 100px;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.result-header h2 {
    margin: 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 18px;
    letter-spacing: 1px;
    font-weight: 700;
}

.result-body {
    padding: 25px 20px;
    background: rgba(8, 28, 12, 0.96);
}

.result-info {
    margin-bottom: 25px;
}

.result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.result-table tr {
    transition: all 0.2s ease;
    position: relative;
}

.result-table tr:hover {
    background: rgba(83, 224, 125, 0.08);
}

.result-table tr::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(83, 224, 125, 0.2), transparent);
}

.result-table tr:last-child::after {
    display: none;
}

.result-table td {
    padding: 12px 10px;
    font-size: 15px;
    vertical-align: middle;
}

.result-table td:first-child {
    width: 40%;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 13px;
}

.result-table td:last-child {
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.3px;
}

#result-code {
    color: var(--main-color);
    font-weight: 700;
    letter-spacing: 1px;
}

#result-status {
    font-weight: 700;
}

#result-points, #result-money {
    font-weight: 700;
    color: var(--main-color);
}

.username-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(83, 224, 125, 0.45);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    transition: all 0.3s ease;
}

.username-input:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 8px rgba(83, 224, 125, 0.5);
    background: rgba(0, 0, 0, 0.5);
}

.username-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.result-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    gap: 12px;
}

.result-button {
    padding: 12px 0;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.result-button.confirm {
    background: linear-gradient(to right, var(--main-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(83, 224, 125, 0.35);
}

.result-button.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.result-button:hover {
    transform: translateY(-3px);
}

.result-button.confirm:hover {
    background: linear-gradient(to right, var(--secondary-color), var(--main-color));
    box-shadow: 0 6px 18px rgba(83, 224, 125, 0.45);
}

.result-button.cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Màu sắc cho các trạng thái */
.status-valid {
    color: #53e07d !important;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(83, 224, 125, 0.4);
}

.status-expired {
    color: #F39C12 !important;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(243, 156, 18, 0.3);
}

.status-invalid {
    color: #E74C3C !important;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(231, 76, 60, 0.3);
}

.status-used {
    color: #65cb66 !important;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(101, 203, 102, 0.4);
}

.status-limit {
    color: #42bf5a !important;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(66, 191, 90, 0.4);
}

/* Style cho phần hạn sử dụng hết hạn */
.expired-date {
    text-decoration: line-through;
    color: #F39C12 !important;
    font-weight: 700;
    opacity: 0.8;
}

/* CSS cho các trạng thái modal — tất cả header xanh lá tươi */
.result-header.valid {
    background: linear-gradient(to right, #53e07d, #229133);
}

.result-header.expired {
    background: linear-gradient(to right, #65cb66, #2bb628);
}

.result-header.invalid {
    background: linear-gradient(to right, #42bf5a, #048022);
}

.result-header.used {
    background: linear-gradient(to right, #53e07d, #2bb628);
}

.result-header.limit-reached {
    background: linear-gradient(to right, #65cb66, #229133);
}

/* Cập nhật màu sắc wave cho các trạng thái */
.result-header.valid::after {
    background-image: linear-gradient(45deg, transparent 33.333%, #53e07d 33.333%, #53e07d 66.667%, transparent 66.667%);
}

.result-header.expired::after {
    background-image: linear-gradient(45deg, transparent 33.333%, #65cb66 33.333%, #65cb66 66.667%, transparent 66.667%);
}

.result-header.invalid::after {
    background-image: linear-gradient(45deg, transparent 33.333%, #42bf5a 33.333%, #42bf5a 66.667%, transparent 66.667%);
}

.result-header.used::after {
    background-image: linear-gradient(45deg, transparent 33.333%, #53e07d 33.333%, #53e07d 66.667%, transparent 66.667%);
}

.result-header.limit-reached::after {
    background-image: linear-gradient(45deg, transparent 33.333%, #65cb66 33.333%, #65cb66 66.667%, transparent 66.667%);
}

/* Responsive cho modal */
@media screen and (max-width: 480px) {
    .result-modal-content {
        width: 95%;
        max-width: 340px;
    }
    
    .result-header h2 {
        font-size: 16px;
    }
    
    .result-logo {
        max-width: 80px;
    }
    
    .result-button {
        font-size: 13px;
        padding: 10px 0;
    }
    
    .result-table td {
        padding: 10px 5px;
        font-size: 14px;
    }
    
    .result-table td:first-child {
        font-size: 12px;
    }
    
    .result-body {
        padding: 20px 15px;
    }
}

/* ===== TRANG BẢO TRÌ + CÔNG TẮC ===== */
#maintenance-page {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99990;
    overflow-x: hidden;
    overflow-y: auto;
    background:
        radial-gradient(1200px 620px at 50% -10%, rgba(83, 224, 125, 0.16), transparent 58%),
        radial-gradient(700px 420px at 100% 100%, rgba(231, 200, 120, 0.1), transparent 50%),
        #07140c;
    color: #fff;
}

html.is-maintenance,
html.is-maintenance body {
    overflow: hidden;
    height: 100%;
}

html.is-maintenance #maintenance-page {
    display: flex;
    justify-content: center;
}

html.is-maintenance .viewport {
    visibility: hidden;
}

.maint-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.maint-orb {
    position: absolute;
    border-radius: 50%;
}

.maint-orb--green {
    width: 560px;
    height: 560px;
    left: 50%;
    top: -80px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(83, 224, 125, 0.22), transparent 68%);
}

.maint-orb--gold {
    width: 420px;
    height: 420px;
    right: -120px;
    bottom: -140px;
    background: radial-gradient(circle, rgba(231, 200, 120, 0.16), transparent 70%);
}

.maint-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(83, 224, 125, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(83, 224, 125, 0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 15%, transparent 72%);
    mask-image: radial-gradient(ellipse at 50% 40%, #000 15%, transparent 72%);
}

.maint-shell {
    position: relative;
    z-index: 1;
    width: min(640px, calc(100% - 48px));
    min-width: 0;
    margin: auto;
    padding: 36px 0;
    text-align: center;
}

.maint-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(83, 224, 125, 0.35);
    background: rgba(83, 224, 125, 0.08);
    color: #c8f8d6;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.maint-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #53e07d;
    box-shadow: 0 0 0 0 rgba(83, 224, 125, 0.65);
    animation: maintPulse 1.8s ease-out infinite;
}

@keyframes maintPulse {
    70% { box-shadow: 0 0 0 8px rgba(83, 224, 125, 0); }
    100% { box-shadow: 0 0 0 0 rgba(83, 224, 125, 0); }
}

.maint-logo {
    display: block;
    width: min(240px, 62vw);
    height: auto;
    margin: 26px auto 8px;
    filter: drop-shadow(0 10px 28px rgba(231, 200, 120, 0.28));
}

.maint-kicker {
    margin: 0 0 10px;
    color: #e7c878;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

#maint-heading {
    margin: 0;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
}

#maint-heading span {
    color: #53e07d;
}

.maint-break {
    display: none;
}

.maint-desc {
    width: 100%;
    max-width: 36rem;
    margin: 16px auto 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
    line-height: 1.65;
}

.maint-progress {
    margin: 28px auto 26px;
    max-width: 460px;
}

.maint-progress-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.maint-progress-track {
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.maint-progress-bar {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #229133, #53e07d, #e7c878);
    animation: maintSlide 1.7s ease-in-out infinite;
}

@keyframes maintSlide {
    0% { transform: translateX(-130%); }
    100% { transform: translateX(340%); }
}

.maint-contact {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.maint-contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(231, 200, 120, 0.35);
    background: rgba(8, 18, 12, 0.55);
    color: #f4e6b6;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.maint-contact a:hover {
    background: rgba(231, 200, 120, 0.14);
    border-color: rgba(231, 200, 120, 0.7);
    transform: translateY(-2px);
}

@media screen and (max-width: 720px) {
    .maint-shell {
        width: min(520px, calc(100% - 36px));
    }

    #maint-heading {
        font-size: 30px;
    }

    .maint-break {
        display: block;
    }

    .maint-contact {
        flex-direction: column;
        align-items: stretch;
    }

    .maint-contact a {
        justify-content: center;
    }

    .maint-desc {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .maint-badge-dot,
    .maint-progress-bar {
        animation: none;
    }

    .maint-progress-bar {
        width: 100%;
        transform: none;
    }
}
/* ===== END TRANG BẢO TRÌ ===== */
