/* ============================================================
   云阁前线 · 全局样式
   军事风 · 军绿 #9CB380 / 沙金 #C9A227
   ============================================================ */

:root {
  --bg: #0c100d;
  --panel: #171f19;
  --card: rgba(23, 31, 25, 0.72);
  --border: rgba(156, 179, 128, 0.28);
  --border-strong: rgba(156, 179, 128, 0.6);
  --gold: #c9a227;
  --cyan: #9cb380;
  --text: #e8e6da;
  --text-dim: #9aa38e;
  --danger: #d06a5e;
  --danger-soft: rgba(208, 106, 94, 0.12);
  --danger-border: rgba(208, 106, 94, 0.45);
  --ok: #8fae6a;
  --ok-soft: rgba(143, 174, 106, 0.1);
  --ok-border: rgba(143, 174, 106, 0.5);
  --radius: 8px;
  --shadow-cyan: 0 0 14px rgba(156, 179, 128, 0.16);
  --shadow-gold: 0 0 14px rgba(201, 162, 39, 0.2);
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

/* 文本选中色：军绿底 + 深色字 */
::selection { background: rgba(156, 179, 128, 0.85); color: #0c100d; }

/* 滚动条：深底 + 军绿滑轨 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(156, 179, 128, 0.3);
  border-radius: 6px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(156, 179, 128, 0.5); }
* { scrollbar-width: thin; scrollbar-color: rgba(156, 179, 128, 0.3) var(--bg); }

a { transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease; }

body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 80% -10%, #1a2418 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- 页面加载进入动画 ---------- */
.page-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(900px 500px at 50% 40%, #121a15 0%, var(--bg) 60%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.loader-logo {
  width: 84px; height: 84px; object-fit: contain;
  animation: loaderPop 0.7s ease backwards;
  filter: drop-shadow(0 0 18px rgba(201, 162, 39, 0.45));
}
.loader-bar {
  width: 160px; height: 4px; border-radius: 4px;
  background: rgba(156, 179, 128, 0.15); overflow: hidden;
}
.loader-bar span {
  display: block; height: 100%; width: 40%; border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  animation: loaderSlide 1.1s ease-in-out infinite;
}
.loader-text {
  color: var(--text-dim); font-size: 13px; letter-spacing: 6px;
  text-indent: 6px; animation: fadeInUp 0.6s ease 0.25s backwards;
}

@keyframes loaderPop {
  0% { opacity: 0; transform: scale(0.5); }
  60% { transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes loaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ---------- 背景装饰 ---------- */
.bg-layer { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(156, 179, 128, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(156, 179, 128, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
}
.bg-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.1; animation: float 12s ease-in-out infinite; }
.bg-orb.orb-cyan { width: 420px; height: 420px; background: #3d4d33; top: -120px; left: -80px; }
.bg-orb.orb-gold { width: 380px; height: 380px; background: #4d3f1e; top: 30%; right: -120px; animation-delay: -6s; }

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(30px) translateX(20px); }
}

/* ---------- 容器与布局 ---------- */
.container, .main-content {
  width: min(1120px, 92%); margin: 0 auto;
}
.main-content { min-height: calc(100vh - 220px); }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 14, 11, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }

.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 800; color: var(--text);
  text-decoration: none; letter-spacing: 1px;
}
.logo-icon {
  color: var(--gold); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  font-size: 22px;
  width: 40px; height: 40px; object-fit: contain; flex-shrink: 0;
}

.main-nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  color: var(--text-dim); text-decoration: none;
  padding: 8px 14px; border-radius: 6px;
  font-size: 15px; transition: all 0.25s ease;
  border: 1px solid transparent;
}
.nav-link:hover { color: var(--cyan); }
.nav-link.active {
  color: var(--gold);
  border-color: rgba(201, 162, 39, 0.4);
  background: rgba(201, 162, 39, 0.08);
}

/* 汉堡菜单按钮 */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 1px solid var(--border);
  border-radius: 6px; padding: 9px 10px; cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 用户下拉菜单 */
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(156, 179, 128, 0.08);
  border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
  padding: 5px 12px 5px 6px; border-radius: 6px;
  font-size: 14px; transition: all 0.25s;
}
.user-btn:hover { border-color: var(--cyan); box-shadow: var(--shadow-cyan); }
.caret { color: var(--text-dim); font-size: 11px; }

.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 260px; background: var(--panel);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), var(--shadow-cyan);
  padding: 14px; display: none; z-index: 200;
}
.dropdown.show { display: block; animation: fadeInUp 0.25s ease; }
.dropdown-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); margin-bottom: 10px; }
.dropdown-name { font-weight: 700; }
.dropdown-role { font-size: 12px; color: var(--gold); }
.dropdown-info { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-dim); padding: 5px 0; word-break: break-all; }
.dropdown-info b { color: var(--text); font-weight: 500; }
.dropdown-logout {
  display: block; text-align: center; margin-top: 12px;
  padding: 8px; border-radius: 6px; text-decoration: none;
  color: var(--danger); border: 1px solid var(--danger-border);
  font-size: 14px; transition: 0.25s;
}
.dropdown-logout:hover { background: var(--danger-soft); box-shadow: 0 0 12px var(--danger-soft); }

