:root {
  --bg-0: #070b1a;
  --bg-1: #0b1127;
  --panel-0: rgba(18, 26, 58, 0.94);
  --panel-1: rgba(28, 38, 79, 0.96);
  --line: rgba(106, 110, 190, 0.24);
  --line-strong: rgba(106, 110, 190, 0.42);
  --text: #f6f3ff;
  --soft: #aeb5db;
  --muted: #636a8f;
  --ice: #64d8ff;
  --grad: linear-gradient(90deg, #8f4ff2 0%, #c255f5 45%, #ff5ea8 100%);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 24px rgba(124, 92, 255, 0.1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 12%, rgba(168, 85, 247, 0.16), transparent 24%),
    radial-gradient(circle at 85% 15%, rgba(255, 94, 168, 0.14), transparent 20%),
    linear-gradient(180deg, #090d1d 0%, #0a1127 52%, #070b1a 100%);
}

/* ── Topbar ───────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 20px;
  background: linear-gradient(90deg, rgba(31, 28, 60, 0.96), rgba(10, 14, 35, 0.96));
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand img { width: 44px; height: 44px; border-radius: 8px; }
.brand-title { font-weight: 800; font-size: 1rem; }
.brand-sub { color: var(--soft); font-size: 0.79rem; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; }

.tab {
  border: 1px solid rgba(132, 116, 235, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  border-radius: 7px;
  padding: 6px 11px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.tab.active { background: var(--grad); border-color: transparent; }
.tab-ice { background: linear-gradient(90deg, #2e7cf6, #49c6ff 60%, #b9fbff); color: #051018; border-color: transparent; }

/* ── Server Banner (WW2RP block) ──────────────────────── */
.server-banner {
  background: linear-gradient(180deg, #0e1432 0%, #080d22 100%);
  border-bottom: 2px solid rgba(124, 92, 255, 0.4);
}

.server-banner-body {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px 16px;
}

.server-back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.79rem;
  margin-bottom: 8px;
  transition: color 0.14s;
}
.server-back-link:hover { color: var(--soft); }

.server-banner-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.server-status-pill {
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: rgba(87, 242, 135, 0.13);
  border: 1px solid rgba(87, 242, 135, 0.36);
  color: #57f287;
  white-space: nowrap;
}

.server-status-pill.coming-soon {
  background: rgba(255, 211, 125, 0.11);
  border-color: rgba(255, 211, 125, 0.32);
  color: #ffd37d;
}

.server-name {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
}

.server-desc {
  margin: 5px 0 0;
  color: var(--soft);
  font-size: 0.84rem;
}

/* ── Page shell ───────────────────────────────────────── */
.page-shell { min-height: 100vh; }

.pkg-layout {
  max-width: 1240px;
  margin: 16px auto 0;
  padding: 0 20px 28px;
  display: grid;
  grid-template-columns: 266px 1fr;
  gap: 14px;
  align-items: start;
}

/* ── Sidebar ──────────────────────────────────────────── */
.pkg-sidebar {
  background: var(--panel-0);
  border: 1px solid var(--line);
}

.sidebar-section {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}
.sidebar-section:last-child { border-bottom: none; }

.sidebar-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--soft);
}

.stack { display: grid; gap: 7px; }

.input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  font-size: 0.87rem;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--soft) 50%),
    linear-gradient(135deg, var(--soft) 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 8px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 30px;
  color-scheme: dark;
}

