/* =========================================================
   醒狮战队 RoboMaster 招新网站 - 全站样式（浅色简洁风）
   ========================================================= */

:root {
  --accent: #c8102e;          /* 醒狮红 */
  --accent-dark: #9e0d26;
  --accent-soft: #fdeef0;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --text: #20242a;
  --text-muted: #626a75;
  --border: #e4e7ec;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 6px 20px rgba(16, 24, 40, 0.05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }

a,
button,
.btn {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: block;
  height: 38px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong { font-size: 17px; }
.brand-text small { color: var(--text-muted); font-size: 12px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 8px 13px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}

.site-nav a:hover { background: var(--accent-soft); color: var(--accent); }
.site-nav a.is-active { color: var(--accent); font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { border-color: var(--accent); color: var(--accent); background: #fff; }
.btn-outline:hover { background: var(--accent-soft); }
.btn:active { transform: scale(0.97); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-soft) 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 0 64px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 18px;
}

.hero h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 12px; }
.hero-sub { font-size: 17px; color: var(--text-muted); margin: 0 0 10px; }
.hero-season { font-size: 15px; color: var(--text-muted); margin: 0 0 26px; }

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-roles {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-roles a {
  text-decoration: none;
  padding: 5px 13px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.hero-roles a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- 章节 ---------- */
.section {
  padding: 64px 0;
  scroll-margin-top: 80px;
}

.section-soft { background: var(--bg-soft); }

.section-title {
  font-size: 26px;
  margin: 0 0 10px;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
  line-height: 1.3;
}

.section-lead { color: var(--text-muted); margin: 0 0 28px; }
.section h3 { font-size: 18px; margin: 26px 0 10px; }
.prose p { margin: 0 0 14px; }
.prose a { color: var(--accent); }
.muted { color: var(--text-muted); }

.notice {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #fff8e6;
  border: 1px solid #f2e2b3;
  color: #7a5b12;
  font-size: 14px;
}

.notice-neutral {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--text-muted);
}

/* ---------- 卡片 ---------- */
.robot-grid,
.group-grid,
.contact-grid {
  display: grid;
  gap: 18px;
}

.robot-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 26px; }
.group-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.contact-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.robot-card,
.team-card,
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.robot-card h3 { margin: 0 0 6px; font-size: 17px; }
.robot-card p { margin: 0; color: var(--text-muted); font-size: 14px; }

/* ---------- 赛场照片 ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 26px;
}

.photo-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-soft);
}

.photo-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.photo-wide { grid-column: 1 / -1; }
.photo-wide img { aspect-ratio: 21 / 9; }

.photo-stack {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.photo-stack .photo-item {
  box-shadow: var(--shadow);
}

.photo-stack img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
}

.team-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.1);
}

.team-card:active {
  transform: translateY(-1px) scale(0.99);
}

.team-card .card-num {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.team-card h3 { margin: 0 0 8px; font-size: 20px; }
.team-card p { margin: 0 0 14px; color: var(--text-muted); font-size: 14px; }
.team-card .more { color: var(--accent); font-weight: 600; font-size: 14px; }

/* ---------- 战绩 ---------- */
.achievements { margin: 18px 0 0; padding-left: 20px; }
.achievements li { margin-bottom: 8px; }
.achievements li::marker { color: var(--accent); }

/* ---------- 招新联系 ---------- */
.contact-card h3 { margin: 0 0 12px; }
.contact-card ul { margin: 0; padding-left: 18px; }
.contact-card li { margin-bottom: 6px; }

.qr {
  display: block;
  width: auto;
  height: auto;
  max-width: 200px;
  max-height: 280px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 10px;
}

/* ---------- 页面头部（组别页 / 资料页） ---------- */
.page-head {
  background: linear-gradient(180deg, #ffffff, var(--accent-soft));
  border-bottom: 1px solid var(--border);
  padding: 44px 0 38px;
}

.crumb { color: var(--text-muted); font-size: 14px; margin: 0 0 12px; }
.crumb a { color: var(--text-muted); }

.page-head h1 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 8px; }
.page-tagline { color: var(--text-muted); margin: 0; font-size: 16px; }

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 8px;
}

.anchor-nav a {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  font-size: 14px;
}

.anchor-nav a:hover { border-color: var(--accent); color: var(--accent); }

.group-section { scroll-margin-top: 84px; }
.group-section + .group-section { margin-top: 20px; }

/* ---------- 列表 ---------- */
.plain-list { padding-left: 20px; }
.plain-list li { margin-bottom: 8px; }

/* ---------- 资料列表 ---------- */
.material-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 22px;
}

.material-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: #fff;
}

.material-list a { color: var(--accent); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.material-list a:hover { text-decoration: underline; }

.tag {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tag-read { color: #0b6e4f; background: #e9f7f1; border-color: #c5e8d9; }
.tag-dl { color: var(--accent); background: var(--accent-soft); border-color: #f3c7cf; }

/* ---------- 培训计划阅读页 ---------- */
.plan-page { max-width: 820px; padding-top: 40px; padding-bottom: 72px; }
.plan-page h1 { font-size: 26px; }
.plan-page .plan-sub { margin: -4px 0 18px; }
.plan-page h2 {
  font-size: 20px;
  margin-top: 34px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.plan-page pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}

.plan-page code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92em;
  background: #f0f1f3;
  border-radius: 4px;
  padding: 1px 5px;
}

.plan-page pre code { background: none; padding: 0; font-size: 13px; }

.plan-page blockquote {
  margin: 16px 0;
  padding: 10px 16px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
}

.plan-page blockquote p { margin: 0; }
.plan-page hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.plan-page ol,
.plan-page ul { padding-left: 22px; }
.plan-page li { margin-bottom: 4px; }

.plan-page table {
  border-collapse: collapse;
  width: 100%;
  margin: 14px 0 22px;
  font-size: 14px;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.plan-page th,
.plan-page td {
  border: 1px solid var(--border);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

.plan-page th { background: var(--bg-soft); white-space: nowrap; }
.plan-back { display: block; margin-bottom: 16px; color: var(--text-muted); font-size: 14px; }
.plan-back a { color: var(--accent); text-decoration: none; }
.plan-back a:hover { text-decoration: underline; }
.plan-page a { overflow-wrap: anywhere; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 96px 0; }
.notfound h1 { font-size: 32px; margin: 0 0 10px; }
.notfound p { margin: 0 0 22px; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #1f232a;
  color: #c9ced6;
  padding: 36px 0;
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
  font-size: 14px;
}

.site-footer a { color: #e8ebef; }
.footer-inner p { margin: 6px 0; }

/* ---------- 移动端 ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 20px 16px;
    gap: 2px;
  }

  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 10px; border-radius: 8px; }
  .section { padding: 48px 0; }
}

@media (max-width: 640px) {
  .brand-text small { display: none; }
  .hero { padding: 52px 0 46px; }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }
  .hero-roles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .hero-roles a {
    padding: 10px 12px;
    text-align: center;
  }
  .hero-roles a:active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
  }
  .robot-grid { display: none; }
  .photo-grid { grid-template-columns: 1fr; }
  .photo-wide img { aspect-ratio: 16 / 9; }
}
