:root {
  --bg: #07060f;
  --bg2: #0d0a1f;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-brd: rgba(255, 255, 255, 0.09);
  --txt: #f2f0ff;
  --muted: #9a93c4;
  --accent: #7c5cff;
  --accent2: #19d3ff;
  --accent3: #ff4d8d;
  --good: #4ad991;
  --radius: 22px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: radial-gradient(1200px 800px at 80% -10%, #1a1240 0%, transparent 55%),
              radial-gradient(900px 700px at 0% 100%, #0b2440 0%, transparent 50%),
              var(--bg);
  color: var(--txt);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* animated aurora blob */
.aurora {
  position: fixed;
  inset: -30vh -10vw auto -10vw;
  height: 90vh;
  background:
    radial-gradient(closest-side, rgba(124,92,255,0.35), transparent),
    radial-gradient(closest-side, rgba(25,211,255,0.25), transparent);
  filter: blur(70px);
  z-index: 0;
  animation: float 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes float {
  0%   { transform: translate(-6%, -4%) scale(1); }
  100% { transform: translate(8%, 6%) scale(1.15); }
}

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

.shell {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 22px 60px;
}

/* TOPBAR */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 46px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 18px;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 26px -8px var(--accent);
  letter-spacing: -1px;
}
.logo-text { font-size: 16px; letter-spacing: .3px; color: var(--muted); }
.logo-text strong { color: var(--txt); }
.badge {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(255,0,51,0.15);
  border: 1px solid rgba(255,0,51,0.6);
  padding: 8px 14px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 0 18px rgba(255,0,51,0.45), 0 0 60px rgba(255,0,51,0.2), inset 0 0 12px rgba(255,0,51,0.15);
  animation: redPulse 2s ease-in-out infinite;
  transition: all .18s ease;
}
@keyframes redPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(255,0,51,0.45), 0 0 60px rgba(255,0,51,0.2), inset 0 0 12px rgba(255,0,51,0.15); }
  50%      { box-shadow: 0 0 28px rgba(255,0,51,0.7), 0 0 80px rgba(255,0,51,0.35), inset 0 0 20px rgba(255,0,51,0.25); }
}
.badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(255,0,51,0.8), 0 0 90px rgba(255,0,51,0.4), inset 0 0 20px rgba(255,0,51,0.3);
}
.yt-ico {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 5px;
  background: #ff0033;
  color: #fff;
  font-size: 9px;
  line-height: 1;
}

/* HERO */
.hero { margin-bottom: 40px; max-width: 720px; }
.hero h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.02;
  letter-spacing: -1.5px;
}
.grad {
  background: linear-gradient(100deg, var(--accent2), var(--accent), var(--accent3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.55;
}
.hero .sub b { color: var(--txt); }

/* GRID */
.grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }

/* CARDS */
.card {
  background: var(--panel);
  border: 1px solid var(--panel-brd);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.card-label {
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 18px;
}

/* INPUT */
.field { display: block; }
.field > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 500;
}
.input-wrap { position: relative; }
.input-wrap input, .field.small input {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--panel-brd);
  border-radius: 14px;
  color: var(--txt);
  font-size: 26px;
  font-weight: 700;
  font-family: "Bricolage Grotesque", sans-serif;
  padding: 16px 60px 16px 18px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input-wrap input:focus, .field.small input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.18);
}
.input-wrap .unit {
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
input[type=number]::-webkit-inner-spin-button { opacity: 0.25; }

/* SLIDER */
#secSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  margin-top: 22px;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent2), var(--accent) var(--p,30%), rgba(255,255,255,0.1) var(--p,30%));
  outline: none;
}
#secSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent);
  cursor: pointer;
  box-shadow: 0 4px 14px -2px var(--accent);
  transition: transform .15s;
}
#secSlider::-webkit-slider-thumb:hover { transform: scale(1.15); }
#secSlider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 4px solid var(--accent); cursor: pointer;
}
.slider-scale {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted); margin-top: 8px;
}

/* CHIPS */
.chips { margin-top: 24px; }
.chip-label { font-size: 12px; color: var(--muted); }
.chip-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chip {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--panel-brd);
  color: var(--txt);
  padding: 9px 15px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--accent); transform: translateY(-2px); }
.chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
}

/* RATE READOUT */
.rate-readout {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--panel-brd);
}
.rate-readout > div { flex: 1; }
.ro-num {
  display: block;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--accent2);
}
.ro-lbl { font-size: 12px; color: var(--muted); }
.ro-div { width: 1px; height: 38px; background: var(--panel-brd); }

/* RESULTS */
.results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--panel-brd);
  border-radius: 18px;
  padding: 20px;
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  animation: rise .6s both;
  animation-delay: calc(var(--d) * 0.07s);
}
.stat::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent2), var(--accent3));
  opacity: .85;
}
.stat.wide { grid-column: 1 / -1; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-top {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.stat-ico { font-size: 16px; }
.stat-val {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin: 10px 0 4px;
  line-height: 1;
}
.stat-val .xp { font-size: .45em; color: var(--muted); font-weight: 600; margin-left: 4px; }
.stat-lvl {
  font-size: 13px;
  color: var(--good);
  font-weight: 600;
}

/* PLANNER */
.planner { margin-top: 18px; }
.planner h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 22px; font-weight: 700; margin-top: 2px;
}
.planner-body {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.field.small { flex: 1; min-width: 120px; }
.field.small input { font-size: 20px; padding: 13px 16px; }
.arrow { font-size: 22px; color: var(--muted); padding-bottom: 12px; }
.planner-result {
  flex: 1.4;
  min-width: 200px;
  background: linear-gradient(135deg, rgba(124,92,255,0.16), rgba(25,211,255,0.08));
  border: 1px solid rgba(124,92,255,0.3);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}
.pr-lbl { font-size: 12px; color: var(--muted); }
.pr-val {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 28px; font-weight: 800; margin: 2px 0; letter-spacing: -.5px;
}
.pr-sub { font-size: 12.5px; color: var(--muted); }

/* FOOT */
.foot {
  margin-top: 40px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.foot b { color: var(--accent2); }