select.input option, select.input optgroup { background: #172041; color: var(--text); }
select.input option:disabled { background: #121933; color: var(--muted); }

.btn {
  width: 100%;
  border: 1px solid rgba(132, 116, 235, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 8px 12px;
  font: inherit;
  font-size: 0.87rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.btn-primary { background: var(--grad); border-color: transparent; }

.account-status {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--soft);
  padding: 7px 9px;
  margin-top: 7px;
  font-size: 0.82rem;
}
.account-status.signed-in { border-color: rgba(102, 255, 153, 0.38); color: #9ef5c1; }

.category-list { display: grid; gap: 4px; }

.category-link {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 6px 9px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}
.category-link.active { background: rgba(124, 92, 255, 0.2); border-color: rgba(169, 142, 255, 0.4); }

.coming-soon-note {
  color: #ffd37d;
  font-size: 0.81rem;
  padding: 8px 13px;
  border-top: 1px solid var(--line);
}

/* ── Package main area ────────────────────────────────── */
.pkg-main {
  background: var(--panel-0);
  border: 1px solid var(--line);
}

.pkg-section-title {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--soft);
  background: rgba(28, 38, 79, 0.45);
}

/* ── Package cards — Prometheus-tight ─────────────────── */
.package-list { display: grid; gap: 0; }

.package-row {
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.package-row:last-child { border-bottom: none; }

/* Package name bar */
.store-box-header {
  padding: 9px 14px 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(28, 38, 79, 0.55);
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

/* Price + badge row */
.store-box { padding: 10px 14px 4px; }

.store-box-upper {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.store-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.store-badges { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }

.store-badge {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--soft);
  border: 1px solid var(--line);
  padding: 2px 7px;
}

.badge-soon { color: #ffd37d; border-color: rgba(255, 211, 125, 0.33); }

/* Description + features */
.store-box-lower {
  color: var(--soft);
  line-height: 1.65;
  font-size: 0.87rem;
  padding-bottom: 4px;
}

.store-features {
  margin: 7px 0 0;
  padding-left: 16px;
  font-size: 0.86rem;
}

.bundle-contents {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(100, 216, 255, 0.22);
  border-radius: 10px;
  background: rgba(100, 216, 255, 0.07);
}

.bundle-contents > span {
  display: block;
  margin-bottom: 8px;
  color: #8fe5ff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bundle-contents > div { display: flex; flex-wrap: wrap; gap: 6px; }
.bundle-contents strong { padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text-main); font-size: .8rem; }
.store-features li { margin-bottom: 2px; }

/* Buy button */
.buy-row { padding: 8px 14px 12px; }

.buy-btn {
  width: 100%;
  border: none;
  background: var(--grad);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 12px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.buy-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  border: 1px solid var(--line);
}

/* ── Result box + Footer ──────────────────────────────── */
.result-box {
  margin: 8px 14px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  padding: 8px 10px;
  min-height: 58px;
  color: #d5dcff;
  white-space: pre-wrap;
  font-size: 0.82rem;
  line-height: 1.55;
}

.footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px 22px;
  color: var(--muted);
  font-size: 0.81rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tos-link { color: #9cc9ff; text-decoration: none; font-weight: 700; }
.hidden { display: none; }

@media (max-width: 960px) {
  .pkg-layout { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; }
}

/* Refined storefront layout */
body { min-height: 100vh; }

.page-shell { width: min(1240px, calc(100% - 28px)); margin: 20px auto 36px; }

.topbar {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(31, 28, 60, 0.96), rgba(10, 14, 35, 0.96));
  box-shadow: var(--shadow);
}

.tab, .btn, .input, .category-link, .server-status-pill, .store-badge, .buy-btn { border-radius: 9px; }

.server-banner {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 94, 168, .15), transparent 27%),
    linear-gradient(135deg, rgba(29, 40, 83, .98), rgba(12, 18, 45, .98));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.server-banner-body {
  max-width: none;
  padding: 24px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 24px;
}

.server-back-link { grid-column: 1 / -1; margin: 0 0 4px; color: var(--soft); }
.server-banner-main { grid-column: 1; }
.server-name { font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -.025em; }
.server-desc { grid-column: 1; margin: 2px 0 0; font-size: .92rem; }
.server-banner .steam-session-badge {
  grid-column: 2;
  grid-row: 2 / 4;
  margin: 0 !important;
  min-width: 250px;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  background: rgba(7, 14, 38, .58) !important;
}
.session-logout {
  margin-left: auto;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--soft);
  font: inherit;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
}
.session-logout:hover { color: var(--text); border-color: var(--line-strong); }

.pkg-layout {
  max-width: none;
  margin: 18px 0 0;
  padding: 0;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 18px;
}

.pkg-sidebar {
  border-radius: 15px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(24, 33, 71, .94), rgba(15, 22, 52, .94));
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

.sidebar-section { padding: 15px; }
.sidebar-label { margin-bottom: 9px; color: #c0c7ed; }
.input { min-height: 42px; padding: 10px 12px; background: rgba(255,255,255,.045); }
.btn { min-height: 40px; }
.account-status { border-radius: 9px; margin-top: 9px; }
.category-list { gap: 7px; }
.category-link { display:flex; justify-content:space-between; gap:10px; padding: 9px 11px; }
.category-link span { color: var(--muted); font-weight: 800; }
.category-link.active span { color: #c9bcff; }

.pkg-main { border: 0; background: transparent; }
.pkg-section-title {
  padding: 2px 2px 12px;
  border: 0;
  background: transparent;
  color: var(--soft);
  font-size: .75rem;
}

.package-list { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.package-row {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(27, 38, 81, .96), rgba(16, 24, 57, .96));
  box-shadow: 0 14px 32px rgba(0,0,0,.24);
}
.package-row:last-child { border-bottom: 1px solid var(--line); }
.store-box-header { padding: 18px 20px 0; border: 0; background: transparent; font-size: .82rem; color: #cdd4fb; }
.store-box { padding: 15px 20px 8px; }
.store-box-upper { align-items:center; margin-bottom: 13px; }
.store-price { font-size: clamp(1.45rem, 2.4vw, 2rem); letter-spacing: -.025em; }
.store-badge { padding: 4px 9px; border-radius: 999px; }
.store-box-lower { min-height: 42px; line-height: 1.6; }
.buy-row { display:flex; gap:9px; padding: 12px 20px 20px; }
.buy-btn { min-height: 44px; padding: 11px 16px; box-shadow: 0 8px 22px rgba(194,85,245,.16); }
.buy-btn.secondary { background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); box-shadow:none; }

.result-box { margin: 16px 0 0; border-radius: 12px; min-height: 0; padding: 12px 14px; }
.result-box.hidden { display: none; }
.footer { max-width: none; margin: 18px 0 0; padding: 16px 4px 0; }

@media (max-width: 960px) {
  .page-shell { width: min(100% - 20px, 760px); margin-top: 10px; }
  .server-banner-body { grid-template-columns: 1fr; padding: 20px; }
  .server-banner .steam-session-badge { grid-column: 1; grid-row: auto; min-width: 0; margin-top: 8px !important; }
  .pkg-layout { grid-template-columns: 1fr; }
  .package-list { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar { align-items: stretch; }
  .nav { overflow-x:auto; flex-wrap:nowrap; padding-bottom:2px; }
  .tab { white-space:nowrap; }
  .server-banner-main { align-items:flex-start; }
  .server-name { line-height:1.12; }
  .store-box-upper, .buy-row { align-items:stretch; flex-direction:column; }
  .store-badges { justify-content:flex-start; }
}
