/**
 * PC 端公共样式：基础重置 / 容器 / 顶部导航 / 按钮 / 表单 / 提示条 / 页脚
 *
 * 风格基线见同目录 token.css。这里只放两端、多页面共用的东西，
 * 页面专属样式分别在 index.css、game.css、auth.css。
 */

/* ===== 基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--t1);
    background: var(--bg-2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font-family: inherit; }

.site-main { flex: 1; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 字阶（收紧字距是苹果标题的辨识度来源） ===== */
.h-display { font-size: 48px; line-height: 1.08; font-weight: 600; letter-spacing: -.022em; }
.h1 { font-size: 32px; line-height: 1.12; font-weight: 600; letter-spacing: -.015em; }
.h2 { font-size: 24px; line-height: 1.17; font-weight: 600; letter-spacing: -.01em; }
.h3 { font-size: 19px; line-height: 1.21; font-weight: 600; letter-spacing: -.01em; }
.lead { font-size: 19px; line-height: 1.5; color: var(--t2); }
.small { font-size: 13px; color: var(--t2); }
.cap { font-size: 12px; color: var(--t3); }
.eyebrow { font-size: 13px; font-weight: 500; color: var(--accent); letter-spacing: .2px; }

/* ===== 顶部导航（毛玻璃常驻） ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(255, 255, 255, .72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line-soft);
}
/* 滚动后加深底部投影，让导航从内容里"浮"出来（is-scrolled 由 header.js 添加） */
.site-header.is-scrolled {
    border-bottom-color: transparent;
    box-shadow: 0 1px 0 var(--line-soft), 0 6px 24px rgba(0, 0, 0, .06);
}
.header-inner { display: flex; align-items: center; height: 100%; gap: 28px; }

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--t1);
    flex: none;
    transition: opacity .2s;
}
.brand:hover { opacity: .82; }

/* 平台 Logo：老站素材 161x59 / 200x60 不等，统一按高度收敛、宽度自适应 */
.brand-logo {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    flex: none;
}
/* 缺 Logo 的渠道：用站名首字做品牌块兜底 */
.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    font-size: 19px;
    font-weight: 600;
    flex: none;
}
.brand-name { white-space: nowrap; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-link {
    position: relative;
    padding: 10px 16px;
    border-radius: var(--r-p);
    font-size: 14px;
    color: var(--t2);
    transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--t1); background: var(--bg-2); }
.nav-link.is-active { color: var(--accent); font-weight: 500; }
.nav-link.is-active::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.header-user { margin-left: auto; display: flex; align-items: center; gap: 12px; }
/* 顶栏加厚后按钮同步放大一点，免得夹在 72px 里显得小气 */
.header-user .btn-sm { height: 34px; padding: 0 18px; font-size: 14px; }
/* 已登录：头像 + 昵称 */
.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 14px 4px 4px;
    border-radius: var(--r-p);
    background: var(--bg-2);
    max-width: 190px;
}
.user-chip .avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    flex: none;
}
.user-chip em {
    font-style: normal;
    font-size: 14px;
    font-weight: 500;
    color: var(--t1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 按钮（统一胶囊） ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--r-p);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn-sm { height: 30px; padding: 0 15px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 30px; font-size: 17px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); }
.btn-line { background: #fff; border-color: var(--line); color: var(--t1); }
.btn-line:hover { border-color: var(--t3); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-glass {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(255, 255, 255, .26); }
.btn:disabled, .btn.is-disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover, .btn.is-disabled:hover { background: var(--accent); }

/* ===== 表单 ===== */
.form-item { margin-bottom: 14px; }
.form-item label {
    display: block;
    font-size: 13px;
    color: var(--t2);
    margin-bottom: 6px;
}
.input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 16px;
    font-family: inherit;
    color: var(--t1);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--t3); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.captcha-row { display: flex; gap: 10px; }
.captcha-row .input { flex: 1; }
.captcha-img {
    width: 120px;
    height: 46px;
    flex: none;
    border: 1px solid var(--line-soft);
    border-radius: var(--r);
    background: var(--bg-2);
    cursor: pointer;
    object-fit: cover;
}
.form-tip { font-size: 13px; color: var(--t2); text-align: center; margin-top: 18px; }
.form-tip a { color: var(--accent); }

/* ===== 提示条 ===== */
.alert {
    display: none;
    border-radius: var(--r);
    font-size: 13px;
    padding: 10px 14px;
    margin-bottom: 16px;
}
.alert-error { background: #fdeceb; color: #a32d2d; }
.alert-success { background: #e8f7ee; color: #1d7a3d; }

/* ===== 区块头（首页 / 选服页共用） ===== */
.blk { padding: 56px 0; }
.blk-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}
.blk-head .h2 { margin-top: 4px; }

/* ===== 页脚 ===== */
.site-footer {
    background: var(--bg-2);
    border-top: 1px solid var(--line-soft);
    padding: 36px 0;
    margin-top: 40px;
}
.foot-in {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--t2);
    line-height: 1.9;
}
.foot-col { min-width: 200px; }
.foot-col h4 { font-size: 13px; font-weight: 600; color: var(--t1); margin-bottom: 8px; }
.foot-col a:hover { color: var(--accent); }
.health-tip { font-size: 12px; color: var(--t3); }

/* ===== 空态 ===== */
.empty {
    padding: 26px 0;
    text-align: center;
    font-size: 13px;
    color: var(--t3);
}

/* ===== 窄屏 ===== */
@media (max-width: 900px) {
    .h-display { font-size: 34px; }
    .lead { font-size: 16px; }
    .main-nav { display: none; }
}
