/* ============================================
   Celestial Destiny — Ba Zi & Feng Shui
   Design: Dark mystical with gold accents
   Target: Western audience drawn to Chinese metaphysics
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-deep: #0d0d0d;
  --bg-card: #1a1a1a;
  --bg-card-alt: #22201c;
  --gold: #c9a96e;
  --gold-light: #e0c88e;
  --gold-dark: #a07c3e;
  --red: #8b2e2e;
  --red-light: #c44f4f;
  --cream: #f0ebe0;
  --text-primary: #e8e0d5;
  --text-secondary: #b0a590;
  --text-muted: #6b6560;
  --border-color: #33302a;
  --border-gold: rgba(201, 169, 110, 0.3);
  --font-heading: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-cn: 'Noto Serif SC', 'SimSun', serif;
  --font-body: 'Cormorant Garamond', 'Georgia', serif;
  --radius: 8px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--cream);
}

.section-title {
  font-size: 2.6rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 60%;
  height: 2px;
  background: linear-gradient(to right, var(--gold), transparent);
  margin-top: 0.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-gold);
  transition: var(--transition);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--transition);
  letter-spacing: 0.5px;
}

.nav-links a:hover { color: var(--gold); }

/* Language Toggle */
.lang-toggle {
  background: none;
  border: 1px solid var(--border-gold);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-cn);
  font-size: 0.9rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang-toggle:hover { border-color: var(--gold); color: var(--gold); }
.lang-toggle .active { color: var(--gold); font-weight: 700; }

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(201, 169, 110, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(139, 46, 46, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 60%, rgba(201, 169, 110, 0.04) 0%, transparent 40%);
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(201,169,110,0.015) 2px, rgba(201,169,110,0.015) 3px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(201,169,110,0.015) 2px, rgba(201,169,110,0.015) 3px);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 750px;
}

.hero-symbol {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  animation: float 6s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  background: linear-gradient(to bottom, var(--cream), var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 14px 40px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 1px;
  transition: all var(--transition);
  text-transform: uppercase;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(201, 169, 110, 0.25);
}

.btn-full { width: 100%; }

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-arrow {
  animation: bounce 2s ease-in-out infinite;
  font-size: 1.2rem;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* --- Sections --- */
.section {
  padding: 6rem 0;
}

.section-dark { background: var(--bg-deep); }
.section-light { background: #12110e; }

/* --- Ba Zi Calculator --- */
.bazi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

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

.bazi-form-card, .bazi-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
}

.bazi-form-card::before, .bazi-result-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold-dark), transparent);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 1.8rem;
  color: var(--gold);
}

/* Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
}

.form-hint {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Results */
.result-placeholder {
  text-align: center;
  padding: 3rem 1rem;
}

.placeholder-symbol {
  font-family: var(--font-cn);
  font-size: 5rem;
  color: var(--gold-dark);
  opacity: 0.3;
  margin-bottom: 1.5rem;
}

.result-placeholder p {
  color: var(--text-muted);
  font-style: italic;
}

/* Pillars Display */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 480px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
}

