/* 引入本地像素字体 */
@font-face {
    font-family: 'Zpix';
    src: url('./fonts/Zpix.woff2') format('woff2'),
         url('./fonts/Zpix.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   颜色变量：统一亮色主题（复古羊皮纸感）
   ============================================================ */
:root {
    --bg-color: #f6f1e9; /* 稍微加深一点底色 */
    --text-main: #2b2725;
    --text-sub: #6b6159;
    --sakura-pink: #b04e62;
    --sakura-light: #d67a8b;
    --sakura-dark: #853545;
    --border-color: #d3c9bd; /* 实体边框色，比纯透明更真实 */
    --border-dark: #b5a99a;
    
    /* 实体硬阴影：模拟复古像素风 */
    --shadow-hard: 3px 3px 0 rgba(0, 0, 0, 0.08);
    --shadow-hard-sm: 2px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Zpix', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    /* 给背景加一点点极其微弱的复古网格/噪点，增加纸张质感 */
    background-image: 
        linear-gradient(rgba(211, 201, 189, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(211, 201, 189, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center top;
}

/* ============================================================
   一、全局元素
   ============================================================ */

footer {
    text-align: center;
    padding: 30px;
    color: var(--text-sub);
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 1px dashed var(--border-dark);
    background: var(--bg-color);
}

/* 樱花飘落背景 */
.sakura-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.sakura {
    position: absolute;
    background: var(--sakura-pink);
    border-radius: 50% 0 50% 50%;
    opacity: 0.15;
    animation: fall linear infinite;
}

@keyframes fall {
    0%   { transform: translateY(-10vh) rotate(0deg); }
    100% { transform: translateY(110vh) rotate(360deg); }
}

/* 通用内容容器 */
.container {
    max-width: 840px;
    margin: 100px auto 0;
    padding: 0 24px;
    flex: 1;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* 通用页面标题 */
.page-title {
    text-align: center;
    margin-bottom: 56px;
}

.page-title h1 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 16px;
    /* 字体硬阴影，增加立体感 */
    text-shadow: 2px 2px 0px rgba(0,0,0,0.08);
}

.page-title p { 
    color: var(--text-sub); 
    font-size: 0.9rem;
}

/* 标题下方装饰线 */
.page-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    margin: 20px auto 0;
    background: var(--sakura-pink);
    /* 像素风的硬阴影 */
    box-shadow: 2px 2px 0 var(--border-dark);
}

/* 返回主页悬浮按钮 */
.back-home {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: var(--bg-color);
    color: var(--sakura-pink);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 0; /* 回归直角 */
    border: 2px solid var(--border-dark);
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.1s; /* 像素风交互要快 */
}
.back-home:hover {
    background: var(--sakura-pink);
    color: #fff;
    border-color: var(--sakura-dark);
}
.back-home:active {
    transform: translate(2px, 2px); /* 按下的实体感 */
    box-shadow: none;
}

/* 悬浮开关 */
#music-toggle {
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    border-radius: 0;
    border: 2px solid var(--border-dark);
    background: var(--bg-color);
    color: var(--sakura-pink);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-hard-sm);
    transition: all 0.1s;
}
#music-toggle:hover {
    background: var(--sakura-pink);
    color: #fff;
    border-color: var(--sakura-dark);
}
#music-toggle:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}
#music-toggle.muted { opacity: 0.6; }

/* 访问计数器 */
.visit-counter {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-sub);
}

/* ============================================================
   二、主页样式
   ============================================================ */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px 40px;
}

.hero-badge {
    display: inline-block;
    color: var(--text-sub);
    padding: 4px 12px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    border: 1px dashed var(--border-dark);
    background: rgba(255,255,255,0.3);
}

.hero h1 {
    font-size: 2.4rem;
    color: var(--text-main);
    margin-bottom: 16px;
    line-height: 1.3;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.08);
}

.hero h1::before {
    content: "◇";
    display: block;
    margin-bottom: 12px;
    color: var(--sakura-pink);
    font-size: 1.2rem;
    text-shadow: none;
}

.hero p {
    font-size: 1rem;
    color: var(--text-sub);
    max-width: 600px;
    line-height: 1.8;
    margin-bottom: 40px;
}

/* 社徽 Logo：做成像素相框 */
.logo-wrapper {
    margin-bottom: 32px;
    display: inline-block;
    position: relative;
    padding: 10px;
    background: #fff;
    border: 2px solid var(--border-dark);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.08);
}

