/* ===== 陪读一本书 - 设计系统（黑蓝绿·水木相生） ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* 主色：翡翠温青（温润·护眼·教育） */
  --primary: #05C79E; --primary-dark: #049B7B; --primary-light: #4CE2C4;
  /* 辅色：雾海蓝（低刺激·宁静·深度） */
  --accent: #4A8CF6; --accent-light: #70A4FA;
  /* 点缀：琥珀金（暖色锚点） */
  --gold: #F59E0B; --gold-light: #FCD34D;
  /* 背景：石墨暗灰板岩色（大降蓝光，极其护眼） */
  --bg-deep: #0A0F14; --bg-card: #121820; --bg-surface: #1E242E;
  --bg-glass: rgba(18,24,32,0.85); --bg-hover: rgba(5,199,158,0.06);
  /* 文字：哑光珍珠柔白（防止眩光与高对比度眼酸） */
  --text: #E2E8F0; --text-secondary: #94A3B8; --text-muted: #475569;
  /* 边框：翡翠微光 */
  --border: rgba(5,199,158,0.08); --border-active: rgba(5,199,158,0.25);
  /* 基础 */
  --radius: 12px; --radius-lg: 20px; --radius-full: 9999px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --font-serif: 'Noto Serif SC', serif; --font-sans: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans); background: var(--bg-deep); color: var(--text);
  line-height: 1.6; min-height: 100vh; overflow-x: hidden;
}

/* 背景：极其柔和温润的绿灰暗渐变光晕，大幅度护眼 */
body::before {
  content:''; position:fixed; inset:0; z-index:-1;
  background: radial-gradient(ellipse at 15% 0%, rgba(5,199,158,0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 85% 20%, rgba(5,199,158,0.03) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 100%, rgba(74,140,246,0.02) 0%, transparent 60%);
}

/* ===== 排版 ===== */
h1,h2,h3,h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.3; text-wrap: balance; }
h1 { font-size: clamp(2rem,5vw,3.2rem); }
h2 { font-size: clamp(1.5rem,3vw,2.2rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-secondary); text-wrap: pretty; overflow-wrap: break-word; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px;
  border-radius: var(--radius-full); font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none; position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #0A0F1A; box-shadow: 0 4px 20px rgba(0,212,170,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(0,212,170,0.4); }
.btn-secondary {
  background: transparent; color: var(--primary); border: 1.5px solid var(--border-active);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--primary); }
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff; box-shadow: 0 4px 20px rgba(59,130,246,0.3);
}
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ===== 导航 ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 40px; display: flex; align-items: center; justify-content: space-between;
  background: rgba(8,14,26,0.88); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); transition: var(--transition);
}
.navbar.scrolled { padding: 10px 40px; background: rgba(8,14,26,0.96); }
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand .logo { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; color: var(--text); }
.nav-brand .logo span { color: var(--primary); }
.nav-links { display: flex; gap: 2px; list-style: none; }
.nav-links a {
  padding: 7px 12px; border-radius: var(--radius-full); color: var(--text-secondary);
  font-size: 0.82rem; font-weight: 500; transition: var(--transition); white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-hover); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ===== 页面容器 ===== */
.page { display: none; min-height: 100vh; padding-top: 80px; }
.page.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header p { margin-top: 12px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; transition: var(--transition); position: relative; overflow: hidden;
}
.card:hover { border-color: var(--border-active); transform: translateY(-4px); box-shadow: var(--shadow); }
.card-glass {
  background: var(--bg-glass); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px;
}

/* ===== 网格 ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }

/* ===== Hero 首页 ===== */
.hero {
  min-height: 92vh; display: flex; align-items: center; position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(0,212,170,0.1) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(59,130,246,0.08) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 1; max-width: 640px; }
