:root {
    --tg-bg: #f5f6f8;
    --tg-surface: #ffffff;
    --tg-ink: #111827;
    --tg-muted: #6b7280;
    --tg-line: #e5e7eb;
    --tg-accent: #f27024;
    --tg-accent-2: #d85f16;
    --tg-soft: #fff7f2;
    --tg-ok: #059669;
    --tg-radius: 8px;
    --tg-radius-sm: 6px;
}

html, body {
    background: var(--tg-bg) !important;
    color: var(--tg-ink);
    font-family: "Be Vietnam Pro", ui-sans-serif, system-ui, sans-serif;
    scrollbar-width: thin;
    scrollbar-color: #c4c4c4 transparent;
}
html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb, *::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 8px;
}
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track, *::-webkit-scrollbar-track {
    background: transparent;
}

.hidden { display: none !important; }
.flex { display: flex !important; }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.scale-95 { transform: scale(.95); }
.scale-100 { transform: scale(1); }
.rotate-180 { transform: rotate(180deg); }
.translate-y-full { transform: translateY(100%); }
.text-primary-red { color: var(--tg-accent) !important; font-weight: 700; }

.form-input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--tg-line);
    background: #fff;
    border-radius: var(--tg-radius-sm);
    padding: 0 12px;
    font-size: 13px;
    outline: none;
}
.form-input:focus {
    border-color: var(--tg-accent);
    box-shadow: 0 0 0 2px rgba(242, 112, 36, .12);
}
.form-input-invalid {
    border-color: #dc2626 !important;
    background: #fff7f7 !important;
}

.tg-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.tg-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #fff;
    border-bottom: 1px solid var(--tg-line);
}
.tg-header-inner {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.tg-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}
.tg-brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--tg-accent);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.tg-brand-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tg-brand-logo {
    display: block;
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}
.tg-header-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: 8px;
}
.tg-header-nav a {
    font-size: 13px;
    font-weight: 600;
    color: var(--tg-muted);
    text-decoration: none;
}
.tg-header-nav a.is-on,
.tg-header-nav a:hover { color: var(--tg-ink); }
.tg-header-search {
    flex: 1;
    max-width: 360px;
    margin-left: auto;
    position: relative;
}
.tg-header-search input {
    width: 100%;
    height: 36px;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius-sm);
    background: #f9fafb;
    padding: 0 12px 0 34px;
    font-size: 13px;
    outline: none;
}
.tg-header-search input:focus {
    background: #fff;
    border-color: var(--tg-accent);
}
.tg-header-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}
.tg-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.tg-support {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--tg-ink);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.tg-support:hover { border-color: #d1d5db; }
.tg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--tg-line);
    background: #f3f4f6;
    display: grid;
    place-items: center;
}
.tg-avatar img { width: 100%; height: 100%; object-fit: cover; }

.tg-main { padding: 16px 0 64px; }

.tg-hero {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 12px;
    margin-bottom: 20px;
}
.tg-hero:not(:has(.tg-hero-side)) { grid-template-columns: 1fr; }
.tg-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--tg-radius);
    background: #111827;
    aspect-ratio: 16 / 5.6;
}
.tg-slider a,
.tg-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.tg-slider img {
    object-fit: cover;
    opacity: 0;
    transition: opacity .5s ease;
}
.tg-slider img.is-on { opacity: 1; }
.tg-slider-dots {
    position: absolute;
    left: 12px;
    bottom: 10px;
    display: flex;
    gap: 5px;
    z-index: 2;
}
.tg-slider-dots button {
    width: 6px;
    height: 6px;
    border: 0;
    border-radius: 99px;
    background: rgba(255,255,255,.45);
    padding: 0;
    cursor: pointer;
}
.tg-slider-dots button.is-on { width: 16px; background: #fff; }
.tg-hero-side { display: grid; gap: 12px; }
.tg-hero-card {
    overflow: hidden;
    border-radius: var(--tg-radius);
    background: #fff;
    min-height: 0;
}
.tg-hero-card img { width: 100%; height: 100%; object-fit: cover; }

.tg-catalog { margin-bottom: 8px; }
.tg-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.tg-section-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}
.tg-mobile-search {
    display: none;
    width: 100%;
    height: 36px;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius-sm);
    background: #fff;
    padding: 0 12px;
    font-size: 13px;
    outline: none;
}