/* ---------- 头像 ---------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(156, 179, 128, 0.85), rgba(201, 162, 39, 0.85));
  color: #0a0f1e; font-weight: 800; font-size: 18px;
  box-shadow: 0 0 12px rgba(156, 179, 128, 0.35);
  flex-shrink: 0;
}
.avatar-sm { width: 30px; height: 30px; font-size: 14px; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  padding: 11px 26px; border-radius: 6px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
  transition: all 0.28s ease; letter-spacing: 0.5px;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
.btn-lg { padding: 14px 40px; font-size: 17px; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, #7d9260, #5c7046);
  color: #f0f0e6; border-color: rgba(156, 179, 128, 0.7);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); background: linear-gradient(135deg, #8aa46a, #667c4e); box-shadow: 0 0 20px rgba(156, 179, 128, 0.35); }

.btn-outline {
  background: rgba(156, 179, 128, 0.08); color: #c9c5b2;
  border-color: rgba(156, 179, 128, 0.6);
}
.btn-outline:hover { transform: translateY(-2px); background: rgba(156, 179, 128, 0.18); border-color: rgba(156, 179, 128, 0.85); box-shadow: 0 0 16px rgba(156, 179, 128, 0.35); }

.btn-ghost { color: var(--text-dim); border-color: rgba(255, 255, 255, 0.18); }
.btn-ghost:hover { color: var(--text); border-color: var(--text); transform: translateY(-3px); }
/* ---------- Hero 横幅 ---------- */
.hero {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 44px;
  padding: 96px 0 70px; text-align: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--cyan); font-size: 14px; letter-spacing: 3px;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 18px; background: rgba(156, 179, 128, 0.06);
  animation: fadeInUp 0.6s ease;
}
.hero-tag span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 10px var(--gold); animation: tagPulse 2s ease-in-out infinite;
}
@keyframes tagPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--gold); }
  50% { opacity: 0.5; box-shadow: 0 0 14px var(--gold); }
}
.hero-title {
  font-size: clamp(44px, 8vw, 84px); font-weight: 900; letter-spacing: 6px;
  color: var(--text);
  background: linear-gradient(180deg, #faf7ea 0%, #e8d98f 38%, #c9a227 62%, #8a6d2f 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.7s ease 0.1s both;
}
.hero-sub { color: var(--text-dim); font-size: clamp(15px, 2.4vw, 19px); margin-top: 16px; animation: fadeInUp 0.7s ease 0.2s both; }
.hero-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; animation: fadeInUp 0.7s ease 0.3s both; }
.badge {
  padding: 7px 16px; border-radius: 6px; font-size: 13px;
  color: #d8d5c4; background: rgba(156, 179, 128, 0.08);
  border: 1px solid rgba(156, 179, 128, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; animation: fadeInUp 0.7s ease 0.4s both; }
.hero-stats { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; animation: fadeInUp 0.7s ease 0.5s both; }

.stat-card { padding: 22px 34px; text-align: center; }
.stat-num { font-size: 30px; font-weight: 800; text-shadow: 0 0 14px currentColor; }
.stat-label { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

.text-gold { color: var(--gold); }
.text-cyan { color: var(--cyan); }

/* ---------- 区块 ---------- */
.section { padding: 70px 0 10px; scroll-margin-top: 80px; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-title {
  font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: 2px;
  color: var(--text); position: relative; display: inline-block;
}
.section-title::after {
  content: ""; display: block; height: 3px; width: 70%;
  margin: 12px auto 0; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--gold), transparent);
}
.section-sub { color: var(--text-dim); margin-top: 14px; font-size: 15px; }

/* ---------- 卡片（硬边框） ---------- */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
/* 顶部高光线：金属面板质感 */
.card::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(156, 179, 128, 0.55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* 玩法卡片 */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card { padding: 34px 26px; text-align: center; }
.card-icon {
  width: 72px; height: 72px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: hidden;
  background: rgba(156, 179, 128, 0.1); border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-icon img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.feature-card:hover .card-icon img { transform: scale(1.08); }
.feature-card h3 { font-size: 21px; margin-bottom: 10px; color: var(--gold); letter-spacing: 2px; }
.feature-card p { color: var(--text-dim); font-size: 14.5px; }

/* 服务器信息卡片 */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.info-card { padding: 26px 20px; text-align: center; }
.info-icon { font-size: 26px; display: block; margin-bottom: 10px; }
.info-card h3 { font-size: 15px; color: var(--text-dim); font-weight: 600; margin-bottom: 6px; }
.info-card p { font-weight: 700; color: var(--text); }

/* 加入我们 */
.join-box {
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  padding: 44px 48px; margin-bottom: 50px; flex-wrap: wrap;
  border-color: rgba(201, 162, 39, 0.35);
  box-shadow: var(--shadow-gold), inset 0 0 30px rgba(201, 162, 39, 0.04);
}
.join-title { font-size: 28px; letter-spacing: 2px; color: var(--gold); position: relative; display: inline-block; }
.join-title::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--gold), transparent); opacity: 0.6;
}
.join-desc { color: var(--text-dim); margin: 12px 0 16px; }
.join-line { margin: 6px 0; font-size: 15px; }
.join-line strong { font-size: 17px; }
.join-tip { color: var(--text-dim); font-size: 12.5px; margin-top: 12px; }
.join-action { text-align: center; }

