/* ==================== 巨野一中回忆录 · 清新校园风 ==================== */
:root {
  --primary: #5b9bd5;
  --primary-light: #e8f2fc;
  --accent: #e8856c;
  --text: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg: #fafbfe;
  --bg-card: #fff;
  --border: #e8ecf0;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 6px 20px rgba(0,0,0,0.1);
  --max-width: 1100px;
  --nav-height: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
.page-loader { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--primary); z-index: 9999; animation: loading 1.5s ease-in-out forwards; }
@keyframes loading { 0% { width: 0; } 50% { width: 70%; } 100% { width: 100%; opacity: 0; } }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ==================== 导航栏 ==================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  transition: box-shadow .3s;
}
.nav.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.08); }
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 100%;
}
.nav-logo {
  font-size: 1rem; font-weight: 800; color: var(--primary);
  text-decoration: none; letter-spacing: 1.5px;
}
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-light); text-decoration: none;
  font-size: .82rem; padding: 6px 10px; border-radius: 6px;
  transition: all .2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary); background: var(--primary-light);
}
.nav-upload {
  background: var(--primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
}
.nav-upload:hover { opacity: .85; background: var(--primary) !important; }
.nav-toggle {
  display: none; background: none; border: none;
  font-size: 1.5rem; color: var(--text); cursor: pointer;
}

/* ==================== 封面 ==================== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, #e8f2fc 0%, var(--bg) 100%);
  position: relative;
  padding: 80px 20px;
}
.hero-bg-img {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  object-fit: cover; width: 100%; height: 100%; opacity: .15;
}
.hero-content { position: relative; z-index: 2; max-width: 600px; }
.hero-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 2px;
}
.hero-addr {
  font-size: 1rem;
  color: var(--primary);
  letter-spacing: 3px;
  margin-bottom: 16px;
}
.hero-quote {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 32px;
  line-height: 1.8;
}
.hero-stats {
  display: flex; gap: 32px; justify-content: center;
  margin-bottom: 32px;
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat strong {
  display: block; font-size: 1.6rem; color: var(--primary); font-weight: 800;
}
.hero-stats .stat span {
  font-size: .75rem; color: var(--text-muted);
}
.hero-btn {
  display: inline-block;
  padding: 12px 36px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  transition: all .3s;
}
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91,155,213,0.3);
}

/* ==================== 通用板块 ==================== */
.section {
  padding: 64px 20px;
}
.section-alt { background: #f0f4f8; }
.container { max-width: var(--max-width); margin: 0 auto; }
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 3px 12px;
  border-radius: 16px;
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.section-header .section-line {
  width: 40px; height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin: 12px auto 0;
}
.section-desc {
  font-size: .88rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ==================== 引用块 ==================== */
.quote-block {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
}
.quote-block p {
  font-size: .92rem;
  color: var(--text-light);
  line-height: 1.9;
  font-style: italic;
}

/* ==================== 美食卡片 ==================== */
.food-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.food-card {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: all .3s;
  contain: layout style paint;
}
.food-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.food-card.food-large { grid-column: span 2; }
.food-img {
  width: 100%; height: 200px;
  background-size: cover; background-position: center;
}
.food-card.food-large .food-img { height: 240px; }
.food-info { padding: 14px 16px; }
.food-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.food-info p {
  font-size: .85rem;
  color: var(--text-light);
  line-height: 1.6;
}
.food-stars {
  font-size: .72rem;
  color: #f0a030;
  margin-top: 6px;
}

/* ==================== 滚动动画 ==================== */
.marquee-wrap {
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 12px;
  margin-bottom: 24px;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,108,240,0.3) transparent;
}
.marquee-wrap::-webkit-scrollbar { width: 4px; }
.marquee-wrap::-webkit-scrollbar-thumb { background: rgba(124,108,240,0.3); border-radius: 2px; }
.marquee-wrap.dragging { cursor: grabbing; }
.marquee-wrap.dragging .marquee-v,
.marquee-wrap.dragging .marquee-h { animation-play-state: paused; }
.marquee-v {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  animation: scrollDown 120s linear infinite;
}
.marquee-v:hover { animation-play-state: paused; }
@keyframes scrollDown {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
.marquee-h {
  display: flex;
  gap: 8px;
  width: max-content;
  animation: scrollLeft 120s linear infinite;
}
.marquee-h:hover { animation-play-state: paused; }
@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-item {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}
.marquee-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.marquee-item span {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 4px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  font-size: .7rem;
  color: #fff;
}

/* ==================== 三列慢速滑动 ==================== */
.scroll-wrapper {
  overflow: hidden;
  margin-bottom: 24px;
}
.scroll-track {
  display: flex;
  gap: 12px;
  animation: scrollLeft 80s linear infinite;
  width: max-content;
  min-width: 100%;
}
.scroll-track:hover {
  animation-play-state: paused;
}
@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.scroll-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 220px;
  flex-shrink: 0;
}
.scroll-col .campus-item {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: all .25s;
}
.scroll-col .campus-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.scroll-col .campus-item img {
  width: 100%;
  display: block;
  transition: transform .3s;
}
.scroll-col .campus-item:hover img {
  transform: scale(1.03);
}
.campus-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  font-size: .72rem;
  color: #fff;
  opacity: 0;
  transition: opacity .25s;
}
.scroll-col .campus-item:hover .campus-caption {
  opacity: 1;
}

/* 旧版 grid 兼容 */
.campus-grid {
  columns: 5;
  column-gap: 10px;
  margin-bottom: 24px;
}
.campus-grid .campus-item {
  break-inside: avoid;
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: all .25s;
}
.campus-grid .campus-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.campus-grid .campus-item img {
  width: 100%;
  display: block;
}
.campus-grid .campus-item:hover .campus-caption {
  opacity: 1;
}

@media (max-width: 768px) {
  .scroll-col { width: 160px; }
  .scroll-track { gap: 8px; }
}
.campus-item {
  display: block;
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: all .3s;
  contain: layout style paint;
}
.campus-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.campus-item img {
  width: 100%; display: block;
  transition: transform .4s;
}
.campus-item:hover img { transform: scale(1.03); }
.campus-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  font-size: .78rem;
  color: #fff;
}

