:root {
  --bg-deep: #07051a;
  --bg-card: #12102a;
  --bg-card-hover: #1a1740;
  --gold: #c9a84c;
  --gold-light: #e8d5a0;
  --purple: #8b7ec8;
  --purple-dark: #4a4080;
  --text: #e8e4f0;
  --text-muted: #9b94b8;
  --accent: #6bcbff;
  --rose: #ff6b8a;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(139, 126, 200, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(201, 168, 76, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--gold-light); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 5, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139, 126, 200, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.logo-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-decoration: none;
}

.logo:hover { color: var(--gold-light); text-decoration: none; }

.logo-tagline {
  color: var(--text);
  font-weight: 400;
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--gold); text-decoration: none; }

/* Hero */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 12px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}

.tag {
  background: rgba(139, 126, 200, 0.15);
  border: 1px solid rgba(139, 126, 200, 0.3);
  color: var(--purple);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.hero-cta { margin-top: 24px; }

.btn-hero {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--gold) 0%, #a08030 100%);
  color: #1a1000;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-hero:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.35);
  color: #1a1000;
  text-decoration: none;
}

/* Banner Carousel */
.banner-carousel-section {
  padding: 10px 0 20px;
}

.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(139, 126, 200, 0.25);
  box-shadow: var(--shadow);
  background: var(--bg-card);
}

.carousel-viewport {
  overflow: hidden;
  aspect-ratio: 960 / 539;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 50%;
  background: rgba(7, 5, 26, 0.65);
  color: var(--gold-light);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font-family: var(--font);
}

.carousel-btn:hover {
  background: rgba(201, 168, 76, 0.2);
  border-color: var(--gold);
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.5);
  background: rgba(7, 5, 26, 0.5);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active,
.carousel-dot:hover {
  background: var(--gold);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }

  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }
}

/* Tool Section */
.tool-section {
  padding: 20px 0 60px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid rgba(139, 126, 200, 0.25);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.tool-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid rgba(139, 126, 200, 0.3);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.tab-btn.active,
.tab-btn:hover {
  background: rgba(201, 168, 76, 0.12);
  border-color: var(--gold);
  color: var(--gold-light);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(7, 5, 26, 0.6);
  border: 1px solid rgba(139, 126, 200, 0.3);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.15);
}

.btn-submit {
  margin-top: 20px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold) 0%, #a08030 100%);
  border: none;
  border-radius: 8px;
  color: #1a1000;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: var(--font);
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.35);
}

.synastry-divider {
  text-align: center;
  color: var(--gold);
  font-size: 0.9rem;
  margin: 20px 0 12px;
  position: relative;
}

.synastry-divider::before,
.synastry-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: rgba(139, 126, 200, 0.3);
}

.synastry-divider::before { left: 0; }
.synastry-divider::after { right: 0; }

/* Results */
.result-panel {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(139, 126, 200, 0.2);
}

.result-panel[hidden] { display: none; }

.loading-box {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.loading-box[hidden] { display: none; }

.loading-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 12px;
  border: 3px solid rgba(139, 126, 200, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.chart-box {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.chart-box svg {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.result-subtitle {
  font-size: 1.15rem;
  color: var(--gold-light);
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
}

.table-wrap { overflow-x: auto; margin-bottom: 24px; }

.planet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.planet-table th,
.planet-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(139, 126, 200, 0.15);
}

.planet-table th {
  background: rgba(139, 126, 200, 0.1);
  color: var(--gold-light);
  font-weight: 600;
}

.planet-table tr:hover td { background: rgba(139, 126, 200, 0.06); }

.highlight-row td { color: var(--rose); font-weight: 600; }

.analysis-lead {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text);
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 16px 0 24px;
}

.analysis-card {
  background: rgba(7, 5, 26, 0.5);
  border: 1px solid rgba(139, 126, 200, 0.2);
  border-radius: 8px;
  padding: 14px;
}

.analysis-card h4 {
  color: var(--purple);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.analysis-card p { font-size: 0.85rem; color: var(--text-muted); }

.house-title { color: var(--gold-light); margin: 16px 0 10px; font-size: 1rem; }

.house-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 6px;
}

.house-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 6px 10px;
  background: rgba(7, 5, 26, 0.4);
  border-radius: 6px;
}

/* Content Sections */
.content-section {
  padding: 50px 0;
  border-top: 1px solid rgba(139, 126, 200, 0.12);
}

.content-section h2 {
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 18px;
}

.content-section h3 {
  font-size: 1.1rem;
  color: var(--purple);
  margin: 22px 0 10px;
}

.content-section p {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.content-section ul,
.content-section ol {
  color: var(--text-muted);
  padding-left: 20px;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.content-section li { margin-bottom: 6px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid rgba(139, 126, 200, 0.2);
  border-radius: var(--radius);
  padding: 20px;
}

.feature-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--gold-light);
}

.feature-item p { margin: 0; font-size: 0.88rem; }

/* FAQ */
.faq-list { margin-top: 16px; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid rgba(139, 126, 200, 0.15);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  color: var(--gold);
  font-size: 1.2rem;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  padding: 0 18px 14px;
  margin: 0;
}

/* Footer */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid rgba(139, 126, 200, 0.15);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer p { margin-bottom: 6px; }

.breadcrumb {
  padding: 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.content-note {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(201, 168, 76, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
}

.zodiac-grid .feature-item h3 {
  font-size: 0.95rem;
}

.zodiac-grid .feature-item p {
  font-size: 0.82rem;
}

.compare-table-wrap { overflow-x: auto; margin: 20px 0; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compare-table th,
.compare-table td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid rgba(139, 126, 200, 0.2);
}

.compare-table th {
  background: rgba(139, 126, 200, 0.12);
  color: var(--gold-light);
}

.compare-table td:first-child { color: var(--text); font-weight: 500; }

.intent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.intent-card {
  background: var(--bg-card);
  border: 1px solid rgba(139, 126, 200, 0.2);
  border-radius: var(--radius);
  padding: 18px;
}

.intent-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--gold-light);
}

.intent-card p {
  margin: 0;
  font-size: 0.88rem;
}

.noscript-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2a1840;
  border-top: 2px solid var(--gold);
  padding: 16px 20px;
  z-index: 9999;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 10px; }
  .nav-links { justify-content: center; gap: 12px; }
  .hero { padding: 40px 0 24px; }
  .tool-card { padding: 18px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .analysis-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
  .tool-tabs { flex-direction: column; }
}
