/* Modern Prac — shared styles */
:root {
  --purple: #9f43ef;
  --purple-dark: #8530d6;
  --lilac: #eda1ff;
  --pale: #f8daff;
  --bg: #120c19;
  --bg-2: #18101f;
  --surface: #1f1628;
  --surface-2: #281d33;
  --border: #33263f;
  --border-strong: #4a3858;
  --text: #f3eaf8;
  --muted: #b3a3c0;
  --dim: #85769a;
  --success: #5fd38d;
  --danger: #ff6b81;
  --warn: #f2c14e;
  /* Kept for the admin panel; both are flat now. */
  --grad: var(--purple);
  --glow: none;
  --radius: 8px;
  --radius-sm: 6px;
  --font: 'Rubik', system-ui, sans-serif;
  --display: 'Rubik', system-ui, sans-serif;
  --pixel: 'Silkscreen', monospace;
  --mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--lilac); }
button { font: inherit; cursor: pointer; }
::selection { background: var(--purple); color: #fff; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 500; font-size: 15px; text-decoration: none;
  color: #fff; background: var(--surface-2);
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--purple); }
.btn-primary:hover { background: var(--purple-dark); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--lilac); }
.btn-danger { background: transparent; border-color: rgba(255, 107, 129, 0.5); color: #ffb3bf; }
.btn-sm { --h: 34px; padding: 0 12px; font-size: 14px; }
.btn-lg { --h: 50px; padding: 0 24px; font-size: 16px; }
.btn svg { width: 17px; height: 17px; flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: transparent; color: var(--text);
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-size: 14px; font-weight: 500; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg);
  color: var(--text); font: inherit; font-size: 15px; outline: none;
}
.textarea { min-height: 100px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--lilac); }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.hint { font-size: 13px; color: var(--dim); }
.form-error { color: var(--danger); font-size: 14px; min-height: 1em; margin: 4px 0 10px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--purple); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: #fff; background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--purple); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.menu-toggle { display: none; }
.account { position: relative; }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.account-menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.account-menu .who b { display: block; }
.account-menu .who span { font-size: 13px; color: var(--dim); word-break: break-all; }
.account-menu a, .account-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--text); font-size: 15px; text-align: left; text-decoration: none;
}
.account-menu a:hover, .account-menu button:hover { background: var(--surface-2); }
.account-menu svg { width: 16px; height: 16px; color: var(--lilac); }

