:root {
    --text: #1f2937;
    --muted: #6b7280;
    --line: #eef2f6;
    --blue: #5b8def;
    --price: #ff6a3d;
    --ok: #16a34a;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: #f6f8fc; color: var(--text); font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }

.topbar {
    height: 64px; background: #fff; border-bottom: 1px solid #f0f2f5;
    position: sticky; top: 0; z-index: 20;
}
.topin {
    width: min(1120px, calc(100% - 32px));
    height: 64px; margin: 0 auto;
    display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; color: #0f766e; margin-right: auto; }
.logo {
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(180deg, #2dd4bf, #0f766e); color: #fff; font-size: 14px;
}
.navlinks { display: flex; gap: 22px; color: #6b7280; font-size: 14px; }
.navlinks a.on, .navlinks a:hover { color: #111827; font-weight: 700; }
.ghost, .primary {
    height: 36px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center;
    font-size: 13px; font-weight: 700;
}
.ghost { border: 1px solid #e5e7eb; background: #fff; }
.primary { background: #3b82f6; color: #fff; }

.announce { padding: 8px 16px; text-align: center; font-size: 13px; color: #047857; background: #ecfdf5; }

.hero {
    background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 48%, #f6f8fc 100%);
    padding: 28px 0 8px;
}
.hero-in {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
}
.hero-card {
    min-width: 280px; background: #fff; border-radius: 18px;
    padding: 22px 24px; display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.hero-card h1 { margin: 0; font-size: 22px; }
.hero-card p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.hero-ico { font-size: 28px; }
.hero-search {
    width: 220px; height: 44px; border: 0; border-radius: 999px;
    padding: 0 18px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.05);
    outline: none;
}

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto 40px; }
.sec { margin: 22px 0 14px; font-size: 15px; color: #4b5563; font-weight: 700; }

.cats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.cat {
    min-width: 148px; text-align: left;
    border: 1px solid #eef2f6; background: #fff; border-radius: 16px;
    padding: 16px 18px; cursor: pointer;
    box-shadow: 0 8px 20px rgba(15,23,42,.04);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.cat:hover { transform: translateY(-2px); }
.cat.on {
    border-color: #c7d2fe;
    background: linear-gradient(180deg, #f8fbff, #fff);
    box-shadow: 0 12px 28px rgba(91,141,239,.12);
}
.cat b { display: block; font-size: 15px; }
.cat small { color: var(--muted); font-size: 12px; }

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.card {
    background: #fff; border-radius: 18px; overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 28px rgba(15,23,42,.05);
    transition: transform .18s ease, box-shadow .18s ease;
    display: block;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(15,23,42,.1); }
.card.off { opacity: .7; }
.pic {
    height: 210px; display: grid; place-items: center;
    color: #fff; font-size: 28px; font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #6366f1);
}
.pic.m3 { background: linear-gradient(135deg, #2dd4bf, #0f766e); }
.pic.m6 { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.pic.m12 { background: linear-gradient(135deg, #fbbf24, #f97316); }
.pic.gift { background: linear-gradient(135deg, #fb923c, #ea580c); }
.pic.official { background: linear-gradient(135deg, #c084fc, #7c3aed); }
.pic.boost { background: linear-gradient(135deg, #22d3ee, #0284c7); }
.pic.rent888 { background: linear-gradient(135deg, #fb7185, #e11d48); }
.pic.tron { background: linear-gradient(135deg, #f87171, #b91c1c); }
.pic.vip { background: linear-gradient(135deg, #4ade80, #16a34a); }
.pic.tg { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.pic.big { height: 240px; border-radius: 18px; }
.info { padding: 14px 16px 16px; }
.info h2 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row b { color: var(--price); font-size: 18px; }
.tag {
    font-size: 11px; padding: 2px 7px; border-radius: 6px;
    background: #fff1e8; color: #ea580c; font-weight: 700;
}
.sold { margin-left: auto; color: #9ca3af; font-size: 12px; }

.query-wrap { padding-bottom: 48px; }
.query { display: flex; gap: 10px; }
.query input, .form input {
    flex: 1; height: 44px; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 0 14px; outline: none; background: #fff;
}
.query input:focus, .form input:focus { border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
.query button, .go {
    height: 44px; border: 0; border-radius: 12px; padding: 0 18px;
    background: #3b82f6; color: #fff; font-weight: 800; cursor: pointer;
}
.go { width: 100%; margin-top: 8px; }

.buy-wrap { padding: 24px 0 48px; }
.back { display: inline-block; margin-bottom: 16px; color: #6b7280; }
.buy-box {
    display: grid; grid-template-columns: 280px 1fr; gap: 28px;
    background: #fff; border-radius: 20px; padding: 22px;
    box-shadow: 0 12px 32px rgba(15,23,42,.06);
}
.buy-box h1 { margin: 8px 0 6px; font-size: 24px; }
.sub { color: var(--muted); margin: 0 0 12px; }
.price { font-size: 32px; color: var(--price); font-weight: 800; margin-bottom: 16px; }
.price small { font-size: 14px; color: var(--muted); }
.form { display: grid; gap: 12px; }
.form label, .label { display: grid; gap: 6px; font-size: 13px; color: #6b7280; font-weight: 700; }
.stepper { display: flex; gap: 8px; align-items: center; }
.stepper input { width: 80px; text-align: center; }
.step { width: 40px; height: 40px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; cursor: pointer; }
.paygrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.paychoice {
    height: 44px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff;
    cursor: pointer; font-weight: 700;
}
.paychoice.on { border-color: #3b82f6; background: #eff6ff; color: #2563eb; }

.flash { width: min(1120px, calc(100% - 32px)); margin: 12px auto; padding: 10px 14px; border-radius: 12px; font-weight: 700; }
.flash.ok { background: #ecfdf5; color: #047857; }
.flash.err { background: #fef2f2; color: #b91c1c; }
.toast {
    position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px);
    opacity: 0; background: #111827; color: #fff; border-radius: 999px;
    padding: 10px 16px; z-index: 40; transition: .2s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.pay-page { width: min(860px, calc(100% - 32px)); margin: 24px auto 48px; background: #fff; border-radius: 20px; box-shadow: 0 12px 32px rgba(15,23,42,.06); overflow: hidden; }
.pay-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.pay-body { display: grid; grid-template-columns: 240px 1fr; gap: 20px; padding: 20px; }
.qr-box { text-align: center; background: #f8fafc; border-radius: 16px; padding: 16px; }
.qr-box img { width: 200px; height: 200px; background: #fff; border-radius: 12px; }
.pay-amount { font-size: 32px; color: #0f766e; font-weight: 800; }
.pay-line { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.copy { border: 0; background: #eff6ff; color: #2563eb; border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.pay-warn { margin-top: 12px; background: #fff7ed; color: #c2410c; padding: 10px 12px; border-radius: 10px; }
.pay-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; }
.order-card { margin: 16px 20px 20px; }
.order-card pre { background: #111827; color: #fff; padding: 12px; border-radius: 10px; white-space: pre-wrap; }
.hidden { display: none !important; }
.hint { color: var(--muted); }

@media (max-width: 900px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .buy-box, .pay-body { grid-template-columns: 1fr; }
    .navlinks, .ghost { display: none; }
    .hero-in { flex-direction: column; align-items: stretch; }
    .hero-search { width: 100%; }
}
@media (max-width: 560px) {
    .grid { grid-template-columns: 1fr; }
}
