:root {
  --bg-void: #050505;
  --bg-base: #0b0b0b;
  --bg-card: #14120e;
  --bg-elevated: #1c1912;
  --bg-hover: #241f16;
  --border: #2e2419;
  --gold: #c9a55c;
  --gold-light: #f5e2a8;
  --gold-dark: #8a6d3b;
  --gold-bright: #facc15;
  --text: #e8e0d0;
  --text-muted: #9a9284;
  --danger: #e05555;
  --success: #6fcf97;
}

* { box-sizing: border-box; }

body {
  background: var(--bg-void);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Starfield backdrop */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 20% 20%, #14120e 0%, #050505 60%);
  overflow: hidden;
}
#starfield::before, #starfield::after {
  content: '';
  position: absolute;
  inset: -50%;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #f5e2a8aa, transparent),
    radial-gradient(1px 1px at 90px 120px, #c9a55c88, transparent),
    radial-gradient(2px 2px at 160px 60px, #f5e2a866, transparent),
    radial-gradient(1px 1px at 220px 180px, #ffffff55, transparent),
    radial-gradient(1.5px 1.5px at 280px 40px, #c9a55c77, transparent),
    radial-gradient(1px 1px at 340px 220px, #f5e2a844, transparent);
  background-repeat: repeat;
  background-size: 400px 400px;
  animation: drift 90s linear infinite;
}
#starfield::after { background-size: 600px 600px; opacity: .5; animation-duration: 140s; animation-direction: reverse; }
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(-400px,-400px); } }

.app { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 32px 24px 80px; }

/* Header */
header.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 48px; flex-wrap: wrap; gap: 16px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: conic-gradient(from 180deg, var(--gold-dark), var(--gold-bright), var(--gold-light), var(--gold-dark));
  box-shadow: 0 0 24px #c9a55c66, inset 0 0 10px #00000066;
  animation: spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.logo-text { font-size: 22px; font-weight: 800; letter-spacing: 2px; }
.logo-text span { color: var(--gold-light); }
nav.tabs { display: flex; gap: 6px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 6px; }
nav.tabs button {
  background: transparent; border: none; color: var(--text-muted);
  padding: 10px 20px; border-radius: 999px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .25s ease; letter-spacing: .3px;
}
nav.tabs button:hover { color: var(--gold-light); background: var(--bg-hover); }
nav.tabs button.active { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #0b0908; box-shadow: 0 0 18px #c9a55c55; }

section.view { display: none; animation: fadeIn .4s ease; }
section.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

h1 { font-size: 32px; margin: 0 0 6px; letter-spacing: .5px; }
h1 .accent { color: var(--gold-light); }
.subtitle { color: var(--text-muted); margin: 0 0 32px; font-size: 15px; }

/* Segment/zone controls */
.pill-group { display: inline-flex; gap: 6px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: 5px; margin-bottom: 28px; }
.pill-group button {
  background: transparent; border: none; color: var(--text-muted); padding: 9px 18px;
  border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .25s ease;
}
.pill-group button.active { background: var(--gold); color: #0b0908; }
.pill-group button:hover:not(.active) { color: var(--gold-light); }

/* Plan cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-base));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: 16px; padding: 1px;
  background: linear-gradient(135deg, transparent 40%, #c9a55c55, transparent 60%);
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.card:hover { transform: translateY(-6px); border-color: var(--gold-dark); box-shadow: 0 12px 40px #00000088, 0 0 30px #c9a55c22; }
.card:hover::before { opacity: 1; }
.plan-name { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.plan-meta { color: var(--text-muted); font-size: 13px; margin-bottom: 18px; min-height: 36px; }
.plan-price { font-size: 30px; font-weight: 800; color: var(--gold-light); }
.plan-price small { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.badge-campaign { display: inline-block; background: #6fcf9722; color: var(--success); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; letter-spacing: .3px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; padding: 13px 22px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  letter-spacing: .3px;
}
.btn-primary { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #0b0908; width: 100%; margin-top: 18px; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px #c9a55c55; filter: brightness(1.08); }
.btn-ghost { background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); box-shadow: 0 0 16px #c9a55c33; }

/* Toggles / options */
.option-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.option-row:last-child { border-bottom: none; }
.option-label { font-size: 14px; }
.option-sub { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
select, input[type=text] {
  background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text);
  padding: 10px 14px; border-radius: 10px; font-size: 14px; transition: border-color .2s ease;
}
select:hover, select:focus, input:hover, input:focus { border-color: var(--gold); outline: none; }

.switch { position: relative; width: 46px; height: 26px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 999px; transition: .25s; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-muted); transition: .25s; }
.switch input:checked + .track { background: #c9a55c33; border-color: var(--gold); }
.switch input:checked + .track .thumb { transform: translateX(20px); background: var(--gold-light); box-shadow: 0 0 10px var(--gold); }

/* Stat tiles (charity/transparency) */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 32px; }
.stat-tile { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; text-align: center; }
.stat-tile .num { font-size: 26px; font-weight: 800; color: var(--gold-light); }
.stat-tile .lbl { font-size: 12px; color: var(--text-muted); margin-top: 4px; letter-spacing: .3px; text-transform: uppercase; }

.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 26px; max-width: 520px; }
.panel h3 { margin-top: 0; font-size: 15px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

.referral-box { background: var(--bg-elevated); border: 1px dashed var(--gold-dark); border-radius: 12px; padding: 18px; text-align: center; margin-top: 20px; }
.referral-code { font-size: 22px; font-weight: 800; color: var(--gold-light); letter-spacing: 3px; margin: 8px 0; }

.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.status-pill.pending { background: #e0555522; color: var(--danger); }
.status-pill.ok { background: #6fcf9722; color: var(--success); }

.notice { background: #c9a55c15; border: 1px solid var(--gold-dark); border-radius: 10px; padding: 12px 16px; font-size: 13px; color: var(--gold-light); margin-bottom: 20px; }

footer { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 60px; opacity: .6; }