.announcement { display: block; text-decoration: none; text-align: center; padding: 8px 20px; font-size: 14px; background: var(--purple); color: #fff; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 64px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(40px, 7vw, 68px); line-height: 1.05; margin: 0 0 14px; font-weight: 700; letter-spacing: -0.01em; }
.hero h1 span { color: var(--lilac); }
.hero .lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 520px; }
.ip-box { display: flex; max-width: 420px; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.ip-box .ip { flex: 1; padding: 12px 16px; font-family: var(--mono); font-size: 18px; color: #fff; }
.ip-box button { border: 0; border-left: 1px solid var(--border-strong); padding: 0 18px; background: var(--purple); color: #fff; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.ip-box button:hover { background: var(--purple-dark); }
.ip-box button svg { width: 16px; height: 16px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.server-panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.server-panel .row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 15px; }
.server-panel .row:last-child { border-bottom: 0; }
.server-panel .row > span:first-child { color: var(--dim); }
.server-panel .row > span:last-child { text-align: right; font-weight: 500; }
.status { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.on { background: var(--success); }
.dot.off { background: var(--danger); }

/* ---------- sections ---------- */
section.block { padding: 80px 0; border-bottom: 1px solid var(--border); }
section.block.alt { background: var(--bg-2); }
h2.title { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; margin: 0 0 12px; font-weight: 700; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-copy p { font-size: 17px; color: var(--muted); margin: 0 0 16px; white-space: pre-line; }
.features { display: grid; gap: 12px; }
.feature { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--purple); }
.feature h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.modes-h { margin: 0 0 12px; font-size: 14px; font-weight: 500; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.rtp-note { margin-top: 20px; padding: 16px 20px; border-radius: var(--radius); border: 1px dashed var(--border-strong); }
.rtp-note h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.rtp-note p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- join ---------- */
.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 20px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 14px; }
.steps li::before {
  content: counter(step); width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: grid; place-items: center; background: var(--purple); color: #fff; font-weight: 700;
}
.steps h3 { margin: 4px 0 4px; font-size: 17px; font-weight: 600; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
.k { font-family: var(--mono); font-size: 14px; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); color: var(--pale); white-space: nowrap; }
.screenshot { margin: 0; }
.screenshot img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border-strong); image-rendering: pixelated; }
.screenshot figcaption { margin-top: 10px; font-size: 14px; color: var(--dim); }
.join-note { margin-top: 24px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 15px; }

/* ---------- discord ---------- */
.discord-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.discord-grid p { color: var(--muted); font-size: 17px; margin: 0; }
.discord-big {
  display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; margin-top: 28px;
  padding: 22px 24px; border-radius: var(--radius); font-weight: 700; font-size: 22px; color: #fff; text-decoration: none;
  background: #5865f2; transition: background 0.15s;
}
.discord-big:hover { background: #4752c4; }
.discord-big svg { width: 32px; height: 32px; }
.uses { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.uses li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 16px; }
.uses li:last-child { border-bottom: 0; }
.uses li svg { flex: none; width: 18px; height: 18px; color: var(--lilac); margin-top: 3px; }
.discord-grid h3 { margin: 0 0 14px; font-size: 18px; font-weight: 600; }

/* ---------- store ---------- */
.store-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: transparent; color: var(--muted); font-size: 14px; }
.chip:hover { color: #fff; }
.chip.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.store-note { color: var(--dim); font-size: 14px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.product { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.product:hover { border-color: var(--border-strong); }
.product.featured { border-color: var(--purple); }
.product .ribbon { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 3px 8px; border-radius: 4px; background: var(--purple); font-size: 12px; font-weight: 600; }
.product-media { aspect-ratio: 16 / 10; background: var(--surface-2); display: grid; place-items: center; border-bottom: 1px solid var(--border); }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media .placeholder { font-size: 26px; font-weight: 700; color: var(--lilac); text-align: center; padding: 10px; }
.product-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.product-cat { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.product h3 { margin: 2px 0 6px; font-size: 20px; font-weight: 600; }
.product p { margin: 0 0 16px; color: var(--muted); font-size: 15px; flex: 1; white-space: pre-line; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-size: 22px; font-weight: 700; }
.empty { padding: 48px 20px; text-align: center; border-radius: var(--radius); border: 1px dashed var(--border-strong); color: var(--muted); }
.empty svg { width: 36px; height: 36px; color: var(--dim); margin-bottom: 8px; }
.empty h3 { color: #fff; margin: 0 0 4px; font-size: 18px; }
.empty p { margin: 0; }

/* ---------- footer ---------- */
footer { padding: 36px 0; }
.foot { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); font-size: 15px; text-decoration: none; }
.foot-links a:hover { color: #fff; }
.legal { margin-top: 20px; color: var(--dim); font-size: 13px; }

/* ---------- drawer & modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(5, 2, 10, 0.7); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(440px, 100%);
  display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border-strong);
  transform: translateX(100%); transition: transform 0.25s ease;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin: 0; font-size: 19px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-foot { padding: 18px 20px 20px; border-top: 1px solid var(--border); background: var(--bg-2); }
.line-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 8px; }
.line-item .thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); overflow: hidden; flex: none; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; color: var(--lilac); }
.line-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-item .info { flex: 1; min-width: 0; }
.line-item .info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.line-item .info span { color: var(--dim); font-size: 14px; }
.totals { display: grid; gap: 4px; margin: 4px 0 14px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; color: var(--muted); }
.totals .grand { color: #fff; font-size: 19px; font-weight: 700; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }
.totals .off { color: var(--success); }
.code-row { display: flex; gap: 8px; }
.code-row .input { text-transform: uppercase; }
.player-preview { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.player-preview img { width: 32px; height: 32px; border-radius: 4px; image-rendering: pixelated; background: var(--surface-2); }
.paypal-box { min-height: 48px; }
.notice { padding: 12px 14px; border-radius: var(--radius); background: rgba(242, 193, 78, 0.08); border: 1px solid rgba(242, 193, 78, 0.3); color: #f5d98c; font-size: 14px; }

.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card {
  position: relative; width: min(440px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.modal-card.wide { width: min(720px, 100%); }
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal-card h3 { margin: 0 0 4px; font-size: 22px; }
.modal-card .sub { color: var(--muted); margin: 0 0 20px; }
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs button { flex: 1; padding: 10px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); font-weight: 500; }
.tabs button.active { color: #fff; border-bottom-color: var(--purple); }
.success-icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--success); }
.success-icon svg { width: 28px; height: 28px; color: #0d2a19; }

.toasts { position: fixed; bottom: 20px; left: 50%; translate: -50% 0; z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.toast.error { border-color: rgba(255, 107, 129, 0.6); }
.toast svg { width: 17px; height: 17px; color: var(--success); }
.toast.error svg { color: var(--danger); }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .about-grid, .join-grid, .discord-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; padding: 8px 12px 12px;
    background: var(--bg); border-bottom: 1px solid var(--border); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .menu-toggle { display: inline-grid; }
  .nav-actions { margin-left: auto; }
  section.block { padding: 56px 0; }
  .hero { padding: 48px 0; }
}
@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .ip-box button span { display: none; }
  .modal-card { padding: 24px 18px; }
  .login-label { display: none; }
}

.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.socials a { padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; font-size: 14px; }
.socials a:hover { color: #fff; border-color: var(--lilac); }
