/* ============================================
   清染导航 - 全局样式表
   从 index.html 提取，支持多主题切换
   ============================================ */

/* -------- 基础重置 -------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* -------- CSS 主题变量 -------- */
:root {
    --bg-gradient-start: #ffe6f0;
    --bg-gradient-end: #ffb6c1;
    --hero-bg: rgba(255, 255, 255, 0.9);
    --text-primary: #ff69b4;
    --text-secondary: #c96f8e;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(255, 255, 255, 0.6);
    --btn-bg: #ffe4ed;
    --btn-hover: #ff69b4;
    --tag-bg: #ffe4ed;
    --shadow: rgba(255, 105, 180, 0.2);
    --border-light: #ffc0cb;
    --section-text: #ffffff;
}

body.theme-sky {
    --bg-gradient-start: #c8e6ff;
    --bg-gradient-end: #aad2fa;
    --hero-bg: rgba(255, 255, 255, 0.85);
    --text-primary: #1e6fdf;
    --text-secondary: #4a6a8b;
    --card-bg: rgba(235, 248, 255, 0.92);
    --card-border: rgba(100, 180, 250, 0.3);
    --btn-bg: #e0f0ff;
    --btn-hover: #3b82f6;
    --tag-bg: #d4e8ff;
    --shadow: rgba(59, 130, 246, 0.2);
    --border-light: #b8d9ff;
    --section-text: #1a4a7a;
}

body.theme-light {
    --bg-gradient-start: #f5f7fa;
    --bg-gradient-end: #eef2f5;
    --hero-bg: rgba(255, 255, 255, 0.96);
    --text-primary: #d45a8c;
    --text-secondary: #6c757d;
    --card-bg: #ffffff;
    --card-border: rgba(221, 221, 221, 0.6);
    --btn-bg: #fef2f5;
    --btn-hover: #e96ba9;
    --tag-bg: #ffeef4;
    --shadow: rgba(0, 0, 0, 0.05);
    --border-light: #e9ecef;
    --section-text: #6c757d;
}

body.theme-dark {
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #16213e;
    --hero-bg: rgba(30, 30, 46, 0.9);
    --text-primary: #ff79c6;
    --text-secondary: #b0b3c8;
    --card-bg: rgba(25, 25, 40, 0.92);
    --card-border: rgba(255, 255, 255, 0.15);
    --btn-bg: #2d2d44;
    --btn-hover: #ff79c6;
    --tag-bg: #2a2a40;
    --shadow: rgba(0, 0, 0, 0.3);
    --border-light: #2d2d44;
    --section-text: #cdd6f4;
}

body.theme-purple {
    --bg-gradient-start: #f3e6ff;
    --bg-gradient-end: #d9b8ff;
    --hero-bg: rgba(255, 255, 255, 0.92);
    --text-primary: #9b59b6;
    --text-secondary: #7d3c98;
    --card-bg: rgba(255, 245, 255, 0.95);
    --card-border: rgba(155, 89, 182, 0.2);
    --btn-bg: #f0e6ff;
    --btn-hover: #9b59b6;
    --tag-bg: #e8d5f5;
    --shadow: rgba(155, 89, 182, 0.2);
    --border-light: #c39bd3;
    --section-text: #6c3483;
}

/* -------- 新主题：赛博科幻（CSDN 暗黑风） -------- */
body.theme-cyber {
    --bg-gradient-start: #0a0a14;
    --bg-gradient-end: #0d1117;
    --hero-bg: rgba(13, 17, 30, 0.92);
    --text-primary: #00e5ff;
    --text-secondary: #a8b8d8;
    --card-bg: rgba(15, 20, 40, 0.92);
    --card-border: rgba(0, 229, 255, 0.18);
    --btn-bg: #1a1f35;
    --btn-hover: #00e5ff;
    --tag-bg: #141a2e;
    --shadow: rgba(0, 229, 255, 0.12);
    --border-light: #1e2a45;
    --section-text: #00e5ff;
}
body.theme-cyber::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 229, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(138, 43, 226, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(0, 229, 255, 0.04) 0%, transparent 50%);
    animation: cyberPulse 8s ease-in-out infinite;
}
@keyframes cyberPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* -------- 新主题：深邃海洋 -------- */
body.theme-ocean {
    --bg-gradient-start: #0a1628;
    --bg-gradient-end: #0d2137;
    --hero-bg: rgba(10, 25, 50, 0.9);
    --text-primary: #5ec4ff;
    --text-secondary: #a0c8e8;
    --card-bg: rgba(15, 35, 60, 0.92);
    --card-border: rgba(94, 196, 255, 0.18);
    --btn-bg: #152238;
    --btn-hover: #5ec4ff;
    --tag-bg: #12263b;
    --shadow: rgba(94, 196, 255, 0.1);
    --border-light: #1a3350;
    --section-text: #5ec4ff;
}
body.theme-ocean::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(30, 144, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 70%, rgba(0, 200, 200, 0.06) 0%, transparent 60%);
    animation: oceanDrift 10s ease-in-out infinite;
}
@keyframes oceanDrift {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(2%, -1%); }
    66% { transform: translate(-1%, 2%); }
}

/* -------- 新主题：日落渐变 -------- */
body.theme-sunset {
    --bg-gradient-start: #ff6b6b;
    --bg-gradient-end: #feca57;
    --hero-bg: rgba(255, 255, 255, 0.88);
    --text-primary: #c0392b;
    --text-secondary: #8b4513;
    --card-bg: rgba(255, 248, 240, 0.95);
    --card-border: rgba(255, 150, 100, 0.3);
    --btn-bg: #fff0e6;
    --btn-hover: #e74c3c;
    --tag-bg: #ffe8d6;
    --shadow: rgba(231, 76, 60, 0.15);
    --border-light: #f5c6a0;
    --section-text: #c0392b;
}

/* -------- 新主题：森林绿 -------- */
body.theme-forest {
    --bg-gradient-start: #d4edda;
    --bg-gradient-end: #a8d5ba;
    --hero-bg: rgba(255, 255, 255, 0.9);
    --text-primary: #2d6a4f;
    --text-secondary: #52796f;
    --card-bg: rgba(240, 255, 245, 0.95);
    --card-border: rgba(45, 106, 79, 0.2);
    --btn-bg: #d8f3dc;
    --btn-hover: #40916c;
    --tag-bg: #b7e4c7;
    --shadow: rgba(45, 106, 79, 0.15);
    --border-light: #b7e4c7;
    --section-text: #2d6a4f;
}

/* -------- 新主题：霓虹暗夜 -------- */
body.theme-neon {
    --bg-gradient-start: #1a0033;
    --bg-gradient-end: #0d001a;
    --hero-bg: rgba(20, 5, 35, 0.92);
    --text-primary: #ff00ff;
    --text-secondary: #bb86fc;
    --card-bg: rgba(25, 8, 45, 0.92);
    --card-border: rgba(255, 0, 255, 0.2);
    --btn-bg: #200840;
    --btn-hover: #ff00ff;
    --tag-bg: #1a0635;
    --shadow: rgba(255, 0, 255, 0.15);
    --border-light: #2d1050;
    --section-text: #ff00ff;
}
body.theme-neon::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 0, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 0% 80%, rgba(0, 255, 255, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 100% 50%, rgba(255, 0, 255, 0.06) 0%, transparent 40%);
    animation: neonGlow 6s ease-in-out infinite alternate;
}
@keyframes neonGlow {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* -------- 布局 -------- */
body {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    padding: 76px 20px 20px;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   顶部导航栏
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: var(--hero-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 2px 12px var(--shadow);
}

.nav-brand a {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    transition: 0.2s;
}

.nav-item:hover {
    background: var(--btn-bg);
    color: var(--btn-hover);
}

.nav-item-admin {
    background: linear-gradient(135deg, var(--text-primary), #ff99cc);
    color: #fff;
}

.nav-item-admin:hover {
    color: #fff;
    opacity: 0.85;
    background: linear-gradient(135deg, var(--text-primary), #ff99cc);
}

/* -------- 汉堡菜单按钮 -------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: 0.2s;
}

.hamburger:hover {
    background: var(--btn-bg);
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* 汉堡菜单激活态动画 */
.hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* -------- 遮罩层 -------- */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1098;
    transition: opacity 0.3s;
}

.nav-overlay.show {
    display: block;
}

/* -------- 右侧抽屉 -------- */
.nav-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    z-index: 1099;
    background: var(--hero-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: -4px 0 20px var(--shadow);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.nav-drawer.open {
    right: 0;
}

.nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.drawer-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--btn-bg);
    color: var(--text-primary);
    font-size: 1.3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.drawer-close:hover {
    background: var(--btn-hover);
    color: #fff;
}

.nav-drawer-links {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.nav-drawer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: 0.2s;
    border-left: 3px solid transparent;
}

.nav-drawer-item:hover {
    background: var(--btn-bg);
    border-left-color: var(--btn-hover);
}

.nav-drawer-item-admin {
    margin: 8px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--text-primary), #ff99cc);
    color: #fff;
    border-left: none;
    justify-content: center;
}

.nav-drawer-item-admin:hover {
    opacity: 0.85;
    border-left: none;
    color: #fff;
}

/* -------- Hero 头部 -------- */
.hero {
    background: var(--hero-bg);
    backdrop-filter: blur(10px);
    border-radius: 48px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 20px 40px var(--shadow);
    border: 1px solid var(--card-border);
}

.hero h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--text-primary), #ff99cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.hero p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* -------- 主题切换按钮 -------- */
.theme-switch-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.theme-btn {
    background: var(--btn-bg);
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 40px;
    color: var(--text-primary);
    font-weight: 500;
    transition: 0.2s;
}

.theme-btn:hover {
    opacity: 0.85;
}

.theme-btn.active {
    background: linear-gradient(135deg, var(--text-primary), #ff99cc);
    color: white;
    box-shadow: 0 2px 8px var(--shadow);
}

/* -------- 导航栏调色盘按钮 -------- */
.nav-palette-btn {
    background: var(--btn-bg);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    margin-left: 2px;
}
.nav-palette-btn:hover {
    background: var(--btn-hover);
    color: #fff;
    transform: rotate(30deg);
}

/* -------- 主题调色盘弹出面板 -------- */
.theme-palette-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.theme-palette-overlay.show {
    display: flex;
}
.theme-palette-panel {
    background: var(--hero-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 24px;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 20px 60px var(--shadow);
    border: 1px solid var(--card-border);
    max-height: 85vh;
    overflow-y: auto;
}
.theme-palette-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}
.theme-palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.theme-palette-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 16px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: 0.2s;
    background: var(--btn-bg);
}
.theme-palette-item:hover {
    border-color: var(--text-primary);
    transform: scale(1.05);
}
.theme-palette-item.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 12px var(--shadow);
}
.theme-palette-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--card-border);
}
.theme-palette-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.3;
}

/* -------- 搜索框 -------- */
.search-box {
    max-width: 500px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid var(--border-light);
    border-radius: 50px;
    font-size: 16px;
    background: white;
    color: var(--text-primary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.2);
}

/* -------- 快速链接 -------- */
.quick-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.quick-btn {
    background: var(--hero-bg);
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: 0.3s;
    box-shadow: 0 2px 8px var(--shadow);
    backdrop-filter: blur(5px);
}

.quick-btn:hover {
    transform: translateY(-2px);
    background: var(--btn-hover);
    color: white;
}

/* -------- 分类标题 -------- */
.section-title {
    font-size: 1.5rem;
    color: var(--section-text);
    margin: 30px 0 20px;
    padding-left: 15px;
    border-left: 4px solid #ff99cc;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* -------- 卡片网格 -------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(5px);
    border-radius: 28px;
    padding: 20px;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 8px 20px var(--shadow);
    border: 1px solid var(--card-border);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow);
    background: var(--hero-bg);
}

.card-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--text-primary), #ff99cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.card-tag {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.7rem;
    background: var(--tag-bg);
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--text-primary);
}

/* -------- 管理后台按钮 -------- */
.admin-entry {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    box-shadow: 0 4px 12px var(--shadow);
    transition: 0.3s;
}

.admin-entry:hover {
    background: var(--text-primary);
    color: white;
    transform: scale(1.1);
}

/* -------- 下载按钮 -------- */
.download-btn {
    background: linear-gradient(135deg, var(--text-primary), #ff99cc);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 12px;
    transition: 0.2s;
    display: inline-block;
    text-decoration: none;
}

.download-btn:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* -------- 评论区预览 -------- */
.preview-section {
    background: var(--card-bg);
    backdrop-filter: blur(5px);
    border-radius: 32px;
    padding: 25px;
    margin-top: 20px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.preview-header h3 {
    color: var(--text-primary);
}

.preview-header a {
    color: var(--text-primary);
    font-size: 0.9rem;
    text-decoration: none;
}

.preview-header a:hover {
    text-decoration: underline;
}

.comment-preview {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: linear-gradient(135deg, var(--text-primary), #ff99cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.comment-body {
    flex: 1;
}

.comment-name {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.comment-time {
    font-size: 0.7rem;
    color: #d9a7b9;
}

/* -------- 全局课表细节项（暗色主题覆盖白底） -------- */
.detail-item {
    color: var(--text-secondary);
}
body.theme-dark .detail-item,
body.theme-cyber .detail-item,
body.theme-ocean .detail-item,
body.theme-neon .detail-item {
    background: rgba(255,255,255,0.08);
}

/* -------- 页脚 -------- */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--text-secondary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

footer p {
    margin-bottom: 4px;
}

.beian-info {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.beian-info a {
    color: var(--text-secondary);
    text-decoration: none;
    opacity: 0.85;
    transition: 0.2s;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.beian-info a:hover {
    opacity: 1;
    text-decoration: underline;
}

.beian-info img {
    height: 14px;
    width: auto;
    vertical-align: middle;
}

/* -------- 空状态 -------- */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

/* ============================================
   天气日历小组件
   ============================================ */
.weather-calendar-widget {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    min-height: 180px;
}

/* 天气面板 */
.wc-weather {
    flex: 1;
    background: var(--hero-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 32px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 12px 30px var(--shadow);
    border: 1px solid var(--card-border);
    transition: transform 0.3s, box-shadow 0.3s;
}
.wc-weather:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px var(--shadow);
}

.wc-weather-icon {
    font-size: 3.5rem;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px var(--shadow));
}

.wc-weather-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wc-temp {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}
.wc-desc {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 4px;
}

.wc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.wc-meta span {
    white-space: nowrap;
}

/* 日历面板 */
.wc-calendar {
    flex: 1;
    background: var(--hero-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 32px;
    padding: 18px 22px 16px;
    box-shadow: 0 12px 30px var(--shadow);
    border: 1px solid var(--card-border);
    transition: transform 0.3s, box-shadow 0.3s;
}
.wc-calendar:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px var(--shadow);
}

.wc-cal-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-align: center;
}

.wc-cal-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.wc-cal-table th {
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 4px 0;
    font-weight: 600;
}
.wc-cal-table td {
    text-align: center;
    padding: 3px 2px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    border-radius: 6px;
    vertical-align: middle;
    line-height: 1.3;
}
.wc-empty {
    /* 空白格 */
}
.wc-day {
    transition: 0.15s;
    cursor: default;
}
.wc-day:hover {
    background: var(--btn-bg);
}
.wc-day-num {
    display: block;
}
.wc-holiday-text {
    display: block;
    font-size: 0.55rem;
    color: #e74c3c;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wc-today {
    background: linear-gradient(135deg, var(--text-primary), #ff99cc) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px var(--shadow);
    border-radius: 8px;
}
.wc-today .wc-holiday-text {
    color: #fff;
}

/* ============================================
   访客计数器
   ============================================ */
.visitor-counter {
    text-align: center;
    padding: 14px 20px;
    margin-bottom: 30px;
    background: var(--hero-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 32px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    box-shadow: 0 12px 30px var(--shadow);
    border: 1px solid var(--card-border);
}
.visitor-counter strong {
    color: var(--text-primary);
    font-size: 1.2rem;
}

/* ============================================
   鼠标点击粒子特效
   ============================================ */
.mouse-particle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 1rem;
    animation: particleBurst 0.5s ease-out forwards;
}
@keyframes particleBurst {
    0%   { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--px), var(--py)) scale(0.2); }
}

/* 鼠标拖尾 */
.mouse-trail {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-primary);
    opacity: 0.5;
    animation: trailFade 0.8s ease-out forwards;
}
@keyframes trailFade {
    0%   { opacity: 0.6; transform: scale(1); }
    100% { opacity: 0; transform: scale(0); }
}

/* ============================================
   背景特效层
   ============================================ */
/* 粒子网络背景 */
.particle-network-animation {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -2;
    pointer-events: none;
    background: transparent;
}
.particle-network-animation canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* 光标丝带 canvas — 默认背景层 */
#cursorRibbon {
    position: fixed;
    top: 0; left: 0;
    z-index: -1;
    pointer-events: none;
}
#cursorRibbon.ribbon-top {
    z-index: 9999;
}

/* 丝带开关按钮（温网风格滑球） — 桌面端在导航栏，手机端在抽屉 */
.ribbon-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    font-family: system-ui, sans-serif;
    padding: 4px 10px 4px 4px;
    border-radius: 28px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    transition: background 0.25s, border-color 0.25s;
    vertical-align: middle;
}
.ribbon-toggle:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.2);
}
.ribbon-toggle .rb-track {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: #3a3a4e;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}
.ribbon-toggle.on .rb-track {
    background: #3d6b4a;
}
.ribbon-toggle .rb-ball {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #f8f8c0, #c8d840 55%, #8aaa30);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    box-shadow: 0 2px 6px rgba(0,0,0,0.35), inset 0 -1px 2px rgba(0,0,0,0.15);
}
.ribbon-toggle.on .rb-ball {
    transform: translateX(20px);
}
.ribbon-toggle .rb-label {
    font-size: 0.7rem;
    color: #c0c0d0;
    white-space: nowrap;
    font-weight: 500;
}
.ribbon-toggle .rb-ripple {
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(200,216,64,0.35);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: none;
}
.ribbon-toggle .rb-ripple.pulse {
    animation: rbRipple 0.6s ease-out forwards;
}

/* 抽屉菜单内的开关 — 撑满整行 */
.nav-drawer-links .ribbon-toggle {
    display: flex;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 4px 0;
    background: rgba(255,255,255,0.06);
    border: none;
    color: #ccc;
    font-size: 0.9rem;
    gap: 12px;
}
.nav-drawer-links .ribbon-toggle:hover {
    background: rgba(255,255,255,0.12);
}
.nav-drawer-links .ribbon-toggle .rb-label {
    font-size: 0.88rem;
    color: #ddd;
}
.nav-drawer-links .ribbon-toggle .rb-track {
    width: 48px;
    height: 26px;
    border-radius: 13px;
}
.nav-drawer-links .ribbon-toggle .rb-ball {
    width: 22px;
    height: 22px;
}
.nav-drawer-links .ribbon-toggle.on .rb-ball {
    transform: translateX(22px);
}

@keyframes rbRipple {
    0%   { width: 0; height: 0; opacity: 0.7; }
    100% { width: 120px; height: 120px; opacity: 0; }
}

/* ============================================
   鼠标跟随小圆圈（包裹光标，悬停可交互元素时扩大）
   ============================================ */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99999;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--text-primary);
    background: transparent;
    transform: translate(-50%, -50%);
    transition: width 0.25s cubic-bezier(0.25, 0.8, 0.25, 1.2),
                height 0.25s cubic-bezier(0.25, 0.8, 0.25, 1.2),
                border-color 0.25s ease,
                background 0.25s ease,
                border-width 0.25s ease;
    will-change: transform, width, height;
    opacity: 0;
}
.cursor-dot.visible {
    opacity: 1;
}
.cursor-dot.hover {
    width: 44px;
    height: 44px;
    border-width: 1.5px;
    background: color-mix(in srgb, var(--text-primary) 10%, transparent);
    border-color: color-mix(in srgb, var(--text-primary) 70%, transparent);
}

/* -------- 响应式 -------- */
@media (max-width: 768px) {
    /* 手机端 body 调整 */
    body {
        padding-top: 66px;
    }

    /* 导航栏：显示汉堡，隐藏桌面链接 */
    .navbar {
        padding: 0 16px;
        height: 50px;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Hero */
    .hero {
        border-radius: 32px;
        padding: 20px 15px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    /* 卡片网格 */
    .card-grid {
        grid-template-columns: 1fr;
    }

    /* 主题按钮 */
    .theme-btn {
        font-size: 0.78rem;
        padding: 5px 12px;
    }

    /* 管理后台入口按钮移到左侧，避免被抽屉盖住 */
    .admin-entry {
        right: auto;
        left: 16px;
        bottom: 16px;
    }
    /* 调色盘面板手机端适配 */
    .theme-palette-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 天气日历 - 手机端纵向堆叠 */
    .weather-calendar-widget {
        flex-direction: column;
        gap: 12px;
    }
    .wc-weather {
        padding: 16px 20px;
        border-radius: 24px;
    }
    .wc-weather-icon {
        font-size: 2.8rem;
    }
    .wc-temp {
        font-size: 1.5rem;
    }
    .wc-calendar {
        padding: 14px 16px 12px;
        border-radius: 24px;
    }
    .wc-cal-table td {
        font-size: 0.72rem;
    }
    .wc-holiday-text {
        font-size: 0.5rem;
    }
}
