body { background: #130F24; color: #F0E2C8; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.card { border: 1px solid rgba(214,178,106,.3); background: #1C1833; }
.gold { color: #D6B26A; }
input, select { background: #262040; color: #F0E2C8; border: 1px solid #322C4E; outline: none; }
input:focus, select:focus { border-color: #D6B26A; box-shadow: 0 0 0 1px rgba(214,178,106,.2); }
.btn-gold { background: linear-gradient(135deg, #D6B26A, #E1C488); }
.step-indicator { display: flex; justify-content: center; gap: 8px; margin-bottom: 2rem; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: #322C4E; transition: .3s; }
.step-dot.active { background: #D6B26A; width: 24px; border-radius: 4px; }
.step-dot.done { background: rgba(214,178,106,.5); }

/* Flatpickr dark theme override */
.flatpickr-calendar { background: #1C1833 !important; border-color: #322C4E !important; box-shadow: none !important; }
.flatpickr-day.today { border-color: #D6B26A !important; color: #D6B26A !important; }
.flatpickr-day.selected { background: #D6B26A !important; border-color: #D6B26A !important; color: #130F24 !important; }
.flatpickr-months .flatpickr-month { background: #1C1833 !important; color: #D6B26A !important; }
.flatpickr-months .flatpickr-next-month,
.flatpickr-months .flatpickr-prev-month { color: #D6B26A !important; fill: #D6B26A !important; }
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year { background: transparent !important; color: #D6B26A !important; }
.flatpickr-weekday { color: #7A80A0 !important; }
.flatpickr-day { color: #B8BFD8 !important; }
.flatpickr-day:hover { background: #262040 !important; border-color: #444 !important; }
.flatpickr-days { border-color: #322C4E !important; }
.numInputWrapper span { border-color: #444 !important; }
.numInputWrapper span:hover { background: #322C4E !important; }

/* City search */
.city-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #1C1833; border: 1px solid rgba(214,178,106,.3);
  border-radius: 0 0 8px 8px; max-height: 200px; overflow-y: auto;
  z-index: 100; display: none;
}
.city-dropdown.show { display: block; }
.city-item { padding: 8px 12px; cursor: pointer; font-size: 14px; }
.city-item:hover { background: rgba(214,178,106,.1); }
.region-group { padding: 4px 12px; font-size: 11px; color: #7A80A0; text-transform: uppercase; letter-spacing: .1em; }

/* ═══════════════════════════════════════════════
   REPORT LAYOUT — Full width, left nav
   ═══════════════════════════════════════════════ */

/* Step 1 form — keep centered, not too wide */
#step-1 {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

/* Step 2 report — full width */
#step-2 {
  width: 100%;
}

.result-layout {
  display: flex;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
  position: relative;
}

/* Left navigation */
.result-nav {
  width: 170px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  background: #1C1833;
  border: 1px solid rgba(214,178,106,.2);
  border-radius: 8px;
  padding: 16px 0;
  font-size: 12px;
  flex-shrink: 0;
  max-height: 100vh;
  overflow-y: auto;
}
.result-nav a {
  display: block;
  padding: 6px 14px;
  color: #B8BFD8;
  text-decoration: none;
  transition: .15s;
  border-left: 2px solid transparent;
}
.result-nav a:hover { color: #D6B26A; }
.result-nav a.active {
  color: #D6B26A;
  font-weight: 600;
  border-left-color: #D6B26A;
  background: rgba(214,178,106,.08);
}

/* Main content area */
.result-main {
  flex: 1;
  min-width: 0;
  max-width: 900px;
}

/* Section cards */
.result-section {
  background: #1C1833;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  scroll-margin-top: 20px;
}
.section-title {
  font-size: 18px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 1px;
  color: #D6B26A;
  border-bottom: 1px solid #322C4E;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════
   BAZI CHART — Rich display
   ═══════════════════════════════════════════════ */

.bazi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  table-layout: fixed;
}
.bazi-table th, .bazi-table td {
  padding: 10px 8px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.08);
}
.bazi-table th {
  background: rgba(255,255,255,.04);
  color: #B8BFD8;
  font-weight: 500;
  font-size: 13px;
}
.bazi-table th:first-child,
.bazi-table td:first-child {
  width: 80px;
  text-align: left;
  padding-left: 12px;
}
.bazi-table th:not(:first-child),
.bazi-table td:not(:first-child) {
  width: 25%;
}
.bazi-table .dm {
  color: #D6B26A;
  font-weight: 700;
}
.bazi-table .na-yin {
  font-size: 12px;
  color: #7A80A0;
}
.bazi-table .twelve {
  font-size: 12px;
  color: #B8BFD8;
}
.bazi-table .void-tag {
  font-size: 11px;
  color: #c00;
  background: rgba(204,0,0,.1);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Hidden stems display */
.hidden-stems {
  font-size: 12px;
  color: #B8BFD8;
}
.hidden-stems .hs-item {
  display: inline-block;
  margin: 0 2px;
}
.hidden-stems .hs-main { color: #B8BFD8; font-weight: 500; }
.hidden-stems .hs-mid { color: #B8BFD8; }
.hidden-stems .hs-res { color: #7A80A0; }

/* ═══════════════════════════════════════════════
   SUMMARY CARDS
   ═══════════════════════════════════════════════ */
.summary-cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.summary-card {
  flex: 1;
  min-width: 100px;
  background: rgba(255,255,255,.03);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}
.summary-card .label { font-size: 11px; color: #7A80A0; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.summary-card .value { font-size: 20px; font-weight: 700; color: #D6B26A; }

/* ═══════════════════════════════════════════════
   INFO TABLES
   ═══════════════════════════════════════════════ */
.info-table {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
}
.info-table tr { border-bottom: 1px solid rgba(255,255,255,.06); }
.info-table td { padding: 10px 8px; }
.info-table td:first-child { color: #B8BFD8; width: 30%; }

/* Two column layout for info */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.info-grid .item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.info-grid .item .label { color: #B8BFD8; }

/* ═══════════════════════════════════════════════
   DECADE LUCK TABLE
   ═══════════════════════════════════════════════ */
.decade-table {
  width: 100%;
  overflow-x: auto;
  margin: 10px 0;
}
.decade-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 600px;
}
.decade-table th, .decade-table td {
  padding: 10px 8px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.06);
}
.decade-table th {
  background: rgba(255,255,255,.04);
  color: #B8BFD8;
  font-weight: 500;
}
.decade-current {
  background: rgba(214,178,106,.1) !important;
  border: 2px solid rgba(214,178,106,.4) !important;
  position: relative;
}
.decade-current td:first-child::before {
  content: "▸";
  color: #D6B26A;
  margin-right: 4px;
}
.stars { color: #D6B26A; letter-spacing: 2px; }

/* Score bar */
.score-bar {
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #D6B26A, #D6B26A);
  border-radius: 3px;
  transition: width .5s;
}

/* ═══════════════════════════════════════════════
   CTA
   ═══════════════════════════════════════════════ */
.cta-box {
  text-align: center;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(214,178,106,.25);
  background: rgba(214,178,106,.04);
  margin-top: 20px;
}
.cta-button {
  padding: 12px 32px;
  background: linear-gradient(135deg, #D6B26A, #D6B26A);
  color: #130F24;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: .2s;
  font-size: 16px;
}
.cta-button:hover { opacity: .88; }

/* ═══════════════════════════════════════════════
   ELEMENT TAGS
   ═══════════════════════════════════════════════ */
.element-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.wood { background: rgba(76,175,80,.15); color: #81c784; }
.fire { background: rgba(244,67,54,.15); color: #e57373; }
.earth { background: rgba(255,152,0,.15); color: #ffb74d; }
.metal { background: rgba(158,158,158,.15); color: #bdbdbd; }
.water { background: rgba(33,150,243,.15); color: #64b5f6; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .result-layout { flex-direction: column; padding: 0 10px; }
  .result-nav {
    position: static;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    max-height: none;
  }
  .result-nav a {
    flex: 1;
    min-width: 80px;
    text-align: center;
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 6px;
  }
  .result-nav a.active {
    border-left-color: transparent;
    border-bottom-color: #D6B26A;
  }
  .info-grid { grid-template-columns: 1fr; }
}

/* Quick-select chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  display: inline-block; padding: 4px 12px; border-radius: 16px;
  font-size: 13px; background: rgba(255,255,255,.06); color: #aaa;
  cursor: pointer; border: 1px solid transparent; transition: .2s;
}
.chip:hover { border-color: #D6B26A; color: #D6B26A; }
.chip.selected { border-color: #D6B26A; color: #D6B26A; background: rgba(214,178,106,.15); }
