/* ── Love Her to the Moon · style.css ───────────────────────────────────── */

/* CRITICAL: prevent CSS display rules from overriding the HTML hidden attribute */
[hidden] { display: none !important; }

:root {
  --bg:          #090910;
  --bg2:         #0f0f1e;
  --surface:     rgba(255,255,255,0.03);
  --border:      rgba(255,255,255,0.07);
  --gold:        #C8A850;
  --gold-mid:    rgba(200,168,80,0.50);
  --gold-dim:    rgba(200,168,80,0.22);
  --gold-glow:   rgba(200,168,80,0.08);
  --text:        #EEEEF6;
  --text-mid:    rgba(255,255,255,0.90);
  --text-dim:    rgba(255,255,255,0.75);
  --text-faint:  rgba(255,255,255,0.55);
  --danger:      rgba(255,100,100,0.50);
  --success:     #8BAD7A;
  --radius-card: 18px;
  --radius-btn:  14px;
  --radius-chip: 20px;
  --max-w:       560px;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  font-weight: 300;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
a { color: var(--gold-mid); text-decoration: none; }
a:hover { color: var(--gold); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

/* ── Header ────────────────────────────────────────────────────────────── */
#hdr {
  position: sticky; top: 0; z-index: 100;
  background: rgba(9,9,16,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px 10px;
  max-width: 100%;
}

#brand {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 14px;
}
#brand-moon { width: 28px; height: 28px; flex-shrink: 0; }
#brand-name {
  font-size: 13px; font-weight: 800; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold);
}

/* Date nav */
#datenav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 6px;
}
#btn-prev, #btn-next {
  width: 44px; height: 44px; font-size: 28px; line-height: 1;
  color: var(--text-dim); transition: color .15s; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
#btn-prev:hover, #btn-next:hover { color: var(--text); }

#date-center { flex: 1; text-align: center; position: relative; }
#btn-date {
  font-size: 19px; font-weight: 800; color: var(--text);
  letter-spacing: .01em; display: block; width: 100%;
  padding: 4px 0; transition: color .15s;
}
#btn-date:hover { color: var(--gold); }
#date-picker {
  position: absolute; opacity: 0; pointer-events: none;
  width: 1px; height: 1px; top: 0; left: 50%;
}
#today-row { height: 18px; margin-top: 2px; }
#btn-today {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); opacity: .75; transition: opacity .15s;
}
#btn-today:hover { opacity: 1; }
#btn-today.hidden { visibility: hidden; }

/* Cycle bar */
#cycle-bar {
  text-align: center; font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,0.80);
  margin-bottom: 6px; min-height: 14px;
}

/* LMP bar */
#lmp-bar { text-align: center; }
#btn-lmp {
  font-size: 11px; color: rgba(255,255,255,0.55); letter-spacing: .04em;
  padding: 4px 8px; transition: color .15s;
}
#btn-lmp:hover { color: var(--text-dim); }
#btn-lmp.cta {
  border: 1px solid var(--gold-mid); border-radius: var(--radius-chip);
  padding: 6px 20px; font-size: 11px; color: var(--gold);
  letter-spacing: .10em; text-transform: uppercase;
  transition: background .15s, border-color .15s;
}
#btn-lmp.cta:hover { background: var(--gold-glow); border-color: var(--gold); }

/* ── Main layout ───────────────────────────────────────────────────────── */
#main { max-width: var(--max-w); margin: 0 auto; padding: 0 0 80px; }

/* ── Loading state ─────────────────────────────────────────────────────── */
#state-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 60vh; gap: 16px;
}
#loading-moon { font-size: 40px; animation: pulse 2.2s ease-in-out infinite; }
#loading-text {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-dim);
}
@keyframes pulse { 0%,100%{opacity:.25} 50%{opacity:.9} }

/* ── No-LMP state ──────────────────────────────────────────────────────── */
#state-nolmp {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 60vh;
  padding: 40px 32px; text-align: center; gap: 16px;
}
#nolmp-moon { font-size: 56px; }
#nolmp-heading {
  font-size: 24px; font-weight: 800; color: var(--text);
  letter-spacing: -.01em;
}
#nolmp-body {
  font-size: 14px; line-height: 1.8; color: var(--text-dim);
  max-width: 320px;
}
#btn-nolmp-cta {
  background: var(--gold); color: var(--bg); border-radius: var(--radius-btn);
  padding: 14px 36px; font-size: 14px; font-weight: 800;
  letter-spacing: .04em; transition: opacity .15s; margin-top: 8px;
}
#btn-nolmp-cta:hover { opacity: .85; }