.tg-game-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.product-tab { cursor: pointer; }
.tg-game-card { text-align: center; }
.tg-game-art {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: transform .2s ease;
}
.tg-game-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}
.tg-game-card:hover .tg-game-art { transform: translateY(-3px); }
.product-tab[data-headlessui-state="checked"] .tg-game-art {
    border-color: var(--tg-accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(242, 112, 36, .25);
}
.tg-game-name {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: auto;
}
.product-tab[data-headlessui-state="checked"] .tg-game-name { color: var(--tg-accent); }
.tg-game-check {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--tg-accent);
    color: #fff;
    display: none;
    place-items: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.product-tab[data-headlessui-state="checked"] .tg-game-check { display: grid; }

.tg-workspace { margin-top: 20px; }

.product-content {
    position: relative;
    height: 120px;
    border-radius: var(--tg-radius);
    overflow: hidden;
    margin-bottom: 0;
    background: #1f2937;
}
.product-content img.tg-banner-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-content .tg-banner-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17,24,39,.72) 0%, rgba(17,24,39,.28) 70%);
}
.tg-banner-meta {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}
.tg-banner-meta img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.25);
    background: #fff;
}
.tg-banner-meta h3 {
    margin: 0 0 2px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}
.tg-safe {
    color: #d1fae5;
    font-size: 11px;
    font-weight: 600;
}

.tg-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 12px;
    align-items: start;
}
.tg-panel {
    background: #fff;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius);
}
.tg-panel + .tg-panel { margin-top: 12px; }
.tg-panel-head {
    padding: 12px 14px;
    border-bottom: 1px solid var(--tg-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.tg-panel-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}
.tg-panel-body { padding: 14px; }

#denom-tabs-bar {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--tg-line);
}
.denom-tab-btn {
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--tg-muted);
    cursor: pointer;
    margin-bottom: -1px;
}
.denom-tab-btn[data-headlessui-state="selected"] {
    color: var(--tg-ink);
    border-bottom-color: var(--tg-accent);
}

.package-wrapper,
.shop-package-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.package-item,
.shop-package-item,
.card-type {
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius-sm);
    background: #fff;
    cursor: pointer;
}
.package-item {
    padding: 10px 8px;
    text-align: center;
}
.package-item:hover,
.shop-package-item:hover,
.card-type:hover { border-color: #d1d5db; }
.package-item[data-headlessui-state="checked"],
.shop-package-item[data-headlessui-state="checked"],
.card-type[data-headlessui-state="checked"] {
    border-color: var(--tg-accent);
    background: var(--tg-soft);
}
.tg-pkg-price {
    display: block;
    color: var(--tg-ink);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}
.package-item[data-headlessui-state="checked"] .tg-pkg-price { color: var(--tg-accent); }
.tg-pkg-amount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tg-muted);
}
.tg-pkg-amount img { width: 13px; height: 13px; object-fit: contain; }
.tg-pkg-bonus {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 4px auto 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--tg-ok);
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
}
.tg-pkg-bonus::before {
    content: "🎁";
    font-size: 12px;
    line-height: 1;
}

.shop-package-item {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tg-shop-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #f3f4f6;
    overflow: hidden;
}
.tg-shop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shop-package-info {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #4b5563;
    cursor: pointer;
    font-weight: 700;
}
.tg-shop-name {
    width: 100%;
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-height: 44px;
}

.tg-pay-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.card-type {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 8px 10px;
}
.card-type-img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.card-type-name-simple,
.card-type-name-under { font-size: 13px; font-weight: 600; }
.card-type-detail { flex-direction: column; }
.card-type-price { color: var(--tg-accent); font-size: 13px; font-weight: 700; }
.card-type-diamond-row { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.card-type-currency-icon { width: 12px; height: 12px; object-fit: contain; }
.tg-hot {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 0 var(--tg-radius-sm) 0 6px;
}

.tg-aside { position: sticky; top: 72px; }
.tg-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--tg-radius-sm);
    background: #f9fafb;
}
.tg-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.tg-user strong { display: block; font-size: 13px; }
.tg-user span { font-size: 12px; color: var(--tg-muted); }
.tg-logout {
    border: 0;
    background: none;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.tg-region {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.tg-region-btn {
    height: 40px;
    border: 1px solid var(--tg-line);
    background: #fff;
    border-radius: 8px;
    color: var(--tg-ink);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.tg-region-btn.is-on {
    border-color: var(--tg-accent);
    color: var(--tg-accent);
    box-shadow: inset 0 0 0 1px var(--tg-accent);
}
.tg-login-row { display: flex; }
.tg-login-row input { border-radius: var(--tg-radius-sm) 0 0 var(--tg-radius-sm); padding-right: 32px; }
#loginSubmitBtn {
    height: 40px;
    border: 0;
    background: #111827;
    color: #fff;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0 var(--tg-radius-sm) var(--tg-radius-sm) 0;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}
#loginSubmitBtn:hover { background: #000; }
.tg-login-error { min-height: 16px; color: #dc2626; font-size: 12px; margin-top: 6px; }
.question-btn {
    border: 0;
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}
.tg-alt-login { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--tg-line); }
.tg-alt-login p { margin: 0 0 8px; font-size: 12px; color: var(--tg-muted); }
.login-button {
    height: 40px;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius-sm);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
}
.login-button:hover {
    border-color: #ed1c24;
    background: #fff5f5;
}
    .login-icon-btn {
        width: 40px;
        height: 40px;
        border: 1px solid var(--tg-line);
        border-radius: 50%;
        background: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all .2s;
    }
    .login-icon-btn:hover {
        opacity: 0.8;
        transform: translateY(-2px);
    }
    .login-icon-btn img, .login-icon-btn svg { width: 20px; height: 20px; }

#dropdownMenu-uid {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius-sm);
    z-index: 20;
}
#toggleDropdown-uid {
    position: absolute;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: #9ca3af;
    cursor: pointer;
    z-index: 3;
    padding: 4px;
}

