/* ========== 全局变量 ========== */
:root {
    --primary-blue: #4a9eff;
    --primary-pink: #ff8fab;
    --primary-white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.28);
    --glass-border: rgba(255, 255, 255, 0.45);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.18);
    --text-primary: #1a202c;
    --text-secondary: #2d3748;
    --text-light: #4a5568;
    --top-bar-height: 56px;
    --sidebar-width: 260px;
}

[data-theme="night"] {
    --glass-bg: rgba(15, 20, 45, 0.68);
    --glass-border: rgba(100, 120, 200, 0.35);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --text-primary: #f7fafc;
    --text-secondary: #e2e8f0;
    --text-light: #a0aec0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========== 背景轮播 ========== */
.slideshow-container {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2; overflow: hidden;
}
.slide {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.2s ease-in-out;
}
.slide.active { opacity: 1; }
.overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.28));
}
[data-theme="night"] .overlay {
    background: linear-gradient(135deg, rgba(5, 8, 25, 0.8), rgba(15, 10, 35, 0.78));
}

/* ========== 液态玻璃 ========== */
.liquid-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* ========== 顶部状态栏 ========== */
.top-bar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--top-bar-height);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; z-index: 1000;
    border-radius: 0; border-left: none; border-right: none; border-top: none;
}
.top-bar-left { display: flex; align-items: center; gap: 12px; }
.logo-mini img { height: 32px; width: auto; }
.app-title {
    font-size: 16px; font-weight: 600;
    color: var(--text-primary); white-space: nowrap;
}
.top-bar-center { flex: 1; display: flex; justify-content: center; }
.current-page {
    font-size: 15px; font-weight: 500; color: var(--text-secondary);
    padding: 4px 16px; border-radius: 20px;
    background: rgba(255,255,255,0.1);
}
[data-theme="night"] .current-page { background: rgba(255,255,255,0.05); }
.top-bar-right { display: flex; align-items: center; gap: 12px; }
.status-time {
    font-size: 14px; font-weight: 500; color: var(--text-secondary);
    font-variant-numeric: tabular-nums; min-width: 70px; text-align: center;
}

/* 控制按钮 */
.control-btn {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.1);
    color: var(--text-primary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; font-size: 12px; font-weight: 600;
}
.control-btn:hover { background: rgba(74, 158, 255, 0.2); transform: scale(1.05); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .icon-moon { display: none; }
[data-theme="night"] .theme-btn .icon-sun { display: none; }
[data-theme="night"] .theme-btn .icon-moon { display: block; }

/* 菜单按钮（移动端） */
.menu-toggle {
    display: none; flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.menu-toggle span {
    width: 22px; height: 2px;
    background: var(--text-primary); border-radius: 2px; transition: 0.3s;
}

/* ========== 左侧导航栏 ========== */
.sidebar {
    position: fixed; top: var(--top-bar-height); left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--top-bar-height));
    overflow-y: auto; z-index: 999;
    border-radius: 0; border-left: none; border-bottom: none;
    padding: 16px 12px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }

.nav-section { margin-bottom: 20px; }
.nav-section-title {
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-light); padding: 8px 12px; margin-bottom: 4px;
}
.nav-subsection { margin-bottom: 12px; }
.nav-subtitle {
    font-size: 11px; font-weight: 600; color: var(--text-light);
    padding: 6px 12px; opacity: 0.8;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 10px;
    color: var(--text-secondary); text-decoration: none;
    font-size: 13px; font-weight: 500;
    transition: all 0.25s; cursor: pointer; position: relative;
}
.nav-item:hover { background: rgba(74, 158, 255, 0.15); color: var(--primary-blue); }
.nav-item.active {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.25), rgba(255, 143, 171, 0.15));
    color: var(--primary-blue); font-weight: 600;
}
.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%); width: 3px; height: 60%;
    background: var(--primary-blue); border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-icon-svg {
    width: 18px; height: 18px; flex-shrink: 0;
    stroke: currentColor; fill: none;
}
.nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge {
    background: var(--primary-pink); color: white;
    font-size: 10px; font-weight: 700; padding: 2px 6px;
    border-radius: 10px; min-width: 20px; text-align: center;
}
.nav-link { font-size: 12px; padding: 7px 12px; opacity: 0.85; }
.nav-link:hover { opacity: 1; }

