/* ═══════════════════════════════════════════════════════════
   I Ching (易经) Learning Website — Master Stylesheet
   Cultural Fusion: Ink Wash × Modern Minimalism
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────────── */
:root {
  /* Ink & Parchment Palette */
  --ink:        #1a1a2e;
  --ink-light:  #2d2d44;
  --ink-faded:  #4a4a6a;
  --parchment:  #f5f0e8;
  --parchment-warm: #ede4d3;
  --cream:      #faf8f4;
  --seal-red:   #c0392b;
  --seal-red-soft: #e74c3c;
  --gold:       #b8860b;
  --gold-light: #d4a843;
  --jade:       #2e8b57;
  --jade-light: #3cb371;

  /* Difficulty Badges */
  --beginner:     #27ae60;
  --intermediate: #e67e22;
  --advanced:     #8e44ad;

  /* Typography */
  --font-display: 'Noto Serif SC', 'Georgia', serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Borders & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(26,26,46,0.08);
  --shadow-md:  0 4px 12px rgba(26,26,46,0.10);
  --shadow-lg:  0 8px 30px rgba(26,26,46,0.12);
  --shadow-xl:  0 16px 50px rgba(26,26,46,0.15);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-med:  0.4s var(--ease-out);
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--seal-red); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--seal-red-soft); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.3;
  color: var(--ink);
}

/* ── Utility Classes ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ── Difficulty Badges ─────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-beginner     { background: #e8f8f0; color: var(--beginner); }
.badge-intermediate { background: #fef3e2; color: var(--intermediate); }
.badge-advanced     { background: #f3e8f9; color: var(--advanced); }
.badge::before { content: '●'; font-size: 0.5em; }

/* ── Navigation ────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250,248,244,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26,26,46,0.06);
  transition: box-shadow var(--transition-med);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.nav-logo:hover { color: var(--ink); }

.nav-logo .yin-yang { 
  width: 32px; 
  height: 16px; 
  position: relative; 
  background: var(--parchment); 
  border: 2px solid var(--ink); 
  border-width: 2px 2px 18px 2px; 
  border-radius: 50%; 
  flex-shrink: 0; 
  animation: rotateTaiji 4s linear infinite; 
} 
 
.nav-logo .yin-yang::before, 
.nav-logo .yin-yang::after { 
  content: ""; 
  position: absolute; 
  width: 8px; 
  height: 8px; 
  border-radius: 50%; 
  left: 50%; 
  transform: translateX(-50%); 
} 
 
.nav-logo .yin-yang::before { 
  top: 0; 
  background: var(--ink); 
  border: 4px solid var(--parchment); 
  transform: translate(-50%, -50%); 
} 
 
.nav-logo .yin-yang::after { 
  top: 100%; 
  background: var(--parchment); 
  border: 4px solid var(--ink); 
  transform: translate(-50%, -50%); 
} 
 
@keyframes rotateTaiji { 
  0% { transform: rotate(0deg); } 
  100% { transform: rotate(360deg); } 
} 

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  color: var(--ink-faded);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--seal-red);
  transition: width var(--transition-med);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--ink);
  transition: all var(--transition-fast);
  border-radius: 2px;
}

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    gap: 0;
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(26,26,46,0.08);
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--transition-med);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: var(--space-md) var(--space-xl);
  }
  .nav-links a::after { display: none; }
}

/* ── Hero Section ──────────────────────────────────────── */
.hero {
  position: relative;
  padding: var(--space-3xl) 0;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cream) 0%, var(--parchment) 50%, var(--parchment-warm) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(192,57,43,0.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -5%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(26,26,46,0.03) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--space-lg);
}

.hero-text h1 .accent { color: var(--seal-red); }
.hero-text h1 .pinyin {
  display: block;
  font-size: 0.4em;
  color: var(--ink-faded);
  font-weight: 400;
  margin-bottom: var(--space-xs);
  letter-spacing: 0.08em;
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--ink-faded);
  max-width: 500px;
  margin-bottom: var(--space-xl);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Bagua Wheel SVG-style */
