/* =================================================================
   个人图书馆资源小站 — 浅绿+白色主题
   面向初高中学生，采用 CLC(中国图书馆分类法) 分类体系
   侧边栏可收缩，含分类导航、新书上架、最新文章等模块
   ================================================================= */

/* ── CSS Reset & 基础样式 ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: #f4faf5;
  color: #2f3b2f;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: #2e5e32; text-decoration: none; }

/* ── 阅读进度条 ──────────────────────────────────────────────────── */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, #81c784, #43a047, #2e7d32);
  z-index: 200; width: 0;
}

/* ── 侧边栏 ──────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 100;
  width: 260px;
  background: linear-gradient(180deg, #ecf8ee 0%, #d0ead2 50%, #b8dfbb 100%);
  box-shadow: 3px 0 22px rgba(46,125,50,0.1);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 22px 20px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(46,125,50,0.12);
  white-space: nowrap; min-height: 74px;
}
.sidebar-logo {
  width: 38px; height: 38px; flex-shrink: 0;
  background: linear-gradient(135deg, #388e3c, #43a047);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: #fff;
  box-shadow: 0 3px 10px rgba(46,125,50,0.22);
  transition: transform 0.3s ease;
}
.sidebar-logo:hover { transform: rotate(-8deg) scale(1.08); }
.sidebar-brand { overflow: hidden; }
.sidebar-brand-name {
  font-size: 15px; font-weight: 700; color: #1b5e20; line-height: 1.4;
  letter-spacing: 0.5px;
}
.sidebar-brand-sub { font-size: 13px; color: #2e5e32; font-weight: 600; letter-spacing: 1px; }

/* ── 侧边栏导航 ──────────────────────────────────────────────────── */
.sidebar-nav {
  flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto; overflow-x: hidden;
}
.sidebar-nav::-webkit-scrollbar { display: none; }
.sidebar-nav { scrollbar-width: none; }

.nav-section-title {
  font-size: 10px; color: #4c8b5b;
  letter-spacing: 2px; padding: 18px 12px 6px;
  font-weight: 700;
  transition: opacity 0.25s ease;
  white-space: nowrap;
}
.nav-section-title:first-child { padding-top: 0; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  color: #2e5e32; font-weight: 500; font-size: 13px;
  cursor: pointer; transition: all 0.2s ease;
  white-space: nowrap; text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,0.55); }
