@font-face { font-family: "LINE Seed"; src: url(/assets/font/LINESeedSansTH_W_Rg.woff); font-weight: 300; }
@font-face { font-family: "LINE Seed"; src: url(/assets/font/LINESeedSansTH_W_Rg.woff); font-weight: 500; }
@font-face { font-family: "LINE Seed"; src: url(/assets/font/LINESeedSansTH_W_Bd.woff); font-weight: 600; }
@font-face { font-family: "LINE Seed"; src: url(/assets/font/LINESeedSansTH_W_XBd.woff); font-weight: 700; }
@font-face { font-family: "LINE Seed"; src: url(/assets/font/LINESeedSansTH_W_He.woff); font-weight: 800; }

:root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface2: #f9f9fb;
    --border: #e5e5ea;
    --accent: #0071e3;
    --accent-light: #e8f0fc;
    --text: #1d1d1f;
    --text-2: #6e6e73;
    --text-3: #aeaeb2;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.07);
    --shadow-hover: 0 8px 28px rgba(0,0,0,0.11);
}

* { box-sizing: border-box; }
body {
    font-family: "LINE Seed","Kanit",-apple-system,BlinkMacSystemFont,sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none !important; color: inherit; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* MARQUEE */
.marquee-content {
    display: inline-block; white-space: nowrap;
    animation: marquee 22s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ===== NAV ===== */
.site-nav {
    background: rgba(255,255,255,0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.nav-inner {
    max-width: 1120px; margin: 0 auto;
    padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 60px;
}
.nav-logo {
    font-size: 1.15rem; font-weight: 800;
    color: var(--text); letter-spacing: -0.3px;
}
.nav-links { display: flex; gap: 2px; }
.nav-links a {
    padding: 6px 14px; border-radius: 8px;
    font-size: 0.875rem; font-weight: 500; color: var(--text-2);
    transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--surface2); color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }

/* ===== BOTTOM NAV (mobile) ===== */
.bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 62px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-inner {
    display: grid; grid-template-columns: repeat(5,1fr);
    height: 100%; align-items: center;
}
.nav-item-mobile {
    display: flex; flex-direction: column; align-items: center;
    gap: 3px; font-size: 0.65rem; font-weight: 600;
    color: var(--text-3); transition: color 0.15s; cursor: pointer;
}
.nav-item-mobile i { font-size: 1.15rem; }
.nav-item-mobile:hover, .nav-item-mobile.active { color: var(--accent); }
.nav-center-pill {
    display: flex; flex-direction: column; align-items: center;
    gap: 3px; cursor: pointer;
}
.nav-center-pill .pill {
    width: 44px; height: 44px; border-radius: 14px;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(0,113,227,0.35);
    margin-top: -14px;
    transition: transform 0.15s;
}
.nav-center-pill .pill:hover { transform: scale(1.06); }
.nav-center-pill span { font-size: 0.65rem; font-weight: 600; color: var(--text-3); }

@media (max-width: 767px) {
    .bottom-nav { display: block; }
    .nav-links, .nav-right .desktop-only { display: none !important; }
    body { padding-bottom: 72px; }
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--accent); color: #fff;
    border: none; border-radius: 980px;
    padding: 8px 20px; font-size: 0.875rem; font-weight: 600;
    cursor: pointer; transition: opacity 0.15s, transform 0.15s;
    display: inline-flex; align-items: center; gap: 6px;
    white-space: nowrap;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-secondary {
    background: var(--surface2); color: var(--text);
    border: 1px solid var(--border); border-radius: 980px;
    padding: 7px 18px; font-size: 0.875rem; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary:hover { background: var(--border); }

/* ===== CARDS ===== */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.card:active { transform: scale(0.98); }

/* Game card */
.game-card {
    background: var(--surface); border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden; cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}
.game-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.game-card:active { transform: scale(0.97); }
.game-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.game-card-body { padding: 8px 8px 10px; text-align: center; }
.game-name {
    font-size: 0.78rem; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0;
}

/* Product card */
.product-card {
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.product-card:active { transform: scale(0.98); }
.product-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.product-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.product-title { font-size: 0.9rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 16px;
}
.section-title { font-size: 1.15rem; font-weight: 800; color: var(--text); letter-spacing: -0.2px; margin: 0; }
.see-all { font-size: 0.82rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.see-all:hover { opacity: 0.75; }

/* ===== NOTICE BAR ===== */
.notice-bar {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 10px 16px;
    display: flex; align-items: center; gap: 12px; overflow: hidden;
}
.notice-tag {
    background: var(--accent-light); color: var(--accent);
    font-size: 0.72rem; font-weight: 700;
    padding: 3px 10px; border-radius: 99px; white-space: nowrap;
}

/* ===== BANNER ===== */
.banner-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 21/8;
    box-shadow: var(--shadow);
}
@media (max-width: 640px) { .banner-wrap { aspect-ratio: 16/9; border-radius: 14px; } }

/* ===== USER DROPDOWN ===== */
.user-btn {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 980px; padding: 5px 14px 5px 5px;
    cursor: pointer; transition: background 0.15s;
}
.user-btn:hover { background: var(--border); }
.user-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--accent-light); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-avatar i { color: var(--accent); font-size: 0.9rem; }
.user-name { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.user-balance { font-size: 0.7rem; font-weight: 600; color: var(--accent); }

.dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 8px);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-hover);
    width: 260px; overflow: hidden; z-index: 200;
}
.dd-wallet {
    background: var(--accent-light); padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.dd-wallet-amount { font-size: 1.25rem; font-weight: 800; color: var(--accent); }
.dd-wallet-label { font-size: 0.72rem; color: var(--text-2); margin-top: 1px; }
.dd-topup {
    background: var(--accent); color: #fff;
    padding: 6px 14px; border-radius: 980px;
    font-size: 0.75rem; font-weight: 700;
}
.dd-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 18px; font-size: 0.85rem; color: var(--text);
    transition: background 0.12s;
}
.dd-item:hover { background: var(--surface2); }
.dd-item i { width: 16px; color: var(--text-2); text-align: center; }
.dd-divider { border: none; border-top: 1px solid var(--border); margin: 0; }
.dd-logout { color: #e53e3e !important; }
.dd-logout i { color: #e53e3e !important; }

/* ===== MOBILE MENU ===== */
.mobile-menu {
    border-top: 1px solid var(--border); padding: 8px 16px 12px;
    background: var(--surface);
}
.mobile-menu a {
    display: block; padding: 10px 12px; border-radius: 10px;
    font-size: 0.9rem; font-weight: 500; color: var(--text-2);
    transition: background 0.12s;
}
.mobile-menu a:hover { background: var(--surface2); color: var(--text); }

/* ===== AUTH MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.28);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-box {
    background: var(--surface); border-radius: 24px;
    width: 100%; max-width: 380px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: scale(0.96); opacity: 0;
    transition: transform 0.25s, opacity 0.25s;
}
.modal-box.open { transform: scale(1); opacity: 1; }
.modal-body { padding: 32px 28px 28px; }
.modal-title { font-size: 1.35rem; font-weight: 800; color: var(--text); margin: 0 0 24px; letter-spacing: -0.3px; }
.modal-close {
    position: absolute; top: 18px; right: 18px;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--surface2); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2); font-size: 0.85rem; transition: background 0.15s;
}
.modal-close:hover { background: var(--border); }

/* ===== FORM ===== */
.field-label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.field-input {
    width: 100%; padding: 11px 14px;
    background: var(--surface2); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.9rem;
    color: var(--text); outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.field-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,0.12); }
.field-input::placeholder { color: var(--text-3); }
.form-stack { display: flex; flex-direction: column; gap: 14px; }

/* ===== DIVIDER ===== */
.or-divider {
    display: flex; align-items: center; gap: 12px; margin: 18px 0;
}
.or-divider::before, .or-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.or-divider span { font-size: 0.78rem; color: var(--text-3); font-weight: 600; }

/* ===== GOOGLE BTN ===== */
.btn-google {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--surface2); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); padding: 11px 18px;
    font-size: 0.875rem; font-weight: 600; color: var(--text);
    cursor: pointer; transition: background 0.15s;
    font-family: inherit;
}
.btn-google:hover { background: var(--border); }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 40px 24px; text-align: center;
    margin-top: 64px;
}
.footer-name { font-size: 1rem; font-weight: 800; color: var(--text); margin-bottom: 14px; }
.footer-links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.footer-links a { font-size: 0.82rem; color: var(--text-2); transition: color 0.15s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 0.78rem; color: var(--text-3); }
.footer-copy a { color: var(--accent); }

/* ===== CONTENT WRAPPER ===== */
.page-content { max-width: 1120px; margin: 0 auto; padding: 32px 24px; }
@media (max-width: 640px) { .page-content { padding: 20px 16px; } }
.page-stack { display: flex; flex-direction: column; gap: 40px; }