/* 侧边栏遮罩 */
.sidebar-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); z-index: 998; display: none;
}
.sidebar-overlay.active { display: block; }

/* ========== 主内容区 ========== */
.main-area {
    margin-left: var(--sidebar-width);
    margin-top: var(--top-bar-height);
    min-height: calc(100vh - var(--top-bar-height));
    padding: 24px 32px;
}

.page { display: none; animation: fadeIn 0.4s ease; }
.page.active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header { margin-bottom: 24px; }
.page-title { font-size: 28px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.page-subtitle { font-size: 14px; color: var(--text-light); }

/* ========== 首页 ========== */
.hero-content {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: calc(100vh - var(--top-bar-height) - 100px);
    gap: 32px;
}
.content-card {
    max-width: 560px; padding: 40px;
    border-radius: 24px; text-align: center;
}
.card-tag {
    display: inline-block; padding: 4px 14px; border-radius: 20px;
    background: rgba(74, 158, 255, 0.15); color: var(--primary-blue);
    font-size: 12px; font-weight: 600; margin-bottom: 16px;
}
.main-title {
    font-size: 48px; font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 4px;
}
.subtitle { font-size: 16px; letter-spacing: 4px; color: var(--text-light); margin-bottom: 20px; }
.description { font-size: 14px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 28px; }
.button-group { display: flex; gap: 12px; justify-content: center; }
.btn {
    padding: 10px 24px; border-radius: 25px; border: none;
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.3s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), #6bb3ff);
    color: white; box-shadow: 0 4px 15px rgba(74, 158, 255, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(74, 158, 255, 0.5); }
.btn-secondary {
    background: rgba(255,255,255,0.15); color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.25); }

.hero-stats { display: flex; gap: 20px; }
.stat-card { padding: 20px 28px; border-radius: 16px; text-align: center; min-width: 100px; }
.stat-number {
    font-size: 32px; font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.slide-controls {
    display: flex; align-items: center; justify-content: center;
    gap: 20px; margin-top: 20px;
}
.slide-btn {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg); color: var(--text-primary);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
}
.slide-btn:hover { background: rgba(74, 158, 255, 0.2); }
.slide-btn svg { width: 18px; height: 18px; }
.indicators { font-size: 14px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.indicators .divider { margin: 0 6px; opacity: 0.5; }

/* ========== 筛选器 ========== */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 16px;
    padding: 16px 20px; border-radius: 16px;
    margin-bottom: 24px; align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label {
    font-size: 11px; font-weight: 600; color: var(--text-light);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.filter-group select, .filter-group input {
    padding: 8px 12px; border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.1);
    color: var(--text-primary); font-size: 13px;
    outline: none; transition: all 0.3s; min-width: 120px;
}
.filter-group select:focus, .filter-group input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15);
}
.search-group { flex: 1; min-width: 200px; }
.search-group input { width: 100%; }