.nav-item.active {
  background: #fff; color: #1b5e20; font-weight: 700;
  box-shadow: 0 2px 10px rgba(46,125,50,0.13);
}
.nav-item .nav-code {
  font-size: 10px; font-weight: 800; color: #43a047;
  background: rgba(255,255,255,0.5); padding: 2px 7px; border-radius: 5px;
  flex-shrink: 0; min-width: 24px; text-align: center;
}
.nav-item.active .nav-code { background: #43a047; color: #fff; }
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 侧边栏底部用户区 ────────────────────────────────────────────── */
.sidebar-footer {
  padding: 14px 18px; border-top: 1px solid rgba(46,125,50,0.12);
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap; min-height: 62px;
}
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #66bb6a, #388e3c);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-footer:hover { background: rgba(255,255,255,0.35); }

/* ── 主内容区 ────────────────────────────────────────────────────── */
.main-content {
  margin-left: 350px;
  margin-right: 20px;
  padding: 32px 44px 48px;
  position: relative; z-index: 1;
  max-width: 1360px;
}

/* ── 顶部工具栏 ──────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 30px; flex-wrap: wrap; gap: 14px;
}
.search-box {
  display: flex; align-items: center;
  background: #fff; border-radius: 26px;
  box-shadow: 0 3px 16px rgba(46,125,50,0.06);
  overflow: hidden; transition: box-shadow 0.25s ease;
  flex: 1; max-width: 480px;
}
.search-box:focus-within { box-shadow: 0 4px 22px rgba(46,125,50,0.14); }
.search-box input {
  flex: 1; border: none; outline: none;
  padding: 13px 18px; font-size: 14px; background: transparent;
  color: #2f3b2f;
}
.search-box input::placeholder { color: #a5b8a5; }
.search-btn {
  border: none; outline: none; background: linear-gradient(135deg, #66bb6a, #43a047);
  color: #fff; padding: 13px 22px; cursor: pointer;
  font-size: 14px; font-weight: 600;
  transition: background 0.25s ease;
}
.search-btn:hover { background: linear-gradient(135deg, #43a047, #2e7d32); }

.topbar-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: #fff; cursor: pointer;
  font-size: 17px; color: #2e5e32;
  box-shadow: 0 2px 10px rgba(46,125,50,0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; align-items: center; justify-content: center;
  position: relative; text-decoration: none;
}
.icon-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(46,125,50,0.13); }

.btn-login-top, .btn-register-top, .btn-logout-top {
  padding: 8px 18px; border-radius: 22px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 5px;
  text-decoration: none; cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-login-top {
  background: #fff; color: #2e5e32;
  box-shadow: 0 2px 10px rgba(46,125,50,0.07);
}
.btn-login-top:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(46,125,50,0.13); }
.btn-register-top {
  background: linear-gradient(135deg, #66bb6a, #43a047); color: #fff;
  box-shadow: 0 2px 10px rgba(46,125,50,0.18);
}
.btn-register-top:hover { transform: translateY(-2px); box-shadow: 0 5px 16px rgba(46,125,50,0.25); }
.btn-logout-top {
  background: #fff; color: #c62828;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.btn-logout-top:hover { background: #ffebee; }

.btn-admin-top {
  padding: 8px 18px; border-radius: 22px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 5px;
  text-decoration: none; cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: #1e293b; color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.btn-admin-top:hover { transform: translateY(-2px); box-shadow: 0 5px 16px rgba(0,0,0,0.2); background: #334155; }

/* ── Hero 横幅 ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 30%, #a5d6a7 65%, #81c784 100%);
  border-radius: 22px; padding: 48px 52px;
  position: relative; overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 10px 34px rgba(46,125,50,0.13);
}
.hero::before {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: ''; position: absolute; left: 20%; bottom: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; max-width: 560px; }
.hero h1 {
  font-size: 40px; font-weight: 800; color: #1b5e20;
  line-height: 1.3; margin-bottom: 12px;
}
.hero h1 em {
  font-style: normal; color: #fff;
  text-shadow: 0 2px 8px rgba(46,125,50,0.22);
}
.hero p { font-size: 15px; color: #33691e; line-height: 1.7; }
.hero-btns { display: flex; gap: 12px; margin-top: 22px; }
.hero-stats { display: flex; gap: 48px; margin-top: 32px; }
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 30px; font-weight: 800; color: #fff; }
.hero-stat-label { font-size: 12px; color: rgba(255,255,255,0.8); margin-top: 2px; }

/* ── 按钮 ────────────────────────────────────────────────────────── */
.btn-primary {
  padding: 12px 30px; border-radius: 26px; border: none;
  background: #fff; color: #2e5e32; font-size: 14px; font-weight: 700;
  cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  transition: all 0.25s ease;
  text-decoration: none; display: inline-block;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.13); }
.btn-outline {
  padding: 12px 30px; border-radius: 26px;
  border: 2px solid rgba(255,255,255,0.7); background: transparent;
  color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: all 0.25s ease; text-decoration: none; display: inline-block;
}
.btn-outline:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }

.btn-sm {
  padding: 6px 16px; font-size: 12px; border-radius: 20px;
}

