/* ============================================================
   校园物语官网主题 —— 冒险岛风格（黄橙 × 深蓝星空）
   设计语言：粗描边、大圆角、糖果按钮、白卡片、夜空背景
   ============================================================ */

:root {
    /* 主色：黄橙 */
    --gold: #FFB400;
    --gold-light: #FFD24D;
    --gold-dark: #F59B00;
    --gold-ink: #5B3D00;          /* 黄底上的深色文字/描边 */

    /* 辅色：深蓝夜空 */
    --navy-0: #0D1333;            /* 导航条/页脚 */
    --navy-1: #16214D;            /* 夜空顶部 */
    --navy-2: #24418C;            /* 夜空中部 */
    --navy-3: #5B8AC9;            /* 地平线 */
    --navy-ink: #1E2A78;          /* 深蓝文字 */

    /* 中性色 */
    --card: #FFFFFF;
    --ink: #333333;
    --ink-2: #777777;
    --line: #E8E3D5;
    --danger: #E5484D;
    --ok: #30A46C;

    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-pill: 999px;

    --shadow-card: 0 10px 30px rgba(13, 19, 51, .35);
    --shadow-btn: 0 4px 0 rgba(91, 61, 0, .55);

    --container: 1180px;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, var(--navy-1) 0%, var(--navy-2) 46%, var(--navy-3) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}
/* 星空点缀 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(1.6px 1.6px at 8% 12%, #fff 60%, transparent),
        radial-gradient(1.2px 1.2px at 21% 7%, #cfe3ff 60%, transparent),
        radial-gradient(1.8px 1.8px at 33% 18%, #fff 60%, transparent),
        radial-gradient(1.2px 1.2px at 47% 9%, #ffe9a8 60%, transparent),
        radial-gradient(1.6px 1.6px at 58% 21%, #fff 60%, transparent),
        radial-gradient(1.2px 1.2px at 69% 6%, #cfe3ff 60%, transparent),
        radial-gradient(1.8px 1.8px at 81% 15%, #fff 60%, transparent),
        radial-gradient(1.2px 1.2px at 92% 10%, #ffe9a8 60%, transparent),
        radial-gradient(1.4px 1.4px at 14% 30%, #fff 60%, transparent),
        radial-gradient(1.4px 1.4px at 76% 33%, #cfe3ff 60%, transparent),
        radial-gradient(1.4px 1.4px at 40% 36%, #fff 60%, transparent);
    opacity: .8;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }

/* ---------- 顶部导航 ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(13, 19, 51, .96), rgba(13, 19, 51, .82));
    border-bottom: 3px solid var(--gold-dark);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .45);
}
.topbar-inner {
    width: min(var(--container), 100% - 32px);
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo {
    width: 48px; height: 48px;
    object-fit: cover;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--gold-dark);
    box-shadow: 0 2px 6px rgba(0,0,0,.5);
    flex-shrink: 0;
}
.brand-name {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--gold-light);
    text-shadow: 0 0 14px rgba(255, 210, 77, .65), 0 2px 0 rgba(0,0,0,.6);
    white-space: nowrap;
}

.mainnav { display: flex; gap: 6px; margin-left: 8px; flex: 1; }
.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    transition: background .2s;
}
.nav-item::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--gold-light);
    opacity: 0;
    transition: opacity .2s;
}
.nav-item small {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: #9FB4E8;
    margin-top: 2px;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); }
.nav-item.active { background: rgba(255, 180, 0, .18); }
.nav-item.active::before { opacity: 1; }

.userbox { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.user-hello { color: #fff; font-size: 14px; text-shadow: 0 1px 0 rgba(0,0,0,.4); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 汉堡按钮（≤1024 显示） */
.nav-toggle { display: none; }
.nav-toggle-btn {
    display: none;
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    border: 2px solid rgba(255,255,255,.35);
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    flex-shrink: 0;
}
.nav-toggle-btn span { width: 22px; height: 3px; background: #fff; border-radius: 2px; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
    text-align: center;
    transition: transform .12s, box-shadow .12s, filter .12s;
}
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn:focus-visible { outline: 3px solid var(--navy-3); outline-offset: 2px; }

.btn-mini {
    padding: 7px 16px;
    font-size: 14px;
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
    color: var(--gold-ink);
    border: 2px solid var(--gold-ink);
    box-shadow: 0 3px 0 rgba(91, 61, 0, .55);
}
.btn-mini-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .6);
    box-shadow: 0 3px 0 rgba(0, 0, 0, .35);
}
.btn-mini:hover { filter: brightness(1.08); }