/* ========== 学生网格 ========== */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.student-card {
    padding: 20px 16px; border-radius: 16px;
    text-align: center; cursor: pointer;
    transition: all 0.3s; position: relative; overflow: hidden;
}
.student-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(74, 158, 255, 0.25);
}
.student-avatar {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    background-size: cover;
    background-position: center top;
    overflow: hidden;
    position: relative;
}
.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.student-avatar .avatar-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
}
.student-name { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.student-name-en { font-size: 11px; color: var(--text-light); margin-bottom: 8px; }
.student-tags { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.tag { padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
.tag-role { background: rgba(74, 158, 255, 0.15); color: var(--primary-blue); }
.tag-attack { background: rgba(255, 143, 171, 0.15); color: var(--primary-pink); }
.tag-limited { background: rgba(255, 193, 7, 0.2); color: #f59e0b; }
.student-stars { font-size: 12px; color: #f59e0b; letter-spacing: 1px; }

/* ========== 分页 ========== */
.pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; flex-wrap: wrap; margin-top: 16px;
}
.page-btn {
    min-width: 36px; height: 36px; padding: 0 10px;
    border-radius: 8px; border: 1px solid var(--glass-border);
    background: var(--glass-bg); color: var(--text-secondary);
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all 0.25s; display: flex; align-items: center; justify-content: center;
}
.page-btn:hover { background: rgba(74, 158, 255, 0.15); color: var(--primary-blue); }
.page-btn.active {
    background: linear-gradient(135deg, var(--primary-blue), #6bb3ff);
    color: white; border-color: transparent;
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-info { font-size: 13px; color: var(--text-light); padding: 0 8px; }

/* ========== 学院网格 ========== */
.school-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.school-card {
    padding: 24px; border-radius: 20px;
    transition: all 0.3s; cursor: pointer;
}
.school-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.15); }
.school-header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.school-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
}
.school-info h3 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.school-info p { font-size: 12px; color: var(--text-light); }
.school-desc { font-size: 13px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 14px; }
.school-features { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.school-feature {
    padding: 3px 10px; border-radius: 12px;
    background: rgba(255,255,255,0.1);
    font-size: 11px; color: var(--text-secondary);
}
.school-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 12px; border-top: 1px solid var(--glass-border);
}
.school-count { font-size: 13px; font-weight: 600; color: var(--primary-blue); }
.school-council { font-size: 11px; color: var(--text-light); }

/* ========== 卡池网格 ========== */
.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.banner-card { padding: 24px; border-radius: 20px; transition: all 0.3s; }
.banner-card:hover { transform: translateY(-4px); }
.banner-type {
    display: inline-block; padding: 4px 12px; border-radius: 12px;
    font-size: 11px; font-weight: 700; margin-bottom: 12px;
}
.banner-type.limited { background: rgba(255, 143, 171, 0.2); color: var(--primary-pink); }
.banner-type.permanent { background: rgba(74, 158, 255, 0.2); color: var(--primary-blue); }
.banner-type.fes { background: rgba(255, 193, 7, 0.2); color: #f59e0b; }
.banner-type.collab { background: rgba(162, 155, 254, 0.2); color: #a29bfe; }
.banner-type.special { background: rgba(0, 184, 148, 0.2); color: #00b894; }
.banner-card h3 { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.banner-date { font-size: 12px; color: var(--text-light); margin-bottom: 12px; }
.banner-desc { font-size: 13px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 14px; }
.banner-chars { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.banner-char {
    padding: 4px 10px; border-radius: 10px;
    background: rgba(255,255,255,0.1);
    font-size: 12px; color: var(--text-primary);
}
.banner-rate {
    padding-top: 12px; border-top: 1px solid var(--glass-border);
    font-size: 12px; color: var(--text-light); font-weight: 600;
}

/* ========== 讨论站 ========== */
.post-form { padding: 24px; border-radius: 20px; margin-bottom: 24px; }
.form-header { margin-bottom: 16px; }
.form-header h3 { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.form-row { display: flex; gap: 12px; margin-bottom: 12px; }
.form-row input, .form-row select {
    flex: 1; padding: 10px 14px; border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.1);
    color: var(--text-primary); font-size: 14px;
    outline: none; transition: all 0.3s;
}
.post-form input[type="text"], .post-form textarea {
    width: 100%; padding: 10px 14px; border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.1);
    color: var(--text-primary); font-size: 14px;
    outline: none; margin-bottom: 12px; transition: all 0.3s; font-family: inherit;
}
.post-form textarea { resize: vertical; min-height: 80px; }
.post-form input:focus, .post-form textarea:focus, .post-form select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15);
}

.post-list { display: flex; flex-direction: column; gap: 14px; }
.post-card { padding: 20px; border-radius: 16px; transition: all 0.3s; }
.post-card:hover { transform: translateX(4px); }
.post-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.post-author { display: flex; align-items: center; gap: 10px; }
.post-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 14px;
}
.post-author-info h4 { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.post-author-info span { font-size: 11px; color: var(--text-light); }
.post-category {
    padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 600;
    background: rgba(74, 158, 255, 0.15); color: var(--primary-blue);
}
.post-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.post-content { font-size: 13px; line-height: 1.7; color: var(--text-secondary); }

/* ========== 空状态 ========== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-state p { font-size: 15px; }

/* ========== 弹窗 ========== */
.modal-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    z-index: 2000; display: none;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    max-width: 600px; width: 100%; max-height: 85vh;
    overflow-y: auto; border-radius: 24px; padding: 32px;
    position: relative; animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    border: none; background: rgba(255,255,255,0.1);
    color: var(--text-primary); font-size: 20px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
}
.modal-close:hover { background: rgba(255, 100, 100, 0.2); transform: rotate(90deg); }
.modal-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 24px; padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}
.modal-avatar {
    width: 80px; height: 80px; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 26px; font-weight: 700; flex-shrink: 0;
    background-size: cover; background-position: center top;
    overflow: hidden;
}
.modal-avatar img {
    width: 100%; height: 100%; object-fit: cover; object-position: center top;
}
.modal-title h2 { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.modal-title .name-en { font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.modal-stars { color: #f59e0b; font-size: 14px; letter-spacing: 2px; }
.modal-section { margin-bottom: 20px; }
.modal-section h4 {
    font-size: 13px; font-weight: 700; color: var(--primary-blue);
    margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px;
}
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-tag {
    padding: 5px 12px; border-radius: 12px;
    background: rgba(255,255,255,0.1);
    font-size: 12px; color: var(--text-primary); font-weight: 500;
}
.modal-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-box {
    padding: 14px; border-radius: 12px;
    background: rgba(255,255,255,0.05); text-align: center;
}
.stat-box .stat-label { font-size: 11px; color: var(--text-light); margin-bottom: 4px; }
.stat-box .stat-value { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.stat-box .stat-max { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.modal-skill {
    padding: 14px; border-radius: 12px;
    background: rgba(74, 158, 255, 0.08);
    font-size: 13px; line-height: 1.7; color: var(--text-secondary);
}
.modal-personality, .modal-desc { font-size: 13px; line-height: 1.8; color: var(--text-secondary); }

/* ========== 鼠标尾流 ========== */
#trailCanvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 9999;
}
#rippleContainer {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; z-index: 9998;
}
.ripple {
    position: absolute; border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.4), transparent);
    transform: translate(-50%, -50%);
    animation: rippleExpand 0.6s ease-out forwards; pointer-events: none;
}
@keyframes rippleExpand {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 120px; height: 120px; opacity: 0; }
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-area { margin-left: 0; }
    .menu-toggle { display: flex; }
}

@media (max-width: 768px) {
    .top-bar { padding: 0 12px; }
    .app-title { display: none; }
    .status-time { display: none; }
    .current-page { font-size: 13px; padding: 3px 10px; }
    .main-area { padding: 16px; }
    .page-title { font-size: 22px; }
    .main-title { font-size: 36px; }
    .content-card { padding: 28px 20px; }
    .hero-stats { gap: 12px; }
    .stat-card { padding: 14px 18px; min-width: 80px; }
    .stat-number { font-size: 24px; }
    .student-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
    .student-card { padding: 14px 10px; }
    .student-avatar { width: 44px; height: 44px; font-size: 18px; }
    .filter-bar { padding: 12px; gap: 10px; }
    .filter-group select, .filter-group input { min-width: 100px; font-size: 12px; }
    .modal { padding: 20px; max-height: 90vh; }
    .modal-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; }
    .school-grid, .banner-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .student-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { flex-direction: column; width: 100%; }
    .stat-card { width: 100%; }
    .button-group { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
}

/* ========== QQ群页面 ========== */
.qqgroup-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60vh;
    padding: 20px 0;
}
.qqgroup-card {
    max-width: 480px;
    width: 100%;
    padding: 40px 32px;
    border-radius: 24px;
    text-align: center;
    position: relative;
}
.qqgroup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #12B7F5, #0099FF);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(18, 183, 245, 0.35);
}
.qqgroup-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
}
.qqgroup-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.qqgroup-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 28px;
}
.qqgroup-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    padding: 20px;
    border-radius: 16px;
    background: rgba(18, 183, 245, 0.08);
    border: 1px solid rgba(18, 183, 245, 0.2);
}
.qqgroup-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.qqgroup-num {
    font-size: 32px;
    font-weight: 800;
    color: #12B7F5;
    letter-spacing: 3px;
    font-variant-numeric: tabular-nums;
}
.qqgroup-actions {
    margin-bottom: 20px;
}
.qqgroup-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    font-size: 15px;
}
.qqgroup-tips {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}
.qqgroup-toast {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(18, 183, 245, 0.9);
    color: white;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}
