:root {
  --bg: #0b1220;
  --panel: #121a2b;
  --line: #243049;
  --text: #eef3ff;
  --muted: #9aa8c2;
  --gold: #f5c542;
  --green: #3dd68c;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 600px at 10% -10%, #1a3a2a 0%, transparent 45%),
    radial-gradient(900px 500px at 100% 0%, #2a2150 0%, transparent 40%), var(--bg);
  color: var(--text);
  font-family: Outfit, system-ui, sans-serif;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
  pointer-events: none;
}

.topbar,
main,
.admin-main {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 7vw;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand h1,
.section-head h3,
.hero h2 {
  margin: 0;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.12em;
  font-size: 12px;
  text-transform: uppercase;
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: transparent;
  display: block;
  flex-shrink: 0;
}

.cube {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #5dce6a, #2f8a45);
  box-shadow: 6px 6px 0 #1d4d2a, inset 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.top-actions {
  display: flex;
  gap: 10px;
}

.ip-chip,
.cart-btn,
.primary,
.ghost,
.product button {
  border: 1px solid var(--line);
  background: #172033;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.cart-btn,
.primary,
.product button {
  background: var(--gold);
  color: #1a1403;
  border-color: transparent;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 999px;
  background: #1a1403;
  color: var(--gold);
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

main,
.admin-main {
  padding: 0 7vw 80px;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  align-items: center;
  margin: 12px 0 48px;
}

.pixel {
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  color: var(--green);
}

.lead,
.section-head p,
.hint,
.muted {
  color: var(--muted);
}

.hero-card,
.product,
.drawer-panel,
.modal-card,
.login-card,
.order-card {
  background: rgba(18, 26, 43, 0.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 24px;
}

.hero-card ol {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 48px;
}

.grid.perms {
  grid-template-columns: repeat(4, 1fr);
}

.product {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.product.featured {
  outline: 2px solid var(--gold);
}

.ribbon {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--gold);
  color: #1a1403;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

.price {
  font-size: 28px;
  font-weight: 800;
}

.duration {
  color: var(--muted);
  font-size: 14px;
}

.product ul {
  margin: 0 0 8px;
  padding-left: 18px;
  color: var(--muted);
  flex: 1;
}

.drawer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 20;
  display: none;
  justify-content: flex-end;
}

.drawer.is-open {
  display: flex;
}

.drawer-panel {
  width: min(420px, 100%);
  height: 100%;
  border-radius: 0;
  padding: 22px;
  overflow: auto;
}

.drawer-head,
.checkout label,
.login-card label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-head {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.cart-items {
  min-height: 120px;
  margin: 16px 0;
}

.cart-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

input {
  width: 100%;
  border: 1px solid var(--line);
  background: #0d1524;
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
}

.checkout,
.login-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-card {
  max-width: 420px;
  padding: 24px;
  margin: 20px 0 32px;
}

.primary {
  width: 100%;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
  z-index: 30;
  padding: 20px;
}

.modal-card {
  max-width: 520px;
  width: 100%;
  padding: 24px;
}

.pay-box {
  background: #0d1524;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0 18px;
  color: var(--muted);
  white-space: pre-wrap;
}

.orders {
  display: grid;
  gap: 14px;
}

.order-card {
  padding: 18px;
}

.status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #243049;
}

.status.pending {
  background: #4a3b12;
  color: var(--gold);
}

.status.paid,
.status.delivered {
  background: #12351f;
  color: var(--green);
}

.status.paid_pending_rcon,
.status.checkout_failed {
  background: #4a1f12;
  color: #fdba74;
}

.lookup-card,
.progress-card {
  background: rgba(18, 26, 43, 0.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.lookup-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  align-items: end;
}

.lookup-card label {
  display: grid;
  gap: 6px;
}

.lookup-card input,
.checkout input {
  width: 100%;
}

.lookup-card .hint {
  grid-column: 1 / -1;
  margin: 0;
}

.progress-card h4,
.progress-card h5 {
  margin: 6px 0;
}

.owned-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.owned-list li {
  background: #172033;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
}

.product.owned {
  opacity: 0.48;
  filter: grayscale(0.85);
  pointer-events: none;
}

.product.locked {
  opacity: 0.42;
  filter: grayscale(1);
  pointer-events: none;
}

.progress-card.staff {
  outline: 2px solid var(--gold);
}

.product.current-rank {
  outline: 2px solid var(--green);
}

.ribbon.owned {
  background: #12351f;
  color: var(--green);
}

.product button:disabled {
  background: #243049;
  color: var(--muted);
  cursor: not-allowed;
}

@media (max-width: 980px) {
  .hero,
  .grid,
  .grid.perms {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .lookup-card {
    grid-template-columns: 1fr;
  }
}