/* ---------- 提示条 ---------- */
.alert {
  padding: 13px 20px; border-radius: 8px; margin: 22px auto 0;
  font-size: 14.5px; border: 1px solid; animation: fadeInUp 0.4s ease;
}
.alert-success { color: var(--ok); border-color: var(--ok-border); background: var(--ok-soft); }
.alert-error { color: var(--danger); border-color: var(--danger-border); background: var(--danger-soft); }
.alert p { margin: 2px 0; }
.alert.hide { opacity: 0; transition: opacity 0.6s; }

/* ---------- 认证页面（登录 / 注册） ---------- */
.auth-section { display: flex; justify-content: center; padding: 60px 0 70px; }
.auth-card { width: min(430px, 100%); padding: 38px 34px; animation: fadeInUp 0.5s ease; }
.auth-title { font-size: 26px; text-align: center; letter-spacing: 2px; }
.auth-sub { color: var(--text-dim); text-align: center; font-size: 14px; margin: 8px 0 24px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-dim); }
.auth-switch a { color: var(--cyan); text-decoration: none; }
.auth-switch a:hover { text-shadow: 0 0 10px var(--cyan); }

/* ---------- 表单 ---------- */
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label { font-size: 14px; color: var(--text-dim); }
.form-input {
  width: 100%; padding: 12px 14px; border-radius: 6px;
  background: rgba(13, 18, 14, 0.9); border: 1px solid var(--border);
  color: var(--text); font-size: 15px; outline: none; transition: 0.25s;
  font-family: var(--font);
}
.form-input:hover { border-color: rgba(156, 179, 128, 0.45); }
.form-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(156, 179, 128, 0.12), 0 0 14px rgba(156, 179, 128, 0.25);
  background: rgba(15, 21, 16, 0.95);
}
.form-input::placeholder { color: var(--text-dim); }
.form-input.invalid { border-color: var(--danger); box-shadow: 0 0 12px var(--danger-soft); }
.form-input.valid { border-color: var(--ok); }
.form-hint { min-height: 18px; font-size: 12.5px; color: var(--danger); }
.form-hint:empty { display: none; }

.checkbox { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text-dim); cursor: pointer; user-select: none; }
.checkbox input { accent-color: var(--gold); width: 16px; height: 16px; cursor: pointer; }
/* ---------- 留言板 ---------- */
.guestbook-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 40px 0 10px; }
.guestbook-title { font-size: 26px; letter-spacing: 2px; }
.guestbook-title small { font-size: 13px; color: var(--text-dim); letter-spacing: 0; margin-left: 10px; }

.post-card { padding: 22px; margin: 16px 0 30px; }
.post-card h3 { font-size: 16px; margin-bottom: 12px; color: var(--cyan); }
.post-form textarea {
  width: 100%; min-height: 110px; resize: vertical;
  padding: 13px 15px; border-radius: 6px; font-family: var(--font);
  background: rgba(13, 18, 14, 0.9); border: 1px solid var(--border);
  color: var(--text); font-size: 15px; outline: none; transition: 0.25s;
}
.post-form textarea:hover { border-color: rgba(156, 179, 128, 0.45); }
.post-form textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(156, 179, 128, 0.12), 0 0 14px rgba(156, 179, 128, 0.25);
  background: rgba(15, 21, 16, 0.95);
}
.post-form .post-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 12px; flex-wrap: wrap; }
.post-count { font-size: 12.5px; color: var(--text-dim); }