/* 大号主按钮（下载 CTA 等） */
.btn-maple {
    padding: 16px 40px;
    font-size: 22px;
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, #FFE38A 0%, var(--gold-light) 18%, var(--gold) 55%, var(--gold-dark) 100%);
    color: var(--gold-ink);
    border: 3px solid var(--gold-ink);
    box-shadow: var(--shadow-btn), inset 0 2px 0 rgba(255,255,255,.55);
    text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
.btn-maple:hover { filter: brightness(1.06); transform: translateY(-2px); }

.btn-lg {
    padding: 12px 30px;
    font-size: 18px;
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
    color: var(--gold-ink);
    border: 3px solid var(--gold-ink);
    box-shadow: 0 4px 0 rgba(91, 61, 0, .55), inset 0 2px 0 rgba(255,255,255,.55);
}
.btn-ghost {
    padding: 12px 30px;
    font-size: 18px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,.1);
    color: #fff;
    border: 2px solid rgba(255,255,255,.55);
}
.btn-sm {
    padding: 7px 16px;
    font-size: 14px;
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
    color: var(--gold-ink);
    border: 2px solid var(--gold-ink);
    box-shadow: 0 3px 0 rgba(91, 61, 0, .45);
}
.btn-sm-plain {
    padding: 7px 16px;
    font-size: 14px;
    border-radius: var(--radius-pill);
    background: #fff;
    color: var(--navy-ink);
    border: 2px solid var(--navy-3);
}
.btn-danger {
    padding: 7px 16px;
    font-size: 14px;
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, #FF8A8A, var(--danger) 70%);
    color: #fff;
    border: 2px solid #8F1D21;
    box-shadow: 0 3px 0 rgba(90, 15, 18, .55);
}

/* ---------- 白色内容面板（冒险岛右侧大卡） ---------- */
.panel {
    position: relative;
    z-index: 1;
    background: var(--card);
    border-radius: var(--radius-lg) var(--radius-lg) 14px 14px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 26px;
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(180deg, var(--gold-light), var(--gold) 60%, var(--gold-dark));
    border-bottom: 3px solid rgba(91, 61, 0, .35);
    padding: 12px 18px;
}
.panel-title { font-size: 19px; font-weight: 900; color: var(--gold-ink); letter-spacing: 1px; }
.panel-header-right { font-size: 13px; color: var(--gold-ink); }
.panel-body { padding: 20px; }

/* 面包屑 */
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--navy-ink); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--ink-2); }

/* ---------- 表单 ---------- */
.form-card { max-width: 460px; margin: 40px auto; }
.form-row { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 700; color: var(--navy-ink); margin-bottom: 6px; }
.form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid var(--navy-3);
    border-radius: var(--radius-md);
    background: #FBFCFF;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.form-input:focus { outline: none; border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(255, 180, 0, .25); }
