:root {
  --bg: #fff7ed;
  --card: #ffffff;
  --text: #292524;
  --muted: #78716c;
  --brand: #9a3412;
  --brand-2: #f97316;
  --line: #fed7aa;
  --soft: #ffedd5;
  --shadow: 0 20px 50px rgba(154, 52, 18, 0.12);
  --transition: 0.18s ease;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #fed7aa 0, transparent 32%),
    radial-gradient(circle at bottom right, #fde68a44 0, transparent 40%),
    linear-gradient(180deg, #fff7ed, #fffbeb);
  min-height: 100vh;
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 32px 36px;
  border-radius: 28px;
  background: linear-gradient(135deg, #7c2d12 0%, #b45309 55%, #ea580c 100%);
  color: white;
  box-shadow: 0 24px 60px rgba(124, 45, 18, 0.35);
  margin-bottom: 26px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(251,191,36,0.12) 0, transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(251,191,36,0.07) 0, transparent 40%);
  border-radius: inherit;
  pointer-events: none;
}

.hero > * { position: relative; }

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: .86;
}

.brand-name {
  font-weight: 800;
  color: #fbbf24;
  opacity: 1;
  font-size: 15px;
  letter-spacing: .14em;
}

h1, h2 { margin: 0; }

h1 { font-size: clamp(30px, 5vw, 54px); line-height: 1; }

.hero-tag {
  margin: 10px 0 0;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  letter-spacing: .16em;
  font-weight: 600;
  color: #fbbf24;
  text-shadow: 0 1px 10px rgba(251,191,36,.4);
}

.hero-oneliner {
  flex: 1;
  text-align: center;
  color: white;
  padding: 0 16px;
}

.hero-oneliner p {
  margin: 0 0 10px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.7;
  color: #fbbf24;
  text-shadow: 0 1px 8px rgba(0,0,0,.25);
}

.hero-oneliner-sub {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #fed7aa;
  text-shadow: 0 1px 6px rgba(0,0,0,.2);
  border-top: 1px solid rgba(251,191,36,0.3);
  padding-top: 10px;
  margin-top: 4px;
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.hero-logo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.35);
  box-shadow: 0 4px 24px rgba(0,0,0,.3), 0 0 0 6px rgba(251,191,36,0.15);
  object-fit: cover;
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-logo:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(0,0,0,.35), 0 0 0 8px rgba(251,191,36,0.22);
}

.hero-contact {
  margin: 10px 0 0;
  font-size: 13px;
  color: #fed7aa;
  letter-spacing: .03em;
  text-align: center;
}

.hero-contact-link {
  color: #fbbf24;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--transition);
}

.hero-contact-link:hover {
  color: #fde68a;
  text-decoration: underline;
}

/* ── Page ──────────────────────────────────────────────────────────────────── */
.page {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px;
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: 0 24px 60px rgba(154, 52, 18, 0.16);
}

.card h2 {
  font-size: 18px;
  color: var(--brand);
  padding-bottom: 14px;
  margin-bottom: 16px;
  position: relative;
}

.card h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--brand-2), var(--line), transparent);
  border-radius: 2px;
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 22px;
  align-items: start;
}

.form-card {
  position: sticky;
  top: 20px;
}

/* ── Form ──────────────────────────────────────────────────────────────────── */
form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: #44403c;
  font-weight: 650;
  font-size: 14px;
}

input, select {
  width: 100%;
  border: 1.5px solid #fdba74;
  background: #fffaf0;
  padding: 12px 13px;
  border-radius: 14px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

input:focus, select:focus {
  border-color: var(--brand-2);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .14);
}