/* 留言列表 */
.msg-list { display: flex; flex-direction: column; gap: 16px; }
.msg-card {
  display: flex; gap: 16px; padding: 20px 22px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(8px); animation: fadeInUp 0.45s ease backwards;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.msg-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-cyan); }
.msg-body { flex: 1; min-width: 0; }
.msg-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-name { font-weight: 700; color: var(--gold); }
.msg-tag { font-size: 11.5px; color: #1a1400; background: var(--gold); padding: 2px 9px; border-radius: 6px; font-weight: 700; }
.msg-time { font-size: 12.5px; color: var(--text-dim); margin-left: auto; }
.msg-content { margin-top: 8px; color: var(--text); font-size: 15px; word-break: break-word; white-space: pre-wrap; }
.msg-delete { align-self: center; }
.btn-del {
  cursor: pointer; border: 1px solid var(--danger-border); border-radius: 6px;
  background: transparent; color: var(--danger); font-size: 12.5px; padding: 6px 13px;
  transition: 0.25s;
}
.btn-del:hover { background: var(--danger-soft); box-shadow: 0 0 12px var(--danger-soft); }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 34px 0 20px; flex-wrap: wrap; }
.page-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; color: var(--text-dim); font-size: 14px; }
.pagination a {
  min-width: 38px; padding: 8px 13px; text-align: center; text-decoration: none;
  color: var(--text-dim); border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; transition: 0.25s;
}
.pagination a:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: var(--shadow-cyan); }
.pagination a.active { color: #1a1400; background: var(--gold); border-color: var(--gold); font-weight: 700; box-shadow: var(--shadow-gold); }

/* 空状态 */
.empty { text-align: center; color: var(--text-dim); padding: 60px 0; }
.empty-icon { font-size: 44px; display: block; margin-bottom: 12px; }

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 40px; padding: 34px 0;
  border-top: 1px solid var(--border);
  background: rgba(9, 13, 10, 0.9);
  text-align: center;
}
/* 页脚顶部渐变分隔线 */
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--cyan) 70%, transparent);
  opacity: 0.5;
}
.footer-brand { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.footer-desc { color: var(--text-dim); font-size: 13.5px; }
.footer-copy { color: var(--text-dim); font-size: 12.5px; margin-top: 6px; }
.footer-visits { color: rgba(154, 163, 142, 0.7); font-size: 12.5px; margin-top: 6px; }

/* ---------- 动画 ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.6s ease backwards; }
.feature-card:nth-child(2) { animation-delay: 0.12s; }
.feature-card:nth-child(3) { animation-delay: 0.24s; }
.msg-card:nth-child(2) { animation-delay: 0.06s; }
.msg-card:nth-child(3) { animation-delay: 0.12s; }
.msg-card:nth-child(4) { animation-delay: 0.18s; }
.msg-card:nth-child(5) { animation-delay: 0.24s; }

/* 滚动进入动画：初始隐藏，进入视口后浮现 */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
/* 卡片阶梯延迟：依次出现 */
.reveal.reveal-1 { transition-delay: 0.08s; }
.reveal.reveal-2 { transition-delay: 0.16s; }
.reveal.reveal-3 { transition-delay: 0.24s; }
.reveal.reveal-4 { transition-delay: 0.32s; }
.reveal.reveal-5 { transition-delay: 0.4s; }
/* 禁用动画偏好：直接显示 */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .fade-in { animation: none; }
}
/* JS 未执行/失败时的安全兜底：3 秒后自动显示，防止内容永久隐藏 */
.no-js .reveal, .reveal-fallback .reveal { opacity: 1; transform: none; }

/* 空状态图标轻微浮动 */
.empty-icon { animation: emptyFloat 3s ease-in-out infinite; }
@keyframes emptyFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}


/* 邀请码徽章（可点击复制） */
.code-chip {
  cursor: pointer; border: 1px solid rgba(201, 162, 39, 0.5); border-radius: 6px;
  background: rgba(201, 162, 39, 0.08); color: var(--gold);
  font-family: Consolas, "Courier New", monospace; font-weight: 700; letter-spacing: 2px;
  padding: 6px 16px; font-size: 14px; transition: all 0.25s;
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.15);
}
.code-chip:hover { background: rgba(201, 162, 39, 0.2); box-shadow: 0 0 18px rgba(201, 162, 39, 0.45); transform: translateY(-2px); }