/* ==================== 影像馆 ==================== */
.gallery-search {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 20px;
}
.gallery-search input {
  width: 260px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .88rem; outline: none; color: var(--text);
}
.gallery-search input:focus { border-color: var(--primary); }
.gallery-search button {
  padding: 10px 20px;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius);
  font-size: .88rem; font-weight: 600; cursor: pointer;
}
.gallery-grid { columns: 4; column-gap: 10px; }
.gallery-item {
  display: block; break-inside: avoid;
  margin-bottom: 10px; border-radius: 8px;
  overflow: hidden; position: relative;
  text-decoration: none; color: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: all .3s;
  contain: layout style paint;
}
.gallery-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.gallery-item img { width: 100%; display: block; }
.gallery-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 6px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.4));
  font-size: .72rem; color: #fff;
  opacity: 0; transition: opacity .3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.btn-more {
  display: block; margin: 16px auto 0;
  padding: 10px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-light);
  font-size: .85rem; cursor: pointer;
  transition: all .2s;
}
.btn-more:hover { border-color: var(--primary); color: var(--primary); }

/* ==================== 老师卡片 ==================== */
.teacher-grid {
  columns: 3;
  column-gap: 16px;
  margin-bottom: 32px;
}
.teacher-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: all .3s;
  contain: layout style paint;
  break-inside: avoid;
  margin-bottom: 16px;
}
.teacher-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(91,155,213,0.3);
}
.teacher-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background-size: cover; background-position: center;
  margin: 0 auto 12px;
  border: 2px solid var(--primary-light);
}
.teacher-card h4 {
  font-size: 1rem; color: var(--text); margin-bottom: 4px;
}
.teacher-title {
  font-size: .78rem; color: var(--primary);
  margin-bottom: 10px;
}
.teacher-quote {
  font-size: .82rem; color: var(--text-light);
  line-height: 1.6; margin-bottom: 12px;
}
.teacher-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.teacher-tags span {
  padding: 3px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 4px;
  font-size: .72rem;
}

