:root {
    --bg: #000;
    --surface: #0d1110;
    --surface-2: #141a18;
    --border: rgba(255, 255, 255, 0.1);
    --text: #fff;
    --muted: #9aa3a0;
    --green: #02d28f;
    --blue: #01a6fc;
    --red: #ea4888;
    --warn: #ffca28;
    --radius: 12px;
    --font: 'Jost*', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    color: var(--text);
    background-color: var(--bg);
    font-family: var(--font);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
a.red { color: var(--red); }
a.blue { color: var(--blue); }
a.green { color: var(--green); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

/* ---------- 顶部公告条 ---------- */
.notice {
    position: relative;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    padding: 8px 44px 8px 16px;
    background: linear-gradient(90deg, #d32f2f 0%, #b71c1c 100%);
    border-bottom: 2px solid var(--warn);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
}
.notice .tag {
    padding: 2px 10px;
    border: 1px dashed var(--warn);
    border-radius: 4px;
    background: rgba(255, 255, 255, .15);
    font-weight: 400;
}
.notice .notice-btn {
    padding: 4px 14px;
    border: 0;
    border-radius: 20px;
    background: var(--warn);
    color: #b71c1c;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: transform .2s;
}
.notice .notice-btn:hover { transform: scale(1.05); }
.notice .notice-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    background: none;
    color: #fff;
    opacity: .7;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.notice .notice-close:hover { opacity: 1; }
.notice[hidden] { display: none; }
.notice-short { display: none; }
@media (max-width: 600px) { .notice-short { display: inline; } }

/* ---------- 导航 ---------- */
.nav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 15px;
}
.nav-links a { color: var(--muted); white-space: nowrap; }
.nav-links a.btn { color: var(--green); }
.nav-links a.btn:hover { color: #000; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 28px;
    border: 2px solid var(--green);
    border-radius: 6px;
    background: transparent;
    color: var(--green);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--green); color: #000; text-decoration: none; }
.btn-solid { background: var(--green); color: #000; }
.btn-solid:hover { background: #3fe6ad; border-color: #3fe6ad; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); color: var(--text); border-color: rgba(255,255,255,.3); }
.btn-warn { border-color: var(--warn); background: var(--warn); color: #111; }
.btn-warn:hover { background: #ffe082; border-color: #ffe082; color: #111; }
.btn-sm { padding: 6px 16px; font-size: 14px; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }

/* ---------- 弹窗 ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: fade .25s ease;
}
.modal-backdrop.closing { opacity: 0; transition: opacity .25s ease; }
.modal-card {
    width: 100%;
    max-width: 440px;
    padding: 30px;
    border: 1px solid var(--warn);
    border-radius: var(--radius);
    background: #111;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 15px rgba(255, 202, 40, .1);
}
.modal-icon { font-size: 44px; margin-bottom: 8px; }
.modal-card h3 { margin: 0 0 12px; font-size: 22px; font-weight: 600; color: var(--warn); }
.modal-card p { margin: 0 0 24px; color: #ddd; font-size: 16px; }
.modal-card strong { display: block; margin-top: 10px; color: var(--green); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; word-break: break-all; }
.modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 页脚 ---------- */
.footer {
    position: relative;
    z-index: 5;
    padding: 24px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}
.footer a { color: var(--muted); }

@media (max-width: 600px) {
    .nav { padding: 14px 16px; }
    .nav-links { gap: 14px; font-size: 14px; }
    .nav-links .hide-sm, .nav-links .btn { display: none; }
    .notice { font-size: 12px; padding: 6px 40px 6px 12px; }
    .notice .tag, .notice .notice-long { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