.bagua-wheel {
  width: 320px; height: 320px;
  position: relative;
  animation: slowSpin 60s linear infinite;
}
@keyframes slowSpin {
  to { transform: rotate(360deg); }
}

.bagua-wheel .trigram-ring {
  position: absolute;
  width: 100%; height: 100%;
}

.bagua-wheel .center-yin-yang {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100px; height: 100px;
  background: conic-gradient(var(--ink) 0deg, var(--ink) 180deg, var(--parchment-warm) 180deg, var(--parchment-warm) 360deg);
  border-radius: 50%;
  border: 3px solid var(--ink);
}
.bagua-wheel .center-yin-yang::before,
.bagua-wheel .center-yin-yang::after {
  content: '';
  position: absolute;
  width: 50px; height: 50px;
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
}
.bagua-wheel .center-yin-yang::before {
  top: 0;
  background: var(--ink);
  box-shadow: inset 5px 5px 0 3px var(--parchment-warm);
}
.bagua-wheel .center-yin-yang::after {
  bottom: 0;
  background: var(--parchment-warm);
  box-shadow: inset -5px -5px 0 3px var(--ink);
}

@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-visual { order: -1; }
  .bagua-wheel { width: 220px; height: 220px; }
  .bagua-wheel .center-yin-yang { width: 70px; height: 70px; }
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.btn-primary {
  background: var(--ink);
  color: var(--parchment);
}
.btn-primary:hover {
  background: var(--ink-light);
  color: var(--parchment);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(26,26,46,0.2);
}
.btn-secondary:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}
.btn-red {
  background: var(--seal-red);
  color: white;
}
.btn-red:hover {
  background: var(--seal-red-soft);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(192,57,43,0.3);
}

/* ── Section Titles ────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}
.section-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: var(--space-sm);
}
.section-header .pinyin {
  color: var(--seal-red);
  font-size: 0.85em;
  font-weight: 400;
}
.section-header p {
  color: var(--ink-faded);
  font-size: 1.05rem;
  max-width: 600px;
  margin: var(--space-sm) auto 0;
}

/* ── Cards ─────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid rgba(26,26,46,0.06);
  transition: all var(--transition-med);
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(26,26,46,0.1);
}

.card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
}
.card-icon.ink-bg  { background: var(--ink); color: var(--parchment); }
.card-icon.red-bg  { background: var(--seal-red); color: white; }
.card-icon.jade-bg { background: var(--jade); color: white; }
.card-icon.gold-bg { background: var(--gold); color: white; }

.card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
}
.card p {
  color: var(--ink-faded);
  font-size: 0.92rem;
  line-height: 1.6;
}
.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-lg);
  font-weight: 600;
  font-size: 0.9rem;
}
.card .card-link::after {
  content: '→';
  transition: transform var(--transition-fast);
}
.card:hover .card-link::after { transform: translateX(4px); }

/* ── Hexagram Grid (for 64 hexagrams) ──────────────────── */
.hexagram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
}

.hexagram-card {
  background: white;
  border: 1px solid rgba(26,26,46,0.06);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-fast);
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.hexagram-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--seal-red);
  color: var(--ink);
}

.hexagram-symbol {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  line-height: 1;
  letter-spacing: 2px;
}

.hexagram-card .number {
  font-size: 0.7rem;
  color: var(--ink-faded);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hexagram-card .name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 4px;
}
.hexagram-card .pinyin {
  font-size: 0.75rem;
  color: var(--seal-red);
}

/* ── Feature Banner ────────────────────────────────────── */
.feature-banner {
  background: var(--ink);
  color: var(--parchment);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  margin: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
}
.feature-banner::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(192,57,43,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.feature-banner h2 { color: var(--parchment); font-size: 1.8rem; margin-bottom: var(--space-md); }
.feature-banner p { color: rgba(245,240,232,0.7); max-width: 600px; margin-bottom: var(--space-xl); }
.feature-banner .btn-primary { background: var(--seal-red); }
.feature-banner .btn-primary:hover { background: var(--seal-red-soft); }

/* ── Trigram Table ─────────────────────────────────────── */
.trigram-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
}
.trigram-table th,
.trigram-table td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 1px solid rgba(26,26,46,0.08);
}
.trigram-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faded);
  font-weight: 600;
}
.trigram-table tr:hover { background: rgba(26,26,46,0.02); }
.trigram-symbol { font-size: 1.4rem; letter-spacing: 3px; }

