:root {
  --bg: #fbf7f0;
  --bg-alt: #f3ece0;
  --ink: #2c2419;
  --ink-soft: #6f6354;
  --line: #e4d8c5;
  --accent: #e07a5f;
  --accent-deep: #c75c42;
  --gold: #d4a24e;
  --card: #fffdf8;
  --shadow: 0 10px 30px rgba(80, 60, 30, 0.12);
  --radius: 18px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff; font-weight: 800; font-size: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.brand-text { font-weight: 700; font-size: 18px; line-height: 1; }
.brand-text small { display: block; font-weight: 400; font-size: 11px; letter-spacing: 2px; color: var(--ink-soft); text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: 15px; transition: color .2s; }
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  background: var(--ink); color: #fff !important;
  padding: 8px 16px; border-radius: 999px; font-size: 14px;
}
.nav-cta:hover { background: var(--accent-deep); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 86vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding: 80px 24px;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(224,122,95,.25), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(212,162,78,.25), transparent 45%),
    radial-gradient(circle at 60% 80%, rgba(87,117,144,.18), transparent 45%),
    var(--bg);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(120,90,50,.07) 1px, transparent 1px);
  background-size: 22px 22px;
}
.hero-content { position: relative; max-width: 760px; }
.hero-kicker { letter-spacing: 8px; color: var(--gold); font-weight: 600; margin-top: 14px; }
.hero-title {
  font-size: clamp(44px, 9vw, 92px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 2px;
}
.hero-title span { display: block; color: var(--accent); }
.hero-tagline {
  margin: 22px 0 0;
  font-size: clamp(20px, 3.4vw, 28px);
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--ink);
}
.hero-tagline::before, .hero-tagline::after {
  content: "—"; color: var(--gold); margin: 0 12px; font-weight: 400;
}
.hero-intro { margin: 24px auto 0; max-width: 680px; color: var(--ink-soft); font-size: 17px; }
.intro-line { display: block; line-height: 2.1; letter-spacing: 1px; }
.hero-stats {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 14px; margin-top: 38px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 22px;
  min-width: 120px;
  box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 30px; color: var(--accent); }
.stat span { font-size: 13px; color: var(--ink-soft); }
.hero-scroll { display: inline-block; margin-top: 40px; color: var(--ink-soft); text-decoration: none; font-size: 15px; animation: bob 2s infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(6px);} }

/* ---------- 通用区块 ---------- */
.section { max-width: 1100px; margin: 0 auto; padding: 90px 24px; }
.section-alt { background: var(--bg-alt); max-width: none; }
.section-alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section-head { text-align: center; margin-bottom: 54px; }
.section-head h2 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; }
.section-head h2::after {
  content: ""; display: block; width: 54px; height: 4px;
  background: var(--accent); border-radius: 4px; margin: 16px auto 0;
}
.section-head p { color: var(--ink-soft); margin-top: 14px; }

/* ---------- 时光轴 ---------- */
.timeline { position: relative; max-width: 860px; margin: 0 auto; }
.timeline::before {
  content: ""; position: absolute; left: 28px; top: 8px; bottom: 8px;
  width: 3px; background: linear-gradient(var(--accent), var(--gold));
  border-radius: 3px;
}
.tl-item { position: relative; padding-left: 78px; margin-bottom: 42px; }
.tl-dot {
  position: absolute; left: 16px; top: 8px;
  width: 27px; height: 27px; border-radius: 50%;
  background: var(--card); border: 4px solid var(--accent);
  z-index: 2;
}
.tl-year { position: absolute; left: -2px; top: 44px; font-size: 13px; font-weight: 700; color: var(--gold); width: 58px; text-align: center; }
.tl-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.tl-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(80,60,30,.18); }
.tl-cover { height: 190px; position: relative; cursor: pointer; background-size: cover; background-position: center; background-color: var(--bg-alt); }
.tl-cover .tl-badge {
  position: absolute; right: 14px; bottom: 14px;
  background: rgba(0,0,0,.55); color: #fff;
  padding: 5px 12px; border-radius: 999px; font-size: 13px;
  backdrop-filter: blur(4px);
}
.tl-body { padding: 22px 24px 24px; }
.tl-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.tl-meta span { display: inline-flex; align-items: center; gap: 5px; }
.tl-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.tl-story { color: var(--ink-soft); margin-bottom: 16px; }
.tl-people { display: flex; align-items: center; }
.tl-people .avatar { margin-left: -8px; border: 2px solid var(--card); }
.tl-people .avatar:first-child { margin-left: 0; }
.tl-people .more { margin-left: 8px; font-size: 13px; color: var(--ink-soft); }

/* 头像 */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 700;
  flex: 0 0 auto;
}