.tg-warn {
    padding: 8px 10px;
    margin-bottom: 12px;
    border-radius: 6px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12px;
}
.serialWrapper, .codeWrapper { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.serialWrapper label, .codeWrapper label { font-size: 13px; font-weight: 600; }

.tg-checkout { border-color: var(--tg-line); background: #fff; }
.tg-sum {
    background: #f9fafb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}
.tg-sum-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.tg-sum-row + .tg-sum-row { margin-top: 8px; }
#infoBase { font-weight: 700; }
#paymentButton {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: var(--tg-radius-sm);
    background: var(--tg-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#paymentButton:hover { background: var(--tg-accent-2); }

.tg-footer {
    background: #fff;
    border-top: 1px solid var(--tg-line);
    padding: 18px 0;
}
.tg-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}
.tg-footer p { margin: 0; font-size: 12px; color: var(--tg-muted); max-width: 640px; }
.tg-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.tg-footer a { font-size: 12px; font-weight: 600; color: #374151; text-decoration: none; }
.tg-footer a:hover { color: var(--tg-accent); }

.tg-marquee {
    overflow: hidden;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius);
    height: 42px;
    margin: 16px 0;
}
.tg-marquee-bell {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 100%;
    display: grid;
    place-items: center;
    color: #e11d48;
    background: #fff;
    z-index: 2;
    border-radius: var(--tg-radius) 0 0 var(--tg-radius);
    box-shadow: 8px 0 10px #fff;
}
.tg-marquee-track {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
    width: max-content;
    animation: tg-marquee 32s linear infinite;
}
.tg-marquee-item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 28px;
    font-size: 12px;
    line-height: 42px;
    color: var(--tg-muted);
    white-space: nowrap;
    box-sizing: border-box;
}
.tg-marquee-item + .tg-marquee-item {
    border-left: 1px solid var(--tg-line);
}
.tg-marquee-item b {
    color: var(--tg-accent);
    font-weight: 700;
}
.tg-marquee-item em {
    color: var(--tg-ink);
    font-style: normal;
    font-weight: 700;
}
@keyframes tg-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.tg-modal { display: none; position: fixed; inset: 0; z-index: 70; }
.tg-modal.show { display: block; }
.tg-modal-bg { position: absolute; inset: 0; background: rgba(17, 24, 39, .5); }
.tg-modal-box {
    position: relative;
    z-index: 1;
    width: min(360px, calc(100% - 32px));
    margin: 14vh auto 0;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}
.tg-modal-box h2 { margin: 0 0 8px; font-size: 16px; }
.tg-modal-box p { margin: 0 0 16px; color: var(--tg-muted); font-size: 13px; }
.tg-modal-box button,
#vatphamInfoOk,
#btnUpgradeOK {
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 6px;
    background: var(--tg-accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
#modalVatphamInfo { display: none; }
#modalVatphamInfo.show { display: block; }
#vatphamInfoPanel {
    position: relative;
    z-index: 1;
    width: min(360px, calc(100% - 32px));
    margin: 12vh auto 0;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}
#vatphamInfoImg { width: 100%; border-radius: 6px; margin-bottom: 10px; }
#modalHuongDan { display: none; place-items: center; }
#modalUpgrade { display: none; }
#modalUpgrade.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
#modalUpgrade.show .popup-upgrade-box { opacity: 1; transform: none; }
.popup-upgrade-box {
    opacity: 0;
    transform: scale(.96);
    transition: .22s ease;
    width: min(380px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 22px 20px;
    border-radius: 14px;
    box-shadow: 0 22px 48px rgba(17, 24, 39, .2);
}
.popup-upgrade-box .tg-note-ico {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--tg-soft);
    color: var(--tg-accent);
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(242, 112, 36, .18);
}
.popup-upgrade-box h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--tg-ink);
}
.popup-upgrade-box .tg-note-sub {
    margin: 4px 0 16px;
    color: var(--tg-muted);
    font-size: 13px;
}
.tg-note-list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    text-align: left;
    display: grid;
    gap: 8px;
}
.tg-note-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--tg-bg);
    border: 1px solid var(--tg-line);
    border-radius: 8px;
    color: var(--tg-ink);
    font-size: 13px;
    line-height: 1.45;
}
.tg-note-mark {
    flex: 0 0 auto;
    width: 22px;
    text-align: center;
    line-height: 1.45;
}
#modalUpgrade #btnUpgradeOK {
    height: 42px;
    border-radius: 8px;
    letter-spacing: .02em;
}
#modalUpgrade #btnUpgradeOK:hover {
    background: var(--tg-accent-2);
}

