/* =============================================
   GAMESTORE VN - MAIN STYLESHEET (Mobile-first)
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:         #0f172a;
    --bg-card:    #1e293b;
    --bg-hover:   #263348;
    --bg-alt:     #151f33;
    --border:     #334155;
    --text:       #f1f5f9;
    --text-muted: #94a3b8;
    --primary:    #f59e0b;
    --primary-dark: #d97706;
    --green:      #10b981;
    --red:        #ef4444;
    --blue:       #3b82f6;
    --radius:     12px;
    --radius-sm:  8px;
    --shadow:     0 4px 20px rgba(0,0,0,0.3);
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; }

/* ── Container ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
@media (max-width: 768px) { .container { padding: 0 14px; } }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--radius-sm); font-family: inherit;
    font-size: 14px; font-weight: 700; cursor: pointer; border: none;
    text-decoration: none; transition: all 0.18s; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary  { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #000; }
.btn-primary:hover { opacity: 0.9; }
.btn-outline  { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: #64748b; color: var(--text); }
.btn-danger   { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--red); }
.btn-sm  { padding: 6px 14px; font-size: 12px; border-radius: 7px; }
.btn-lg  { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-disabled { background: #334155; color: #475569; cursor: not-allowed; }

/* ── Hero ── */
.hero {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 60px 0;
    min-height: 480px;
}
.hero-content { flex: 1; }
.hero-visual  { flex: 1; display: flex; justify-content: center; }
.hero-badge {
    display: inline-block;
    background: rgba(245,158,11,0.12); color: var(--primary);
    border: 1px solid rgba(245,158,11,0.25);
    padding: 5px 14px; border-radius: 20px;
    font-size: 13px; font-weight: 700; margin-bottom: 18px;
}
.hero h1 {
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 900; line-height: 1.15; margin-bottom: 16px;
}
.hero h1 .highlight { color: var(--primary); }
.hero p  { font-size: 16px; color: var(--text-muted); max-width: 520px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-stats  {
    display: flex; gap: 28px; flex-wrap: wrap;
    font-size: 14px; color: var(--text-muted);
}
.hero-stats div span { font-size: 20px; font-weight: 800; color: var(--text); display: block; }

/* Floating cards in hero */
.floating-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.game-card-float {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
    padding: 20px 16px; display: flex; align-items: center; gap: 12px;
    font-size: 14px; font-weight: 600; transition: border-color 0.2s, transform 0.2s;
}
.game-card-float:hover { border-color: var(--primary); transform: translateY(-3px); }
.game-icon-big { font-size: 30px; }

@media (max-width: 768px) {
    .hero { flex-direction: column; padding: 32px 0 24px; min-height: auto; gap: 20px; }
    .hero-content { text-align: center; }
    .hero p { max-width: 100%; }
    .hero-actions { justify-content: center; }
    .hero-stats  { justify-content: center; gap: 20px; }
    .hero-visual { display: none; }
}

/* ── Sections ── */
.section { padding: 56px 0; }
.section.bg-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 36px; }
.section-header h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 800; margin-bottom: 8px; }
.section-header p  { color: var(--text-muted); font-size: 15px; }
@media (max-width: 768px) { .section { padding: 32px 0; } .section-header { margin-bottom: 22px; } }

/* ── Category grid ── */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
@media (max-width: 480px) { .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.category-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px 16px; text-align: center; text-decoration: none; transition: all 0.2s;
    display: block;
}
.category-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-icon { font-size: 36px; display: block; margin-bottom: 10px; }
.category-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.cat-count { font-size: 12px; color: var(--text-muted); }
@media (max-width: 480px) { .category-card { padding: 16px 10px; } .cat-icon { font-size: 28px; } }