/* ── Content Page Layout ───────────────────────────────── */
.content-page {
  padding: var(--space-3xl) 0;
}

.content-page .breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--ink-faded);
  margin-bottom: var(--space-xl);
}
.content-page .breadcrumb a { color: var(--ink-faded); }
.content-page .breadcrumb a:hover { color: var(--seal-red); }
.content-page .breadcrumb span { opacity: 0.5; }

.content-header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(26,26,46,0.08);
}
.content-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: var(--space-sm);
}
.content-header .subtitle {
  color: var(--ink-faded);
  font-size: 1.05rem;
}

.content-body h2 {
  font-size: 1.5rem;
  margin: var(--space-2xl) 0 var(--space-md);
  padding-top: var(--space-md);
}
.content-body h3 {
  font-size: 1.2rem;
  margin: var(--space-xl) 0 var(--space-sm);
}
.content-body p {
  margin-bottom: var(--space-md);
  color: var(--ink-light);
}
.content-body ul, .content-body ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
  color: var(--ink-light);
}
.content-body li { margin-bottom: var(--space-sm); }

.content-body blockquote {
  border-left: 3px solid var(--seal-red);
  padding: var(--space-md) var(--space-xl);
  margin: var(--space-xl) 0;
  background: rgba(192,57,43,0.03);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--ink-faded);
}

/* Hexagram Detail */
.hexagram-detail {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-2xl);
  margin: var(--space-2xl) 0;
  align-items: start;
}

.hexagram-large-symbol {
  font-size: 4rem;
  line-height: 1.2;
  letter-spacing: 6px;
  font-family: var(--font-display);
  text-align: center;
  padding: var(--space-xl);
  background: var(--parchment);
  border-radius: var(--radius-lg);
}

.hexagram-meta h1 { font-size: 2rem; }
.hexagram-meta .pinyin { color: var(--seal-red); font-size: 1rem; }

@media (max-width: 640px) {
  .hexagram-detail { grid-template-columns: 1fr; }
  .hexagram-large-symbol { font-size: 3rem; }
}

/* ── Sidebar (Content Pages) ───────────────────────────── */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-2xl);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 84px;
}

.sidebar-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid rgba(26,26,46,0.06);
  margin-bottom: var(--space-lg);
}
.sidebar-section h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faded);
  margin-bottom: var(--space-md);
}
.sidebar-section ul { list-style: none; }
.sidebar-section li { margin-bottom: var(--space-sm); }
.sidebar-section a {
  color: var(--ink-light);
  font-size: 0.9rem;
  display: block;
  padding: 4px 0;
  transition: color var(--transition-fast);
}
.sidebar-section a:hover { color: var(--seal-red); }
.sidebar-section a.active { color: var(--seal-red); font-weight: 600; }

@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* ── Category Hero ─────────────────────────────────────── */
.category-hero {
  padding: var(--space-3xl) 0;
  text-align: center;
  background: linear-gradient(180deg, var(--parchment) 0%, var(--cream) 100%);
  position: relative;
}
.category-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: var(--space-sm);
}
.category-hero .pinyin {
  color: var(--seal-red);
  font-weight: 400;
  font-size: 0.9em;
}
.category-hero p {
  color: var(--ink-faded);
  font-size: 1.1rem;
  max-width: 600px;
  margin: var(--space-md) auto 0;
}

/* ── Footer ────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(245,240,232,0.6);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-top: var(--space-md);
}

.footer h4 {
  color: var(--parchment);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-lg);
}
.footer ul { list-style: none; }
.footer li { margin-bottom: var(--space-sm); }
.footer a {
  color: rgba(245,240,232,0.5);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}
.footer a:hover { color: var(--parchment); }

.footer-bottom {
  border-top: 1px solid rgba(245,240,232,0.08);
  padding-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-md); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Divination Tool ───────────────────────────────────── */
.divination-tool {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  border: 1px solid rgba(26,26,46,0.06);
  text-align: center;
}