input:hover:not(:focus), select:hover:not(:focus) {
  border-color: #f97316;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.search-row {
  display: grid;
  grid-template-columns: 1fr 95px;
  gap: 8px;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
button {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 750;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.primary {
  color: white;
  background: linear-gradient(135deg, #9a3412, #f97316);
  box-shadow: 0 4px 14px rgba(154, 52, 18, 0.25);
}

.primary:hover {
  background: linear-gradient(135deg, #7c2d12, #ea580c);
  box-shadow: 0 8px 24px rgba(154, 52, 18, 0.4);
}

.secondary {
  color: var(--brand);
  background: var(--soft);
  border: 1.5px solid #fdba74;
  box-shadow: 0 2px 8px rgba(154, 52, 18, 0.08);
}

.secondary:hover {
  background: #fde9c9;
  box-shadow: 0 4px 14px rgba(154, 52, 18, 0.18);
}

#searchLocation {
  color: var(--brand);
  background: var(--soft);
  border: 1.5px solid #fdba74;
}

#searchLocation:hover {
  background: #fde9c9;
  box-shadow: 0 4px 12px rgba(154, 52, 18, 0.18);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Location results ───────────────────────────────────────────────────────── */
.location-results { display: grid; gap: 8px; }

.loc-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf0;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.loc-item:hover {
  border-color: var(--brand-2);
  background: #ffedd5;
  transform: translateX(3px);
}

/* ── Results section ────────────────────────────────────────────────────────── */
.results { display: grid; gap: 18px; }

/* ── Welcome state ──────────────────────────────────────────────────────────── */
.welcome-state {
  text-align: center;
  padding: 36px 20px;
}

.welcome-om {
  font-size: 48px;
  color: var(--brand-2);
  margin-bottom: 12px;
  line-height: 1;
  text-shadow: 0 2px 16px rgba(249,115,22,0.25);
}

.welcome-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  color: var(--brand);
  margin: 0 0 14px;
  letter-spacing: .08em;
}

.welcome-divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-2), transparent);
  margin: 0 auto 16px;
  border-radius: 2px;
}

.welcome-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
  max-width: 400px;
  margin: 0 auto 14px;
}

.welcome-sub {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0;
}
.welcome-disclaimer {
  margin: 14px auto 0;
  max-width: 420px;
  font-size: 11.5px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 7px;
  padding: 8px 13px;
  line-height: 1.55;
}

/* ── Summary ────────────────────────────────────────────────────────────────── */
.summary-card:empty { display: none; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-top: 4px;
}

.summary-item {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.summary-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(154,52,18,0.1);
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 4px;
}

/* ── Chart tabs ─────────────────────────────────────────────────────────────── */
.chart-tabs {
  display: inline-flex;
  gap: 4px;
  background: rgba(255,255,255,0.8);
  border-radius: 999px;
  padding: 5px;
  border: 1.5px solid var(--line);
  box-shadow: 0 2px 10px rgba(154,52,18,0.08);
}

.tab {
  color: var(--brand);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 8px 22px;
  font-size: 14px;
  font-weight: 650;
  transition: all var(--transition);
}

.tab:hover:not(.active) {
  background: var(--soft);
  transform: none;
}

.tab.active {
  color: white;
  background: linear-gradient(135deg, #9a3412, #f97316);
  box-shadow: 0 3px 10px rgba(154, 52, 18, 0.3);
}

/* ── Chart ──────────────────────────────────────────────────────────────────── */
.chart-card { overflow: hidden; }

.north-chart {
  position: relative;
  width: min(650px, 100%);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  background: #fffaf0;
  border: 3px solid var(--brand);
  border-radius: 4px;
}

.north-chart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.house-label {
  position: absolute;
  width: 120px;
  min-height: 64px;
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1.22;
}

.lagna-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fed7aa;
  border: 1.5px solid #c2410c;
  margin: 0 auto 2px;
}

.rashi-num {
  color: #a16207;
  font-weight: 850;
  font-size: 15px;
}

.planets { margin-top: 2px; }