/* ---------- 管理后台 ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.code-input { display: flex; gap: 10px; align-items: center; }
.code-input .form-input { flex: 1; font-family: Consolas, "Courier New", monospace; letter-spacing: 2px; text-transform: uppercase; }
.admin-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-form { display: inline-block; margin: 0; }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-del.btn-sm { padding: 6px 12px; }

.admin-table-wrap { overflow-x: auto; margin-top: 6px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.admin-table th, .admin-table td {
  padding: 12px 14px; text-align: left; font-size: 14px;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.admin-table th {
  color: var(--cyan); font-weight: 600; white-space: nowrap;
  background: rgba(156, 179, 128, 0.05);
}
.admin-table tbody tr { transition: background 0.2s; }
.admin-table tbody tr:hover { background: rgba(156, 179, 128, 0.05); }
.admin-table .mountain-name { font-weight: 700; color: var(--text); white-space: nowrap; }
.admin-table .mountain-desc-cell { color: var(--text-dim); max-width: 220px; }
.admin-table .mountain-time { color: var(--text-dim); font-size: 13px; white-space: nowrap; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .logo { font-size: 18px; gap: 6px; }
  .logo-icon { width: 34px; height: 34px; }
  .nav-wrap { height: 60px; }
  .main-nav {
    position: fixed; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(10, 14, 11, 0.97); border-bottom: 1px solid var(--border);
    padding: 14px 5vw 20px; display: none;
    max-height: calc(100vh - 60px); overflow-y: auto;
  }
  .main-nav.open { display: flex; animation: fadeInUp 0.3s ease; }
  .nav-link { padding: 13px 16px; font-size: 16px; }
  .user-menu { margin-top: 6px; }
  .dropdown { position: static; width: 100%; margin-top: 8px; }
  .hero { padding: 60px 0 46px; }
  .hero-actions .btn { flex: 1 1 40%; }
  .cards-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .code-input { flex-wrap: wrap; }
  .join-box { padding: 32px 24px; justify-content: center; text-align: center; }
  .join-action .btn-lg { width: 100%; }
  .msg-card { flex-wrap: wrap; }
  .msg-time { margin-left: 0; width: 100%; }
  .msg-delete { width: 100%; }
  .msg-delete form, .msg-delete .btn-del { width: 100%; }
  .msg-delete .btn-del { display: block; text-align: center; padding: 10px; }
  .guestbook-header { justify-content: center; text-align: center; }
  .guestbook-header .badge { margin-top: 4px; }
  .pagination { gap: 6px; }
  .pagination a { min-width: 42px; padding: 10px 14px; }
  .post-foot .btn { width: 100%; }
  .post-foot .post-count { width: 100%; }
  .auth-switch { font-size: 13px; }
  .footer-inner { padding: 0 12px; }
  /* 输入框 16px：防止 iOS 聚焦时自动放大页面 */
  .form-input, .post-form textarea { font-size: 16px; }
}

/* ---------- 小屏手机（<480px） ---------- */
@media (max-width: 480px) {
  .container, .main-content { width: 94%; }
  .section { padding: 46px 0 4px; }
  .hero { padding: 46px 0 36px; gap: 30px; }
  .hero-title { letter-spacing: 2px; font-size: 38px; }
  .hero-tag { letter-spacing: 2px; padding: 5px 12px; font-size: 12.5px; }
  .hero-badges { gap: 8px; }
  .badge { padding: 6px 12px; font-size: 12.5px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { flex: 1 1 100%; padding: 13px 18px; }
  .hero-stats { gap: 12px; }
  .stat-card { padding: 14px 18px; }
  .stat-num { font-size: 24px; }
  .info-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 26px 16px; }
  .post-card { padding: 16px; }
  .msg-card { padding: 14px; gap: 12px; }
  .msg-content { font-size: 14.5px; }
  .guestbook-title { font-size: 21px; }
  .join-box { padding: 26px 16px; }
  .join-title { font-size: 23px; }
  .btn { padding: 12px 18px; font-size: 14.5px; }
  .btn-lg { padding: 14px 24px; font-size: 15.5px; }
  .logo { font-size: 17px; }
  .logo-icon { width: 30px; height: 30px; }
  .footer-desc { font-size: 12px; }
  .footer-copy { font-size: 11.5px; }
  .footer-visits { font-size: 11.5px; }
  .code-chip { padding: 7px 14px; font-size: 13px; }
  .user-btn { padding: 6px 10px 6px 5px; }
}