.hero-content h1 { margin-bottom: 20px; }
.hero-content h1 .highlight { color: var(--primary); }
.hero-content p { font-size: 1.15rem; margin-bottom: 32px; line-height: 1.8; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual {
  position: absolute; right: -5%; top: 50%; transform: translateY(-50%);
  width: 45%; aspect-ratio: 1; opacity: 0.15;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  border-radius: 50%; filter: blur(80px);
}

/* ===== Hero 轮播 ===== */
.hero-carousel { position: relative; z-index: 1; width: 100%; min-height: 92vh; }
.hero-slide { display: none; min-height: 92vh; align-items: center; }
.hero-slide.active { display: flex; animation: heroFadeIn 0.7s ease; }
@keyframes heroFadeIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.hero-controls {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: 16px;
}
.hero-arrow {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--border-active);
  background: var(--bg-glass); backdrop-filter: blur(10px); color: var(--text);
  font-size: 1.4rem; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.hero-arrow:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.hero-dots { display: flex; gap: 8px; }
.hero-dot {
  width: 10px; height: 10px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--text-muted); opacity: 0.4; transition: var(--transition);
}
.hero-dot.active { opacity: 1; background: var(--primary); width: 28px; border-radius: var(--radius-full); }

/* ===== 统计条 ===== */
.stats-bar {
  display: flex; justify-content: center; gap: 60px; padding: 40px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 700; font-family: var(--font-serif); color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* ===== 特性卡片 ===== */
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 1.5rem; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(0,212,170,0.15), rgba(0,212,170,0.03));
}
.feature-icon.green { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(59,130,246,0.05)); }
.feature-icon.gold { background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(245,158,11,0.05)); }

/* ===== 导师卡片 ===== */
.tutor-card { text-align: center; }
.tutor-avatar {
  width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff; font-weight: 700;
  border: 3px solid var(--border);
}
.tutor-name { font-weight: 600; margin-bottom: 4px; }
.tutor-title { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.tutor-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tag {
  padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.75rem;
  background: rgba(0,212,170,0.06); color: var(--primary); border: 1px solid rgba(0,212,170,0.15);
}
.tag.green { color: var(--accent); background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.2); }
.tutor-stats { display: flex; gap: 20px; justify-content: center; margin-top: 16px; font-size: 0.85rem; color: var(--text-secondary); }

/* ===== 广场需求卡 ===== */
.request-card { display: flex; gap: 20px; align-items: flex-start; }
.request-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-surface); display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.request-body { flex: 1; }
.request-meta { display: flex; gap: 16px; margin-top: 12px; font-size: 0.8rem; color: var(--text-muted); }
.request-book {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  background: var(--bg-surface); border-radius: var(--radius); font-size: 0.85rem;
  margin-top: 10px; color: var(--text-secondary);
}
.request-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ===== 排课日历 ===== */
.calendar-grid {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 4px;
}
.calendar-header { padding: 10px; text-align: center; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.calendar-day {
  aspect-ratio: 1; padding: 8px; border-radius: var(--radius);
  background: var(--bg-surface); font-size: 0.85rem; cursor: pointer;
  transition: var(--transition); position: relative;
}
.calendar-day:hover { background: var(--bg-hover); }
.calendar-day.has-class::after {
  content:''; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.calendar-day.today { border: 1.5px solid var(--primary); }

/* ===== 课堂/直播 ===== */
.live-room {
  background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border);
}
.live-video {
  aspect-ratio: 16/9; background: #0D0B09; display: flex; align-items: center;
  justify-content: center; color: var(--text-muted); font-size: 1.2rem; position: relative;
}
.live-controls {
  display: flex; justify-content: center; gap: 16px; padding: 16px;
  background: var(--bg-surface); border-top: 1px solid var(--border);
}
.live-btn {
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--bg-card); color: var(--text); font-size: 1.2rem;
  cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center;
}
.live-btn:hover { background: var(--bg-hover); }
.live-btn.danger { background: #C0392B; color: #fff; }

/* ===== 进度条 ===== */
.progress-bar {
  height: 8px; background: var(--bg-surface); border-radius: var(--radius-full); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: var(--radius-full); transition: width 0.6s ease;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}

/* ===== 等级徽章 ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600;
}
.badge-free { background: rgba(0,212,170,0.1); color: var(--primary); }
.badge-pro { background: rgba(212,168,83,0.15); color: var(--gold); }
.badge-vip { background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(0,212,170,0.15)); color: var(--gold-light); }

/* ===== 定价卡片 ===== */
.pricing-card { text-align: center; padding: 36px 28px; }
.pricing-card.featured {
  border-color: var(--primary); position: relative;
  background: linear-gradient(180deg, rgba(0,212,170,0.06), var(--bg-card));
}
.pricing-card.featured::before {
  content:'推荐'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  padding: 4px 16px; background: var(--primary); color: #fff; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
}
.price { font-size: 2.5rem; font-weight: 700; font-family: var(--font-serif); color: var(--text); }
.price span { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.pricing-features { list-style: none; margin: 24px 0; text-align: left; }
.pricing-features li {
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem;
  color: var(--text-secondary); display: flex; align-items: center; gap: 8px;
}
.pricing-features li::before { content:'✓'; color: var(--accent); font-weight: 700; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.form-input {
  width: 100%; padding: 12px 16px; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 0.95rem; transition: var(--transition);
  font-family: var(--font-sans);
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,212,170,0.1); }
textarea.form-input { min-height: 100px; resize: vertical; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:scale(1); } }
.modal-close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  color: var(--text-muted); font-size: 1.3rem; cursor: pointer;
}
.modal h2 { margin-bottom: 24px; }