.logo-wrapper img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.logo-wrapper:hover img {
    transform: scale(1.05);
}

/* 快捷入口：做成实体按键 */
.quick-nav {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

.btn-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    height: 100px;
    background: var(--bg-color);
    text-decoration: none;
    color: var(--text-main);
    border: 2px solid var(--border-dark);
    box-shadow: var(--shadow-hard);
    transition: all 0.1s;
    padding: 16px;
}

.btn-card:hover {
    background: #fff;
    border-color: var(--sakura-pink);
    color: var(--sakura-pink);
}

.btn-card:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}

.btn-card .icon { font-size: 1.5rem; margin-bottom: 10px; color: var(--sakura-pink); }
.btn-card span { font-weight: 600; font-size: 1rem; }

/* S.O.S. 团致敬：做成纸质便签 */
.sos-tribute {
    margin-top: 0;
    margin-bottom: 40px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--sakura-pink);
    box-shadow: var(--shadow-hard-sm);
    text-align: left;
    max-width: 520px;
    display: inline-block;
    position: relative;
}

/* 便签的折角装饰 */
.sos-tribute::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    border-width: 0 0 16px 16px;
    border-style: solid;
    border-color: transparent transparent var(--bg-color) transparent;
}

.sos-line1 {
    font-size: 0.95rem;
    color: var(--sakura-dark);
    font-weight: 600;
    margin-bottom: 8px;
}
.sos-line2 {
    font-size: 0.75rem;
    color: var(--text-sub);
    font-style: italic;
    margin-bottom: 6px;
}
.sos-line3 {
    font-size: 0.85rem;
    color: var(--text-sub);
}

/* ============================================================
   三、社史页样式
   ============================================================ */

.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border-dark);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

/* 时间轴节点：类似复古地图的标记点 */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    border: 2px solid var(--sakura-pink);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
    z-index: 2;
}

.timeline-content {
    background: #fff;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-hard-sm);
    transition: transform 0.2s;
}

.timeline-content:hover { 
    transform: translateX(4px); 
    border-color: var(--sakura-light);
}

.timeline-year {
    display: inline-block;
    color: #fff;
    background: var(--sakura-pink);
    padding: 2px 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    box-shadow: 1px 1px 0 var(--sakura-dark);
}

.timeline-content h3 {
    margin-bottom: 12px;
    color: var(--text-main);
    font-size: 1.1rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 8px;
}

.timeline-content p {
    color: var(--text-sub);
    line-height: 1.8;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* 社史图片：拍立得/相框风格 */
.history-img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 4px solid #fff;
    outline: 1px solid var(--border-color);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.08);
    margin-top: 16px;
}

.history-img-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}
.history-img-grid .history-img { margin-top: 0; }

.history-figure { margin: 18px 0 0; text-align: center; }
.history-figure figcaption {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-top: 8px;
}

/* 游园会图集 */
.history-fair-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.history-fair-grid .history-img {
    margin-top: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.history-fair-grid .history-img:hover {
    transform: scale(1.05);
    border-color: var(--sakura-light);
}

/* 附录表格 */
.appendix {
    margin-top: 64px;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-hard-sm);
    padding: 24px;
}

.appendix h2 {
    color: var(--text-main);
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--border-dark);
    padding-bottom: 8px;
}

.appendix table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.appendix th, .appendix td {
    text-align: left;
    padding: 12px 8px;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.9rem;
}

.appendix th { color: var(--sakura-dark); font-weight: 600; background: rgba(0,0,0,0.02); }
.appendix td { color: var(--text-sub); }
.appendix tr:hover td { background-color: var(--bg-color); color: var(--text-main); }

/* 社史外链 */
.history-link {
    color: var(--sakura-pink);
    text-decoration: none;
    border-bottom: 1px dashed var(--sakura-pink);
    transition: all 0.2s;
}
.history-link:hover {
    color: var(--sakura-dark);
    border-bottom-style: solid;
}

/* ============================================================
   四、小测试 - 通用卡片
   ============================================================ */

.quiz-card {
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-hard);
    padding: 32px;
}

.quiz-card h1 {
    text-align: center;
    color: var(--text-main);
    margin-bottom: 32px;
    font-size: 1.5rem;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.05);
}

.progress-bar {
    text-align: center;
    margin-bottom: 24px;
    color: var(--text-sub);
    font-size: 0.9rem;
}
.progress-bar .current {
    color: var(--sakura-pink);
    font-weight: 700;
    font-size: 1rem;
}

