/* ============================================================
   摇铃山景区 · 通用样式系统
   主色调：深林绿 / 米白背景 / 暖金点缀
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&family=Source+Code+Pro:wght@400;500;600&display=swap');

/* ============ CSS 变量 ============ */
:root {
  /* 背景色 */
  --bg-page: #f4f6f5;
  --bg-card: #ffffff;
  --bg-section: #ffffff;
  --bg-alt: #ebeef0;
  --bg-tint: #e8f0ec;

  /* 主色 - 深林绿 */
  --primary: #2d5a3f;
  --primary-dark: #1f4030;
  --primary-light: #4a7d5e;
  --primary-bg: #e8f0ec;

  /* 点缀 - 暖金 */
  --accent: #b8842e;
  --accent-light: #d4a548;
  --accent-bg: #faf3e2;

  /* 警示 - 朱红 */
  --danger: #a8324a;
  --danger-light: #c75570;
  --danger-bg: #fce8ec;

  /* 信息 - 墨蓝 */
  --info: #3a5a7c;
  --info-bg: #e6edf5;

  /* 文字色 */
  --text-main: #1f2d27;
  --text-body: #3a4a42;
  --text-light: #6b7a72;
  --text-muted: #9aa6a0;
  --text-on-primary: #ffffff;

  /* 边框 */
  --border: #d8dedc;
  --border-light: #e8eceb;
  --border-strong: #b8c4be;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(45, 90, 63, 0.08);
  --shadow: 0 2px 8px rgba(45, 90, 63, 0.10);
  --shadow-md: 0 4px 16px rgba(45, 90, 63, 0.12);
  --shadow-lg: 0 12px 32px rgba(45, 90, 63, 0.15);

  /* 圆角 */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* 字体 */
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  --font-serif: 'Noto Serif SC', 'Songti SC', serif;
  --font-mono: 'Source Code Pro', 'Courier New', Consolas, monospace;
}

/* ============ 重置 ============ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ============ 布局工具 ============ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 880px;
}

.section {
  padding: 64px 0;
}

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

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

.section-dark {
  background: var(--primary-dark);
  color: var(--text-on-primary);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
}

/* ============ 页头导航 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
}

.brand:hover {
  color: var(--text-main);
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  box-shadow: var(--shadow);
  position: relative;
}

.brand-logo::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0.4;
}

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

.brand-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 1px;
}

.brand-sub {
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: 2px;
  margin-top: 2px;
}

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

.nav-link {
  padding: 8px 16px;
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  position: relative;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.nav-link-kanyu {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-pill);
  line-height: 1.4;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .main-nav { gap: 0; }
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .brand-sub { display: none; }
}

/* ============ 页脚 ============ */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.footer-brand .brand-title {
  color: #fff;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 600px) {
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #9a6f24;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-body);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-alt);
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #8a2840;
  color: #fff;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 16px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ============ 卡片 ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card-accent {
  border-top: 3px solid var(--accent);
}

.card-primary {
  border-top: 3px solid var(--primary);
}

.card-danger {
  border-top: 3px solid var(--danger);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.card-text {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
}

/* ============ 标题 ============ */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 400px;
  height: 100%;
  background: radial-gradient(circle at 70% 30%, rgba(184, 132, 46, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.page-header p {
  font-size: 15px;
  opacity: 0.85;
  max-width: 640px;
}

.page-header .breadcrumb {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 16px;
}

.page-header .breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
}

.page-header .breadcrumb a:hover {
  color: #fff;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 40px;
}

.section-title.left {
  text-align: left;
}

/* ============ 表单 ============ */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 90, 63, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* ============ 徽章/标签 ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: var(--bg-alt);
  color: var(--text-light);
}

.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-accent  { background: var(--accent-bg);  color: var(--accent); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }

/* ============ 提示横幅 ============ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius);
  border-left: 4px solid;
  font-size: 14px;
  line-height: 1.6;
}

.alert-warning {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: #6b4d1a;
}

.alert-danger {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: #7a1f30;
}

.alert-info {
  background: var(--info-bg);
  border-color: var(--info);
  color: #2a4258;
}

.alert-success {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.alert-icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1.4;
}

/* ============ 工具类 ============ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-light  { color: var(--text-light); }
.text-primary{ color: var(--primary); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.font-serif  { font-family: var(--font-serif); }
.font-mono   { font-family: var(--font-mono); }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.hidden { display: none !important; }

/* ============ Toast 提示 ============ */
.toast-container {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 380px;
  animation: toast-in 0.3s;
  pointer-events: auto;
}

.toast.success { border-left-color: var(--primary); }
.toast.warning { border-left-color: var(--accent); }
.toast.error   { border-left-color: var(--danger); }
.toast.info    { border-left-color: var(--info); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

.fade-in { animation: fade-in 0.4s; }

/* ============ 图片 lightbox ============ */
.image-lightbox {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0, 0, 0, 0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 32px; cursor: zoom-out;
  animation: image-lightbox-fade 0.2s ease-out;
}
.image-lightbox img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: image-lightbox-zoom 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes image-lightbox-fade {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes image-lightbox-zoom {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ============ 档案原文弹窗（共用） ============ */
.archive-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.archive-modal.open { display: flex; }
.archive-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 30, 25, 0.55);
  backdrop-filter: blur(4px);
  animation: archive-fade-in 0.2s ease-out;
}
.archive-modal-card {
  position: relative; z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  max-width: 720px; width: 100%;
  max-height: 82vh;
  display: flex; flex-direction: column;
  animation: archive-pop-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.archive-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 22px;
  border-bottom: 1px solid var(--border-light);
}
.archive-modal-header h3 {
  margin: 0;
  font-family: var(--font-serif); font-size: 16px; font-weight: 600;
  color: var(--text-main);
}
.archive-modal-close {
  flex: 0 0 auto;
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--text-muted);
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.archive-modal-close:hover { color: var(--danger); background: var(--danger-bg); }
.archive-modal-body {
  margin: 0; padding: 0;
  overflow-y: auto;
  background: var(--bg-alt);
}
.archive-modal-content {
  margin: 0; padding: 20px 24px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.75;
  color: var(--text-body); white-space: pre-wrap; word-break: break-word;
}
.archive-modal-content .keyword { color: var(--text-main); font-weight: 700; }
.archive-modal-content .clue { color: var(--accent); font-weight: 700; }
.archive-modal-hidden {
  margin: 0 24px 18px; padding: 14px 16px;
  background: var(--bg-card);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(184, 132, 46, 0.1);
}
.archive-modal-hidden .hidden-label {
  font-family: var(--font-serif); font-size: 12px; font-weight: 600;
  color: var(--accent); margin-bottom: 6px; letter-spacing: 0.5px;
}
.archive-modal-hidden .hidden-text {
  font-family: var(--font-serif); font-size: 14px; line-height: 1.7;
  color: var(--text-light); font-style: italic;
}
.archive-modal-hidden .key-word {
  color: var(--accent); font-weight: 700; font-style: normal;
  border-bottom: 2px solid var(--accent); padding: 0 1px;
}
@keyframes archive-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes archive-pop-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