/* ===== 标签页 ===== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 12px 20px; background: none; border: none; color: var(--text-muted);
  font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: var(--transition);
  border-bottom: 2px solid transparent; font-family: var(--font-sans);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

/* ===== 侧边栏布局 ===== */
.layout-sidebar { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.sidebar {
  position: sticky; top: 96px; height: fit-content;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: var(--radius); color: var(--text-secondary); font-size: 0.9rem;
  transition: var(--transition);
}
.sidebar-nav li a:hover { background: var(--bg-hover); color: var(--text); }
.sidebar-nav li a.active { background: rgba(0,212,170,0.1); color: var(--primary); }

/* ===== Toast 通知 ===== */
.toast-container { position: fixed; top: 90px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 14px 20px; border-radius: var(--radius); min-width: 280px;
  background: var(--bg-card); border: 1px solid var(--border); box-shadow: var(--shadow);
  animation: slideIn 0.3s ease; font-size: 0.9rem;
}
.toast.success { border-left: 3px solid var(--accent); }
.toast.info { border-left: 3px solid var(--primary); }
@keyframes slideIn { from { opacity:0; transform:translateX(30px); } to { opacity:1; transform:translateX(0); } }

/* ===== 页脚 ===== */
.footer {
  padding: 60px 0 30px; border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.3));
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; }
.footer-brand .logo span { color: var(--primary); }
.footer-col h4 { font-size: 0.9rem; margin-bottom: 16px; color: var(--text); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.85rem; color: var(--text-muted); }
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--text-muted); }

