/* 主题与基础排版 */
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #1e90ff;
  --brand-2: #00c2a8;
  --border: #e5e7eb;
  --accent: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --card: #0b1220;
  --text: #e5e7eb;
  --muted: #a1a1aa;
  --brand: #60a5fa;
  --brand-2: #34d399;
  --border: #1f2937;
  --accent: #fbbf24;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Noto Sans SC', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(30,144,255,.08), transparent 60%),
              radial-gradient(1000px 500px at 110% 0%, rgba(52,211,153,.08), transparent 60%),
              var(--bg);
}

img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input[type="search"] { font: inherit; }

/* 头部 */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 48px);
  backdrop-filter: saturate(1.2) blur(6px);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand .logo { width: 44px; height: 44px; }
.brand .titles h1 { margin: 0; font-size: clamp(18px, 2.6vw, 28px); font-weight: 700; }
.brand .subtitle { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.actions { display: flex; align-items: center; gap: 12px; }
.search-box {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px 6px 14px;
  box-shadow: var(--shadow);
}
.search-box input { border: none; outline: none; background: transparent; width: 220px; color: var(--text); }
.search-box button { border: none; background: transparent; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.search-box button:hover { color: var(--text); }

.theme-toggle { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.theme-toggle .sun, .theme-toggle .moon { pointer-events: none; }

/* 标签导航 */
.tabs { display: flex; gap: 10px; padding: 0 clamp(16px, 4vw, 48px) 10px; flex-wrap: wrap; }
.tab {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}
.tab.active, .tab:hover { border-color: transparent; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: white; }

/* 主体 */
.container { max-width: 1200px; margin: 0 auto; padding: 10px clamp(16px, 4vw, 48px) 60px; }

.hero { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 24px; padding: 20px 0 10px; }
.hero h2 { margin: 0 0 8px; font-size: clamp(20px, 3vw, 34px); }
.hero p { margin: 0 0 16px; color: var(--muted); }
.quick-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 12px; border-radius: 999px; border: 1px dashed var(--brand); background: rgba(30,144,255,.06); color: var(--brand); }
.chip:hover { background: rgba(30,144,255,.12); }
.hero-illu img { width: 100%; filter: drop-shadow(0 10px 18px rgba(0,0,0,.15)); }

/* 统计 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 10px 0 18px; }
.stat { display: grid; place-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.stat span { font-size: 22px; font-weight: 700; }
.stat label { color: var(--muted); font-size: 12px; }

/* 卡片网格 */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card .cover { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card .content { padding: 14px; display: grid; gap: 8px; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { padding: 4px 8px; border-radius: 999px; font-size: 12px; background: rgba(245,158,11,.15); color: #b45309; }
.badge.craft { background: rgba(30,144,255,.15); color: #155e75; }
.badge.cuisine { background: rgba(16,185,129,.18); color: #065f46; }
.badge.festival { background: rgba(245,158,11,.18); color: #92400e; }
.meta { color: var(--muted); font-size: 12px; }
.title { font-size: 16px; font-weight: 600; margin: 4px 0; }
.desc { color: var(--muted); font-size: 13px; line-height: 1.5; }
.card .actions { display: flex; justify-content: space-between; align-items: center; padding: 0 14px 14px; }
.btn { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: none; }

/* 空状态 */
.empty-state { text-align: center; color: var(--muted); padding: 40px 0; }
.empty-state.hidden { display: none; }

/* 页脚 */
.site-footer { text-align: center; color: var(--muted); padding: 26px; }
.scroll-top { position: fixed; right: 18px; bottom: 18px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }

/* 弹窗 */
.modal { position: fixed; inset: 0; display: none; }
.modal[aria-hidden="false"] { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-dialog { position: relative; margin: 6vh auto; width: min(900px, 92vw); background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 30px 60px rgba(0,0,0,.25); max-height: 88vh; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.modal-close { position: absolute; right: 12px; top: 10px; border: none; background: transparent; font-size: 22px; color: var(--muted); }
.modal-header { padding: 16px 20px 8px; border-bottom: 1px solid var(--border); }
.modal-meta { color: var(--muted); font-size: 12px; }
.lang-switch { display: inline-flex; gap: 8px; margin-top: 8px; }
.lang-btn { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-size: 12px; }
.lang-btn.active, .lang-btn:hover { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.modal-body { display: grid; grid-template-columns: 1fr; gap: 0; overflow: auto; }
.modal-cover { height: 260px; position: relative; background-size: cover; background-position: center; border-bottom: 1px solid var(--border); }
.modal-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.15), rgba(0,0,0,.25)); }
.modal-content { margin: 0; padding: 16px 20px 24px; white-space: pre-wrap; line-height: 1.7; font-size: 14px; color: var(--text); }

/* 双语内容 */
.bilingual { display: grid; gap: 10px; }
.bilingual .content-zh { font-size: 14px; line-height: 1.8; }
.bilingual .content-en { font-size: 13px; line-height: 1.8; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 10px; }

/* 响应式 */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .search-box input { width: 160px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
}


