/* ========================================
   韬略之道 · Tao of Strategy — Static Site
   ======================================== */

:root {
  --bg: #f5f0eb;
  --card-bg: #ffffff;
  --text: #2c2c2c;
  --text-muted: #7a6b5e;
  --border: #e0d5c8;
  --accent: #8b4513;
  --accent-light: #efe4d6;
  --accent-glow: #d4a574;
  --tag-bg: #f0ebe4;
  --tag-color: #6b4f3a;
  --face-jin: #c0392b;
  --face-jin-light: #fde8e4;
  --face-bi: #2c6faa;
  --face-bi-light: #e4edf8;
  --face-zhuan: #27ae60;
  --face-zhuan-light: #e4f5ec;
  --shadow: 0 4px 20px rgba(0,0,0,0.07);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 14px;
  --hero-start: #1a0f0a;
  --hero-mid: #3d2418;
  --hero-end: #8b4513;
}

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

body {
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
}

.container { max-width: 800px; margin: 0 auto; padding: 24px 20px; }

/* ---- Hero Header ---- */
header {
  text-align: center;
  padding: 60px 20px 44px;
  background: linear-gradient(145deg, var(--hero-start), var(--hero-mid), var(--hero-end));
  position: relative;
  overflow: hidden;
}
header::before {
  content: "☯";
  position: absolute;
  top: -30px;
  right: -20px;
  font-size: 14rem;
  opacity: 0.04;
  color: #fff;
  transform: rotate(15deg);
}
header::after {
  content: "⚔";
  position: absolute;
  bottom: -40px;
  left: -10px;
  font-size: 12rem;
  opacity: 0.03;
  color: #fff;
  transform: rotate(-10deg);
}
header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 6px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}
header h1 .jin { color: #e8a87c; }
header h1 .bi { color: #7fc8e8; }
header .subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  margin-top: 10px;
  position: relative;
  z-index: 1;
}
header .hero-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

/* ---- Navigation — 单行不换行 ---- */
nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 8px 0;
  margin: 0 auto 28px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }
nav a {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--card-bg);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
nav a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(139,69,19,0.2);
}

/* ---- Filter Bar ---- */
.filter-bar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.filter-row:last-child { margin-bottom: 0; }
.filter-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  min-width: 48px;
}

/* ---- Face Buttons ---- */
.face-btn {
  padding: 7px 20px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.face-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}
.face-btn.active-jin { background: linear-gradient(135deg, var(--face-jin), #e74c3c); color: #fff; border-color: var(--face-jin); }
.face-btn.active-bi { background: linear-gradient(135deg, var(--face-bi), #3498db); color: #fff; border-color: var(--face-bi); }
.face-btn.active-zhuan { background: linear-gradient(135deg, var(--face-zhuan), #2ecc71); color: #fff; border-color: var(--face-zhuan); }
.face-btn.active-all { background: linear-gradient(135deg, var(--accent), #a0522d); color: #fff; border-color: var(--accent); }

/* ---- Selects ---- */
.filter-select {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
}

/* ---- Action Buttons ---- */
.action-btn {
  padding: 8px 24px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: inherit;
  transition: all 0.25s;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.btn-random { background: linear-gradient(135deg, #f1c40f, #f39c12); color: #5a3e00; }
.btn-random:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(241,196,15,0.4); }
.btn-daily { background: linear-gradient(135deg, var(--accent-light), #f5e6d0); color: var(--accent); }
.btn-daily:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(139,69,19,0.2); }

/* ---- Quote Cards ---- */
.quote-list { display: flex; flex-direction: column; gap: 22px; }

.quote-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.quote-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s;
}
.quote-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.quote-card:hover::before { opacity: 1; }

.quote-text {
  font-size: 1.35rem;
  line-height: 1.9;
  margin-bottom: 14px;
  color: var(--text);
  quotes: "「" "」";
  font-weight: 500;
}
.quote-text::before { content: "「"; color: var(--accent); font-weight: 700; }
.quote-text::after { content: "」"; color: var(--accent); font-weight: 700; }

.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.daily-badge {
  padding: 3px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f1c40f, #f39c12);
  color: #5a3e00;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ---- Daily Card ---- */
.daily-card {
  border: 2px solid var(--accent-glow);
  background: linear-gradient(135deg, #fffdfa, #fef8f0);
  position: relative;
}
.daily-card::after {
  content: '🪙';
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.6rem;
  opacity: 0.15;
}
.daily-card:hover { border-color: var(--accent); }

.daily-section {
  margin-bottom: 36px;
  padding: 20px 0;
  border-bottom: 2px dashed var(--border);
}
.daily-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.daily-header h2 {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 700;
}
.daily-header .date-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 12px;
}
.page-btn {
  padding: 10px 24px;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  min-width: 48px;
  font-weight: 500;
}
.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(139,69,19,0.15);
}
.page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.page-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0 12px;
  font-weight: 500;
  min-width: 70px;
  text-align: center;
}

/* ---- Quote Meta ---- */
.quote-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.quote-meta a {
  color: var(--accent);
  text-decoration: none;
}
.quote-meta a:hover { text-decoration: underline; }

.quote-interp {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.8;
  padding: 14px 16px;
  background: #faf8f5;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  margin-bottom: 12px;
}

.quote-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.quote-tags span {
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--tag-bg);
  color: var(--tag-color);
  font-size: 0.78rem;
}

/* ---- Face Badge ---- */
.face-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}
.badge-jin { background: linear-gradient(135deg, var(--face-jin), #e74c3c); }
.badge-bi { background: linear-gradient(135deg, var(--face-bi), #3498db); }
.badge-zhuan { background: linear-gradient(135deg, var(--face-zhuan), #2ecc71); }

/* ---- Topics Grid ---- */
.topics-grid { margin-bottom: 28px; }
.section-title {
  font-size: 1.1rem;
  color: var(--accent);
  text-align: center;
  margin-bottom: 16px;
  font-weight: 700;
  letter-spacing: 2px;
}
.topic-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.topic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s;
  box-shadow: var(--shadow);
}
.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.topic-icon { font-size: 1.8rem; line-height: 1; }
.topic-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}
.topic-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

/* ---- Count Info ---- */
.count-info {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* ---- Footer ---- */
footer {
  text-align: center;
  padding: 36px 20px;
  font-size: 0.82rem;
  background: linear-gradient(145deg, #1a0f0a, #2c1a12);
  color: rgba(255,255,255,0.6);
  margin-top: 48px;
}
footer a { color: var(--accent-glow); text-decoration: none; }
footer a:hover { color: #fff; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  header h1 { font-size: 1.5rem; }
  .quote-card { padding: 20px 18px; }
  .quote-text { font-size: 1.15rem; }
  .filter-row { flex-direction: column; align-items: flex-start; }
  .topic-cards { grid-template-columns: repeat(2, 1fr); }
  nav a { padding: 4px 10px; font-size: 0.78rem; }
}
