:root {
    --bg: #050507;
    --panel: #111119;
    --panel-2: #181824;
    --text: #f8f8ff;
    --muted: #9ca3af;
    --line: rgba(255,255,255,.1);
    --red: #fe2c55;
    --cyan: #25f4ee;
    --gold: #ffd166;
    --green: #39ff88;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 12%, rgba(37,244,238,.18), transparent 30%),
        radial-gradient(circle at 85% 8%, rgba(254,44,85,.22), transparent 28%),
        var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.topbar {
    position: sticky; top: 0; z-index: 10;
    background: rgba(5,5,7,.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}
.nav {
    max-width: 1160px; margin: 0 auto; padding: 14px 18px;
    display: flex; align-items: center; gap: 18px; justify-content: space-between;
}
.nav-head { display: flex; align-items: center; min-width: 0; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 900; letter-spacing: .5px; min-width: 0; }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--cyan), var(--red));
    display: grid; place-items: center; color: #020203; font-weight: 1000;
    box-shadow: -5px 0 0 rgba(37,244,238,.25), 5px 0 0 rgba(254,44,85,.25);
}
.navlinks { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.07);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}
.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
    transition: transform .2s ease, opacity .2s ease;
}
.navlinks a, .btn, button {
    border: 1px solid var(--line);
    background: rgba(255,255,255,.06);
    color: var(--text);
    border-radius: 8px;
    padding: 9px 13px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.25;
    text-align: center;
}
.btn, button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }
.btn.primary, button.primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--red), #b91cff 52%, var(--cyan));
    color: white;
}
.btn.ghost { background: transparent; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 28px 18px 60px; width: 100%; }
.hero {
    min-height: 430px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 28px; align-items: center;
}
.eyebrow { color: var(--cyan); font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
h1 { font-size: clamp(38px, 6vw, 76px); line-height: .96; margin: 12px 0; letter-spacing: 0; }
h2 { font-size: clamp(26px, 3vw, 40px); margin: 0 0 18px; }
.lead { color: #d5d7df; font-size: 18px; line-height: 1.8; max-width: 650px; }
.hero-art {
    aspect-ratio: 4/3; border-radius: 8px; overflow: hidden;
    border: 1px solid rgba(255,255,255,.16);
    background: linear-gradient(145deg, rgba(254,44,85,.86), rgba(15,15,25,.92) 45%, rgba(37,244,238,.68));
    position: relative;
    box-shadow: 0 26px 80px rgba(0,0,0,.45);
}
.hero-art > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}
.hero-art:before {
    content: ""; position: absolute; inset: 16px;
    background:
        linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
    background-size: 36px 36px;
    transform: perspective(500px) rotateX(56deg);
    transform-origin: bottom;
    z-index: 1;
}
.hero-card {
    position: absolute; left: 34px; right: 34px; bottom: 34px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(7,7,12,.72);
    border-radius: 8px;
    padding: 22px;
    z-index: 2;
}
.live-dot { width: 10px; height: 10px; background: var(--red); border-radius: 50%; display: inline-block; box-shadow: 0 0 24px var(--red); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.card, .panel {
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}
.game-cover {
    height: 190px; display: grid; place-items: center; position: relative;
    background: linear-gradient(135deg, rgba(254,44,85,.86), rgba(37,244,238,.55));
}
.game-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-title {
    position: absolute; inset: auto 14px 14px; font-size: 26px; font-weight: 1000;
    text-shadow: 0 3px 18px rgba(0,0,0,.6);
}
.card-body, .panel-body { padding: 18px; }
.muted { color: var(--muted); }
.price { color: var(--gold); font-size: 26px; font-weight: 1000; }
.badge { display: inline-flex; gap: 6px; align-items: center; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--cyan); font-size: 12px; font-weight: 900; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.form {
    max-width: 520px; margin: 28px auto; padding: 22px;
    background: rgba(17,17,25,.84); border: 1px solid var(--line); border-radius: 8px;
}
label { display: block; margin: 12px 0 7px; color: #d6d8df; font-weight: 700; }
input, textarea, select {
    width: 100%; border: 1px solid rgba(255,255,255,.14); border-radius: 8px;
    background: rgba(0,0,0,.36); color: var(--text); padding: 12px 13px;
    min-height: 44px;
    font-size: 16px;
}
textarea { min-height: 120px; resize: vertical; }
code { white-space: normal; overflow-wrap: anywhere; color: #d8fbff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--cyan); }
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.side { position: sticky; top: 82px; align-self: start; }
.side a { display: block; padding: 11px 12px; border-radius: 8px; color: #d9dce8; }
.side a:hover { background: rgba(255,255,255,.08); }
.notice { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; margin: 14px 0; }
.notice.ok { border-color: rgba(57,255,136,.4); color: var(--green); }
.notice.err { border-color: rgba(254,44,85,.45); color: #ff8aa0; }
.footer { color: #8b90a0; border-top: 1px solid var(--line); padding: 28px 18px; text-align: center; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill { padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.08); color: #cbd5e1; font-size: 12px; }
.home-section { margin-top: 38px; }
.section-head { max-width: 760px; margin-bottom: 18px; }
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.category-card {
    min-height: 190px;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.12);
    background:
        linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.035)),
        radial-gradient(circle at 78% 8%, rgba(37,244,238,.18), transparent 34%),
        radial-gradient(circle at 12% 85%, rgba(254,44,85,.18), transparent 38%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.category-card h3 { font-size: 25px; margin: 14px 0 8px; }
.category-card p, .clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.category-card small { color: var(--gold); font-weight: 900; }
.split-band {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 18px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.045);
}
.step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step-grid div {
    padding: 16px;
    border-radius: 8px;
    background: rgba(0,0,0,.25);
    border: 1px solid var(--line);
}
.step-grid strong { display: block; color: var(--cyan); font-size: 28px; }
.products-hero {
    padding: 22px 0 10px;
    max-width: 780px;
}
.products-toolbar {
    position: sticky;
    top: 0;
    z-index: 4;
    margin: 8px 0 20px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(10,10,14,.94), rgba(10,10,14,.84));
    box-shadow: 0 18px 38px rgba(0,0,0,.22);
    backdrop-filter: blur(16px);
}
.toolbar-top {
    display: flex;
    align-items: center;
    gap: 12px;
}
.toolbar-meta {
    flex: 0 0 auto;
    min-width: 84px;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
}
.toolbar-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}
#product-count {
    font-size: 18px;
    line-height: 1;
    color: #ffffff;
}
.toolbar-group {
    margin-top: 12px;
}
.toolbar-group-title {
    display: block;
    margin-bottom: 8px;
    color: #c8d0df;
    font-size: 12px;
    font-weight: 800;
}
.search-wrap {
    flex: 1 1 auto;
}
.search-wrap input {
    width: 100%;
    min-height: 48px;
    border-radius: 999px;
    padding-inline: 16px;
    background: rgba(255,255,255,.08);
}
.toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.toolbar-actions-sort .toolbar-chip {
    min-width: 108px;
}
.toolbar-chip {
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.05);
    color: #eef2ff;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.toolbar-chip:active {
    transform: scale(.98);
}
.toolbar-chip.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, rgba(254,44,85,.95), rgba(37,244,238,.86));
    color: #050507;
}
.product-category { scroll-margin-top: 90px; margin: 26px 0 38px; }
.product-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.product-card {
    min-width: 0;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.1);
    background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04));
    box-shadow: 0 16px 32px rgba(0,0,0,.24);
    overflow: hidden;
}
.product-card.is-collapsed { display: none !important; }
.product-card-link {
    display: flex;
    flex-direction: column;
    min-height: 44px;
}
.product-card-media {
    aspect-ratio: 1 / .96;
    background: rgba(255,255,255,.06);
    overflow: hidden;
}
.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.product-category-tag {
    display: inline-flex;
    align-self: flex-start;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(37,244,238,.12);
    color: var(--cyan);
    font-size: 11px;
    font-weight: 900;
}
.product-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.product-summary {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}
.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.product-price {
    color: var(--gold);
    font-size: 22px;
    font-weight: 1000;
}
.product-days {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(37,244,238,.12);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.product-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.product-stock {
    color: var(--muted);
    font-size: 12px;
}
.product-enter {
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}
.product-loadmore-wrap {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}
.product-loadmore {
    min-width: 164px;
}
@media (max-width: 960px) {
    .hero, .grid, .admin-layout { grid-template-columns: 1fr; }
    .category-grid, .split-band { grid-template-columns: 1fr; }
    .hero { min-height: auto; padding-top: 12px; }
    .side { position: static; }
    .side .panel-body { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .side a { text-align: center; background: rgba(255,255,255,.045); }
}
@media (max-width: 720px) {
    body {
        background:
            radial-gradient(circle at 10% 0%, rgba(37,244,238,.14), transparent 34%),
            radial-gradient(circle at 96% 3%, rgba(254,44,85,.17), transparent 32%),
            var(--bg);
    }
    .topbar { position: static; }
    .nav {
        padding: 10px 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .nav-head {
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
    }
    .nav-head .brand { order: 2; }
    .brand {
        font-size: 14px;
    }
    .logo {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        flex: 0 0 auto;
    }
    .menu-toggle { display: inline-flex; flex: 0 0 auto; order: 1; width: 38px; height: 38px; gap: 4px; }
    .menu-toggle span { width: 18px; }
    .menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
    .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .navlinks {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        justify-content: stretch;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        padding-top: 0;
        pointer-events: none;
        transition: max-height .24s ease, opacity .2s ease, padding-top .2s ease;
    }
    .menu-open .navlinks {
        max-height: 360px;
        opacity: 1;
        padding-top: 10px;
        pointer-events: auto;
    }
    .navlinks a, .navlinks .pill {
        width: 100%;
        min-width: 0;
        padding: 9px 8px;
        font-size: 13px;
    }
    .navlinks .pill {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 36px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .wrap { padding: 14px 10px 34px; }
    h1 { font-size: 31px; line-height: 1.08; margin: 8px 0; }
    h2 { font-size: 22px; margin-bottom: 12px; }
    h3 { margin: 9px 0 6px; font-size: 17px; }
    .eyebrow { font-size: 12px; letter-spacing: .12em; }
    .lead { font-size: 14px; line-height: 1.62; }
    .hero { gap: 14px; }
    .hero-art { aspect-ratio: 4 / 3; box-shadow: 0 12px 34px rgba(0,0,0,.4); }
    .hero-art:before { inset: 10px; background-size: 26px 26px; }
    .hero-card {
        left: 14px;
        right: 14px;
        bottom: 14px;
        padding: 12px;
    }
    .hero-card h2 { font-size: 18px; margin-bottom: 6px; }
    .hero-card p { margin: 6px 0; font-size: 13px; }
    .grid { gap: 10px; }
    .category-grid { grid-template-columns: 1fr; gap: 10px; }
    .category-card { min-height: 138px; padding: 14px; }
    .category-card h3 { font-size: 20px; margin: 10px 0 6px; }
    .split-band { padding: 14px; gap: 10px; }
    .step-grid { grid-template-columns: 1fr; gap: 8px; }
    .step-grid div { padding: 11px; }
    .step-grid strong { font-size: 20px; }
    .products-toolbar {
        margin: 8px 0 14px;
        padding: 12px;
        border-radius: 10px;
    }
    .toolbar-top {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }
    .toolbar-meta {
        min-height: 44px;
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 12px;
        border-radius: 12px;
    }
    .search-wrap input { min-height: 44px; font-size: 14px; }
    .toolbar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }
    .toolbar-chip {
        width: 100%;
        min-height: 44px;
        padding: 8px 10px;
        font-size: 12px;
    }
    .product-category { margin: 18px 0 28px; }
    .product-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .product-card { border-radius: 12px; }
    .product-card-body { padding: 11px; gap: 7px; }
    .product-title { font-size: 14px; }
    .product-summary {
        font-size: 12px;
        min-height: 36px;
    }
    .product-price { font-size: 18px; }
    .product-days, .product-stock, .product-enter { font-size: 11px; }
    .card, .panel, .form { border-radius: 7px; }
    .card-body, .panel-body { padding: 12px; }
    .game-cover { height: 142px; }
    .cover-title {
        font-size: 20px;
        inset: auto 12px 12px;
        overflow-wrap: anywhere;
    }
    .price { font-size: 20px; }
    .badge { font-size: 11px; padding: 4px 8px; }
    .row {
        align-items: flex-start;
        gap: 6px;
    }
    .form {
        max-width: none;
        margin: 12px 0;
        padding: 13px;
    }
    input, textarea, select { padding: 9px 10px; min-height: 40px; font-size: 15px; }
    label { margin: 9px 0 5px; font-size: 14px; }
    .actions, .form p {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .actions .btn, .actions button, .form button, .card-body .btn, .panel-body .btn {
        width: 100%;
    }
    .admin-layout { gap: 12px; }
    .side .panel-body {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 8px;
    }
    .side a {
        padding: 8px 5px;
        font-size: 12px;
    }
    table.mobile-card {
        display: block;
        width: 100%;
        border-collapse: separate;
    }
    table.mobile-card tbody,
    table.mobile-card tr,
    table.mobile-card td {
        display: block;
        width: 100%;
    }
    table.mobile-card tr:first-child { display: none; }
    table.mobile-card tr {
        margin: 0 0 9px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(255,255,255,.045);
    }
    table.mobile-card td {
        border: 0;
        padding: 6px 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    table.mobile-card td::before {
        content: attr(data-label);
        display: block;
        color: var(--cyan);
        font-size: 12px;
        font-weight: 900;
        margin-bottom: 3px;
    }
    table.mobile-card td:empty::after { content: "-"; color: var(--muted); }
    .footer { padding: 18px 10px; font-size: 12px; }
}
@media (max-width: 400px) {
    .navlinks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    h1 { font-size: 29px; }
    .hero-art { min-height: 238px; }
    .game-cover { height: 132px; }
    .toolbar-actions,
    .product-card-grid { grid-template-columns: 1fr; }
    .side .panel-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .badge { max-width: 100%; }
}