/* ===== 阅读路径 ===== */
.reading-path { display: flex; gap: 0; align-items: flex-start; overflow-x: auto; padding: 20px 0; }
.path-step {
  flex-shrink: 0; width: 180px; text-align: center; position: relative; padding: 0 10px;
}
.path-step::after {
  content:'→'; position: absolute; right: -12px; top: 24px;
  color: var(--text-muted); font-size: 1.2rem;
}
.path-step:last-child::after { display: none; }
.path-dot {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  background: var(--bg-surface); border: 2px solid var(--border);
}
.path-step.completed .path-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.path-step.current .path-dot { border-color: var(--primary); background: rgba(0,212,170,0.15); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  /* 手机端文字对比度增强——解决深色字体看不清问题 */
  :root {
    --text-secondary: #A8B8C8;
    --text-muted: #6B8394;
  }

  .navbar { padding: 10px 16px; }
  .nav-brand .logo { font-size: 1.1rem; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--bg-deep); border-bottom: 1px solid var(--border); padding: 12px; gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; font-size: 0.9rem; border-radius: 0; }
  .nav-toggle { display: block; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn { font-size: 0.7rem !important; padding: 6px 10px; }
  .nav-actions a.btn { display: none; }

  /* 网格保持双列——每屏展示更多信息块 */
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Hero */
  .hero { min-height: auto; }
  .hero-carousel, .hero-slide { min-height: 70vh; }
  .hero-slide { text-align: center; }
  .hero-content { max-width: 100%; }
  .hero-content h1 { font-size: 1.5rem; line-height: 1.5; }
  .hero-content p { font-size: 0.88rem; margin-bottom: 20px; line-height: 1.7; }
  .hero-actions { justify-content: center; flex-direction: column; align-items: center; gap: 10px; }
  .hero-actions .btn { width: 100%; max-width: 260px; }
  .hero-visual { display: none; }
  .hero-controls { bottom: 16px; }
  .hero-arrow { width: 32px; height: 32px; font-size: 1rem; }
  .hero-dot { width: 8px; height: 8px; }
  .hero-dot.active { width: 20px; }

  /* 紧凑间距——增加每屏信息量 */
  .section { padding: 32px 0; }
  .section-header { margin-bottom: 18px; }
  .section-header h2 { font-size: 1.2rem; }
  .section-header p { font-size: 0.82rem; margin-top: 6px; }
  .container { padding: 0 14px; }
  .card { padding: 14px; border-radius: var(--radius); }
  .card h3 { font-size: 0.92rem; }
  .card p { font-size: 0.8rem; line-height: 1.6; }
  .btn-lg { padding: 12px 24px; font-size: 0.9rem; }
  .btn-sm { padding: 6px 12px; font-size: 0.78rem; }

  /* 统计条2×2网格 */
  .stats-bar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 18px 0; }
  .stat-item { padding: 6px 0; }
  .stat-num { font-size: 1.3rem; }
  .stat-label { font-size: 0.72rem; }

  /* 阅读路径紧凑 */
  .reading-path { flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; }
  .path-step { width: auto; }
  .path-step::after { content: '↓'; position: static; margin: 2px 0; font-size: 0.8rem; }

  /* 导师卡片紧凑 */
  .tutor-avatar { width: 48px; height: 48px; font-size: 1.1rem; margin-bottom: 6px; }
  .tutor-name { font-size: 0.84rem; }
  .tutor-title { font-size: 0.72rem; margin-bottom: 4px; }
  .tutor-stats { font-size: 0.72rem; gap: 8px; margin-top: 6px; }
  .tag { padding: 2px 7px; font-size: 0.62rem; }

  /* 弹窗 */
  .modal { padding: 20px 16px; max-width: 100%; border-radius: var(--radius); }
  .modal-overlay { padding: 10px; }

  /* Tab */
  .tabs { gap: 0; overflow-x: auto; margin-bottom: 14px; }
  .tab-btn { padding: 8px 12px; font-size: 0.8rem; white-space: nowrap; }

  /* 页脚紧凑双列 */
  .footer { padding: 28px 0 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
  .footer-brand { grid-column: 1 / -1; text-align: center; }
  .footer-col h4 { font-size: 0.82rem; margin-bottom: 8px; }
  .footer-col ul li { margin-bottom: 4px; }
  .footer-col ul li a { font-size: 0.78rem; }
  .footer-bottom { font-size: 0.72rem; padding-top: 14px; }
  .pricing-card.featured { order: -1; }

  /* 社区 */
  #checkinInput { max-width: 100% !important; }

  /* 请求卡片紧凑 */
  .request-card { flex-direction: column; gap: 10px; }
  .request-avatar { align-self: flex-start; width: 40px; height: 40px; font-size: 1rem; }
  .request-actions { flex-wrap: wrap; }
  .request-meta { gap: 8px; font-size: 0.72rem; }

  /* 防止孤字转行 */
  h1, h2, h3, h4 { word-break: keep-all; }
  p, li { overflow-wrap: break-word; }
}

