/* ==========================================================================
   AI Destiny & Astrology Platform Stylesheet
   Brand: snowcow (blueprint.snowcow.net)
   ========================================================================== */

:root {
  --bg-dark: #080a14;
  --bg-card: rgba(18, 22, 42, 0.75);
  --bg-card-hover: rgba(26, 32, 60, 0.85);
  --border-subtle: rgba(99, 102, 241, 0.15);
  --border-accent: rgba(168, 85, 247, 0.35);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --color-indigo: #6366f1;
  --color-purple: #a855f7;
  --color-cyan: #06b6d4;
  --color-amber: #f59e0b;
  --color-rose: #f43f5e;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Starfield & Glow */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: 10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: 10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, rgba(168, 85, 247, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.app-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px 20px;
}

/* Header & Nav */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 40px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-indigo), var(--color-purple));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.header-link:hover {
  color: var(--color-indigo);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-select {
  background: rgba(18, 22, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lang-select:hover, .lang-select:focus {
  border-color: var(--color-purple);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

/* Hero Section */
.hero-section {
  text-align: center;
  max-width: 840px;
  margin: 0 auto 50px auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 44px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 30%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Pillar Feature Badges */
.feature-triad {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.triad-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.triad-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.triad-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.triad-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Glass Panels */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Birth Form Styling */
.form-card {
  max-width: 680px;
  margin: 0 auto 50px auto;
  padding: 36px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group-full {
  grid-column: span 2;
}

.input-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-control {
  width: 100%;
  background: rgba(11, 14, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-control:focus {
  border-color: var(--color-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.city-autocomplete-wrapper {
  position: relative;
}

.city-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: #11152a;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
  display: none;
}

.city-dropdown.active {
  display: block;
}

.city-option {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
}

.city-option:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #ffffff;
}

/* Quick City Selection Pills */
.city-quick-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.pill-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-right: 2px;
}

.city-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.city-pill:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

.city-pill.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35) 0%, rgba(168, 85, 247, 0.35) 100%);
  border-color: rgba(168, 85, 247, 0.6);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, var(--color-indigo) 0%, var(--color-purple) 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Calculation & Chart Display Cards */
.chart-display-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.chart-card {
  padding: 24px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.chart-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

/* BaZi Pillars Grid */
.bazi-pillars-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}

.pillar-col {
  background: rgba(11, 14, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 6px;
}

.pillar-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.pillar-char {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 4px;
}

.pillar-tengod {
  font-size: 10px;
  color: var(--text-secondary);
}

/* Zi Wei 12-Palace Matrix Preview */
.ziwei-palaces-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.palace-mini-box {
  background: rgba(11, 14, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
  font-size: 11px;
}

.palace-mini-box.life-palace {
  border-color: var(--color-purple);
  background: rgba(168, 85, 247, 0.1);
}

/* Western Big Three Preview */
.western-bigthree {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bigthree-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(11, 14, 28, 0.6);
  border-radius: 8px;
  font-size: 12px;
}

/* Preview & Paywall Cards */
.preview-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 30px;
  text-align: center;
}

.locked-card {
  position: relative;
  overflow: hidden;
  filter: blur(3px);
  user-select: none;
  opacity: 0.6;
}

.paywall-overlay {
  position: relative;
  margin-top: -120px;
  background: linear-gradient(to bottom, rgba(8, 10, 20, 0) 0%, rgba(8, 10, 20, 0.95) 40%, rgba(8, 10, 20, 1) 100%);
  padding: 60px 20px 40px 20px;
  text-align: center;
  border-radius: 20px;
  z-index: 10;
}

.paywall-box {
  max-width: 580px;
  margin: 0 auto;
  background: #13172e;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.price-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 44px;
  font-weight: 900;
  color: #ffffff;
  margin: 16px 0 10px 0;
}

.price-original {
  font-size: 22px;
  color: #64748b;
  text-decoration: line-through;
  font-weight: 600;
}

.price-badge-discount {
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-currency {
  font-size: 22px;
  vertical-align: super;
  color: #a855f7;
}

.value-checklist {
  list-style: none;
  text-align: left;
  margin: 20px auto 28px auto;
  max-width: 440px;
}

.value-checklist li {
  padding: 8px 0;
  font-size: 13px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.value-checklist li::before {
  content: '✓';
  color: #10b981;
  font-weight: 800;
  font-size: 15px;
}

/* Full Report Tabs Navigation */
.report-tabs-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.tab-btn {
  background: rgba(18, 22, 42, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.4);
}

.tab-btn.active {
  background: var(--color-indigo);
  color: #ffffff;
  border-color: var(--color-indigo);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.analyst-toggle-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.analyst-switch {
  display: inline-flex;
  background: #0d1020;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.analyst-opt {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.analyst-opt.active {
  background: var(--color-purple);
  color: #ffffff;
}

/* Report Content Cards */
.report-view-panel {
  padding: 32px;
  margin-bottom: 30px;
}

.report-lead-summary {
  font-size: 15px;
  color: #cbd5e1;
  background: rgba(99, 102, 241, 0.08);
  border-left: 4px solid var(--color-indigo);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 28px;
  line-height: 1.7;
}

.report-section-block {
  margin-bottom: 28px;
}

.report-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.report-section-text {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.75;
}

/* Action Toolbar */
.report-action-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: #11152a;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  margin-bottom: 30px;
}

.action-btn-group {
  display: flex;
  gap: 10px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 30px;
  margin-top: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title { font-size: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group-full { grid-column: span 1; }
  .form-card { padding: 20px; }
  .report-action-bar { flex-direction: column; align-items: stretch; }
  .action-btn-group { flex-direction: column; }
  .site-header { flex-direction: column; gap: 16px; text-align: center; }
  .site-footer { flex-direction: column; text-align: center; }
}

/* Print Stylesheet */
@media print {
  body {
    background: #ffffff !important;
    color: #0f172a !important;
  }
  body::before, body::after, .site-header, .site-footer, .report-tabs-nav, .analyst-toggle-container, .report-action-bar, .preview-banner, .paywall-overlay {
    display: none !important;
  }
  .app-container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  .glass-panel {
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .report-section-title {
    color: #1e1b4b !important;
    border-bottom: 1px solid #cbd5e1 !important;
    padding-bottom: 4px !important;
  }
  .report-section-text {
    color: #334155 !important;
  }
}
