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

:root {
  --bg: #08070d;
  --bg2: #0f0d1a;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 215, 80, 0.18);
  --gold: #f5c842;
  --gold2: #e8a020;
  --amber: #ff8c00;
  --text: #f0ead6;
  --muted: #8b7d60;
  --success: #4caf7d;
  --warn: #ff9800;
  --danger: #e53935;
  --radius: 16px;
  --font: 'Inter', sans-serif;
  --font-display: 'Cinzel', serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Particles ─── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #f5c84244, transparent);
  animation: float linear infinite;
  opacity: 0;
}

@keyframes float {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.3;
  }

  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

/* ─── Header ─── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 7, 13, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.om {
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
}

.logo-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 2px;
}

.logo-sub {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}

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

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: color .3s;
}

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

/* ─── Hero ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 8rem 2rem 4rem;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(245, 200, 66, 0.08), transparent);
}

.mandala {
  position: absolute;
  width: 700px;
  height: 700px;
  border: 1px solid rgba(245, 200, 66, 0.06);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 60s linear infinite;
}

.mandala::before,
.mandala::after {
  content: '';
  position: absolute;
  inset: 30px;
  border: 1px solid rgba(245, 200, 66, 0.05);
  border-radius: 50%;
}

.mandala::after {
  inset: 60px;
  animation: spin 40s linear infinite reverse;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: .4rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(245, 200, 66, 0.06);
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--gold), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
  font-size: 1.05rem;
}

.btn-hero {
  display: inline-block;
  padding: .9rem 2.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #08070d;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  letter-spacing: 1px;
  transition: transform .3s, box-shadow .3s;
  box-shadow: 0 0 30px rgba(245, 200, 66, 0.35);
}

.btn-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 50px rgba(245, 200, 66, 0.5);
}

/* Compass */
.compass-ring {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  height: 220px;
  border: 2px solid rgba(245, 200, 66, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: compassSpin 20s linear infinite;
}

.compass {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(245, 200, 66, 0.04);
  border: 1px solid rgba(245, 200, 66, 0.1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dir {
  position: absolute;
  font-size: 0.65rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
}

.n {
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.s {
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.e {
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.w {
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.ne {
  top: 16px;
  right: 16px;
  font-size: .5rem;
  color: var(--muted);
}

.nw {
  top: 16px;
  left: 16px;
  font-size: .5rem;
  color: var(--muted);
}

.se {
  bottom: 16px;
  right: 16px;
  font-size: .5rem;
  color: var(--muted);
}

.sw {
  bottom: 16px;
  left: 16px;
  font-size: .5rem;
  color: var(--muted);
}

.needle {
  width: 2px;
  height: 60px;
  background: linear-gradient(to top, var(--amber), transparent 50%);
  position: absolute;
}

@keyframes compassSpin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* ─── Sections ─── */
.section {
  padding: 6rem 2rem;
  position: relative;
  z-index: 1;
}

.container {
  max-width: 960px;
  margin: auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-align: center;
  margin-bottom: .75rem;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 3rem;
  font-size: 1rem;
}

/* ─── Form ─── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  backdrop-filter: blur(10px);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group.center {
  align-items: center;
}

.form-group label {
  font-size: .8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
}

.form-group select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .85rem 1rem;
  border-radius: 10px;
  font-family: var(--font);
  font-size: .95rem;
  appearance: none;
  cursor: pointer;
  transition: border-color .3s, box-shadow .3s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f5c842'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
}

.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 200, 66, 0.12);
}

.form-group select option {
  background: #1a1628;
}

/* Radio Cards */
.radio-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.radio-card {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all .3s;
}

.radio-card input {
  display: none;
}

.radio-card .icon {
  font-size: 1.8rem;
}

.radio-card span:last-child {
  font-size: .8rem;
  color: var(--muted);
}

.radio-card:has(input:checked) {
  border-color: var(--gold);
  background: rgba(245, 200, 66, 0.1);
  box-shadow: 0 0 20px rgba(245, 200, 66, 0.2);
}

.radio-card:has(input:checked) span:last-child {
  color: var(--gold);
}

.radio-card:hover {
  border-color: rgba(245, 200, 66, 0.4);
}

/* Submit Button */
.btn-submit {
  padding: 1rem 3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #08070d;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  letter-spacing: 1px;
  transition: transform .3s, box-shadow .3s;
  box-shadow: 0 0 30px rgba(245, 200, 66, 0.3);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 50px rgba(245, 200, 66, 0.5);
}

.btn-icon {
  font-size: 1.3rem;
}

/* ─── Results ─── */
.score-card {
  display: flex;
  align-items: center;
  gap: 3rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
}

.score-ring-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.score-svg {
  width: 160px;
  height: 160px;
  transform: rotate(-90deg);
}

.score-svg .track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 10;
}

.score-svg .fill {
  fill: none;
  stroke: url(#goldGrad);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 1.5s ease;
}

.score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 1;
}

.score-label {
  font-size: .65rem;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.score-info {
  flex: 1;
}

.score-badge {
  display: inline-block;
  padding: .4rem 1.2rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.score-badge.excellent {
  background: rgba(76, 175, 125, 0.2);
  color: #4caf7d;
  border: 1px solid #4caf7d44;
}

.score-badge.good {
  background: rgba(245, 200, 66, 0.15);
  color: var(--gold);
  border: 1px solid var(--border);
}

.score-badge.average {
  background: rgba(255, 152, 0, 0.15);
  color: var(--warn);
  border: 1px solid #ff980044;
}

.score-badge.poor {
  background: rgba(229, 57, 53, 0.15);
  color: var(--danger);
  border: 1px solid #e5393544;
}

.score-desc {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.score-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
}

.stat-lbl {
  font-size: .7rem;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Direction Grid */
.direction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.dir-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  transition: transform .3s, box-shadow .3s;
}

.dir-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dir-card-top {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .5rem;
}

.dir-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-great {
  background: #4caf7d;
}

.dot-good {
  background: var(--gold);
}

.dot-avg {
  background: var(--warn);
}

.dot-bad {
  background: var(--danger);
}

.dir-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
}

.dir-score {
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.dir-score.great {
  color: #4caf7d;
}

.dir-score.good {
  color: var(--gold);
}

.dir-score.avg {
  color: var(--warn);
}

.dir-score.bad {
  color: var(--danger);
}

.dir-note {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Recommendations */
.reco-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.reco-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.reco-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reco-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  border-left: 3px solid;
  background: rgba(255, 255, 255, 0.02);
  animation: slideIn .5s ease forwards;
  opacity: 0;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.reco-item.positive {
  border-color: #4caf7d;
}

.reco-item.neutral {
  border-color: var(--gold);
}

.reco-item.negative {
  border-color: var(--danger);
}

.reco-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.reco-text strong {
  display: block;
  font-size: .9rem;
  margin-bottom: .3rem;
}

.reco-text p {
  font-size: .83rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Zodiac Card */
.zodiac-card {
  background: linear-gradient(135deg, rgba(245, 200, 66, 0.08), rgba(255, 140, 0, 0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.zodiac-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.zodiac-tip {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: .6rem;
}

/* About */
.about-section {
  background: linear-gradient(180deg, transparent, rgba(245, 200, 66, 0.03) 50%, transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.5rem;
}

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: transform .3s, box-shadow .3s;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(245, 200, 66, 0.1);
}

.about-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.about-card h3 {
  font-family: var(--font-display);
  color: var(--gold);
  margin-bottom: .75rem;
}

.about-card p {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.8;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .8rem;
}

/* Table Styling */
.table-container {
  overflow-x: auto;
  margin: 0 1rem;
}

.vastu-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.vastu-table th,
.vastu-table td {
  padding: 1.2rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 215, 80, 0.1);
  font-size: .9rem;
}

.vastu-table th {
  background: rgba(245, 200, 66, 0.1);
  color: var(--gold);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.vastu-table tr:last-child td {
  border-bottom: none;
}

.vastu-table td:nth-child(2) {
  color: var(--muted);
}

.vastu-table td:nth-child(3) {
  color: var(--success);
  font-weight: 500;
}

/* Print Styles */
@media print {

  .header,
  .hero,
  #calculator,
  .btn-submit,
  .footer,
  .about-section {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .section#resultsSection {
    display: block !important;
    padding: 0 !important;
  }

  .container {
    max-width: 100% !important;
    margin: 0 !important;
  }

  .score-card,
  .dir-card,
  .reco-wrap,
  .zodiac-card {
    border: 1px solid #ccc !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    page-break-inside: avoid;
  }

  .gradient-text {
    -webkit-text-fill-color: black !important;
    background: none !important;
    color: black !important;
  }

  .score-num,
  .dir-score,
  .reco-title,
  .zodiac-card h3 {
    color: black !important;
  }

  .score-badge {
    border: 1px solid #000 !important;
    color: black !important;
    background: none !important;
  }

  .reco-item {
    border-left: 5px solid #000 !important;
    color: black !important;
  }
}

/* Utilities */
.center {
  text-align: center;
}

/* Responsive */
@media (max-width: 700px) {
  .form-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .form-group.full {
    grid-column: 1;
  }

  .score-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .compass-ring {
    display: none;
  }

  .nav {
    display: none;
  }
}