@media (max-width: 480px) {
  .hero-carousel, .hero-slide { min-height: 65vh; }
  .hero-content h1 { font-size: 1.3rem; }
  /* 极小屏：grid-3回单列，grid-4保持双列（书卡适合紧凑展示） */
  .grid-3 { grid-template-columns: 1fr; gap: 10px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stats-bar { gap: 8px; padding: 14px 0; }
  .stat-num { font-size: 1.1rem; }
  .stat-label { font-size: 0.68rem; }
  .card { padding: 12px; border-radius: 10px; }
  .card h3 { font-size: 0.85rem; }
  .card p { font-size: 0.75rem; }
  .tutor-avatar { width: 40px; height: 40px; font-size: 0.95rem; }
  .btn { padding: 9px 16px; font-size: 0.82rem; }
  .section { padding: 24px 0; }
  .section-header { margin-bottom: 12px; }
  .section-header h2 { font-size: 1.05rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { text-align: left; }
}

/* ===== 导航图标按钮 ===== */
.nav-icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--border); background: transparent;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.nav-icon-btn:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-active); }
.nav-icon-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.notif-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  background: #E74C3C; color: #fff; font-size: 0.65rem; font-weight: 700;
  border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid var(--bg-deep); animation: notifPulse 2s infinite;
}
.notif-badge.hidden { display: none; }
@keyframes notifPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* ===== 全站搜索面板 ===== */
.search-panel {
  position: fixed; inset: 0; z-index: 250; background: rgba(0,0,0,0.65);
  backdrop-filter: blur(12px); display: none; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
}
.search-panel.active { display: flex; animation: fadeIn 0.25s ease; }
.search-panel-inner {
  width: 100%; max-width: 640px; margin: 0 24px;
}
.search-input-wrap {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1.5px solid var(--border-active);
  border-radius: var(--radius-lg); padding: 16px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); animation: searchSlideIn 0.3s ease;
}
@keyframes searchSlideIn { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }
.search-input {
  flex: 1; background: none; border: none; color: var(--text); font-size: 1.1rem;
  font-family: var(--font-sans); outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-kbd {
  padding: 3px 8px; border-radius: 6px; font-size: 0.7rem; font-family: var(--font-sans);
  background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-muted);
}
.search-results {
  margin-top: 12px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); max-height: 55vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.search-empty { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.search-empty p { margin-bottom: 16px; font-size: 0.9rem; }
.search-hints { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.search-hint {
  padding: 6px 14px; border-radius: var(--radius-full); font-size: 0.8rem;
  background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-secondary);
  cursor: pointer; transition: var(--transition);
}
.search-hint:hover { background: var(--bg-hover); color: var(--primary); border-color: var(--border-active); }
.search-result-group { padding: 12px 0; }
.search-result-group:not(:last-child) { border-bottom: 1px solid var(--border); }
.search-group-title {
  padding: 0 20px 8px; font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.search-result-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 20px;
  cursor: pointer; transition: var(--transition);
}
.search-result-item:hover { background: var(--bg-hover); }
.search-result-icon { font-size: 1.5rem; flex-shrink: 0; }
.search-result-info { flex: 1; min-width: 0; }
.search-result-title { font-size: 0.9rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.search-no-result { text-align: center; padding: 40px 24px; color: var(--text-muted); font-size: 0.9rem; }

/* ===== 通知中心面板 ===== */
.notif-panel {
  position: fixed; top: 72px; right: 24px; z-index: 210;
  width: 380px; max-height: 520px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); display: none;
  flex-direction: column; overflow: hidden;
}
.notif-panel.active { display: flex; animation: notifSlideIn 0.3s ease; }
@keyframes notifSlideIn { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.notif-header h3 { font-size: 1rem; font-family: var(--font-serif); }
.notif-list { flex: 1; overflow-y: auto; max-height: 380px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition);
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: rgba(0,212,170,0.04); }
.notif-item.unread::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0; margin-top: 6px;
}
.notif-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.notif-content { flex: 1; min-width: 0; }
.notif-text { font-size: 0.85rem; color: var(--text); line-height: 1.5; }
.notif-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.notif-footer {
  text-align: center; padding: 14px 20px; border-top: 1px solid var(--border);
}