.question {
    margin-bottom: 28px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.question p {
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--text-main);
}
.options { display: flex; flex-direction: column; gap: 12px; }
.options label {
    display: flex;
    align-items: center;
    background: #faf8f5;
    padding: 12px 16px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    color: var(--text-sub);
    font-size: 0.95rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
    transition: all 0.15s;
}
.options label:hover {
    background: #fff;
    border-color: var(--sakura-pink);
    color: var(--text-main);
}
.options input { margin-right: 12px; accent-color: var(--sakura-pink); width: 16px; height: 16px; }

/* 通用按钮：物理按键感 */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--sakura-pink);
    color: #fff;
    border: 2px solid var(--sakura-dark);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    box-shadow: 3px 3px 0 var(--border-dark);
    transition: all 0.1s;
}
.btn-submit:hover { background: var(--sakura-light); }
.btn-submit:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}

.btn-outline {
    background: #fff;
    color: var(--text-main);
    border: 2px solid var(--border-dark);
    box-shadow: 3px 3px 0 var(--border-color);
}
.btn-outline:hover {
    background: var(--bg-color);
    border-color: var(--sakura-pink);
}
.btn-outline:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}

/* 上下题 */
.nav-buttons { display: flex; gap: 12px; margin-top: 28px; }
.btn-nav {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-dark);
    background: #fff;
    color: var(--text-main);
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 2px 2px 0 var(--border-color);
    transition: all 0.1s;
}
.btn-nav:hover:not(:disabled) {
    border-color: var(--sakura-pink);
    color: var(--sakura-pink);
}
.btn-nav:active:not(:disabled) {
    transform: translate(2px, 2px);
    box-shadow: none;
}
.btn-nav:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; background: #f5f5f5; }

/* 结果页 */
.result { text-align: center; display: none; }
.result h2 { color: var(--text-main); font-size: 1.5rem; margin-bottom: 16px; }
.result p { font-size: 0.95rem; color: var(--text-sub); line-height: 1.8; margin-bottom: 24px; }
.result .score { font-size: 3rem; color: var(--sakura-pink); font-weight: 700; text-shadow: 2px 2px 0 rgba(0,0,0,0.1); }
.result-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.result-buttons .btn-submit { flex: 1; min-width: 140px; }

/* ============================================================
   五、小测试 - 模式选择 & 排行榜
   ============================================================ */

/* 用户信息栏 */
.user-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 24px;
    padding: 10px 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 #fff;
    font-size: 0.9rem;
}
.user-bar img {
    width: 32px; height: 32px;
    border-radius: 0; /* 像素风复古 */
    border: 1px solid var(--border-dark);
}
.user-bar .btn-login-sm, .user-bar .btn-logout-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid var(--border-dark);
    box-shadow: 1px 1px 0 var(--border-color);
    transition: all 0.1s;
}
.user-bar .btn-login-sm { background: var(--sakura-pink); color: #fff; }
.user-bar .btn-login-sm:hover { background: var(--sakura-light); }
.user-bar .btn-login-sm:active { transform: translate(1px, 1px); box-shadow: none; }
.user-bar .btn-logout-sm { background: #fff; color: var(--text-sub); }
.user-bar .btn-logout-sm:hover { color: var(--text-main); border-color: var(--text-sub); }
.user-bar .btn-logout-sm:active { transform: translate(1px, 1px); box-shadow: none; }

/* 模式选择 */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}
.mode-card {
    display: block;
    padding: 32px 24px;
    background: #fff;
    text-decoration: none;
    color: var(--text-main);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-hard);
    text-align: center;
    transition: all 0.15s;
}
.mode-card:hover {
    border-color: var(--sakura-pink);
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 rgba(176, 78, 98, 0.15);
}
.mode-card:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}
.mode-card .icon { font-size: 1.8rem; margin-bottom: 12px; color: var(--sakura-pink); }
.mode-card h3 { color: var(--text-main); font-size: 1.1rem; margin-bottom: 8px; }
.mode-card p { color: var(--text-sub); font-size: 0.85rem; line-height: 1.6; }

/* 排行榜 */
.rank-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.rank-tab {
    padding: 6px 20px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-sub);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    box-shadow: 1px 1px 0 var(--border-color);
}
.rank-tab.active {
    background: var(--sakura-pink);
    border-color: var(--sakura-dark);
    color: #fff;
    box-shadow: 1px 1px 0 var(--sakura-dark);
}
.rank-tab:active:not(.active) {
    transform: translate(1px, 1px);
    box-shadow: none;
}
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-hard-sm);
    background: #fff;
}
.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.9rem;
    transition: background 0.2s;
}
.rank-item:hover { background: var(--bg-color); }
.rank-item:last-child { border-bottom: none; }
.rank-item .rank-no { width: 24px; font-weight: 700; color: var(--text-sub); text-align: center; flex-shrink: 0; }
.rank-item .rank-avatar { width: 28px; height: 28px; border: 1px solid var(--border-color); flex-shrink: 0; }
.rank-item .rank-name { flex: 1; font-weight: 500; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-item .rank-score { color: var(--sakura-pink); font-weight: 600; flex-shrink: 0; }
.rank-item .rank-time { color: var(--text-sub); font-size: 0.8rem; flex-shrink: 0; min-width: 60px; text-align: right; }
.rank-empty { text-align: center; color: var(--text-sub); padding: 40px 0; font-size: 0.9rem; }
.gold   { color: #e6b75c; text-shadow: 1px 1px 0 #b58d3c; }
.silver { color: #a0a0a0; text-shadow: 1px 1px 0 #7d7d7d; }
.bronze { color: #c98c6a; text-shadow: 1px 1px 0 #9b6647; }

/* ============================================================
   六、小测试 - 答题页 HUD
   ============================================================ */

.hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 12px 20px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 #fff;
    font-size: 0.9rem;
    color: var(--text-main);
    flex-wrap: wrap;
    gap: 8px;
}
.hud .hud-item { display: flex; align-items: center; gap: 6px; }
.hud .hud-val { color: var(--sakura-pink); font-size: 1rem; font-weight: 700; }

.feedback { text-align: center; font-weight: 500; font-size: 0.95rem; margin-top: 16px; min-height: 24px; }
.feedback.correct { color: #3e8e7e; }
.feedback.wrong   { color: var(--sakura-pink); }

/* ============================================================
   七、留言板
   ============================================================ */

.comment-container { max-width: 720px; margin: 100px auto 60px; padding: 0 20px; }
.comment-card {
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-hard);
    padding: 32px;
}
.comment-card h1 { text-align: center; color: var(--text-main); margin-bottom: 24px; font-size: 1.5rem; }
#auth-section { text-align: center; margin-bottom: 24px; }

#comment-input {
    width: 100%;
    min-height: 100px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    background: var(--bg-color);
    color: var(--text-main);
    resize: vertical;
    margin-bottom: 16px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
    transition: border-color 0.2s;
}
#comment-input:focus { outline: none; border-color: var(--sakura-pink); background: #fff; }

#submit-btn {
    display: block;
    margin: 0 auto;
    padding: 10px 32px;
    border: 2px solid var(--sakura-dark);
    background: var(--sakura-pink);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 2px 2px 0 var(--border-dark);
    transition: all 0.1s;
}
#submit-btn:hover { background: var(--sakura-light); }
#submit-btn:active { transform: translate(2px, 2px); box-shadow: none; }

#comment-display { margin-top: 32px; }
.comment-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px dashed var(--border-color);
    align-items: flex-start;
}
.comment-item:last-child { border-bottom: none; }
.comment-item img { border: 1px solid var(--border-color); flex-shrink: 0; }
.comment-item strong { color: var(--sakura-dark); display: block; margin-bottom: 4px; font-size: 0.9rem; }
.comment-item p { color: var(--text-sub); margin: 0; line-height: 1.6; word-break: break-word; }

.login-btn {
    padding: 10px 28px;
    border: 2px solid var(--sakura-dark);
    background: var(--sakura-pink);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 2px 2px 0 var(--border-dark);
    transition: all 0.1s;
}
.login-btn:hover { background: var(--sakura-light); }
.login-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.logout-btn {
    padding: 6px 16px;
    border: 1px solid var(--border-dark);
    background: #fff;
    color: var(--text-sub);
    font-size: 0.85rem;
    cursor: pointer;
    margin-left: 10px;
    box-shadow: 1px 1px 0 var(--border-color);
    transition: all 0.1s;
}
.logout-btn:hover { border-color: var(--text-main); color: var(--text-main); }
.logout-btn:active { transform: translate(1px, 1px); box-shadow: none; }
.back-home-btn { display: inline-block; margin-top: 24px; color: var(--text-sub); text-decoration: none; font-size: 0.9rem; }
.back-home-btn:hover { color: var(--sakura-pink); }

/* ============================================================
   八、相关链接页
   ============================================================ */

.link-section { margin-bottom: 56px; }
.link-section-title {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 24px;
    padding-left: 12px;
    border-left: 4px solid var(--sakura-pink);
    font-weight: 600;
}
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 2px 2px 0 var(--border-color);
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.15s ease;
}
.link-card:hover { 
    border-color: var(--sakura-pink); 
    box-shadow: 3px 3px 0 rgba(176, 78, 98, 0.15);
    transform: translateY(-2px);
}
.link-card:active {
    transform: translate(2px, 2px); 
    box-shadow: none;
}
.link-icon {
    font-size: 1.5rem; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-color); border: 1px solid var(--border-color);
    flex-shrink: 0; color: var(--sakura-pink);
}
.link-info { flex: 1; min-width: 0; }
.link-name { font-size: 1rem; font-weight: 600; color: var(--text-main); margin-bottom: 4px; }
.link-desc { font-size: 0.82rem; color: var(--text-sub); }
.link-arrow { color: var(--text-sub); font-size: 1.1rem; transition: transform 0.25s, color 0.25s; }
.link-card:hover .link-arrow { transform: translateX(4px); color: var(--sakura-pink); }

/* ============================================================
   九、响应式
   ============================================================ */

@media (max-width: 600px) {
    .hero { padding-top: 80px; }
    .hero h1 { font-size: 1.8rem; }
    .page-title h1 { font-size: 1.6rem; }
    .logo-wrapper img { width: 100px; height: 100px; }
    .btn-card { min-width: 100%; height: 90px; }
    .history-img-grid { grid-template-columns: 1fr; }
    .history-fair-grid { grid-template-columns: repeat(2, 1fr); }
    .link-grid { grid-template-columns: 1fr; }
    .quiz-card { padding: 24px 16px; }
    .comment-card { padding: 24px 16px; }
    .user-bar { flex-wrap: wrap; justify-content: center; }
    .timeline { padding-left: 20px; }
    .timeline::before { left: 3px; }
    .timeline-item::before { left: -22px; }
}

/* ============================================================
   十、PDF 预览组件
   ============================================================ */

.doc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.doc-btn { 
    text-decoration: none; display: inline-block; text-align: center; 
    margin-top: 0 !important; width: auto !important; padding: 10px 24px !important; 
    font-size: 0.9rem !important; 
    border: 2px solid var(--border-dark) !important;
    background: #fff !important; color: var(--text-main) !important;
    box-shadow: 2px 2px 0 var(--border-color);
}
.doc-btn:hover { background: var(--bg-color) !important; border-color: var(--sakura-pink) !important; }

