:root {
    --bg: #0f1120;
    --bg-soft: #171a2e;
    --card: #1c2038;
    --card-hover: #232848;
    --border: #2c3050;
    --text: #e8eaf6;
    --text-dim: #9aa0c0;
    --accent: #7c5cff;
    --accent-2: #ff9a3c;
    --green: #3ddc97;
    --red: #ff5d6c;
    --radius: 14px;
}

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

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    background: radial-gradient(1200px 600px at 20% -10%, #232a4d 0%, transparent 60%),
                radial-gradient(900px 500px at 90% 10%, #3a2550 0%, transparent 55%),
                var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.site-header {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 17, 32, .75);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.logo b { color: var(--accent-2); }
.site-header nav a { color: var(--text-dim); margin-left: 18px; font-size: 14px; }

/* ---------- 首页 ---------- */
.hero { padding: 70px 0 40px; text-align: center; }
.hero h1 { font-size: 42px; font-weight: 800; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-dim); margin-top: 12px; font-size: 16px; }

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 30px 0 70px;
}
.game-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: block;
    color: var(--text);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
    position: relative;
    overflow: hidden;
}
.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(124, 92, 255, .18);
    text-decoration: none;
}
.game-card .icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #9a6bff);
    margin-bottom: 14px;
}
.game-card .icon.orange { background: linear-gradient(135deg, #ff9a3c, #ff6b6b); }
.game-card .icon.green { background: linear-gradient(135deg, #3ddc97, #2bb3ff); }
.game-card h3 { font-size: 18px; margin-bottom: 6px; }
.game-card p { color: var(--text-dim); font-size: 13px; min-height: 40px; }
.game-card .tag {
    display: inline-block; margin-top: 12px;
    font-size: 12px; padding: 3px 10px;
    border-radius: 20px; color: var(--text-dim);
    border: 1px solid var(--border);
}
.game-card .tag.hot { color: var(--accent-2); border-color: var(--accent-2); }
.game-card .tag.new { color: var(--green); border-color: var(--green); }
.game-card .soon-flag {
    position: absolute; top: 14px; right: 14px;
    font-size: 12px; color: var(--text-dim);
    border: 1px dashed var(--border); padding: 2px 8px; border-radius: 10px;
}
.card-soon { opacity: .55; cursor: not-allowed; }
.card-soon:hover { transform: none; box-shadow: none; border-color: var(--border); }

.site-footer {
    text-align: center; color: var(--text-dim);
    font-size: 13px; padding: 26px 0 34px;
    border-top: 1px solid var(--border);
}

/* ---------- 移动端 ---------- */
@media (max-width: 760px) {
    .container { padding: 0 14px; }
    .site-header { padding: 12px 0; }
    .logo { font-size: 17px; }
    .site-header nav a { margin-left: 12px; font-size: 13px; }
    .hero { padding: 40px 0 26px; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 14px; }
    .games-grid { grid-template-columns: 1fr; gap: 14px; padding: 18px 0 46px; }
    .game-card { padding: 20px; }
    .game-card .icon { width: 46px; height: 46px; font-size: 22px; }
    .game-card p { min-height: 0; }
}

@media (max-width: 380px) {
    .site-header nav a { margin-left: 8px; }
    .game-card h3 { font-size: 16px; }
}

/* ---------- 通用按钮 ---------- */
.btn {
    display: inline-block;
    border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--accent), #9a6bff);
    color: #fff; font-size: 15px; font-weight: 600;
    padding: 11px 26px; border-radius: 10px;
    transition: filter .15s ease, transform .15s ease;
    font-family: inherit;
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost {
    background: transparent;
    border: 1px solid var(--border); color: var(--text-dim);
}
.btn.ghost:hover { color: var(--text); border-color: var(--text-dim); filter: none; }
.btn.orange { background: linear-gradient(135deg, #ff9a3c, #ff6b6b); }
.btn.small { padding: 7px 16px; font-size: 13px; border-radius: 8px; }

/* ---------- 游戏页面通用 ---------- */
.game-page { min-height: 100vh; display: flex; flex-direction: column; }
.game-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; background: rgba(15,17,32,.85);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 40;
    backdrop-filter: blur(8px);
}
.game-top .left { display: flex; align-items: center; gap: 14px; }
.game-top h1 { font-size: 17px; }
.speed-dots { display: flex; gap: 4px; }
.speed-dots i {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--border); display: block;
}
.speed-dots i.on { background: var(--accent-2); }