/* ===== 基础 ===== */
:root {
    --bg: #14100c;
    --bg-2: #1f1811;
    --panel: #2a2016;
    --panel-2: #352819;
    --line: #4a3823;
    --text: #ece2cf;
    --muted: #a9967a;
    --gold: #e8b34b;
    --gold-2: #f6d27a;
    --red: #b33a2e;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    background:
        radial-gradient(1200px 600px at 80% -10%, #3a2a16 0%, transparent 60%),
        radial-gradient(900px 500px at -10% 20%, #2a1d10 0%, transparent 55%),
        var(--bg);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff; }

/* ===== 顶部导航 ===== */
.topbar {
    background: linear-gradient(180deg, #241a10, #17100a);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--gold), #9c6b1f);
    color: #1a1206; font-weight: 900; border-radius: 8px;
}
.brand-text { font-size: 18px; font-weight: 700; letter-spacing: 1px; }

/* 在线人数，顶部居中 */
.online-box {
    flex: 1 1 auto;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 15px; color: var(--gold-2); white-space: nowrap;
}
.online-box strong { font-size: 17px; color: #fff; }
.online-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: #46d369; box-shadow: 0 0 8px #46d369;
    animation: onlinePulse 1.6s ease-in-out infinite;
}
@keyframes onlinePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* 后台背景预览框 */
.bg-preview {
    width: 280px; aspect-ratio: 16 / 9;
    border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
    display: grid; place-items: center; background: var(--panel-2);
}
.bg-preview img { width: 100%; height: 100%; object-fit: cover; }

/* 全屏背景：始终铺满 */
.bg-layer {
    position: fixed; inset: 0; z-index: -2;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}
.bg-shade {
    position: fixed; inset: 0; z-index: -1;
    background: rgba(10, 7, 4, .55);
}

.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: 15px; }
.nav a.active, .nav a:hover { color: var(--gold-2); }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid transparent; border-radius: 8px;
    padding: 9px 18px; font-size: 15px; cursor: pointer;
    color: var(--text); background: var(--panel-2);
    transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn-gold {
    background: linear-gradient(180deg, var(--gold-2), var(--gold));
    color: #241703; font-weight: 700;
}
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-block { width: 100%; }
.btn-danger { background: var(--red); }
.btn-sm { padding: 5px 12px; font-size: 13px; }

/* ===== Hero ===== */
.hero {
    padding: 46px 0 30px;
    text-align: center;
}
.hero h1 {
    font-size: 34px; margin: 0 0 12px;
    color: var(--gold-2); letter-spacing: 2px;
    text-shadow: 0 2px 12px rgba(0,0,0,.6);
}
.hero p { color: var(--muted); max-width: 720px; margin: 0 auto; }
.hero-actions { margin-top: 22px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== 布局卡片 ===== */
.section { padding: 26px 0; }
.section-title {
    font-size: 20px; margin: 0 0 18px;
    padding-left: 12px; border-left: 4px solid var(--gold);
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}
.card h3 { margin: 0 0 8px; color: var(--gold-2); }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

.notice-list, .rank-list { list-style: none; margin: 0; padding: 0; }
.notice-list li, .rank-list li {
    padding: 10px 4px; border-bottom: 1px dashed var(--line);
    display: flex; justify-content: space-between; gap: 12px;
}
.notice-list li:last-child, .rank-list li:last-child { border-bottom: 0; }
.rank-list .rank-no { color: var(--gold); width: 28px; }
.rank-list .rank-power { color: var(--muted); }

/* 截图占位 */
.shot {
    aspect-ratio: 16 / 9;
    background:
        linear-gradient(135deg, rgba(232,179,75,.12), rgba(179,58,46,.12)),
        var(--panel-2);
    border: 1px solid var(--line); border-radius: var(--radius);
    display: grid; place-items: center; color: var(--muted);
    overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }

/* ===== 表单 ===== */
.admin-form { display: grid; gap: 14px; }
.admin-form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.admin-form input, .admin-form textarea, .admin-form select {
    background: #17110a; border: 1px solid var(--line); border-radius: 8px;
    padding: 10px 12px; color: var(--text); font-size: 15px; width: 100%;
}
.admin-form input:focus, .admin-form textarea:focus {
    outline: none; border-color: var(--gold);
}
.form-note { font-size: 12px; color: var(--muted); }
.auth-alert {
    background: rgba(179,58,46,.15); border: 1px solid var(--red);
    color: #ffb4ac; border-radius: 8px; padding: 10px 12px; font-size: 14px;
}

/* ===== 页脚 ===== */
/* ===== 经典副本详解 ===== */
.dun-head { text-align: center; margin-bottom: 30px; }
.dun-eyebrow {
    margin: 0 0 10px; font-size: 13px; letter-spacing: 4px;
    color: var(--gold); font-weight: 700;
}
.dun-title { margin: 0 0 10px; font-size: 34px; color: #fff; letter-spacing: 2px; }
.dun-title::first-letter, .dun-title { color: var(--gold-2); }
.dun-sub { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.dun-line { display: inline-block; width: 64px; height: 3px; border-radius: 2px; background: var(--gold); }

.dun-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.dun-card {
    position: relative; padding: 22px 22px 24px;
    background: linear-gradient(180deg, rgba(53,40,25,.9), rgba(35,26,16,.92));
    border: 1px solid var(--line); border-radius: var(--radius);
}
.dun-level {
    display: inline-block; padding: 3px 12px; margin-bottom: 12px;
    font-size: 12px; font-weight: 700; border-radius: 999px;
}
.lv-red { color: #ff8a8a; background: rgba(224,90,90,.16); }
.lv-orange { color: #ffc07a; background: rgba(232,161,58,.16); }
.lv-purple { color: #c9a5f5; background: rgba(155,107,214,.18); }
.lv-green { color: #7fe0ad; background: rgba(63,191,127,.16); }
.lv-cyan { color: #83d8e6; background: rgba(63,182,201,.16); }
.dun-name { margin: 0 0 6px; font-size: 20px; color: #fff; }
.dun-loc { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.dun-intro { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.dun-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.bar-cell { width: 26px; height: 8px; border-radius: 3px; }
.b-y { background: var(--gold); }
.b-r { background: #e05555; }
.b-x { background: #3a2c1c; }
.dun-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.dun-tag {
    padding: 3px 11px; font-size: 12px; border-radius: 999px;
    color: var(--gold-2); background: rgba(232,179,75,.08);
    border: 1px solid rgba(232,179,75,.35);
}
@media (max-width: 900px) { .dun-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .dun-grid { grid-template-columns: 1fr; } }

/* ===== 怀旧的六大核心 ===== */
.core-title { color: #46cfe0; }
.core-line { background: linear-gradient(90deg, var(--gold), #46cfe0); }
.core-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.core-card {
    padding: 26px 26px 28px;
    background: linear-gradient(180deg, rgba(53,40,25,.9), rgba(35,26,16,.92));
    border: 1px solid var(--line); border-radius: var(--radius);
}
.core-icon {
    width: 54px; height: 54px; margin-bottom: 18px;
    display: grid; place-items: center; border-radius: 14px;
}
.ic-yellow { background: rgba(232,179,75,.18); color: #f2c14e; }
.ic-cyan { background: rgba(63,182,201,.18); color: #46cfe0; }
.ic-red { background: rgba(224,90,90,.18); color: #ff7a7a; }
.ic-purple { background: rgba(155,107,214,.2); color: #b98cf0; }
.ic-green { background: rgba(63,191,127,.18); color: #5fd99a; }
.ic-gold { background: rgba(232,179,75,.18); color: #f6d27a; }
.core-name { margin: 0 0 10px; font-size: 19px; color: #fff; }
.core-desc { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .core-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .core-grid { grid-template-columns: 1fr; } }

/* ===== 职业卡片 ===== */
.page-lead { color: var(--muted); margin: 0 0 26px; }
.class-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.class-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.class-thumb {
    aspect-ratio: 16 / 10; display: grid; place-items: center;
    overflow: hidden; background: var(--panel-2);
}
.class-thumb img { width: 100%; height: 100%; object-fit: cover; }
.class-thumb-ph { font-size: 42px; font-weight: 900; color: var(--gold); }
.class-body { padding: 16px 18px 20px; }
.class-body h3 { margin: 0 0 8px; color: var(--gold-2); }
.class-body p { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .class-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .class-grid { grid-template-columns: 1fr; } }

/* ===== 光盘音乐播放器 ===== */
.music-widget { position: fixed; z-index: 60; cursor: pointer; user-select: none; }
.music-disc {
    width: 100%; height: auto; border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .55);
    background: radial-gradient(circle at center, #2a2a2a 0 12%, #555 13% 16%, #1b1b1b 17% 100%);
}
.music-disc.spinning { animation: discSpin 6s linear infinite; }
@keyframes discSpin { to { transform: rotate(360deg); } }
.music-notes { position: absolute; inset: 0; pointer-events: none; }
.music-notes span {
    position: absolute; bottom: 8%; opacity: 0; font-size: 18px;
    color: var(--gold-2);
}
.music-widget.playing .music-notes span { animation: noteFloat 2.6s ease-in infinite; }
.music-notes span:nth-child(1) { left: 18%; animation-delay: 0s; }
.music-notes span:nth-child(2) { left: 48%; animation-delay: .8s; }
.music-notes span:nth-child(3) { left: 72%; animation-delay: 1.5s; }
@keyframes noteFloat {
    0%   { opacity: 0; transform: translateY(6px) scale(.6); }
    25%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(-64px) scale(1.15); }
}

.footer { margin-top: auto; padding-top: 40px; border-top: 1px solid var(--line); background: #100b07; }
.footer-inner {
    display: flex; justify-content: space-between; gap: 20px;
    padding: 28px 20px; flex-wrap: wrap;
}
.footer-title { font-size: 16px; color: var(--gold-2); margin-bottom: 6px; }
.footer-meta { display: grid; gap: 6px; color: var(--muted); }
.footer-copy { padding: 14px 20px; color: #6f5f49; font-size: 12px; border-top: 1px solid var(--line); }

/* ===== 后台 ===== */
.admin-wrap { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 64px); }
.admin-side { background: var(--bg-2); border-right: 1px solid var(--line); padding: 20px 0; }
.admin-side a {
    display: block; padding: 11px 22px; color: var(--muted);
}
.admin-side a.active, .admin-side a:hover { color: var(--gold-2); background: var(--panel); }
.admin-main { padding: 26px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.admin-table th { color: var(--gold-2); font-weight: 600; }
.admin-form { display: grid; gap: 14px; max-width: 560px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; background: rgba(232,179,75,.12); color: var(--gold-2); border: 1px solid var(--line); }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .admin-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 26px; }
    .nav { gap: 10px; }
}
