:root {
  --bg: #0d0d1a;
  --bg2: #141428;
  --bg3: #1c1c38;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --text: #f0eee8;
  --text-muted: #8a8aa0;
  --accent: #7b68ee;
  --accent2: #9b8fff;
  --free: #4a9eff;
  --paid: #c9a84c;
  --danger: #ff6b6b;
  --radius: 16px;
  --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
}

/* ---- HEADER ---- */
header {
  background: var(--bg2);
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(201,168,76,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
}

.header-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-align: right;
}

/* ---- BOTTOM NAV ---- */
nav.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--bg2);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-around;
  padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  z-index: 100;
}

nav.bottom-nav button {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 4px 12px;
  cursor: pointer;
  transition: color 0.2s;
}

nav.bottom-nav button.active { color: var(--gold); }
nav.bottom-nav button .icon { font-size: 22px; }

/* ---- MAIN CONTENT ---- */
main {
  padding: 20px 16px 100px;
  min-height: 100vh;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- CARDS ---- */
.card {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.06);
}

.card-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ---- SIGN SELECTOR ---- */
.sign-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.sign-btn {
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  color: var(--text);
}

.sign-btn:hover, .sign-btn.selected {
  background: rgba(201,168,76,0.15);
  border-color: var(--gold);
  color: var(--gold);
}

.sign-btn .glyph { font-size: 22px; display: block; margin-bottom: 4px; }
.sign-btn .name { font-size: 10px; }

/* ---- COMPATIBILITY RESULT ---- */
.compat-result {
  background: var(--bg3);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  border: 1px solid rgba(201,168,76,0.2);
}

.compat-score {
  font-size: 56px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}

.compat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.compat-body {
  font-size: 15px;
  line-height: 1.65;
  text-align: left;
  color: var(--text);
}

/* ---- HOROSCOPE ---- */
.horoscope-sign-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.horoscope-sign-row::-webkit-scrollbar { display: none; }

.horoscope-sign-pill {
  background: var(--bg3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 8px 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.horoscope-sign-pill.active {
  background: rgba(201,168,76,0.15);
  border-color: var(--gold);
  color: var(--gold);
}

.horoscope-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.moon-phase {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.moon-phase .phase-icon { font-size: 28px; }

/* ---- PAYWALL ---- */
.paywall-nudge {
  background: linear-gradient(135deg, rgba(201,168,76,0.1), rgba(123,104,238,0.1));
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-top: 16px;
}

.paywall-nudge h3 { color: var(--gold); margin-bottom: 8px; }
.paywall-nudge p { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }

.btn-gold {
  background: var(--gold);
  color: #0d0d1a;
  border: none;
  border-radius: 25px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.btn-gold:hover { background: var(--gold-light); }

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 25px;
  padding: 12px 32px;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  transition: all 0.2s;
}

/* ---- CALENDAR ---- */
.calendar-event {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.event-date {
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  min-width: 60px;
  padding-top: 2px;
}

.event-body h4 { font-size: 14px; margin-bottom: 4px; }
.event-body p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ---- INSTALL PROMPT ---- */
.install-banner {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  background: var(--bg2);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.install-banner p { font-size: 13px; color: var(--text); flex: 1; }
.install-banner strong { color: var(--gold); }
.install-banner button { background: var(--gold); color: #0d0d1a; border: none; border-radius: 8px; padding: 8px 16px; font-weight: 700; cursor: pointer; font-size: 13px; }
.install-banner .dismiss { background: none; color: var(--text-muted); padding: 8px; }

/* ---- FREE BADGE ---- */
.badge-free { color: var(--free); font-size: 11px; font-weight: 600; }
.badge-paid { color: var(--gold); font-size: 11px; font-weight: 600; }

/* ---- LOADING ---- */
.loading { text-align: center; padding: 40px; color: var(--text-muted); }
.spinner { font-size: 40px; animation: spin 2s linear infinite; display: block; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