/* ── Product grid ── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
@media (max-width: 768px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 360px)  { .product-grid { grid-template-columns: 1fr; } }
.product-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: all 0.2s; position: relative;
}
.product-card:hover { border-color: #475569; transform: translateY(-4px); box-shadow: var(--shadow); }
.badge-sale {
    position: absolute; top: 10px; left: 10px;
    background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff;
    font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; z-index: 1;
}
.product-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: #0f172a;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.thumb-placeholder { font-size: 48px; }
.product-info { padding: 14px; }
.product-category { font-size: 11px; color: var(--text-muted); margin-bottom: 5px; display: block; }
.product-info h3 {
    font-size: 13px; font-weight: 700; margin-bottom: 10px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-price { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.price-main  { font-size: 16px; font-weight: 800; color: var(--primary); }
.price-old   { font-size: 12px; color: var(--text-muted); text-decoration: line-through; }
@media (max-width: 480px) { .product-info { padding: 10px; } .price-main { font-size: 14px; } }

/* ── Features grid ── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
@media (max-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px 20px; text-align: center;
}
.feature-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.feature-card p  { font-size: 13px; color: var(--text-muted); }

/* ── Category page ── */
.category-banner {
    display: flex; align-items: center; gap: 20px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px; margin-bottom: 28px;
}
.category-banner span { font-size: 52px; }
.category-banner h1 { font-size: clamp(20px, 3vw, 28px); font-weight: 800; margin-bottom: 6px; }
.category-banner p  { font-size: 14px; color: var(--text-muted); }
@media (max-width: 480px) { .category-banner { padding: 18px; gap: 14px; } .category-banner span { font-size: 36px; } }

/* ── Page layout ── */
.page-main { padding: 32px 0 48px; }
.page-title { margin-bottom: 28px; }
.page-title h1 { font-size: clamp(22px, 3vw, 32px); font-weight: 800; margin-bottom: 6px; }
.page-title p  { color: var(--text-muted); font-size: 15px; }
@media (max-width: 768px) { .page-main { padding: 20px 0 32px; } .page-title { margin-bottom: 18px; } }

/* ── Auth pages ── */
.auth-page { padding: 48px 0; min-height: calc(100vh - 120px); display: flex; align-items: center; }
.auth-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px;
    padding: 40px 36px; max-width: 440px; margin: 0 auto; width: 100%;
}
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.auth-header h1 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.auth-header p  { color: var(--text-muted); font-size: 14px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-footer a  { color: var(--primary); text-decoration: none; font-weight: 700; }
@media (max-width: 480px) { .auth-card { padding: 28px 18px; } }

/* ── Forms ── */
.auth-form .form-group, .form-group { margin-bottom: 16px; }
.auth-form label, label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=email], input[type=number], select, textarea {
    width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 11px 14px; font-size: 14px; color: var(--text); font-family: inherit;
    outline: none; transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; min-height: 80px; }