/* ===== 额外微动画和视觉增强 ===== */
/* 卡片悬停发光效果 */
.card::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit;
  background: linear-gradient(135deg, rgba(0,212,170,0.08), transparent, rgba(59,130,246,0.06));
  opacity: 0; transition: opacity 0.4s ease; z-index: -1;
}
.card:hover::before { opacity: 1; }

/* 按钮点击涟漪效果 */
.btn::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.4s;
}
.btn:active::after { opacity: 1; transition: opacity 0s; }

/* 页面切换动画增强 */
.page.active { animation: pageIn 0.5s cubic-bezier(0.22,1,0.36,1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* 导航栏呼吸灯品牌名 */
.nav-brand .logo span {
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-active); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== 导航栏活跃状态下划线动画 ===== */
.nav-links a {
  position: relative; padding-bottom: 4px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 50%; width: 0;
  height: 2px; background: var(--primary); border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  transform: translateX(-50%);
}
.nav-links a.active::after { width: 70%; }
.nav-links a:hover::after { width: 50%; }

/* ===== 会员等级徽章 ===== */
.member-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: var(--radius-full);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.02em;
  animation: badgeGlow 3s ease-in-out infinite;
}
.member-badge.tier-free { background: rgba(71,85,105,0.3); color: var(--text-muted); animation: none; }
.member-badge.tier-pro { background: rgba(0,212,170,0.12); color: var(--primary); border: 1px solid rgba(0,212,170,0.25); }
.member-badge.tier-vip { background: rgba(245,158,11,0.15); color: var(--gold); border: 1px solid rgba(245,158,11,0.3); }
@keyframes badgeGlow {
  0%,100% { box-shadow: 0 0 0 rgba(0,212,170,0); }
  50% { box-shadow: 0 0 12px rgba(0,212,170,0.15); }
}

/* ===== 表单深色主题适配 ===== */
.form-select, select.form-input {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px !important;
}
input[type="date"].form-input {
  color-scheme: dark;
  position: relative;
}
input[type="date"].form-input::-webkit-calendar-picker-indicator {
  filter: invert(0.7); cursor: pointer; padding: 4px; border-radius: 4px;
}
input[type="date"].form-input::-webkit-calendar-picker-indicator:hover {
  filter: invert(0.85); background: rgba(0,212,170,0.1);
}
/* textarea 高度适配 */
textarea.form-input {
  resize: vertical; min-height: 60px;
  font-family: var(--font-sans);
}

/* ===== 浮动课表按钮 ===== */
.fab-schedule {
  position: fixed; bottom: 28px; right: 28px; z-index: 900;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #080E1A; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; box-shadow: 0 6px 24px rgba(0,212,170,0.3);
  transition: all 0.3s ease; opacity: 0; pointer-events: none;
  transform: scale(0.8) translateY(20px);
}
.fab-schedule.visible {
  opacity: 1; pointer-events: auto;
  transform: scale(1) translateY(0);
}
.fab-schedule:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,212,170,0.45);
}
.fab-schedule .fab-count {
  position: absolute; top: -4px; right: -4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #E74C3C; color: #fff; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; border: 2px solid var(--bg-deep);
}