.pdf-viewer-wrap { margin-top: 16px; border: 1px solid var(--border-color); background: #fff; overflow: hidden; box-shadow: var(--shadow-hard-sm); }
.pdf-viewer-wrap summary { padding: 14px 20px; cursor: pointer; color: var(--sakura-pink); font-weight: 500; font-size: 0.95rem; user-select: none; list-style: none; transition: background 0.2s; border-bottom: 1px dashed transparent; }
.pdf-viewer-wrap summary::-webkit-details-marker { display: none; }
.pdf-viewer-wrap summary::before { content: '▶ '; display: inline-block; margin-right: 8px; transition: transform 0.2s; font-size: 0.8em; }
.pdf-viewer-wrap[open] summary::before { transform: rotate(90deg); }
.pdf-viewer-wrap[open] summary { border-bottom-color: var(--border-color); }
.pdf-viewer-wrap summary:hover { background: var(--bg-color); }

.pdf-viewer { width: 100%; max-height: 80vh; min-height: 300px; overflow-y: auto; padding: 16px; background: #e0dbd5; }
.pdf-loading { text-align: center; color: var(--text-sub); font-size: 0.9rem; padding: 40px 0; }
.pdf-page-canvas { width: 100%; height: auto; margin-bottom: 16px; border: 2px solid #fff; outline: 1px solid var(--border-color); box-shadow: 0 2px 8px rgba(0,0,0,0.1); background: #fff; }

@media (max-width: 600px) {
    .pdf-viewer { max-height: 70vh; padding: 8px; }
    .pdf-page-canvas { margin-bottom: 8px; }
}

/* ============================================================
   历届干部 & 指导老师 名录统一排版
   ============================================================ */

/* 增加两个大区块之间的间距 */
.appendix + .appendix {
    margin-top: 64px; 
}

.leaders-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
}

.leader-item {
    display: flex;
    padding: 16px 8px;
    border-bottom: 1px dashed var(--border-color);
    gap: 24px;
    transition: background-color 0.2s;
}

.leader-item:hover {
    background-color: var(--card-hover);
}

/* 左侧年份/任期 */
.leader-year {
    flex: 0 0 80px; /* 稍微加宽，让年份对齐更整齐 */
    font-size: 1rem;
    font-weight: 600;
    color: var(--sakura-pink);
    text-align: left;
    padding-top: 2px;
}

/* 右侧信息容器 */
.leader-info {
    flex: 1;
    min-width: 0;
}

/* 社长/老师姓名 */
.leader-president {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

/* 干部名单/备注（统一的纯文本样式） */
.leader-desc, 
.leader-note {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.6;
    margin-top: 4px;
    word-break: break-all;
}

/* 手机端适配 */
@media (max-width: 600px) {
    .leader-item {
        flex-direction: column;
        gap: 6px;
    }
    .leader-year {
        flex: unset;
        width: 100%;
    }
}

/* 干部多行列表容器 */
.leader-desc {
    display: flex;
    flex-direction: column;
    gap: 4px; /* 控制不同部门之间的换行间距 */
    margin-top: 6px;
}

/* 单独的每一行干部信息 */
.leader-sub-item {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.5;
}

/* ============================================================
   同好群卡片专属样式
   ============================================================ */

.group-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text-main);
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 2px 2px 0 var(--border-color);
    transition: all 0.15s ease;
}

.group-card:hover {
    border-color: var(--sakura-pink);
    box-shadow: 3px 3px 0 rgba(176, 78, 98, 0.15);
    transform: translateY(-2px);
}

.group-card:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.group-avatar {
    width: 52px;
    height: 52px;
    border-radius: 4px; /* 配合像素风用微圆角 */
    border: 1px solid var(--border-dark);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-color);
}

.group-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.group-tag {
    font-size: 0.75rem;
    color: var(--sakura-dark);
    background: rgba(176, 78, 98, 0.1);
    border: 1px solid rgba(176, 78, 98, 0.2);
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 500;
}

.group-qq {
    font-size: 0.8rem;
    color: var(--text-sub);
}

@media (max-width: 600px) {
    .group-card {
        padding: 12px 14px;
    }
    .group-avatar {
        width: 44
        height: 44px;
    }
}

/* ============================================================
   相关链接页 - 真实 Logo 图标样式
   ============================================================ */

.link-avatar {
    width: 44px;
    height: 44px;
    border-radius: 4px; /* 配合复古风的小圆角 */
    border: 1px solid var(--border-dark);
    object-fit: cover; /* 保证图片不变形 */
    flex-shrink: 0;
    background: var(--bg-color);
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.05); /* 微弱的相框立体感 */
    transition: transform 0.2s ease;
}

/* 鼠标悬停时图标微微放大，增加互动感 */
.link-card:hover .link-avatar {
    transform: scale(1.05);
}

/* 手机端稍微缩小图标 */
@media (max-width: 600px) {
    .link-avatar {
        width: 40px;
        height: 40px;
    }
}

/* ============================================================
   主页按钮：复古文字印章图标
   ============================================================ */

/* 替代原来的 .icon 样式 */
.icon-seal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--sakura-dark);
    
    /* 做成一个复古的方形印鉴 */
    background: var(--bg-color);
    border: 2px solid var(--sakura-pink);
    box-shadow: 2px 2px 0 var(--border-dark);
    
    /* 内发光，模拟一点纸质的凹陷感 */
    box-shadow: inset 0 0 0 1px #fff, 2px 2px 0 var(--border-dark);
    
    transition: all 0.2s;
}

/* 当鼠标悬浮在卡片上时，印章的交互反馈 */
.btn-card:hover .icon-seal {
    background: var(--sakura-pink);
    color: #fff;
    border-color: var(--sakura-dark);
    box-shadow: inset 0 0 0 1px var(--sakura-light), 2px 2px 0 var(--sakura-dark);
}

.btn-card:active .icon-seal {
    transform: translate(2px, 2px);
    box-shadow: none;
}

/* 确保卡片内部的 span 文字不受影响 */
.btn-card span {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.btn-card:hover span {
    color: var(--sakura-dark);
}