#mobileModal-uid { position: fixed; inset: 0; z-index: 60; }
#mobileBackdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
#mobilePanel {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-radius: 12px 12px 0 0;
    padding: 16px;
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .tg-game-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .package-wrapper,
    .shop-package-wrapper { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .tg-pay-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-content { height: 132px; }
}
@media (min-width: 1100px) {
    .tg-game-grid { grid-template-columns: repeat(9, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .tg-hero { grid-template-columns: 1fr; }
    .tg-hero-side { display: none; }
    
    .tg-board {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .tg-board > div,
    .tg-aside {
        display: contents;
    }
    
    .tg-panel { margin-top: 0 !important; width: 100%; }
    .tg-order-1 { order: 1; }
    .tg-order-2 { order: 2; }
    .tg-order-3 { order: 3; }
    .tg-order-4 { order: 4; }
    .tg-order-5 { order: 5; }

    .tg-aside { position: static; }
    .tg-header-search { display: none; }
    .tg-mobile-search { display: block; }
    .tg-support { display: none; }
    .tg-footer-inner { flex-direction: column; text-align: center; }
    .tg-slider { aspect-ratio: 16 / 8; }
    .tg-game-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .tg-game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tg-page { padding: 24px 0 40px; }
.tg-page-narrow { max-width: 440px; }
.tg-back {
    display: inline-flex;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tg-muted);
    text-decoration: none;
}
.tg-back:hover { color: var(--tg-ink); }
.tg-page-head { margin-bottom: 16px; }
.tg-page-head h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: var(--tg-ink);
}
.tg-page-head p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--tg-muted);
}
.tg-page-search input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius-sm);
    padding: 0 12px;
    font-size: 13px;
    outline: none;
}
.tg-page-search input:focus { border-color: var(--tg-accent); }
.tg-page-note {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--tg-muted);
}
.tg-page-note a { color: var(--tg-accent); font-weight: 600; text-decoration: none; }

.tg-faq-item { border-bottom: 1px solid var(--tg-line); }
.tg-faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: var(--tg-ink);
    cursor: pointer;
}
.tg-faq-q svg { flex-shrink: 0; color: var(--tg-muted); transition: transform .2s; }
.tg-faq-item.is-open .tg-faq-q svg { transform: rotate(180deg); color: var(--tg-accent); }
.tg-faq-a {
    display: none;
    padding: 0 16px 14px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--tg-muted);
}
.tg-faq-item.is-open .tg-faq-a { display: block; }
.tg-faq-empty { padding: 16px; font-size: 13px; color: var(--tg-muted); }

.tg-legal { font-size: 13px; line-height: 1.7; color: var(--tg-ink); }
.tg-legal h1 { font-size: 16px; margin: 0 0 12px; }
.tg-legal ol { padding-left: 18px; }
.tg-legal li { margin-bottom: 8px; }
.tg-legal strong { color: var(--tg-ink); }

.tg-login-lead { margin: 0 0 16px; font-size: 13px; color: var(--tg-muted); }
.tg-field { display: block; margin-bottom: 12px; }
.tg-field > span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tg-muted);
}
.tg-field-err { display: none; margin-top: 4px; color: #dc2626; font-size: 12px; }
.tg-login-forgot {
    display: inline-block;
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tg-accent);
    text-decoration: none;
}
.tg-btn-primary {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: var(--tg-radius-sm);
    background: var(--tg-accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.tg-btn-primary:hover { background: var(--tg-accent-2); }
.tg-login-fail { display: none; margin-top: 10px; font-size: 13px; color: #dc2626; }

.tg-user-side { padding: 16px 0; }
.tg-side-nav {
    margin-top: 12px;
    background: #fff;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius);
    overflow: hidden;
}
.tg-side-nav a {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--tg-line);
    color: var(--tg-ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.tg-side-nav a:last-child { border-bottom: 0; }
.tg-side-nav a:hover { background: var(--tg-soft); color: var(--tg-accent); }

@media (max-width: 980px) {
    .tg-header-nav { display: none; }
}