.input-password { position: relative; }
.input-password input { padding-right: 44px; }
.toggle-pass {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px;
}

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-info    { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon  { font-size: 56px; display: block; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p  { margin-bottom: 20px; }

/* ── Tables ── */
.table-wrap  { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table  { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 500px; }
.data-table th {
    text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02);
}
.data-table td { padding: 11px 14px; border-bottom: 1px solid rgba(51,65,85,0.4); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Deposit page ── */
.deposit-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 768px) { .deposit-layout { grid-template-columns: 1fr; } }
.guide-card, .bank-info-card, .qr-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.guide-card h2, .qr-card h2 { font-size: 18px; font-weight: 800; margin-bottom: 18px; }
.bank-info-card { margin-top: 16px; }
.bank-info-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.guide-steps { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.guide-step  { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
    width: 28px; height: 28px; background: var(--primary); color: #000;
    border-radius: 50%; font-weight: 800; font-size: 13px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.deposit-code {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
    padding: 10px 14px; margin: 8px 0;
}
.deposit-code code { flex: 1; color: var(--primary); font-size: 14px; font-weight: 700; }
.btn-copy { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.bank-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bank-table td { padding: 9px 0; border-bottom: 1px solid rgba(51,65,85,0.5); }
.bank-table td:first-child { color: var(--text-muted); width: 120px; }
.amount-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.amount-btn {
    background: var(--bg); border: 1px solid var(--border); color: var(--text-muted);
    padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.15s;
}
.amount-btn:hover, .amount-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(245,158,11,0.06); }
.custom-amount { margin-bottom: 16px; }
.qr-wrapper { text-align: center; margin: 16px 0; }
.qr-image { width: 200px; height: 200px; border-radius: 12px; }
.qr-amount { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.checking-status { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; margin: 12px 0; }
.status-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Product detail ── */
.product-detail-layout {
    display: flex; gap: 36px; align-items: flex-start; margin-top: 24px;
}
@media (max-width: 768px) { .product-detail-layout { flex-direction: column; gap: 20px; } }
.product-detail-media { flex-shrink: 0; width: 440px; text-align: center; }
@media (max-width: 1024px) { .product-detail-media { width: 360px; } }
@media (max-width: 768px)  { .product-detail-media { width: 100%; } }
.product-main-img {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    object-fit: contain;
    background: #0f172a;
    display: block;
}
.product-icon-big { font-size: 80px; padding: 24px 0; }
.product-meta-badges { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.product-detail-info { flex: 1; }
.product-category-tag { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; display: block; }
.product-detail-info h1 { font-size: clamp(18px, 2.5vw, 26px); font-weight: 800; margin-bottom: 16px; line-height: 1.3; }
.price-section { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.price-big { font-size: clamp(24px, 3vw, 36px); font-weight: 900; color: var(--primary); }
.price-strikethrough { font-size: 18px; color: var(--text-muted); text-decoration: line-through; }
.discount-tag { background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); padding: 3px 10px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.product-description { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.product-description h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.product-description p  { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.acc-reveal { background: rgba(16,185,129,0.05); border: 1px solid rgba(16,185,129,0.2); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.acc-field { margin-bottom: 12px; }
.acc-field label { font-size: 11px; color: var(--text-muted); margin-bottom: 5px; display: block; }
.acc-value { display: flex; align-items: center; gap: 8px; }
.acc-value code { flex: 1; background: var(--bg); padding: 6px 12px; border-radius: 6px; font-size: 13px; color: #93c5fd; }
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }

/* ── Order history ── */
.orders-list { display: flex; flex-direction: column; gap: 16px; }
.order-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.order-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px; border-bottom: 1px solid var(--border); gap: 12px; }
@media (max-width: 480px) { .order-header { flex-direction: column; gap: 8px; } }
.order-cat { font-size: 11px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.order-header h3 { font-size: 15px; font-weight: 700; }
.order-date { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.order-amount { font-size: 18px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.order-acc { padding: 16px 18px; }
.order-acc h4 { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.acc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .acc-row { grid-template-columns: 1fr; } }
.extra-info { margin-top: 12px; font-size: 13px; color: var(--text-muted); }
.password-hidden { cursor: pointer; }

/* ── My accounts grid ── */
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
@media (max-width: 480px) { .accounts-grid { grid-template-columns: 1fr; } }
.acc-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.acc-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cat-tag { font-size: 11px; color: var(--text-muted); }
.acc-date { font-size: 11px; color: var(--text-muted); }
.acc-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.acc-fields { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.acc-field-row { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.acc-field-row span { color: var(--text-muted); min-width: 80px; }
.acc-field-row code { flex: 1; background: var(--bg); padding: 4px 8px; border-radius: 5px; font-size: 12px; color: #93c5fd; }
.acc-extra { font-size: 12px; color: var(--text-muted); background: var(--bg); padding: 8px 12px; border-radius: 7px; }
.acc-price { font-size: 13px; color: var(--primary); font-weight: 700; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }

/* ── Status badges ── */
.status-badge, .badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
}
.status-completed, .badge-completed { background: rgba(16,185,129,0.1); color: #10b981; }
.status-pending,   .badge-pending   { background: rgba(245,158,11,0.1); color: #f59e0b; }
.status-failed,    .badge-failed    { background: rgba(239,68,68,0.1);  color: #ef4444; }
.badge-admin    { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-user     { background: rgba(59,130,246,0.1);  color: #60a5fa; }
.badge-available { background: rgba(16,185,129,0.1); color: #10b981; }
.badge-sold     { background: rgba(239,68,68,0.1);  color: #ef4444; }
.badge-views    { background: rgba(100,116,139,0.1); color: #94a3b8; }

/* ── Footer ── */
.site-footer {
    background: var(--bg-card); border-top: 1px solid var(--border);
    padding: 40px 0 24px; margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px; margin-bottom: 28px; }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
.footer-col h4 { font-size: 13px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.footer-col a, .footer-col p { font-size: 13px; color: var(--text-muted); text-decoration: none; display: block; margin-bottom: 7px; transition: color 0.15s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; font-size: 13px; color: var(--text-muted); }

/* ── Mobile scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }