@font-face {
  font-family: "Russo One";
  src: url("fonts/russo-one.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #05040f;
  --bg-2: #0a0820;
  --panel: #14112a;
  --panel-2: #1b1736;
  --panel-3: #231e45;
  --frame: #2c2650;
  --frame-light: #4b3f8c;
  --text: #f4f2ff;
  --muted: #a8a4c9;
  --gold: #ffd35a;
  --gold-deep: #e39b12;
  --cyan: #22d3ee;
  --purple: #a855f7;
  --pink: #d946ef;
  --orange: #fb923c;
  --success: #34d399;
  --danger: #f87171;
  --radius: 14px;
  --display: "Russo One", "Arial Black", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 50% 0, #3b0f6b55, transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
  color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

code {
  font-family: ui-monospace, Consolas, monospace;
  background: #ffffff14;
  border: 1px solid #ffffff22;
  border-radius: 6px;
  padding: 0 6px;
}

.muted { color: var(--muted); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: 13px;
  color: #d6e9f5;
  background: linear-gradient(90deg, #0c3a45, #0e2a3d 50%, #0c3a45);
  text-align: center;
}

.topbar strong { color: #fff; letter-spacing: .3px; }

.topbar-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  flex: none;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 0 16px;
  background: #0b0a1acc;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--frame);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 4px;
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 1.5px;
  border-right: 1px solid var(--frame);
}

.brand img { border-radius: 10px; }

.tabs { display: flex; flex: 1; overflow-x: auto; }

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .8px;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color .15s, background .15s;
}

.tab:hover { color: #fff; background: #ffffff08; }
.tab.active { color: #fff; border-bottom-color: var(--purple); background: linear-gradient(180deg, transparent, #a855f71f); }

.tab-icon {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: currentColor;
  opacity: .8;
}

.tab-icon.coins { border-radius: 50%; background: var(--gold); opacity: 1; }
.tab-icon.servers { background: var(--cyan); }
.tab-icon.help { border-radius: 50%; background: transparent; border: 2px solid currentColor; }

.play-ip {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--cyan);
  background: #22d3ee14;
  color: #cffafe;
  font: 600 13px/1 system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.play-ip:hover { background: #22d3ee26; }
.play-ip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }

.hero {
  position: relative;
  height: 380px;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  isolation: isolate;
}

.hero-art { position: absolute; inset: 0; z-index: -1; }

.hero-art::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(40% 50% at 30% 40%, #7c3aedaa, transparent 70%),
    radial-gradient(35% 45% at 72% 35%, #db2777aa, transparent 70%),
    radial-gradient(45% 55% at 55% 75%, #0891b2aa, transparent 70%),
    radial-gradient(30% 30% at 85% 80%, #f59e0b55, transparent 70%);
  filter: blur(18px);
  animation: drift 24s ease-in-out infinite alternate;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, var(--bg-2));
}

.stars, .scene::before {
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, #fff, transparent),
    radial-gradient(1px 1px at 25% 70%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40% 30%, #fff, transparent),
    radial-gradient(1px 1px at 55% 85%, #fff, transparent),
    radial-gradient(2px 2px at 70% 15%, #fff, transparent),
    radial-gradient(1px 1px at 82% 55%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 92% 35%, #fff, transparent),
    radial-gradient(1px 1px at 5% 90%, #fff, transparent),
    radial-gradient(1px 1px at 63% 48%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 33% 8%, #fff, transparent);
  background-size: 320px 220px;
}

.stars { position: absolute; inset: 0; opacity: .8; animation: twinkle 6s ease-in-out infinite alternate; }

.planet {
  position: absolute;
  width: 230px;
  height: 230px;
  left: 6%;
  top: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c4b5fd, #7c3aed 45%, #2e1065 75%);
  box-shadow: 0 0 60px #7c3aed88, inset -30px -30px 60px #1e0b4b;
}

.planet::after {
  content: "";
  position: absolute;
  left: -40%;
  right: -40%;
  top: 44%;
  height: 26%;
  border-radius: 50%;
  border: 6px solid #f0abfc88;
  transform: rotate(-16deg);
}

.moon {
  position: absolute;
  width: 70px;
  height: 70px;
  right: 12%;
  top: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #a5f3fc, #0e7490 70%);
  box-shadow: 0 0 30px #22d3ee66;
}

.hero-coins {
  position: absolute;
  right: 5%;
  bottom: 20px;
  width: 330px;
  filter: drop-shadow(0 10px 30px #00000088);
}

.hero-text { padding: 0 16px; }

.eyebrow {
  margin: 0;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero h1 {
  margin: 4px 0 8px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 8vw, 76px);
  line-height: 1;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 4px 0 #6d28d9, 0 8px 30px #a855f7aa;
}

.lead { margin: 0 auto; max-width: 520px; color: #e4e0ff; font-size: 16px; }

.vault {
  position: relative;
  max-width: 1040px;
  margin: -40px auto 40px;
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--frame-light), var(--frame) 30%, #16132c);
  box-shadow: 0 30px 80px #000000aa, 0 0 0 1px #6d5fc255 inset;
}

.vault::before, .vault::after {
  content: "";
  position: absolute;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d8d2ff, #5b4fa3);
}

.vault::before { left: 14px; }
.vault::after { right: 14px; }

.vault-inner {
  position: relative;
  padding: 26px clamp(14px, 3vw, 34px) 34px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff06, transparent 200px),
    repeating-linear-gradient(135deg, #ffffff03 0 2px, transparent 2px 8px),
    var(--panel);
  box-shadow: inset 0 0 0 1px #00000088, inset 0 2px 30px #000000aa;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 26px;
  border-radius: 12px;
  background: #0d0b1f;
  border: 1px solid var(--frame);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1.5px dashed var(--cyan);
  background: #22d3ee0d;
  color: #a5f3fc;
  font: 600 14px/1 system-ui, sans-serif;
  cursor: pointer;
}

.user-chip.set { border-style: solid; border-color: var(--success); color: #d1fae5; background: #34d39912; }
.user-chip:hover { background: #22d3ee1f; }

.head { border-radius: 6px; image-rendering: pixelated; background: var(--panel-3); }

.select { position: relative; min-width: 230px; }

.select-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--frame-light);
  background: var(--panel-2);
  color: var(--text);
  font: 600 14px/1 system-ui, sans-serif;
  cursor: pointer;
}

.select-button:hover, .select-button[aria-expanded="true"] { border-color: var(--purple); }

.select-value { display: flex; align-items: center; gap: 8px; }

.chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform .15s;
}

.select-button[aria-expanded="true"] .chevron { transform: rotate(225deg) translate(-2px, -2px); }

.select-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--frame-light);
  box-shadow: 0 16px 40px #000000aa;
}

.select-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
}

.select-list li:hover, .select-list li.active { background: var(--panel-3); }
.select-list li[aria-selected="true"] { color: #fff; font-weight: 700; }

.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #6b6892; }
.live.on::before { background: var(--success); box-shadow: 0 0 8px var(--success); }

.balance { margin: 0 0 0 auto; color: var(--muted); font-size: 14px; }
.balance strong { color: var(--gold); font-family: var(--display); font-weight: 400; letter-spacing: .5px; }

.status { color: var(--muted); text-align: center; margin: 0 0 16px; }
.status.error { color: var(--danger); }
.status:empty { display: none; }

.featured { display: grid; gap: 22px; margin-bottom: 30px; }

.banner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 230px;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #3b3370, #1d1938);
  box-shadow: 0 12px 30px #00000088, inset 0 0 0 1px #8b7fe055;
}

.scene {
  position: absolute;
  inset: 10px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #00000099;
}

.scene::before { content: ""; position: absolute; inset: 0; opacity: .7; }

.scene.violet { background: radial-gradient(60% 90% at 75% 40%, #9333eacc, transparent 70%), radial-gradient(50% 80% at 20% 90%, #1d4ed8aa, transparent 70%), #120a2e; }
.scene.magenta { background: radial-gradient(60% 90% at 25% 40%, #db2777cc, transparent 70%), radial-gradient(50% 80% at 85% 80%, #7c3aedaa, transparent 70%), #1c0a24; }
.scene.aurora { background: radial-gradient(60% 90% at 75% 50%, #0891b2cc, transparent 70%), radial-gradient(50% 70% at 30% 20%, #f59e0baa, transparent 70%), #07162a; }

.banner-art, .banner-copy { position: relative; z-index: 1; }
.banner-art svg { width: 100%; max-width: 380px; display: block; margin: 0 auto; filter: drop-shadow(0 12px 22px #000000aa); }
.banner-copy { text-align: center; padding: 18px; }
.banner.flip .banner-art { order: 2; }

.label {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--gold);
  text-shadow: 0 2px 0 #7a4b00;
  text-transform: uppercase;
}

.amount {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(38px, 6vw, 54px);
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 3px 0 #2e2860, 0 6px 18px #00000099;
  letter-spacing: 1px;
}

.price-pill {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 16px;
  border-radius: 999px;
  background: #fff;
  color: #14112a;
  font-weight: 800;
  font-size: 15px;
}

.price-pill s { color: #6b6892; font-weight: 500; margin-left: 6px; }

.bonus-ribbon {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: -6px;
  padding: 5px 14px 5px 12px;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .6px;
  color: #062a30;
  background: linear-gradient(90deg, #67e8f9, var(--cyan));
  border-radius: 0 8px 8px 0;
  box-shadow: 0 6px 16px #00000066;
}

.banner.flip .bonus-ribbon { left: auto; right: -6px; border-radius: 8px 0 0 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 12px 22px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 -4px 0 #00000055, inset 0 2px 0 #ffffff55, 0 6px 16px #00000066;
  transition: transform .1s, filter .15s;
}

.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -2px 0 #00000055, 0 3px 8px #00000066; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn.blue { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.btn.purple { background: linear-gradient(180deg, #d946ef, #9333ea); }
.btn.orange { background: linear-gradient(180deg, #fb923c, #ea580c); }
.btn.ghost { background: #ffffff10; box-shadow: inset 0 0 0 1px var(--frame-light); min-width: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
  margin-bottom: 34px;
}

.pack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 16px 22px;
  border-radius: 16px;
  background: radial-gradient(80% 60% at 50% 30%, #3b2f7a55, transparent 70%), var(--panel-2);
  border: 1px solid var(--frame);
  transition: transform .15s, border-color .15s;
}

.pack:hover { transform: translateY(-3px); border-color: var(--frame-light); }
.pack .pack-art svg { width: 100%; max-width: 230px; display: block; filter: drop-shadow(0 10px 16px #00000099); }
.pack .amount { font-size: 34px; }
.pack .price { margin: 0 0 14px; color: var(--orange); font-weight: 800; font-size: 16px; }
.pack .price s { color: var(--muted); font-weight: 500; margin-left: 6px; }
.pack .bonus-ribbon { top: 14px; }

.section-title {
  margin: 0 0 4px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 1px;
}

.servers-section { margin-bottom: 30px; }

.server-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.server-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--frame);
}

.server-card strong { display: block; font-family: var(--display); font-weight: 400; letter-spacing: .5px; }
.server-card small { display: block; color: var(--muted); margin-bottom: 6px; }

.notices { display: grid; gap: 10px; }

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0d0b1f;
  border: 1px solid var(--frame);
  color: var(--muted);
  font-size: 13px;
}

.notice::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 5px;
  border: 2px solid var(--cyan);
}

.notice.warn::before { border-color: var(--orange); border-radius: 50%; }
.notice.card::before { border-color: var(--purple); }

.order {
  margin-bottom: 26px;
  padding: 20px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--frame-light);
}

.order.success { border-color: var(--success); }
.order.error { border-color: var(--danger); }
.order-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.order h2 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: .5px; }
.order-icon { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--frame-light); }
.order.success .order-icon { border-color: var(--success); background: #34d39922; }
.order.error .order-icon { border-color: var(--danger); background: #f8717122; }
.order-icon.spinning { border-top-color: var(--purple); animation: spin 1s linear infinite; }
.link { color: var(--cyan); }

.dialog {
  width: min(520px, calc(100vw - 24px));
  padding: 0;
  border: 1px solid var(--frame-light);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 30px 80px #000000cc;
}

.dialog::backdrop { background: #05040fcc; backdrop-filter: blur(4px); }
.dialog-body { padding: 22px; }
.dialog h2 { margin: 0 0 14px; font-family: var(--display); font-weight: 400; letter-spacing: .5px; }
.field-label { display: block; margin: 14px 0 6px; font-weight: 700; font-size: 14px; }
.name-row { display: flex; align-items: center; gap: 10px; }

.dialog input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--frame-light);
  background: var(--panel-2);
  color: var(--text);
  font-size: 16px;
}

.dialog input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.hint.ok { color: var(--success); }
.hint.error { color: var(--danger); }

.dialog-servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }

.dialog-server {
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--frame);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.dialog-server strong { display: block; font-size: 14px; }
.dialog-server[aria-checked="true"] { border-color: var(--purple); background: var(--panel-3); box-shadow: 0 0 0 1px var(--purple) inset; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.dialog-actions .btn { min-width: 120px; }

.footer { text-align: center; color: #6b6892; font-size: 13px; padding: 10px 16px 40px; }
.footer p { margin: 2px 0; }

button:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { to { transform: translate3d(3%, 4%, 0) scale(1.06); } }
@keyframes twinkle { to { opacity: .45; } }

@media (max-width: 760px) {
  .brand span { display: none; }
  .play-ip { display: none; }
  .hero { height: 300px; }
  .planet { width: 140px; height: 140px; left: -20px; top: 30px; }
  .hero-coins { width: 200px; right: -20px; bottom: 10px; opacity: .6; }
  .banner { grid-template-columns: 1fr; }
  .banner.flip .banner-art { order: 0; }
  .banner-art svg { max-width: 260px; }
  .balance { margin-left: 0; width: 100%; }
  .select { flex: 1; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art::before, .stars, .order-icon.spinning { animation: none; }
  .btn, .pack { transition: none; }
}