/* ===== Toast 入场动画增强 ===== */
.toast {
  animation: toastIn 0.4s cubic-bezier(0.34,1.56,0.64,1) !important;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

/* ===== 弹窗表单交互增强 ===== */
.form-group label {
  font-size: 0.88rem; font-weight: 600; margin-bottom: 6px;
  display: block; color: var(--text);
}
.form-input:focus, .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,212,170,0.12);
  outline: none;
}

/* 评分标签切换效果 */
.review-tag { transition: all 0.2s ease !important; }
.review-tag.btn-primary {
  background: var(--primary) !important; color: #080E1A !important;
  transform: scale(1.05); box-shadow: 0 2px 8px rgba(0,212,170,0.3);
}

/* ===== 移动端优化 ===== */
@media (max-width: 768px) {
  .nav-icon-btn { width: 34px; height: 34px; }
  .search-panel { padding-top: 8vh; }
  .search-panel-inner { margin: 0 12px; }
  .search-input-wrap { padding: 12px 16px; }
  .search-input { font-size: 1rem; }
  .notif-panel { right: 12px; left: 12px; width: auto; max-height: 70vh; top: 64px; }

  /* 手机菜单展开时显示外部导航链接 */
  .nav-links.open .nav-external-links { display: block !important; }

  /* 弹窗移动端全屏模式 */
  .modal .modal-inner {
    max-width: 100vw; max-height: 90vh; width: 100%;
    margin: 5vh 8px; border-radius: var(--radius);
  }
  .modal .modal-inner > div { padding: 16px !important; }

  /* 浮动按钮移动端位置 */
  .fab-schedule { bottom: 16px; right: 16px; width: 50px; height: 50px; font-size: 1.2rem; }

  /* 表单两列改单列 */
  .form-group div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   全新 Premium 数字图书馆书架 (Digital Library) 样式系统
   ========================================================================== */

/* 容器布局 */
.library-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 32px;
  align-items: flex-start;
  margin-top: 24px;
}

/* 左侧分类侧边栏 */
.library-sidebar {
  position: sticky;
  top: 96px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow);
  z-index: 10;
}

/* 分类项目 */
.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.category-item:hover {
  background: var(--bg-hover);
  color: var(--primary);
  transform: translateX(4px);
}

.category-item.active {
  background: rgba(5, 199, 158, 0.08);
  color: var(--primary);
  border-color: rgba(5, 199, 158, 0.2);
  font-weight: 600;
}

.category-item .cat-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-item .cat-icon {
  font-size: 1.1rem;
}

/* 数量气泡 */
.category-item .count-badge {
  font-size: 0.72rem;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: var(--transition);
}

.category-item:hover .count-badge,
.category-item.active .count-badge {
  background: var(--primary);
  color: #0A0F1A;
}

/* 右侧主体 */
.library-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 控制栏：搜索与上传 */
.library-control-panel {
  display: flex;
  gap: 16px;
  align-items: center;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 16px;
  font-size: 1.05rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrapper .form-input {
  padding-left: 44px;
  padding-right: 40px;
  height: 48px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.search-input-wrapper .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 199, 158, 0.15);
}

/* 清除搜索按钮 */
.clear-search-btn {
  position: absolute;
  right: 14px;
  background: rgba(148, 163, 184, 0.15);
  border: none;
  color: var(--text-secondary);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  transition: var(--transition);
}

.clear-search-btn:hover {
  background: rgba(231, 76, 60, 0.2);
  color: #E74C3C;
}

.upload-resource-btn {
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-lg) !important;
  white-space: nowrap;
}

/* 筛选项和统计数据 */
.library-meta-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.current-filter-tag {
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.current-filter-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.total-books-count {
  color: var(--text-secondary);
}

/* 优雅书籍卡片重构 */
.library-book-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.library-book-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(5, 199, 158, 0.05), transparent 60%);
  opacity: 0;
  transition: var(--transition);
  z-index: 0;
}