.form-hint { font-size: 12px; color: var(--ink-2); margin-top: 5px; }
.form-error { font-size: 13px; color: var(--danger); margin-top: 10px; font-weight: 700; }
.form-ok { font-size: 13px; color: var(--ok); margin-top: 10px; font-weight: 700; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.captcha-row { display: flex; gap: 10px; align-items: stretch; }
.captcha-row .form-input { flex: 1; min-width: 0; }
.captcha-img {
    height: 50px;
    border-radius: var(--radius-md);
    border: 2px solid var(--navy-3);
    background: #EEF3FF;
    cursor: pointer;
    flex-shrink: 0;
}

/* ---------- 消息提示 ---------- */
.toast {
    position: fixed;
    left: 50%;
    top: 96px;
    transform: translateX(-50%);
    z-index: 300;
    background: rgba(13, 19, 51, .94);
    color: #fff;
    padding: 12px 26px;
    border-radius: var(--radius-pill);
    border: 2px solid var(--gold-light);
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.toast-err { border-color: #FF8A8A; }

/* ---------- Hero 区 ---------- */
.hero {
    position: relative;
    z-index: 1;
    margin-top: 22px;
    margin-bottom: 30px;
}
.hero-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 3px solid rgba(255, 255, 255, .18);
    aspect-ratio: 16 / 7;
    background: linear-gradient(180deg, var(--navy-1), var(--navy-3));
}
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.hero-slide.showing { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption {
    position: absolute;
    top: 8%;
    left: 0;
    right: 0;
    text-align: center;
    pointer-events: none;
}
.hero-caption h2 {
    margin: 0;
    font-size: clamp(26px, 4.5vw, 52px);
    font-weight: 900;
    letter-spacing: 6px;
    color: #fff;
    text-shadow: 0 0 18px rgba(127, 212, 255, .9), 0 3px 0 rgba(0, 0, 0, .55);
}
.hero-caption p {
    margin: 8px 0 0;
    font-size: clamp(14px, 1.8vw, 20px);
    letter-spacing: 10px;
    color: #CFE3FF;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .5);
}
.hero-dots {
    position: absolute;
    bottom: 14px; left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.hero-dots button {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: rgba(255,255,255,.25);
    cursor: pointer;
    padding: 0;
}
.hero-dots button.on { background: var(--gold-light); border-color: var(--gold-dark); }

/* ---------- 首页新闻 Tab ---------- */
.news-tabs { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.news-tab {
    padding: 9px 22px;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 800;
    color: var(--navy-ink);
    background: #fff;
    border: 2px solid var(--gold);
    cursor: pointer;
}
.news-tab.on {
    background: linear-gradient(180deg, var(--gold-light), var(--gold) 60%);
    color: var(--gold-ink);
    border-color: var(--gold-ink);
    box-shadow: 0 3px 0 rgba(91, 61, 0, .4);
}

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 6px;
    border-bottom: 1px dashed var(--line);
}
.news-list li:last-child { border-bottom: none; }
.news-date {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy-3);
    background: #EEF3FF;
    border-radius: 8px;
    padding: 4px 8px;
}
.news-badge {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    border-radius: 6px;
    padding: 3px 8px;
}
.badge-notice { background: #E5484D; }
.badge-event  { background: #30A46C; }
.badge-version{ background: var(--navy-2); }
.news-title {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.news-list a:hover .news-title { color: var(--gold-dark); }
.news-more { font-size: 13px; color: var(--navy-3); font-weight: 700; }

/* 新闻卡片（列表页） */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.news-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(13, 19, 51, .25);
    transition: transform .15s, box-shadow .15s;
    display: flex;
    flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(13, 19, 51, .35); }
.news-card .cover { aspect-ratio: 16 / 9; overflow: hidden; background: #EEF3FF; }
.news-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.news-card .meta { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.news-card h3 { margin: 0; font-size: 16px; line-height: 1.45; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .sub { font-size: 12px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; margin-top: auto; }

/* 文章详情 */
.article-title { font-size: 26px; font-weight: 900; color: var(--ink); margin: 0 0 10px; }
.article-meta { font-size: 13px; color: var(--ink-2); margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.article-content { font-size: 16px; line-height: 1.9; color: var(--ink); word-break: break-word; }
.article-content img { border-radius: 10px; margin: 10px auto; }
.article-content h1, .article-content h2, .article-content h3 { color: var(--navy-ink); margin: 1.2em 0 .5em; }
.article-content blockquote { margin: 12px 0; padding: 10px 16px; background: #FFF7E3; border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; color: #6B5B2A; }
.article-content pre { background: #16214D; color: #E8F0FF; padding: 14px; border-radius: 10px; overflow-x: auto; }

/* ---------- 下载中心 ---------- */
.dl-hero { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 34px 20px 30px; text-align: center; }
.dl-hero h1 { color: #fff; font-size: 30px; margin: 0; text-shadow: 0 2px 0 rgba(0,0,0,.5), 0 0 18px rgba(255,210,77,.4); }
.dl-hero p { color: #CFE0FF; margin: 0; }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dl-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 26px 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.dl-card .dl-icon { width: 84px; height: 84px; object-fit: contain; }
.dl-card h3 { margin: 0; font-size: 20px; color: var(--navy-ink); }
.dl-card .dl-ver { font-size: 13px; color: var(--ink-2); }
.dl-note {
    background: rgba(255, 255, 255, .92);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 13px;
    color: var(--ink-2);
    margin-top: 20px;
}

/* ---------- 论坛 ---------- */
.board-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.board-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 6px 18px rgba(13, 19, 51, .22);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    transition: transform .15s;
}
.board-card:hover { transform: translateY(-3px); }
.board-icon {
    width: 56px; height: 56px;
    flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--navy-2), var(--navy-1));
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    border: 2px solid var(--gold-dark);
}
.board-card h3 { margin: 0 0 4px; font-size: 18px; color: var(--navy-ink); }
.board-card p { margin: 0; font-size: 13px; color: var(--ink-2); }

.thread-list { list-style: none; margin: 0; padding: 0; }
.thread-list li { border-bottom: 1px solid var(--line); }
.thread-list li:last-child { border-bottom: none; }
.thread-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 8px;
    transition: background .15s;
}
.thread-row:hover { background: #FFF9EC; }
.thread-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-flag {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
    border: 1.5px solid var(--gold-ink);
    border-radius: 6px;
    padding: 2px 7px;
}
.lock-flag { flex-shrink: 0; font-size: 12px; font-weight: 900; color: #fff; background: var(--ink-2); border-radius: 6px; padding: 2px 7px; }
.thread-meta { flex-shrink: 0; font-size: 12px; color: var(--ink-2); text-align: right; }
.thread-meta .author { color: var(--navy-2); font-weight: 700; }

.post-floor {
    display: flex;
    gap: 14px;
    padding: 18px 6px;
    border-bottom: 1px dashed var(--line);
}
.post-avatar {
    width: 52px; height: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--navy-3), var(--navy-2));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 900;
    border: 2.5px solid var(--gold-light);
}
.post-main { flex: 1; min-width: 0; }
.post-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; flex-wrap: wrap; }
.post-author { font-size: 15px; font-weight: 800; color: var(--navy-ink); }
.post-time { font-size: 12px; color: var(--ink-2); }
.post-floor .content { font-size: 15px; line-height: 1.8; color: var(--ink); word-break: break-word; }
.post-op .post-avatar { border-color: var(--gold-dark); background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); color: var(--gold-ink); }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin: 26px 0 8px; flex-wrap: wrap; }
.pager a, .pager span.cur {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    background: #fff;
    color: var(--navy-ink);
    border: 2px solid var(--navy-3);
}
.pager span.cur {
    background: linear-gradient(180deg, var(--gold-light), var(--gold) 60%);
    color: var(--gold-ink);
    border-color: var(--gold-ink);
}
.pager a:hover { border-color: var(--gold-dark); }

/* ---------- 表格（后台） ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { color: var(--navy-ink); background: #F4F7FF; font-size: 13px; }
.data-table tr:hover td { background: #FFFaf0; }

/* ---------- 后台 ---------- */
.admin-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; padding-top: 26px; }
.admin-side { background: #fff; border-radius: var(--radius-md);; box-shadow: 0 6px 18px rgba(13,19,51,.2); overflow: hidden; }
.admin-side .admin-side-title { background: linear-gradient(180deg, var(--navy-2), var(--navy-1)); color: #fff; font-weight: 900; padding: 14px 16px; font-size: 15px; letter-spacing: 2px; }
.admin-side nav { display: flex; flex-direction: column; padding: 8px; gap: 2px; }
.admin-side nav a { padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.admin-side nav a:hover { background: #FFF3D6; }
.admin-side nav a.active { background: linear-gradient(180deg, var(--gold-light), var(--gold) 60%); color: var(--gold-ink); }
.admin-main { min-width: 0; }
.admin-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }

/* 轻量富文本编辑器 */
.rte-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px;
    border: 2px solid var(--navy-3);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: #F4F7FF;
}
.rte-toolbar button {
    border: 1.5px solid var(--navy-3);
    background: #fff;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    color: var(--navy-ink);
    font-family: inherit;
}
.rte-toolbar button:hover { background: #FFF3D6; }
.rte-area {
    min-height: 320px;
    border: 2px solid var(--navy-3);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 14px;
    background: #fff;
    font-size: 15px;
    line-height: 1.8;
    outline: none;
    overflow: auto;
}

/* ---------- 首页双栏 ---------- */
.home-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
}
.home-side .panel { margin-bottom: 22px; }
.dl-icon-big {
    font-size: 60px;
    line-height: 1;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.3));
    margin-bottom: 4px;
}
.dl-ver-line { font-size: 13px; color: #CFE0FF; margin: 10px 0 0; }
.home-side .dl-hero { background: linear-gradient(180deg, var(--navy-2), var(--navy-1)); border-radius: var(--radius-lg); }

.quick-links { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
.quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
    border: 2px solid var(--gold-ink);
    color: var(--gold-ink);
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 3px 0 rgba(91, 61, 0, .5);
    transition: transform .12s, filter .12s;
}
.quick-link:hover { transform: translateY(-2px); filter: brightness(1.06); }
.quick-link span { font-size: 20px; }
.quick-link small { margin-left: auto; font-size: 11px; letter-spacing: 1.5px; opacity: .65; font-weight: 700; }

/* ---------- 页脚 ---------- */
.page-body { position: relative; z-index: 1; min-height: calc(100vh - 300px); padding-bottom: 40px; }
.site-footer {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, rgba(13, 19, 51, .88), var(--navy-0));
    border-top: 3px solid var(--gold-dark);
    color: #B9C6EE;
    padding: 30px 0 26px;
}
.footer-inner { width: min(var(--container), 100% - 32px); margin-inline: auto; text-align: center; }
.footer-links { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a { font-size: 14px; font-weight: 700; color: #fff; }
.footer-links a:hover { color: var(--gold-light); text-decoration: underline; }
.footer-copy { font-size: 13px; margin: 8px 0; }
.footer-disclaimer { font-size: 12px; color: #7E8FC7; margin: 6px 0 0; }

/* 适龄提示悬浮徽标 */
.age-badge {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 90;
    width: 74px;
    background: #fff;
    border: 2.5px solid var(--navy-2);
    border-radius: 12px;
    padding: 8px 0 6px;
    text-align: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
    user-select: none;
}
.age-badge-num { display: block; font-size: 26px; font-weight: 900; color: var(--navy-ink); line-height: 1.1; }
.age-badge-label { display: block; font-size: 11px; color: var(--ink-2); margin-top: 2px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .home-grid { grid-template-columns: 1fr; }
    .nav-toggle-btn { display: flex; }
    .mainnav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(13, 19, 51, .97);
        padding: 10px 16px 16px;
        gap: 4px;
        border-bottom: 3px solid var(--gold-dark);
        box-shadow: 0 16px 30px rgba(0, 0, 0, .5);
    }
    .nav-toggle:checked ~ .mainnav { display: flex; }
    .nav-item { flex-direction: row; align-items: center; gap: 8px; padding: 12px 16px; }
    .nav-item small { margin: 0 0 0 4px; }
    .userbox { margin-left: 0; }
    .topbar-inner { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; min-height: 0; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .board-grid { grid-template-columns: 1fr; }
    .admin-wrap { grid-template-columns: 1fr; }
    .admin-side nav { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 768px) {
    .brand-name { font-size: 20px; }
    .brand-logo { width: 38px; height: 38px; }
    .userbox .user-hello { display: none; }
    .hero-slider { aspect-ratio: 16 / 9; }
    .dl-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .btn-maple { font-size: 19px; padding: 14px 30px; }
    .article-title { font-size: 21px; }
    .age-badge { right: 10px; bottom: 10px; width: 64px; }
    .age-badge-num { font-size: 22px; }
    .thread-meta .author-name { display: none; }
    .form-card { margin: 20px auto; }
}

@media (max-width: 480px) {
    .thread-row { flex-wrap: wrap; }
    .thread-meta { width: 100%; display: flex; justify-content: space-between; }
    .post-avatar { width: 42px; height: 42px; font-size: 18px; }
    .nav-item { font-size: 16px; }
    .panel-body { padding: 14px; }
}

/* 管理后台登录页（淡雅风，避免抢戏） */
.admin-login-tip { font-size: 12px; color: var(--ink-2); margin-top: 14px; text-align: center; }

/* ---------- 后台专属（素净风，不走星空） ---------- */
.admin-body {
    background: #F2F4FA;
    background-attachment: fixed;
    color: var(--ink);
}
.admin-body::before { display: none; }
.admin-body .age-badge { display: none; }

.admin-topbar {
    background: linear-gradient(180deg, var(--navy-1), var(--navy-0));
    color: #fff;
    border-bottom: 3px solid var(--gold-dark);
}
.admin-topbar-inner {
    width: min(var(--container), 100% - 32px);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    gap: 12px;
}
.admin-brand { font-weight: 900; font-size: 17px; letter-spacing: 1px; color: var(--gold-light); }
.admin-topbar-right { display: flex; align-items: center; gap: 10px; font-size: 14px; flex-wrap: wrap; }
.admin-topbar-right a { color: #fff; }
.admin-topbar-right a:hover { color: var(--gold-light); }
.admin-sep { opacity: .4; }

.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
.stat-card {
    background: linear-gradient(180deg, #FFF, #F6F9FF);
    border: 1.5px solid var(--navy-3);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-num { font-size: 30px; font-weight: 900; color: var(--navy-ink); }
.stat-label { font-size: 13px; color: var(--ink-2); }
.stat-link { font-size: 13px; color: var(--gold-dark); font-weight: 700; margin-top: 6px; }
.admin-sec-title { color: var(--navy-ink); font-size: 16px; margin: 22px 0 10px; border-left: 4px solid var(--gold); padding-left: 10px; }

@media (max-width: 768px) {
    .admin-stats { grid-template-columns: 1fr; }
}