.qqgroup-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .qqgroup-card { padding: 28px 20px; }
    .qqgroup-num { font-size: 26px; letter-spacing: 2px; }
    .qqgroup-icon { width: 64px; height: 64px; }
    .qqgroup-icon svg { width: 32px; height: 32px; }
}

/* ========== 抽卡模拟器 ========== */
.gacha-container { max-width: 900px; margin: 0 auto; }
.gacha-info {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px; border-radius: 16px; margin-bottom: 20px; flex-wrap: wrap; gap: 16px;
}
.gacha-banner-info h3 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.gacha-banner-info p { font-size: 13px; color: var(--text-secondary); }
.gacha-stats { display: flex; gap: 24px; }
.gacha-stat { text-align: center; }
.gacha-stat span { display: block; font-size: 24px; font-weight: 800; color: var(--primary-blue); }
.gacha-stat label { font-size: 11px; color: var(--text-light); }
.gacha-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.gacha-btn { min-width: 120px; padding: 14px 32px; font-size: 16px; }
.gacha-ten { background: linear-gradient(135deg, var(--primary-pink), #ffb3c6); box-shadow: 0 4px 15px rgba(255,143,171,0.4); }
.gacha-result {
    min-height: 200px; padding: 20px; border-radius: 16px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    margin-bottom: 24px;
}
.gacha-placeholder { text-align: center; color: var(--text-light); padding: 60px 0; }
.gacha-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.gacha-card {
    aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; position: relative;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    animation: gachaReveal 0.5s ease backwards;
}
.gacha-card img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.gacha-card .gacha-card-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px 8px 8px; text-align: center;
}
.gacha-card .gacha-card-name { font-size: 12px; font-weight: 600; color: white; }
.gacha-card .gacha-card-stars { font-size: 11px; color: #ffd700; }
.gacha-card.rarity-3 { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); border: 2px solid #ffd700; }
.gacha-card.rarity-2 { box-shadow: 0 0 12px rgba(200, 200, 255, 0.4); }
@keyframes gachaReveal {
    from { opacity: 0; transform: scale(0.8) rotateY(90deg); }
    to { opacity: 1; transform: scale(1) rotateY(0); }
}
.gacha-history h4 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; }
.gacha-history-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.gacha-history-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    border-radius: 10px; background: var(--glass-bg); font-size: 13px; color: var(--text-secondary);
}
.gacha-history-item .time { color: var(--text-light); font-size: 11px; }
.gacha-history-item .result { font-weight: 600; }
.gacha-history-item .result.gold { color: #ffd700; }

/* ========== 学生对比 ========== */
.compare-selector { padding: 20px; border-radius: 16px; margin-bottom: 24px; }
.compare-slots { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.compare-slot {
    width: 140px; height: 180px; border-radius: 12px;
    border: 2px dashed var(--glass-border); display: flex;
    align-items: center; justify-content: center; cursor: pointer;
    transition: all 0.3s; overflow: hidden; position: relative;
}
.compare-slot:hover { border-color: var(--primary-blue); background: rgba(74,158,255,0.08); }
.compare-slot-placeholder { color: var(--text-light); font-size: 13px; }
.compare-slot.filled { border-style: solid; border-color: transparent; }
.compare-slot.filled img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.compare-slot .remove-compare {
    position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
    border-radius: 50%; background: rgba(0,0,0,0.6); color: white; border: none;
    cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.compare-actions { display: flex; justify-content: flex-end; }
.compare-result { min-height: 200px; }
.compare-placeholder { text-align: center; color: var(--text-light); padding: 60px 0; }
.compare-table-wrap { overflow-x: auto; border-radius: 16px; }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td {
    padding: 12px 16px; text-align: center; border-bottom: 1px solid var(--glass-border);
    font-size: 13px; color: var(--text-secondary);
}
.compare-table th { background: var(--glass-bg); font-weight: 600; color: var(--text-primary); position: sticky; top: 0; }
.compare-table .label-col { text-align: left; font-weight: 600; color: var(--text-primary); background: var(--glass-bg); }
.compare-table .best { color: var(--primary-blue); font-weight: 700; }
.compare-table .student-head img { width: 50px; height: 50px; border-radius: 10px; object-fit: cover; margin-bottom: 6px; }
.compare-table .student-head .name { font-size: 12px; font-weight: 600; color: var(--text-primary); }

/* ========== 数据速查 ========== */
.ref-section { margin-bottom: 32px; }
.ref-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }
.ref-table-wrap { padding: 16px; border-radius: 16px; overflow-x: auto; }
.ref-table { width: 100%; border-collapse: collapse; }
.ref-table th, .ref-table td {
    padding: 12px 16px; text-align: center; border: 1px solid var(--glass-border);
    font-size: 13px;
}
.ref-table th { background: var(--glass-bg); font-weight: 700; color: var(--text-primary); }
.ref-table td { color: var(--text-secondary); }
.ref-table .dmg-high { color: #10b981; font-weight: 700; }
.ref-table .dmg-mid { color: #f59e0b; font-weight: 600; }
.ref-table .dmg-low { color: #ef4444; font-weight: 600; }
.ref-filter { margin-bottom: 16px; }
.ref-filter select {
    padding: 10px 16px; border-radius: 10px; border: 1px solid var(--glass-border);
    background: var(--glass-bg); color: var(--text-primary); font-size: 14px; min-width: 240px;
}
.terrain-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.terrain-card {
    padding: 20px; border-radius: 14px; text-align: center;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.terrain-card .terrain-name { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.terrain-card .terrain-dmg { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.terrain-card .terrain-dmg.high { color: #10b981; }
.terrain-card .terrain-dmg.mid { color: #f59e0b; }
.terrain-card .terrain-dmg.low { color: #ef4444; }
.terrain-card .terrain-label { font-size: 11px; color: var(--text-light); }
.terrain-card .terrain-shield { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }

/* ========== 收藏页面 ========== */
.fav-empty { text-align: center; padding: 60px 20px; }
.fav-empty p { color: var(--text-secondary); font-size: 15px; margin-bottom: 8px; }
.fav-tip { color: var(--text-light) !important; font-size: 13px !important; }
.fav-btn {
    position: absolute; top: 8px; right: 8px; width: 32px; height: 32px;
    border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; z-index: 2;
}
.fav-btn:hover { transform: scale(1.15); }
.fav-btn svg { width: 18px; height: 18px; stroke: #ccc; fill: none; transition: all 0.3s; }
.fav-btn.active svg { stroke: #ff6b6b; fill: #ff6b6b; }

/* ========== 养成计算器 ========== */
.calc-container { max-width: 600px; margin: 0 auto; padding: 28px; border-radius: 20px; }
.calc-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.calc-row label { font-size: 14px; font-weight: 600; color: var(--text-primary); min-width: 70px; }
.calc-row select, .calc-row input {
    flex: 1; padding: 10px 14px; border-radius: 10px;
    border: 1px solid var(--glass-border); background: rgba(255,255,255,0.1);
    color: var(--text-primary); font-size: 14px; outline: none; min-width: 120px;
}
.calc-result {
    margin-top: 20px; padding: 20px; border-radius: 14px;
    background: rgba(74,158,255,0.08); border: 1px solid rgba(74,158,255,0.2);
}
.calc-result-item {
    display: flex; justify-content: space-between; padding: 8px 0;
    border-bottom: 1px solid var(--glass-border); font-size: 14px;
}
.calc-result-item:last-child { border-bottom: none; }
.calc-result-item .label { color: var(--text-secondary); }
.calc-result-item .value { font-weight: 700; color: var(--primary-blue); }
.calc-note { margin-top: 16px; font-size: 12px; color: var(--text-light); text-align: center; }

/* ========== 全局搜索 ========== */
.search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    z-index: 3000; display: none; align-items: flex-start;
    justify-content: center; padding-top: 100px;
}
.search-overlay.active { display: flex; }
.search-modal {
    width: 90%; max-width: 600px; border-radius: 20px; padding: 8px;
    max-height: 70vh; overflow: hidden; display: flex; flex-direction: column;
    animation: searchIn 0.25s ease;
}
@keyframes searchIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.search-input-wrap {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
}
.search-input-wrap svg { width: 20px; height: 20px; color: var(--text-light); flex-shrink: 0; }
.search-input-wrap input {
    flex: 1; border: none; background: transparent; color: var(--text-primary);
    font-size: 16px; outline: none;
}
.search-hint { font-size: 11px; color: var(--text-light); padding: 4px 8px; border-radius: 6px; background: var(--glass-bg); }
.search-results { overflow-y: auto; flex: 1; padding: 8px; }
.search-result-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    border-radius: 10px; cursor: pointer; transition: all 0.2s;
}
.search-result-item:hover { background: rgba(74,158,255,0.12); }
.search-result-item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.search-result-item .info { flex: 1; }
.search-result-item .name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.search-result-item .desc { font-size: 11px; color: var(--text-light); }
.search-result-item .type-tag {
    font-size: 10px; padding: 2px 8px; border-radius: 8px;
    background: rgba(74,158,255,0.15); color: var(--primary-blue); font-weight: 600;
}
.search-empty { text-align: center; padding: 40px; color: var(--text-light); font-size: 14px; }

/* ========== 对比选择器 ========== */
.compare-picker-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px; max-height: 400px; overflow-y: auto;
}
.compare-picker-item {
    aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; cursor: pointer;
    border: 2px solid transparent; transition: all 0.2s; position: relative;
}
.compare-picker-item:hover { border-color: var(--primary-blue); transform: scale(1.05); }
.compare-picker-item img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.compare-picker-item .cp-name {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 16px 4px 4px; font-size: 10px; color: white; text-align: center;
}

@media (max-width: 768px) {
    .gacha-info { flex-direction: column; text-align: center; }
    .gacha-stats { justify-content: center; }
    .compare-slots { justify-content: center; }
    .compare-slot { width: 100px; height: 140px; }
    .search-overlay { padding-top: 60px; }
    .gacha-cards { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
}

/* ========== 用户按钮 ========== */
.user-btn { padding: 0; overflow: hidden; }
.user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    color: white; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

/* ========== 登录注册弹窗 ========== */
.auth-modal { max-width: 400px; padding: 28px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--glass-border); }
.auth-tab {
    flex: 1; padding: 12px; border: none; background: none; cursor: pointer;
    font-size: 15px; font-weight: 600; color: var(--text-light);
    border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.3s;
}
.auth-tab.active { color: var(--primary-blue); border-bottom-color: var(--primary-blue); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input {
    padding: 12px 16px; border-radius: 10px; border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.1); color: var(--text-primary); font-size: 14px; outline: none;
}
.auth-form input:focus { border-color: var(--primary-blue); }
.auth-submit { margin-top: 8px; padding: 12px; font-size: 15px; }
.auth-error { color: #ef4444; font-size: 13px; text-align: center; min-height: 18px; margin: 0; }

/* ========== 讨论站 ========== */
.forum-actions {
    display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.forum-hint { font-size: 13px; color: var(--text-light); }
.forum-list { display: flex; flex-direction: column; gap: 12px; }
.forum-loading { text-align: center; color: var(--text-light); padding: 40px; }
.forum-empty { text-align: center; padding: 60px 20px; color: var(--text-light); }
.post-card {
    padding: 20px; border-radius: 14px; background: var(--glass-bg);
    border: 1px solid var(--glass-border); cursor: pointer; transition: all 0.3s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(74,158,255,0.15); }
.post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.post-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    color: white; font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.post-meta { flex: 1; }
.post-author { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.post-time { font-size: 11px; color: var(--text-light); }
.post-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.post-content { font-size: 13px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-footer { display: flex; gap: 20px; font-size: 12px; color: var(--text-light); }
.post-footer span { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.post-footer span:hover { color: var(--primary-blue); }
.post-detail-content { white-space: pre-wrap; line-height: 1.8; font-size: 14px; color: var(--text-secondary); margin: 16px 0; }
.comment-section { margin-top: 20px; border-top: 1px solid var(--glass-border); padding-top: 16px; }
.comment-input-row { display: flex; gap: 8px; margin-bottom: 16px; }
.comment-input-row input {
    flex: 1; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.1); color: var(--text-primary); font-size: 13px; outline: none;
}
.comment-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--glass-border); }
.comment-item .post-avatar { width: 28px; height: 28px; font-size: 12px; }
.comment-body { flex: 1; }
.comment-author { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.comment-text { font-size: 13px; color: var(--text-secondary); margin: 2px 0; }
.comment-time { font-size: 10px; color: var(--text-light); }

/* ========== 个人中心 ========== */
.profile-container { max-width: 700px; margin: 0 auto; }
.profile-header {
    display: flex; align-items: center; gap: 20px; padding: 24px;
    border-radius: 16px; background: var(--glass-bg); border: 1px solid var(--glass-border);
    margin-bottom: 20px;
}
.profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    color: white; font-size: 28px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.profile-info h3 { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.profile-info p { font-size: 13px; color: var(--text-light); }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.profile-stat-card {
    padding: 20px; border-radius: 14px; text-align: center;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.profile-stat-card .num { font-size: 24px; font-weight: 800; color: var(--primary-blue); }
.profile-stat-card .label { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.profile-section {
    padding: 20px; border-radius: 14px; background: var(--glass-bg);
    border: 1px solid var(--glass-border); margin-bottom: 16px;
}
.profile-section h4 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.checkin-btn {
    padding: 10px 24px; border-radius: 10px; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    color: white; font-size: 14px; font-weight: 600; transition: all 0.3s;
}
.checkin-btn:hover { transform: scale(1.05); }
.checkin-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.logout-btn {
    padding: 10px 24px; border-radius: 10px; border: 1px solid #ef4444;
    background: transparent; color: #ef4444; font-size: 14px; cursor: pointer;
}

/* ========== 公告栏 ========== */
.announcement-bar {
    display: flex; align-items: center; gap: 10px; padding: 12px 20px;
    border-radius: 12px; margin-top: 16px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.announcement-icon { font-size: 16px; flex-shrink: 0; }
.announcement-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