.coin {
  display: inline-flex;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 var(--space-sm);
  box-shadow: 0 2px 8px rgba(184,134,11,0.3);
  transition: transform var(--transition-fast);
}
.coin.animate {
  animation: coinFlip 0.6s ease-out;
}
@keyframes coinFlip {
  0%   { transform: rotateY(0) scale(1); }
  50%  { transform: rotateY(180deg) scale(1.2); }
  100% { transform: rotateY(360deg) scale(1); }
}

.line-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: var(--space-md) 0;
}
.line-result .yin { width: 60px; height: 8px; background: var(--ink); border-radius: 2px; position: relative; }
.line-result .yin::after { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 20px; height: 8px; background: var(--cream); border-radius: 1px; }
.line-result .yang { width: 60px; height: 8px; background: var(--ink); border-radius: 2px; }

/* ── Search ────────────────────────────────────────────── */
.search-box {
  position: relative;
  max-width: 500px;
  margin: 0 auto var(--space-2xl);
}
.search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 1.5px solid rgba(26,26,46,0.12);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-family: var(--font-body);
  background: white;
  transition: all var(--transition-fast);
}
.search-box input:focus {
  outline: none;
  border-color: var(--seal-red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
.search-box .search-icon {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faded);
  font-size: 1.1rem;
}

/* ── Tabs ──────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid rgba(26,26,46,0.08);
  margin-bottom: var(--space-xl);
}
.tab-btn {
  padding: var(--space-md) var(--space-xl);
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-faded);
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active {
  color: var(--seal-red);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 2px;
  background: var(--seal-red);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Daily Hexagram Widget ─────────────────────────────── */
.daily-widget {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-light) 100%);
  color: var(--parchment);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.daily-widget::before {
  content: '';
  position: absolute;
  top: -30%; right: -15%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(192,57,43,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.daily-widget .symbol {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}
.daily-widget h3 { color: var(--parchment); margin-bottom: var(--space-sm); }
.daily-widget .pinyin { color: var(--seal-red-soft); }
.daily-widget p { color: rgba(245,240,232,0.7); }

/* ── Ink Wash Decorative Elements ──────────────────────── */
.ink-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--ink-faded) 20%, var(--ink) 50%, var(--ink-faded) 80%, transparent 100%);
  opacity: 0.15;
  margin: var(--space-2xl) 0;
}

.ink-dot {
  width: 6px; height: 6px;
  background: var(--seal-red);
  border-radius: 50%;
  display: inline-block;
}

/* ── Myth vs Reality Section ───────────────────────────── */
.myth-reality {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin: var(--space-2xl) 0;
}
.myth-card, .reality-card {
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
}
.myth-card {
  background: rgba(192,57,43,0.04);
  border: 1px solid rgba(192,57,43,0.12);
}
.myth-card h4 { color: var(--seal-red); }
.reality-card {
  background: rgba(46,139,87,0.04);
  border: 1px solid rgba(46,139,87,0.12);
}
.reality-card h4 { color: var(--jade); }

@media (max-width: 640px) {
  .myth-reality { grid-template-columns: 1fr; }
}

/* ── Quiz / Quick Taste ────────────────────────────────── */
.quiz-container {
  max-width: 600px;
  margin: 0 auto;
}
.quiz-question {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  border: 1px solid rgba(26,26,46,0.06);
  margin-bottom: var(--space-lg);
}
.quiz-question h3 {
  margin-bottom: var(--space-lg);
}
.quiz-option {
  display: block;
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
  border: 1.5px solid rgba(26,26,46,0.1);
  border-radius: var(--radius-md);
  background: white;
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}
.quiz-option:hover {
  border-color: var(--seal-red);
  background: rgba(192,57,43,0.02);
}
.quiz-option.selected {
  border-color: var(--seal-red);
  background: rgba(192,57,43,0.06);
}

/* ── Animations ────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  animation: fadeInUp 0.6s var(--ease-out) forwards;
}
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }

/* ── Print Styles ──────────────────────────────────────── */
@media print {
  .navbar, .footer, .btn { display: none; }
  body { background: white; color: black; }
  .container { max-width: 100%; }
}