/* ── Quick Read card ───────────────────────────────────────────────────── */
#quick-card {
  margin: 20px 16px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px 20px;
}
#label-quick, #label-work {
  font-size: 10px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px; opacity: .8;
}
#quick-text {
  font-size: 20px; font-weight: 300; line-height: 1.75;
  color: #fff; margin-bottom: 20px;
  font-family: 'Nunito', serif;
}
#quick-divider {
  border: none; border-top: 1px solid var(--border); margin-bottom: 16px;
}
#work-text {
  font-size: 14px; line-height: 1.85; color: rgba(255,255,255,0.88);
  font-style: italic; margin-bottom: 20px;
}

/* Stars / Ratings */
#ratings {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px;
}
.rating-cell { text-align: center; padding: 4px 2px; }
.rating-label {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,0.65); margin-bottom: 5px;
}
.stars { font-size: 15px; letter-spacing: -1px; color: var(--gold); }
.stars .off { color: rgba(255,255,255,0.10); }
.rating-note {
  font-size: 11px; color: rgba(255,255,255,0.75); margin-top: 4px; line-height: 1.4;
}

/* ── Accordion base ────────────────────────────────────────────────────── */
#full-forecast, #go-deeper {
  margin: 10px 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
#go-deeper { border-color: var(--gold-dim); }

#btn-full-toggle, #btn-deeper-toggle {
  width: 100%; display: flex; align-items: center;
  justify-content: space-between; padding: 16px 20px;
  transition: background .15s;
}
#btn-full-toggle:hover, #btn-deeper-toggle:hover {
  background: rgba(255,255,255,0.02);
}
#btn-full-toggle span:first-child {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-dim);
}
#btn-deeper-toggle span:first-child {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); opacity: .75;
}
.acc-icon { font-size: 20px; color: rgba(255,255,255,0.55); line-height: 1; }

/* Forecast sections */
.f-section { border-top: 1px solid var(--border); }
.f-section-btn {
  width: 100%; text-align: left; padding: 18px 20px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; transition: background .15s;
}
.f-section-btn:hover { background: rgba(255,255,255,0.02); }
.f-section-h {
  font-size: 18px; font-weight: 300; line-height: 1.45;
  color: rgba(255,255,255,0.90); flex: 1;
  font-family: 'Nunito', serif; transition: color .15s;
}
.f-section-btn:hover .f-section-h { color: #fff; }
.f-section-icon {
  font-size: 18px; color: rgba(255,255,255,0.60); flex-shrink: 0;
  margin-top: 2px; line-height: 1;
}
.f-section-body { padding: 0 20px 22px; }
.f-section-text {
  font-size: 15px; line-height: 1.95; color: rgba(255,255,255,0.88);
  white-space: pre-line;
}

/* Go Deeper domain sections */
.gd-section { padding: 0 20px; margin-bottom: 20px; }
.gd-section:first-child { padding-top: 6px; }
.gd-label {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(200,168,80,0.90); margin-bottom: 6px;
}
.gd-text {
  font-size: 14px; line-height: 1.9; color: rgba(255,255,255,0.85);
}

/* Hora schedule */
.hora-wrap { padding: 0 20px 4px; }
.hora-head {
  font-size: 10px; letter-spacing: .20em; text-transform: uppercase;
  color: rgba(200,168,80,0.80); margin: 16px 0 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.hora-row {
  display: flex; gap: 10px; margin-bottom: 8px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.hora-time {
  font-size: 10px; color: rgba(200,168,80,0.85); min-width: 96px;
  flex-shrink: 0; line-height: 1.55; font-variant-numeric: tabular-nums;
}
.hora-body { font-size: 13px; line-height: 1.8; color: rgba(255,255,255,0.80); }
.hora-planet {
  font-weight: 800; font-size: 13px; color: rgba(255,255,255,0.95);
  display: block; margin-bottom: 1px;
}
.hora-chog {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  display: block; margin-bottom: 3px;
}
.chog-Amrit  { color: #C8A850; }
.chog-Shubh  { color: #8BAD7A; }
.chog-Labh   { color: #7AA8BD; }
.chog-Char   { color: rgba(255,255,255,0.42); }
.chog-Kaal   { color: rgba(255,100,100,0.48); }
.chog-Rog    { color: rgba(255,100,100,0.48); }
.chog-Udveg  { color: rgba(255,100,100,0.48); }

/* Special windows box */
.special-box {
  margin: 14px 20px; padding: 12px 14px;
  background: var(--gold-glow);
  border: 1px solid var(--gold-dim); border-radius: 10px;
}
.special-head {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); opacity: .65; margin-bottom: 7px;
}
.special-head.warn { color: var(--danger); }
.special-row {
  font-size: 13px; line-height: 1.75; color: rgba(255,255,255,0.85);
  margin-bottom: 3px;
}
.special-row.warn { color: rgba(255,120,120,0.75); }

.gd-note {
  margin: 16px 20px 24px; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 10px; line-height: 1.65; color: rgba(255,255,255,0.55);
}

/* ── Footer ────────────────────────────────────────────────────────────── */
#site-footer {
  padding: 24px 20px;
  font-size: 10px; line-height: 1.7;
  color: rgba(255,255,255,0.55); letter-spacing: .02em;
}
#site-footer p { margin-bottom: 4px; }

/* ── Modals ────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-overlay[hidden] { display: none; }

.modal-box {
  background: #0f0f1d;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 22px;
  padding: 28px 24px;
  width: 100%; max-width: 360px;
}
.modal-box h2 {
  font-size: 24px; font-weight: 800; color: var(--text);
  margin-bottom: 10px; letter-spacing: -.01em;
}
.modal-box p {
  font-size: 13px; line-height: 1.75; color: var(--text-dim);
  margin-bottom: 22px;
}
.consent-statement {
  font-size: 17px !important; font-weight: 300 !important;
  line-height: 1.75 !important; color: rgba(255,255,255,0.55) !important;
  font-style: italic;
}

/* date input in modal */
#lmp-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px; color: var(--text);
  margin-bottom: 20px;
  outline: none;
  color-scheme: dark;
  transition: border-color .15s;
}
#lmp-input:focus { border-color: var(--gold-mid); }

.modal-btns { display: flex; gap: 10px; }
.btn-secondary {
  flex: 1; padding: 13px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--text-dim); font-size: 14px;
  transition: border-color .15s, color .15s;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.28); color: var(--text-mid); }
.btn-primary {
  flex: 1; padding: 13px;
  border-radius: 12px;
  background: var(--gold); color: var(--bg);
  font-size: 14px; font-weight: 800;
  transition: opacity .15s;
}
.btn-primary:hover { opacity: .85; }
.btn-primary:disabled { opacity: .3; cursor: not-allowed; }


/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 519px) {
  #hdr { padding: 12px 16px 8px; }
  #quick-card { margin: 14px 12px 0; padding: 18px 16px; }
  #full-forecast, #go-deeper { margin: 8px 12px 0; }
}
@media (min-width: 520px) {
  :root { --max-w: 580px; }
  #main { padding-top: 8px; }
  #brand-name { font-size: 14px; }
  .f-section-text { font-size: 15px; }
  .gd-text { font-size: 15px; }
}
@media (min-width: 768px) {
  :root { --max-w: 700px; }
  #hdr { padding: 18px 32px 12px; }
  #brand-name { font-size: 15px; letter-spacing: .3em; }
  #btn-date { font-size: 22px; }
  #quick-card { margin: 24px auto 0; padding: 28px 28px; }
  #full-forecast, #go-deeper { margin: 12px auto 0; }
  #quick-text { font-size: 22px; line-height: 1.8; }
  .f-section-h { font-size: 20px; }
  .f-section-text { font-size: 16px; line-height: 2.0; }
  .gd-text { font-size: 15px; line-height: 2.0; }
  .hora-body { font-size: 14px; }
  #site-footer { padding: 28px 28px; }
}
@media (min-width: 1024px) {
  :root { --max-w: 780px; }
  #quick-text { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  #loading-moon { animation: none; }
  * { transition: none !important; }
}