/* ---------- 成员墙 ---------- */
.members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}
.member {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.member:hover { transform: translateY(-4px); }
.member .avatar { width: 64px; height: 64px; font-size: 24px; margin: 0 auto 14px; }
.member h3 { font-size: 18px; }
.member p { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- 上传 ---------- */
.upload { max-width: 720px; }
.upload-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px 34px;
  text-align: center;
  box-shadow: var(--shadow);
}
.upload-card h2 { font-size: 28px; }
.upload-card > p { color: var(--ink-soft); margin: 12px 0 28px; }
.dropzone {
  border: 2.5px dashed var(--line);
  border-radius: 18px;
  padding: 46px 20px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: rgba(224,122,95,.06); }
.dropzone-icon { font-size: 44px; }
.dropzone-title { font-weight: 600; margin-top: 12px; }
.dropzone-hint { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.upload-preview { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.upload-preview img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow); }
.upload-note { font-size: 12px; color: var(--ink-soft); margin-top: 22px; }

/* ---------- 页脚 ---------- */
.footer { text-align: center; padding: 50px 24px; border-top: 1px solid var(--line); color: var(--ink-soft); }
.footer-sub { font-size: 13px; margin-top: 6px; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20,15,8,.92);
  display: grid; place-items: center;
  padding: 40px;
}
.lightbox[hidden] { display: none; }
.lightbox-close {
  position: absolute; top: 22px; right: 26px;
  background: none; border: none; color: #fff; font-size: 28px; cursor: pointer;
}
.lightbox-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  max-width: 900px; width: 100%;
  max-height: 80vh; overflow-y: auto;
}
.lightbox-inner .shot { margin: 0; }
.lightbox-inner .shot img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.lightbox-inner .shot figcaption { color: rgba(255,255,255,.7); font-size: 12px; margin-top: 4px; text-align: center; }

/* 渐显动画 */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .section { padding: 64px 18px; }
}

/* ---------- 口令进站 ---------- */
.gate {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: grid; place-items: center; padding: 24px;
}
.gate[hidden] { display: none; }
.gate-card { text-align: center; max-width: 360px; width: 100%; }
.gate-mark {
  width: 56px; height: 56px; margin: 0 auto 18px;
  display: grid; place-items: center; background: var(--accent); color: #fff;
  font-weight: 800; font-size: 28px; border-radius: 16px; box-shadow: var(--shadow);
}
.gate-card h1 { font-size: 24px; }
.gate-sub { color: var(--ink-soft); margin: 10px 0 24px; font-size: 14px; }
.gate-card form { display: flex; gap: 10px; }
.gate-card input {
  flex: 1; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 12px; font-size: 16px; background: var(--card);
}
.gate-card button {
  padding: 12px 22px; border: none; border-radius: 12px;
  background: var(--ink); color: #fff; font-size: 15px; cursor: pointer;
}
.gate-card button:hover { background: var(--accent-deep); }
.gate-err { color: var(--accent-deep); font-size: 13px; margin-top: 14px; min-height: 18px; }

/* ---------- 空状态 / 按钮 ---------- */
.empty { text-align: center; color: var(--ink-soft); padding: 40px 0; }
.btn-primary {
  display: inline-block; margin-top: 14px; padding: 11px 22px;
  background: var(--accent); color: #fff; border-radius: 999px;
  text-decoration: none; font-size: 15px;
}
.btn-primary:hover { background: var(--accent-deep); }

/* ---------- 上传:姓名 + 进度 ---------- */
.name-field { display: block; text-align: left; font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.name-field input {
  display: block; width: 100%; margin-top: 6px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 12px; font-size: 15px; background: var(--bg);
}
.upload-progress { margin-top: 18px; font-size: 14px; color: var(--ink-soft); }

/* ---------- 待归类 ---------- */
.unsorted-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.uns-cell { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.uns-img { height: 120px; background-size: cover; background-position: center; background-color: var(--bg-alt); }
.uns-cell .uns-assign {
  display: block; width: 100%; padding: 9px; border: none; background: var(--ink);
  color: #fff; font-size: 13px; cursor: pointer;
}
.uns-cell .uns-assign:hover { background: var(--accent-deep); }
.uns-by { display: block; padding: 6px 10px; font-size: 12px; color: var(--ink-soft); }

/* ---------- 归类弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 150; background: rgba(20,15,8,.55); display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--card); border-radius: 20px; padding: 26px; max-width: 420px; width: 100%; max-height: 80vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal-card h3 { margin-bottom: 16px; }
.assign-list { display: flex; flex-direction: column; gap: 10px; }
.assign-item {
  text-align: left; background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; cursor: pointer;
}
.assign-item:hover { border-color: var(--accent); }
.assign-item b { display: block; }
.assign-item span { font-size: 12px; color: var(--ink-soft); }
.assign-empty { color: var(--ink-soft); font-size: 14px; }
.modal-close { margin-top: 16px; width: 100%; padding: 10px; border: 1px solid var(--line); background: var(--bg); border-radius: 12px; cursor: pointer; color: var(--ink-soft); }

/* ---------- 管理后台 ---------- */
.admin { max-width: 760px; margin: 0 auto; padding: 60px 24px; }
.admin[hidden] { display: none; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.admin-head h1 { font-size: 26px; }
.admin-back { color: var(--ink-soft); text-decoration: none; font-size: 14px; }
.admin-back:hover { color: var(--accent); }
.quota-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); }
.quota-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.quota-top b { font-size: 34px; color: var(--accent); }
.quota-top span { font-size: 13px; color: var(--ink-soft); }
.quota-bar { height: 14px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; }
.quota-fill { height: 100%; width: 2%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.quota-marks { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-soft); margin-top: 8px; }
.admin-stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0; }
.admin-sub { font-size: 18px; margin: 30px 0 14px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.admin-table th { background: var(--bg-alt); font-weight: 600; }
.admin-table tr:last-child td { border-bottom: none; }