.pillar {
  text-align: center;
  padding: 1.2rem 0.5rem;
  background: var(--bg-card-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.pillar-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.pillar-stem {
  font-family: var(--font-cn);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.2;
}

.pillar-branch {
  font-family: var(--font-cn);
  font-size: 2rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.2;
}

/* Element Analysis */
.subsection-title {
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.element-bars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.element-bar-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.element-bar-label {
  width: 50px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.element-bar-track {
  flex: 1;
  height: 10px;
  background: var(--bg-card-alt);
  border-radius: 5px;
  overflow: hidden;
}

.element-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s ease;
}

.element-bar-fill.wood  { background: #5b8c5a; }
.element-bar-fill.fire  { background: #c44f4f; }
.element-bar-fill.earth { background: #c9a040; }
.element-bar-fill.metal { background: #b8b8b8; }
.element-bar-fill.water { background: #4a6fa5; }

.element-bar-count {
  width: 24px;
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Day Master */
#dayMasterText {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* --- Five Elements Section --- */
.elements-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

@media (max-width: 900px) {
  .elements-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 500px) {
  .elements-grid { grid-template-columns: 1fr 1fr; }
}

.element-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.element-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  transition: height var(--transition);
}

.element-card[data-element="wood"]::before  { background: #5b8c5a; }
.element-card[data-element="fire"]::before  { background: #c44f4f; }
.element-card[data-element="earth"]::before { background: #c9a040; }
.element-card[data-element="metal"]::before { background: #b8b8b8; }
.element-card[data-element="water"]::before { background: #4a6fa5; }

.element-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
}

.element-card:hover::before { height: 5px; }

.element-icon {
  font-family: var(--font-cn);
  font-size: 3rem;
  margin-bottom: 0.8rem;
  line-height: 1;
}

.element-card[data-element="wood"] .element-icon  { color: #5b8c5a; }
.element-card[data-element="fire"] .element-icon  { color: #c44f4f; }
.element-card[data-element="earth"] .element-icon { color: #c9a040; }
.element-card[data-element="metal"] .element-icon { color: #b8b8b8; }
.element-card[data-element="water"] .element-icon { color: #4a6fa5; }

.element-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.element-zh {
  font-family: var(--font-cn);
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.element-card p:last-child {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Cycles */
.cycles-diagram {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 600px) {
  .cycles-diagram { grid-template-columns: 1fr; }
}

.cycle-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
}

.cycle-box h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.creative-cycle h3 { color: #5b8c5a; }
.control-cycle h3 { color: #c44f4f; }

.cycle-box p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Feng Shui Section --- */
.fengshui-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 768px) {
  .fengshui-content { grid-template-columns: 1fr; }
}

/* Bagua Diagram */
.bagua-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.bagua-diagram {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 2px solid var(--gold-dark);
}

.bagua-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  z-index: 2;
}

.bagua-sector {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  transform: rotate(var(--angle));
}

.bagua-content {
  position: absolute;
  top: -135px;
  left: 0;
  transform: translateX(-50%) rotate(calc(-1 * var(--angle)));
  text-align: center;
  width: 100px;
  /* Ensure crisp text rendering after transform */
  -webkit-font-smoothing: antialiased;
  backface-visibility: hidden;
}

.bagua-content span {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1.3;
}

.bagua-content small {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* Feng Shui Principles */
.fengshui-principles {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.principle h4 {
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.principle p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Footer --- */
.footer {
  background: #080808;
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 2rem;
}

@media (max-width: 600px) {
  .footer-content { flex-direction: column; }
}

.footer-brand h3 {
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-style: italic;
}

.footer-disclaimer {
  max-width: 500px;
}

.footer-disclaimer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* --- Selection --- */
::selection {
  background: rgba(201, 169, 110, 0.25);
  color: var(--cream);
}

/* ============================================
   NEW V3 COMPONENTS
   ============================================ */

/* --- Particle Canvas (Hero background) --- */
#particleCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* --- Section Intro --- */
.section-intro {
  text-align: center;
  margin-bottom: 3rem;
}

/* --- Free Tools Section --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 900px) {
  .tools-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .tools-grid { grid-template-columns: 1fr; }
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold-dark), transparent);
}

.tool-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.tool-card-icon {
  font-family: var(--font-cn);
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.tool-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--cream);
}

.tool-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

/* --- Zodiac Explorer --- */
.zodiac-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.zodiac-chip {
  padding: 8px 16px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}

.zodiac-chip:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.zodiac-chip.active {
  background: rgba(201, 169, 110, 0.15);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
}

.zodiac-result {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  display: none;
}

.zodiac-result.visible { display: block; }

.zodiac-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.zodiac-animal-icon {
  font-family: var(--font-cn);
  font-size: 4rem;
  line-height: 1;
  color: var(--gold-light);
}

.zodiac-title h3 {
  font-size: 1.8rem;
  margin-bottom: 0.2rem;
}

.zodiac-element-badge {
  display: inline-block;
  padding: 3px 12px;
  background: rgba(201, 169, 110, 0.15);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--gold);
}

.zodiac-traits { margin-bottom: 1.5rem; }
.zodiac-traits p { margin-bottom: 0.8rem; color: var(--text-secondary); line-height: 1.7; }
.zodiac-traits strong { color: var(--text-primary); }

.zodiac-compat {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.zodiac-compat span.label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.zodiac-compat span.animal {
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  background: rgba(91, 140, 90, 0.15);
  color: #5b8c5a;
}

.zodiac-compat span.animal.incompat {
  background: rgba(196, 79, 79, 0.15);
  color: #c44f4f;
}

/* --- Dream Search --- */
.dream-search {
  max-width: 600px;
  margin: 0 auto;
}

.search-input-wrap {
  position: relative;
  margin-bottom: 2rem;
}

.search-input-wrap input {
  width: 100%;
  padding: 16px 20px;
  padding-right: 50px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
  transition: border-color var(--transition);
}

.search-input-wrap input:focus {
  outline: none;
  border-color: var(--gold);
}

.search-input-wrap input::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--text-muted);
}

.dream-results { display: none; }

.dream-result-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1rem;
  transition: all var(--transition);
}

.dream-result-card:hover {
  border-color: var(--border-gold);
}

.dream-result-card h4 {
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.dream-result-card .meaning {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.dream-result-card .guidance {
  color: var(--cream);
  font-style: italic;
  padding-left: 1rem;
  border-left: 2px solid var(--gold-dark);
}

.dream-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* --- Quick Element Quiz --- */
.quiz-container {
  max-width: 500px;
  margin: 0 auto;
}

.quiz-question {
  margin-bottom: 2rem;
}

.quiz-question h4 {
  font-size: 1.1rem;
  color: var(--cream);
  margin-bottom: 1rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quiz-option {
  padding: 12px 16px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.quiz-option:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.quiz-option.selected {
  background: rgba(201, 169, 110, 0.1);
  border-color: var(--gold);
  color: var(--gold);
}

.quiz-result {
  display: none;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}

.quiz-result.visible { display: block; }

.quiz-result .element-icon-large {
  font-family: var(--font-cn);
  font-size: 5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.quiz-result h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.quiz-result p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.quiz-result .quiz-cta {
  margin-top: 1.5rem;
}

/* --- BaZi Result Enhanced --- */
.result-english {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.pillar-english-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

.bazi-interpretation {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-card-alt);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold-dark);
}

.bazi-interpretation h4 {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.bazi-interpretation .metaphor {
  color: var(--cream);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
  font-style: italic;
}

.bazi-interpretation .strengths,
.bazi-interpretation .challenges,
.bazi-interpretation .career,
.bazi-interpretation .advice {
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.92rem;
}

.bazi-interpretation strong {
  color: var(--text-primary);
}

.paywall-cta {
  margin-top: 2rem;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(180deg, rgba(201,169,110,0.08) 0%, rgba(201,169,110,0.02) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
}

.paywall-cta .paywall-heading {
  display: block;
  font-size: 1.3rem;
  color: var(--cream);
  margin-bottom: 0.8rem;
}

.paywall-cta p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.paywall-cta .price-tag {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
  margin-bottom: 1.5rem;
}

/* --- Pricing Section --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
}

@media (max-width: 1100px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .pricing-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 450px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
}

.pricing-card.featured {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, rgba(201,169,110,0.08) 0%, var(--bg-card) 30%);
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--bg-deep);
  font-size: 0.7rem;
  padding: 4px 14px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pricing-name {
  font-size: 1.4rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 1.2rem;
  font-family: var(--font-heading);
}

.pricing-features {
  list-style: none;
  text-align: left;
  flex: 1;
  margin-bottom: 1.5rem;
}

.pricing-features li {
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  line-height: 1.5;
}

.pricing-features li:last-child { border-bottom: none; }

.pricing-features li::before {
  content: '· ';
  color: var(--gold);
  font-weight: 700;
}

.btn-outline {
  display: inline-block;
  padding: 10px 24px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: all var(--transition);
}

.btn-outline:hover {
  background: rgba(201, 169, 110, 0.1);
  border-color: var(--gold);
}

.btn-coming-soon {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: auto;
}
.btn-coming-soon:hover {
  transform: none !important;
  box-shadow: none !important;
  background: inherit;
}

/* --- Footer Payment/Badges --- */
.footer-badges {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-badges span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* --- Blog Teaser --- */
.blog-teaser {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.blog-teaser p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-style: italic;
}

.blog-teaser a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.blog-teaser a:hover { text-decoration: underline; }

/* --- Declarative Separator --- */
.section-sep {
  width: 40px;
  height: 2px;
  background: var(--gold-dark);
  margin: 2rem auto;
}

/* --- Consultation CTA Banner --- */
.consult-banner {
  margin-top: 4rem;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
}

.consult-banner h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--cream);
}

.consult-banner p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* --- Payment Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 480px;
  width: 90%;
  text-align: center;
}

.modal-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--cream);
}

.modal-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.modal-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-family: var(--font-heading);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  color: var(--cream);
  padding: 14px 28px;
  border-radius: 4px;
  z-index: 3000;
  font-size: 0.95rem;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: none;
}

@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(-10px); } }

/* --- Responsive Nav (mobile hamburger) --- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(13, 13, 13, 0.98);
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--border-color);
  }
  .nav-toggle { display: block; }
}

/* --- Element color classes (extended) --- */
.elem-wood  { color: #5b8c5a; }
.elem-fire  { color: #c44f4f; }
.elem-earth { color: #c9a040; }
.elem-metal { color: #b8b8b8; }
.elem-water { color: #4a6fa5; }

.elem-bg-wood  { background: rgba(91, 140, 90, 0.15); }
.elem-bg-fire  { background: rgba(196, 79, 79, 0.15); }
.elem-bg-earth { background: rgba(201, 160, 64, 0.15); }
.elem-bg-metal { background: rgba(184, 184, 184, 0.15); }
.elem-bg-water { background: rgba(74, 111, 165, 0.15); }