.planet-line {
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

.house-name {
  color: var(--muted);
  font-size: 10px;
  margin-top: 1px;
}

/* ── Tables ─────────────────────────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
}

.table th {
  color: var(--brand);
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  padding: 11px 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--line);
}

.table td {
  padding: 10px 10px;
  border-bottom: 1px solid #fef3c7;
  text-align: left;
  font-size: 14px;
  transition: background var(--transition);
}

.table tbody tr:nth-child(even) td { background: #fffbf0; }
.table tbody tr:hover td { background: #ffedd5; }

.planet-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── Loading spinner ────────────────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.spinner {
  width: 40px;
  height: 40px;
  border: 3.5px solid var(--line);
  border-top-color: var(--brand-2);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 16px;
}

.loading-state {
  text-align: center;
  padding: 32px 20px;
}

.loading-text {
  color: var(--brand);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}

.loading-sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.fade-in { animation: fadeIn 0.35s ease forwards; }

/* ── Misc ───────────────────────────────────────────────────────────────────── */
.subtitle {
  max-width: 600px;
  margin: 14px 0 0;
  opacity: .9;
  font-size: 16px;
  line-height: 1.6;
}

.badge {
  border: 1px solid rgba(255,255,255,.35);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  white-space: nowrap;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* ── SEO Section ────────────────────────────────────────────────────────────── */
.seo-section {
  position: relative;
  background: linear-gradient(135deg, #7c2d12 0%, #b45309 55%, #ea580c 100%);
  padding: 56px 24px 64px;
  margin-top: 40px;
  overflow: hidden;
}

.seo-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top left, rgba(251,191,36,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(124,45,18,0.4) 0%, transparent 50%);
  pointer-events: none;
}

.seo-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.seo-inner > h2 {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  color: #fef3c7;
  margin: 0 0 12px;
  letter-spacing: .02em;
}

.seo-inner > p {
  color: #fed7aa;
  font-size: 15px;
  line-height: 1.75;
  max-width: 780px;
  margin: 0 0 36px;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.seo-block {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 14px;
  padding: 24px 22px;
  backdrop-filter: blur(4px);
}

.seo-block h3 {
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 0 12px;
}

.seo-block p, .seo-block li {
  font-size: 14px;
  color: #fde8d0;
  line-height: 1.75;
}

.seo-block ul {
  margin: 0;
  padding-left: 18px;
}

.seo-block li { margin-bottom: 6px; }

.seo-block a {
  color: #fbbf24;
  text-decoration: underline;
  text-decoration-color: rgba(251,191,36,0.4);
}

/* ── Vimshottari Dasha ──────────────────────────────────────────────────────── */
.dasha-maha { cursor: pointer; }
.dasha-maha:hover td { background: #fff7ed !important; }
.dasha-maha-active td { background: linear-gradient(135deg,#fff7ed,#ffedd5) !important; }

.dasha-badge {
  display: inline-block;
  background: #ea580c;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

.dasha-badge-now {
  background: #b45309;
  font-size: 9px;
  padding: 1px 6px;
}

.dasha-toggle {
  font-size: 10px;
  color: var(--muted);
  margin-left: 6px;
  user-select: none;
}

.dasha-ad-cell { padding: 0 !important; }

.dasha-ad-table {
  font-size: 12.5px;
  border-top: 2px solid var(--line);
  border-radius: 0 0 16px 16px;
  margin: 0;
}

.dasha-ad-table thead th {
  font-size: 11px;
  background: #fef3c7 !important;
  color: #92400e;
  border-radius: 0 !important;
}

.dasha-ad-now td { background: #fefce8 !important; }

/* ── Vedic Indicators ───────────────────────────────────────────────────────── */
#indicators:empty { display: none; }

.indicators-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 4px;
}

.indicator-card {
  border: 1.5px solid;
  border-radius: 16px;
  padding: 16px;
}

.indicator-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.indicator-icon { font-size: 18px; line-height: 1; }

.indicator-title {
  font-weight: 700;
  font-size: 14px;
}

.indicator-detail {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

.indicator-meta {
  font-size: 11px;
  color: var(--muted);
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .form-card { position: static; }
  .hero { align-items: flex-start; flex-direction: column; padding: 24px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .seo-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 480px) {
  .page { padding: 14px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .actions { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
}