/* ==================== 各地思念 ==================== */
.miss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.miss-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: all .3s;
  contain: layout style paint;
}
.miss-card:hover { border-color: rgba(91,155,213,0.3); transform: translateY(-2px); }
.miss-loc {
  display: inline-block;
  background: #e6f7ee;
  color: #2db87a;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.miss-card p { font-size: .85rem; color: var(--text-light); line-height: 1.6; }
.miss-person { display: block; font-size: .72rem; color: var(--text-muted); margin-top: 6px; }

/* ==================== 青春告白 ==================== */
.confess-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.confess-card {
  background: var(--bg-card);
  border: 1px solid rgba(232,133,108,0.15);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all .3s;
  contain: layout style paint;
}
.confess-card:hover {
  border-color: rgba(232,133,108,0.3);
  transform: translateY(-2px);
}
.confess-icon { font-size: 1.3rem; margin-bottom: 8px; }
.confess-card p { font-size: .88rem; color: var(--text-light); line-height: 1.7; }

/* ==================== 遗憾列表 ==================== */
.regret-list {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 32px;
}
.regret-item {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  transition: all .3s;
  contain: layout style paint;
}
.regret-item:hover { border-color: rgba(0,0,0,0.08); transform: translateX(3px); }
.regret-num {
  font-size: 1.1rem; font-weight: 800;
  color: #ddd; flex-shrink: 0; min-width: 24px;
}
.regret-item p { font-size: .88rem; color: var(--text-light); line-height: 1.7; }

/* ==================== 评论区 ==================== */
.comment-zone {
  margin-top: 24px;
  padding-top: 28px;
  border-top: 1px dashed var(--border);
}
.comment-zone h3 { font-size: 1rem; color: var(--text); margin-bottom: 14px; }
.comment-list { margin-bottom: 16px; }
.comment-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  contain: layout style paint;
}
.comment-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.comment-name { font-size: .82rem; font-weight: 700; color: var(--primary); }
.comment-time { font-size: .72rem; color: #ccc; }
.comment-city {
  display: inline-block; padding: 2px 8px;
  background: #e6f7ee; color: #2db87a;
  border-radius: 4px; font-size: .72rem; margin-bottom: 6px;
}
.comment-body { font-size: .88rem; color: var(--text-light); line-height: 1.7; }
.comment-body img {
  max-width: 100%; border-radius: 8px;
  margin-top: 8px; cursor: pointer;
}
.comment-actions-bar { display: flex; gap: 14px; margin-top: 8px; }
.comment-actions-bar button {
  background: none; border: none;
  color: #ccc; font-size: .75rem; cursor: pointer;
  transition: color .2s;
}
.comment-actions-bar button:hover { color: var(--primary); }

/* 评论表单 */
.comment-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.form-row { display: flex; gap: 8px; margin-bottom: 10px; }
.input-name, .input-text {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: .88rem;
  outline: none;
  font-family: inherit;
  transition: border-color .2s;
}
.input-name:focus, .input-text:focus { border-color: var(--primary); }
.input-text { min-height: 72px; resize: vertical; margin-bottom: 10px; }
.comment-actions {
  display: flex; justify-content: space-between; align-items: center;
}
.img-upload {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: .82rem;
  cursor: pointer;
  transition: all .2s;
}
.img-upload:hover { border-color: var(--primary); color: var(--primary); }
.img-input { display: none; }
.btn-send {
  padding: 9px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-send:hover { opacity: .85; transform: translateY(-1px); }
.img-preview { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.img-preview img { max-width: 100px; border-radius: 6px; border: 1px solid var(--border); }

/* ==================== 横滚相册条 ==================== */
.memory-strip {
  overflow: hidden;
  border-radius: var(--radius);
  margin: 24px 0;
}
.strip-scroll {
  display: flex; gap: 8px;
  animation: stripScroll 25s linear infinite;
}
@keyframes stripScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.strip-item {
  min-width: 180px; height: 120px;
  background-size: cover; background-position: center;
  border-radius: 8px; flex-shrink: 0;
}

/* ==================== 返回顶部 ==================== */
.back-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #fff;
  border: none; border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(91,155,213,0.3);
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: all .3s;
  z-index: 90;
}
.back-top.show {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.back-top:hover { transform: translateY(-3px); }

/* ==================== 页脚 ==================== */
.footer {
  text-align: center;
  padding: 48px 20px;
  background: #f0f4f8;
  border-top: 1px solid var(--border);
}
.footer-quote {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
}
.footer-sub {
  font-size: .78rem;
  color: #ccc;
}
.footer-credit {
  font-size: .72rem;
  color: #ddd;
  margin-top: 10px;
}

/* ==================== 图片弹窗 ==================== */
.img-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
  cursor: pointer;
  animation: fadeIn .2s;
}
.img-modal.show { display: flex; }
.img-modal img { max-width: 92vw; max-height: 92vh; border-radius: 8px; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==================== 加载动画 ==================== */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
img {
  background-color: #f5f5f5;
  transition: opacity .3s;
}
img[src=""] { opacity: 0; }

/* ==================== 子页面封面 ==================== */
.page-hero {
  height: 280px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--nav-height);
  position: relative;
}
.page-hero-overlay {
  text-align: center;
  background: rgba(0,0,0,0.45);
  padding: 40px 24px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.page-hero-overlay h1 {
  font-size: 2rem;
  color: #fff;
  font-weight: 800;
  margin-bottom: 6px;
}
.page-hero-overlay p {
  font-size: .92rem;
  color: rgba(255,255,255,0.8);
}

/* ==================== 主页卡片 ==================== */
.index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.index-card {
  display: block;
  height: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  position: relative;
  text-decoration: none;
  transition: all .3s;
  contain: layout style paint;
}
.index-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.index-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(0,0,0,0.7));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}
.index-overlay h3 {
  font-size: 1.2rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 4px;
}
.index-overlay p {
  font-size: .82rem;
  color: rgba(255,255,255,0.75);
}

/* ==================== 通用小工具 ==================== */
.sub-title {
  font-size: 1.1rem;
  color: var(--text);
  margin: 28px 0 16px;
}
.upload-bar {
  text-align: center;
  margin: 24px 0;
}

/* ==================== 加载更多 ==================== */
.loading-spinner {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: .85rem;
}
.loading-spinner::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 20px; gap: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero { min-height: 80vh; padding: 60px 16px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-stats { gap: 20px; }
  .hero-stats .stat strong { font-size: 1.3rem; }

  .section { padding: 40px 16px; }
  .section-header h2 { font-size: 1.2rem; }

  .food-grid { grid-template-columns: 1fr; }
  .food-card.food-large { grid-column: span 1; }
  .food-img, .food-card.food-large .food-img { height: 180px; }

  .campus-grid { columns: 3; }

  .teacher-grid { grid-template-columns: 1fr 1fr; }

  .miss-grid { grid-template-columns: 1fr; }

  .confess-grid { grid-template-columns: 1fr; }

  .strip-item { min-width: 140px; height: 90px; }

  .gallery-search input { width: 180px; }

  body { font-size: 14px; }
}

@media (max-width: 480px) {
  .campus-grid { columns: 2; }
  .teacher-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
}
