* { box-sizing: border-box; }

body {
  background: #05050f;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: white;
}

#stars-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── Glass card ────────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

/* ── Text inputs ───────────────────────────────────────── */
.field-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  padding: 11px 40px 11px 14px;
  color: white;
  font-size: 15px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.field-input:focus          { border-color: rgba(251, 191, 36, .55); background: rgba(255, 255, 255, 0.09); }
.field-input::placeholder   { color: rgba(255, 255, 255, .32); }
.field-input:disabled       { opacity: .4; cursor: not-allowed; }
.field-input--invalid       { border-color: rgba(248, 113, 113, .55); }
.field-input--invalid:focus { border-color: rgba(248, 113, 113, .75); background: rgba(255, 255, 255, 0.07); }

.field-hint {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.35);
}

.field-error {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: rgb(248, 113, 113);
}

/* ── Number inputs (no spinners) ───────────────────────── */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

.num-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  padding: 11px 10px;
  color: white;
  font-size: 15px;
  text-align: center;
  outline: none;
  transition: border-color .2s, background .2s;
}
.num-input:focus       { border-color: rgba(251, 191, 36, .55); background: rgba(255, 255, 255, 0.09); }
.num-input::placeholder { color: rgba(255, 255, 255, .32); }

/* ── Dropdown list ─────────────────────────────────────── */
.dropdown-list {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 4px);
  background: #12122e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  max-height: 232px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.dropdown-list::-webkit-scrollbar       { width: 4px; }
.dropdown-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 4px; }

.dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  transition: background .12s;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover       { background: rgba(251, 191, 36, .1); }

/* ── Section dividers ──────────────────────────────────── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

/* ── Map ───────────────────────────────────────────────── */
#map {
  height: 380px;
  border-radius: 12px;
  z-index: 1;
}

/* ── Submit button ─────────────────────────────────────── */
.gold-btn {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .03em;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #07070e;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(245, 158, 11, .3);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.gold-btn:hover:not(:disabled)  { transform: translateY(-1px); box-shadow: 0 8px 32px rgba(245, 158, 11, .45); }
.gold-btn:active:not(:disabled) { transform: translateY(0); }
.gold-btn:disabled              { opacity: .35; cursor: not-allowed; }

/* ── Chart ─────────────────────────────────────────────── */
.ni-chart-wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 8px;
  background: #fffef5;
  border: 2px solid #b91c1c;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.ni-chart-caption {
  text-align: center;
  margin-top: 10px;
}

.ni-chart-caption .center-label {
  font-size: 11px;
  font-weight: 600;
  color: #78350f;
  letter-spacing: .05em;
}

.ni-chart-caption .center-sub {
  font-size: 9px;
  color: #a8a29e;
  letter-spacing: .04em;
  margin-top: 2px;
}

.chart-cell {
  background: rgba(255,255,255,0.03);
  padding: 6px 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
  overflow: hidden;
  transition: background .15s;
}
.chart-cell:hover { background: rgba(255,255,255,0.07); }

.sign-header {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  line-height: 1.2;
}
.sign-name  { font-size: 9px; }
.asc-mark   { font-size: 8px; color: #fbbf24; font-weight: 700; margin-left: 2px; }

.planet-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  overflow: hidden;
}

.chart-planet {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
}
.chart-planet .symbol { font-size: 11px; }
.chart-planet .name   { font-size: 9px; opacity: .85; }

.chart-center {
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-left: 1px solid rgba(255,255,255,0.08);
  border-right: 1px solid rgba(255,255,255,0.08);
}
.center-glyph { font-size: 22px; opacity: .25; }
.center-label { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.5); letter-spacing: .05em; }
.center-sub   { font-size: 9px; color: rgba(255,255,255,.25); letter-spacing: .04em; }

/* Planet table */
.planet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.planet-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.35);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.planet-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  color: rgba(255,255,255,.8);
  vertical-align: middle;
}
.planet-table tr:last-child td { border-bottom: none; }
.planet-table tr:hover td     { background: rgba(255,255,255,.03); }
.planet-table .pl-name  { margin-left: 5px; }
.planet-table .mono     { font-family: monospace; font-size: 11px; color: rgba(255,255,255,.5); }
.planet-table .sign-val { font-size: 12px; color: rgba(255,255,255,.75); }
.planet-table .house-num { color: #fbbf24; font-weight: 600; text-align: center; }
.planet-table .sym      { font-size: 13px; }

/* Chart tabs */
.chart-tabs { display: flex; gap: 2px; margin-bottom: 16px; }
.chart-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.4);
  background: transparent;
  transition: all .15s;
  letter-spacing: .04em;
}
.chart-tab.active {
  background: rgba(251,191,36,.12);
  border-color: rgba(251,191,36,.3);
  color: #fbbf24;
}

/* Birth info strip */
.birth-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.birth-strip-item {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  padding: 8px 12px;
}
.birth-strip-item .label { font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: rgba(255,255,255,.3); }
.birth-strip-item .value { font-size: 12px; color: rgba(255,255,255,.75); margin-top: 2px; }

/* Loading spinner */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(251,191,36,.2);
  border-top-color: #fbbf24;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Markdown prose (AI interpretation) ───────────────── */
.prose-vedic { color: rgba(255,255,255,.82); line-height: 1.7; }

.prose-vedic h1, .prose-vedic h2 {
  color: #fbbf24;
  font-weight: 700;
  margin: 1.4em 0 .5em;
  line-height: 1.25;
}
.prose-vedic h1 { font-size: 1.2rem; letter-spacing: .02em; }
.prose-vedic h2 { font-size: 1rem; letter-spacing: .02em; border-bottom: 1px solid rgba(251,191,36,.2); padding-bottom: .35em; }
.prose-vedic h3 { color: rgba(255,255,255,.7); font-size: .9rem; font-weight: 600; margin: 1em 0 .3em; }

.prose-vedic p  { margin: .6em 0; font-size: .875rem; }

.prose-vedic ul, .prose-vedic ol { margin: .5em 0 .5em 1.2em; font-size: .875rem; }
.prose-vedic li { margin: .25em 0; }
.prose-vedic li::marker { color: #fbbf24; }

.prose-vedic strong { color: #fbbf24; font-weight: 600; }
.prose-vedic em     { color: rgba(255,255,255,.6); font-style: italic; }
.prose-vedic code   { font-family: monospace; font-size: .8rem; background: rgba(255,255,255,.07); padding: 1px 5px; border-radius: 4px; }

.prose-vedic table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
  margin: .8em 0;
}
.prose-vedic th {
  text-align: left;
  padding: 5px 10px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(255,255,255,.35);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.prose-vedic td {
  padding: 5px 10px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  color: rgba(255,255,255,.75);
}
.prose-vedic tr:last-child td { border-bottom: none; }

.prose-vedic hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,.08);
  margin: 1.2em 0;
}

.prose-vedic blockquote {
  border-left: 3px solid rgba(251,191,36,.4);
  margin: .8em 0;
  padding: .4em .8em;
  color: rgba(255,255,255,.55);
  font-style: italic;
  font-size: .875rem;
}

/* ── Alpine ────────────────────────────────────────────── */
[x-cloak] { display: none !important; }