.library-book-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 36px rgba(0, 212, 170, 0.12);
}

.library-book-card:hover::before {
  opacity: 1;
}

.library-book-card .book-cover-emoji {
  font-size: 3.5rem;
  margin-bottom: 16px;
  line-height: 1;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1;
  transition: transform 0.3s ease;
}

.library-book-card:hover .book-cover-emoji {
  transform: scale(1.1) rotate(3deg);
}

.library-book-card .book-details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  z-index: 1;
}

.library-book-card .book-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em; /* 保证排版整齐 */
}

.library-book-card .book-author {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-book-card .book-tags-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.library-book-card .book-badge-gutenberg {
  font-size: 0.65rem;
  background: rgba(74, 140, 246, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(74, 140, 246, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.library-book-card .book-meta-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.05);
}

.library-book-card .book-rating {
  color: var(--gold-light);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.library-book-card .book-readers {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 优雅的空状态 */
.library-empty-state {
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-card);
  border: 1px dashed var(--border-active);
  border-radius: var(--radius-lg);
  margin-top: 12px;
}

.library-empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: bounceEmpty 3s infinite ease-in-out;
}

@keyframes bounceEmpty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.library-empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text);
}

.library-empty-state p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

/* 古腾堡按钮详情页定制 */
.gutenberg-read-btn {
  background: linear-gradient(135deg, #10B981, #059669) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3) !important;
}

.gutenberg-read-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.45) !important;
  background: linear-gradient(135deg, #34D399, #059669) !important;
}

/* ==========================================================================
   移动端响应式高级适配 (375px/390px/430px)
   ========================================================================== */
@media (max-width: 1024px) {
  .library-container {
    grid-template-columns: 200px 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .library-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* 左侧分类侧边栏自动扁平化为顶部可左右滑动的胶囊导航栏 */
  .library-sidebar {
    position: sticky;
    top: 64px; /* 紧贴导航栏下方 */
    flex-direction: row;
    overflow-x: auto;
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
    background: var(--bg-deep);
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    scrollbar-width: none; /* Firefox 隐藏滚动条 */
    -ms-overflow-style: none; /* IE 隐藏 */
  }
  
  .library-sidebar::-webkit-scrollbar {
    display: none; /* Chrome 隐藏滚动条 */
  }
  
  .category-item {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
  }
  
  .category-item:hover {
    transform: none; /* 移动端取消平移效果 */
  }
  
  .category-item.active {
    background: var(--primary);
    color: #0A0F1A;
    border-color: var(--primary);
  }
  
  .category-item .count-badge {
    background: rgba(148, 163, 184, 0.15);
    margin-left: 6px;
  }
  
  .category-item.active .count-badge {
    background: #0A0F1A;
    color: var(--primary);
  }
  
  /* 控制面板纵向排布 */
  .library-control-panel {
    flex-direction: row;
    gap: 10px;
  }
  
  .search-input-wrapper {
    width: 100%;
  }
  
  .upload-resource-btn {
    height: 44px;
    padding: 0 16px;
    font-size: 0.85rem;
  }
  
  .search-input-wrapper .form-input {
    height: 44px;
    font-size: 0.85rem;
  }
  
  /* 卡片改双列 */
  .grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }
  
  .library-book-card {
    padding: 16px;
    border-radius: var(--radius);
  }
  
  .library-book-card .book-cover-emoji {
    font-size: 2.8rem;
    margin-bottom: 10px;
  }
  
  .library-book-card .book-title {
    font-size: 0.88rem;
    height: 2.8em;
  }
  
  .library-book-card .book-author {
    font-size: 0.72rem;
    margin-bottom: 8px;
  }
  
  .library-book-card .book-tags-row {
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  /* 超窄屏改单列 */
  .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  .hero-carousel, .hero-slide { min-height: 75vh; }
}