/* ── 通用区块 ────────────────────────────────────────────────────── */
.section { margin-bottom: 38px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 19px; font-weight: 700; color: #1b5e20;
  display: flex; align-items: center; gap: 8px;
}
.section-title::before {
  content: ''; width: 4px; height: 18px; background: #43a047; border-radius: 2px;
}
.section-more {
  color: #43a047; font-size: 13px; font-weight: 600; text-decoration: none;
  transition: color 0.2s ease;
}
.section-more:hover { color: #1b5e20; }

/* ── 图书卡片网格 ────────────────────────────────────────────────── */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.book-card {
  background: #fff; border-radius: 15px; padding: 0 0 14px 0;
  box-shadow: 0 3px 14px rgba(46,125,50,0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer; overflow: hidden;
  will-change: transform;
}
.book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(46,125,50,0.12);
}
.book-cover-wrap {
  height: 200px;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.book-cover-bg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 50px; position: relative;
}
.book-cover-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.28) 100%);
}
.book-cat-code {
  position: absolute; top: 8px; left: 10px;
  background: rgba(255,255,255,0.85); color: #2e5e32;
  font-size: 10px; font-weight: 800; padding: 2px 7px;
  border-radius: 5px; z-index: 1;
}
.book-info { padding: 12px 14px 0; }
.book-info h4 {
  font-size: 14px; font-weight: 700; color: #1b5e20;
  margin-bottom: 3px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.book-info .author { font-size: 11px; color: #78909c; margin-bottom: 6px; }
.book-info .meta-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: #8d9f8d;
}

/* ── CLC 分类网格 ────────────────────────────────────────────────── */
.clc-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.clc-card {
  background: #fff; border-radius: 12px; padding: 16px 12px;
  text-align: center; cursor: pointer; text-decoration: none; color: inherit;
  box-shadow: 0 2px 10px rgba(46,125,50,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 2px solid transparent;
  will-change: transform; display: block;
}
.clc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(46,125,50,0.1);
  border-color: #a5d6a7;
}
.clc-card.active-card { border-color: #43a047; background: #f8fcf8; }
.clc-card-code { font-size: 20px; font-weight: 800; color: #43a047; margin-bottom: 3px; }
.clc-card.active-card .clc-card-code { color: #2e5e32; }
.clc-card-name { font-size: 11px; color: #6b7d6b; }
.clc-card-count { font-size: 10px; color: #a5b8a5; margin-top: 2px; }

/* ── 文章列表 ────────────────────────────────────────────────────── */
.article-list { display: flex; flex-direction: column; gap: 6px; }
.article-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px; background: #fff;
  border: 1px solid #dcebdc; border-radius: 12px;
  transition: all 0.2s ease;
  text-decoration: none; color: inherit;
}
.article-item:hover {
  border-color: #a5d6a7; box-shadow: 0 2px 8px rgba(46,125,50,0.06);
  background: #fafdfa;
}
.article-date { flex-shrink: 0; text-align: center; width: 44px; }
.article-date-day { font-size: 1.15rem; font-weight: 700; color: #43a047; line-height: 1; }
.article-date-month { font-size: 0.65rem; color: #8d9f8d; margin-top: 2px; }
.article-content { flex: 1; min-width: 0; }
.article-content .article-title {
  font-size: 0.88rem; font-weight: 600; color: #2f3b2f;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.article-item:hover .article-title { color: #1b5e20; }
.article-meta { font-size: 0.75rem; color: #8d9f8d; margin-top: 2px; }
.article-summary { font-size: 0.82rem; color: #6b7d6b; margin-top: 4px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-arrow { flex-shrink: 0; color: #a5b8a5; transition: all 0.2s ease; }
.article-item:hover .article-arrow { color: #43a047; transform: translateX(3px); }

/* ── 登录状态控制 ────────────────────────────────────────────────── */
.show-if-logged-in { display: none; }
body.logged-in .show-if-logged-in { display: block; }
body.logged-in .hide-if-logged-in { display: none !important; }

/* ── 加入图书馆 CTA ────────────────────────────────────────────────── */
.join-library {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 40%, #a5d6a7 100%);
  border-radius: 18px; padding: 44px 48px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(46,125,50,0.1);
  position: relative; overflow: hidden;
}
.join-library::before {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, transparent 70%);
  border-radius: 50%;
}
.join-library::after {
  content: ''; position: absolute; left: 10%; bottom: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  border-radius: 50%;
}
.join-content { position: relative; z-index: 1; }
.join-icon { font-size: 2.8rem; margin-bottom: 10px; }
.join-library h2 {
  font-size: 1.5rem; font-weight: 700; color: #1b5e20; margin-bottom: 8px;
}
.join-library p {
  font-size: 0.95rem; color: #33691e; line-height: 1.6;
  max-width: 480px; margin: 0 auto 22px;
}
.join-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── 特色功能卡片 ────────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card {
  padding: 24px 20px; background: #fff;
  border: 1px solid #dcebdc; border-radius: 12px;
  text-align: center; transition: all 0.2s ease;
}
.feature-card:hover { border-color: #a5d6a7; box-shadow: 0 4px 12px rgba(46,125,50,0.06); }
.feature-icon {
  width: 46px; height: 46px; margin: 0 auto 10px;
  border-radius: 11px; background: #e8f5e9;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.feature-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; color: #1b5e20; }
.feature-card p { font-size: 0.78rem; color: #8d9f8d; line-height: 1.5; }

/* ── 图书列表表格 ────────────────────────────────────────────────── */
.book-list {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #dcebdc;
  border-radius: 12px;
  overflow: hidden;
}
.book-list th, .book-list td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e8f0e8;
}
.book-list th {
  background: #f4faf5;
  font-weight: 600;
  font-size: 0.85rem;
  color: #4c8b5b;
}
.book-list tr:last-child td { border-bottom: none; }
.book-list tr:hover td { background: #fafdfa; }
.book-list a { color: #2e5e32; text-decoration: none; font-weight: 600; }
.book-list a:hover { color: #1b5e20; text-decoration: underline; }

/* ── 面包屑 ──────────────────────────────────────────────────────── */
.breadcrumb {
  font-size: 0.85rem; color: #8d9f8d; margin-bottom: 1rem;
  padding: 10px 0;
}
.breadcrumb a { color: #43a047; text-decoration: none; }
.breadcrumb a:hover { color: #1b5e20; text-decoration: underline; }
.breadcrumb .sep { margin: 0 0.35rem; color: #a5b8a5; }

/* ── 图书详情 ────────────────────────────────────────────────────── */
.book-detail header { margin-bottom: 1.5rem; }
.book-detail header h2 {
  font-size: 24px; font-weight: 700; color: #1b5e20; margin-bottom: 8px;
}
.book-detail .meta span {
  display: inline-block;
  margin-right: 1.5rem;
  color: #6b7d6b;
  font-size: 0.9rem;
}
.book-detail .meta a { color: #43a047; text-decoration: none; }
.book-detail .meta a:hover { color: #1b5e20; }
.summary { margin-bottom: 1.5rem; background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #dcebdc; }
.summary h3 { border: none; margin-bottom: 0.75rem; color: #1b5e20; font-size: 16px; }
.summary p { color: #4a5b4a; line-height: 1.7; }

.tags { margin-bottom: 1.5rem; }
.tags h3 { border: none; margin-bottom: 0.5rem; color: #1b5e20; font-size: 16px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  display: inline-block;
  padding: 0.25rem 0.85rem;
  background: #f4faf5;
  border: 1px solid #a5d6a7;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #2e5e32;
  text-decoration: none;
  transition: all 0.2s ease;
}
.tag:hover { background: #43a047; color: #fff; border-color: #43a047; }

.classification { margin-bottom: 1.5rem; }
.classification h3 { color: #1b5e20; font-size: 16px; margin-bottom: 0.5rem; }
.classification a { color: #43a047; }

.downloads {
  margin-top: 2rem; padding: 1.5rem;
  background: #fff; border: 1px solid #dcebdc; border-radius: 12px;
}
.downloads h3 { color: #1b5e20; font-size: 16px; margin-bottom: 1rem; }
.download-buttons { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 26px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: none; cursor: pointer;
}
.btn-download {
  background: linear-gradient(135deg, #66bb6a, #43a047);
  color: #fff;
  box-shadow: 0 2px 8px rgba(46,125,50,0.15);
}
.btn-download:hover { background: linear-gradient(135deg, #43a047, #2e7d32); transform: translateY(-1px); }
.btn-download small { font-weight: 400; opacity: 0.8; }
.note {
  font-size: 0.85rem;
  color: #8d9f8d;
}

/* ── 页面标题区（非首页） ────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
  border-radius: 22px; padding: 32px 40px;
  position: relative; overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 6px 20px rgba(46,125,50,0.08);
}
.page-hero h2 {
  font-size: 28px; font-weight: 700; color: #1b5e20; position: relative; z-index: 1;
}
.page-hero p { color: #33691e; position: relative; z-index: 1; margin-top: 6px; }
.page-hero::before {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 70%);
  border-radius: 50%;
}

/* ── 子分类/筛选按钮行 ───────────────────────────────────────────── */
.sub-nav {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0;
}
.sub-nav a, .sub-nav .btn-outline-sm {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid #a5d6a7;
  border-radius: 20px;
  font-size: 13px; font-weight: 600;
  color: #2e5e32; text-decoration: none;
  transition: all 0.2s ease;
  background: #fff;
}
.sub-nav a:hover {
  background: #43a047; color: #fff; border-color: #43a047;
}

/* ── 内容卡片（通用） ────────────────────────────────────────────── */
.content-card {
  background: #fff; border: 1px solid #dcebdc; border-radius: 12px;
  padding: 24px; margin-bottom: 20px;
}
.content-card h2, .content-card h3 { color: #1b5e20; margin-bottom: 12px; }

/* ── 悬浮按钮 ────────────────────────────────────────────────────── */
.quick-float {
  position: fixed; right: 24px; bottom: 30px; z-index: 99;
  display: flex; flex-direction: column; gap: 10px;
}
.float-btn {
  width: 46px; height: 46px; border-radius: 50%;
  border: none; background: #fff; cursor: pointer;
  font-size: 20px; color: #2e5e32;
  box-shadow: 0 3px 14px rgba(46,125,50,0.11);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex; align-items: center; justify-content: center;
}
.float-btn:hover { transform: scale(1.1); box-shadow: 0 6px 22px rgba(46,125,50,0.18); }
.float-btn.back-top { background: #43a047; color: #fff; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }

/* ── 页脚 ────────────────────────────────────────────────────────── */
.main-footer {
  height: 60px; display: flex; align-items: center; justify-content: center;
  color: #8d9f8d; font-size: 12px;
  border-top: 1px solid rgba(46,125,50,0.08);
  margin-top: 14px;
  white-space: nowrap; overflow: hidden;
}

/* ── 移动端遮罩 ──────────────────────────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,0.25); backdrop-filter: blur(2px);
}

/* ── Toast ───────────────────────────────────────────────────────── */
.toast {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  background: #1b5e20; color: #fff; padding: 12px 28px;
  border-radius: 24px; font-weight: 600; font-size: 13px;
  z-index: 300; letter-spacing: 0.5px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.18);
  animation: toastIn 0.35s ease, toastOut 0.35s ease 1.6s forwards;
  pointer-events: none; white-space: nowrap;
}
@keyframes toastIn  { from { opacity: 0; transform: translateX(-50%) translateY(-14px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(-50%) translateY(-14px); } }

/* ── 滚动条 ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: #f4faf5; }
::-webkit-scrollbar-thumb { background: #a5d6a7; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #81c784; }

/* ── 移动端菜单按钮 ──────────────────────────────────────────────── */
.mobile-menu-btn {
  display: none; width: 40px; height: 40px; border-radius: 10px;
  border: none; background: #fff; cursor: pointer;
  font-size: 20px; color: #2e5e32;
  box-shadow: 0 2px 8px rgba(46,125,50,0.08);
  align-items: center; justify-content: center;
}

/* ── 响应式 ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); width: 260px; }
  .sidebar-overlay.show { display: block; }
  .main-content { margin-left: 0 !important; margin-right: 0 !important; padding: 14px; }
  .hero { padding: 26px 20px; }
  .hero h1 { font-size: 24px; }
  .hero-stats { gap: 22px; }
  .books-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .clc-grid { grid-template-columns: repeat(4, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .search-box { max-width: 100%; }
  .mobile-menu-btn { display: flex !important; }
  .page-hero { padding: 20px; }
  .page-hero h2 { font-size: 22px; }
}

/* ── 活动日志（Activity Log） ────────────────────────────────────── */
.timeline { position: relative; padding-left: 40px; margin: 2rem 0; }
.timeline::before { content: ''; position: absolute; left: 18px; top: 0; bottom: 0; width: 2px; background: #a5d6a7; }
.timeline-day { position: relative; margin-bottom: 1.5rem; }
.timeline-day::before { content: ''; position: absolute; left: -28px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: #43a047; border: 3px solid #e8f5e9; box-shadow: 0 0 0 2px #43a047; }
.timeline-card { display: block; background: #fff; border: 1px solid #dcebdc; border-radius: 12px; padding: 1.25rem; text-decoration: none; color: #2f3b2f; transition: box-shadow 0.15s; }
.timeline-card:hover { box-shadow: 0 4px 16px rgba(46,125,50,0.08); }
.timeline-card h3 { font-size: 1.2rem; margin-bottom: 0.25rem; color: #1b5e20; }
.timeline-card p { color: #8d9f8d; font-size: 0.85rem; }
.day-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.day-header a { color: #43a047; }
.log-list { list-style: none; }
.log-item { display: flex; align-items: flex-start; padding: 0.85rem 0; border-bottom: 1px solid #e8f0e8; gap: 0.75rem; }
.log-item:last-child { border-bottom: none; }
.log-time { font-size: 0.8rem; color: #8d9f8d; min-width: 50px; padding-top: 2px; }
.log-operator { color: #43a047; font-weight: 700; font-size: 0.85rem; min-width: 80px; }
.log-desc { flex: 1; font-size: 0.9rem; color: #4a5b4a; }
.log-result { font-size: 0.8rem; min-width: 60px; text-align: right; }
.log-result.success { color: #43a047; } .log-result.failure { color: #c62828; }
.empty { text-align: center; color: #8d9f8d; padding: 3rem; }
.activity-page-title { font-size: 22px; font-weight: 700; color: #1b5e20; margin-bottom: 1.5rem; cursor: pointer; }
.activity-page-title:hover { color: #43a047; }
