:root {
  color-scheme: dark;
  --bg: #07070a;
  --panel: rgba(18, 17, 26, 0.75);
  --panel-solid: #12111a;
  --panel-2: rgba(25, 24, 38, 0.85);
  --border: rgba(139, 92, 246, 0.25);
  --border-strong: rgba(139, 92, 246, 0.5);
  --text: #ede9fe;
  --muted: #a29bc2;
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-glow: rgba(139, 92, 246, 0.4);
}

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

body {
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background-color: var(--bg);
}

/* ===== Background layers ===== */
/* Base background image — stays at normal scale */
.bg {
  position: fixed;
  inset: 0;
  z-index: -4;
  background-image: url('background.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

/* Zoomed copy of the background, revealed only around the cursor via a
   circular mask. Creates a magnifying-glass effect that follows the mouse. */
.bg-zoom {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: url('background.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transform: scale(1.18);
  transform-origin: var(--mx, 50%) var(--my, 50%);
  filter: brightness(1.15) saturate(1.25);
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: transform, opacity, mask-position;
  -webkit-mask-image: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    black 25%,
    rgba(0,0,0,0.5) 55%,
    transparent 80%
  );
          mask-image: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    black 25%,
    rgba(0,0,0,0.5) 55%,
    transparent 80%
  );
}
body:hover .bg-zoom { opacity: 1; }

/* Fallback gradient — visible if background.png is missing */
.bg-fallback {
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 50% -100px, rgba(139,92,246,0.25), transparent 65%),
    radial-gradient(600px 400px at 15% 30%, rgba(124,58,237,0.12), transparent 60%),
    var(--bg);
}

/* Dark overlay so text on top of the background image stays readable */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(7,7,10,0.55) 0%,
    rgba(7,7,10,0.85) 60%,
    rgba(7,7,10,0.95) 100%);
}

/* Purple spotlight that follows the cursor */
.spotlight {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(
    500px circle at var(--mx, 50%) var(--my, 50%),
    rgba(139,92,246,0.28) 0%,
    rgba(139,92,246,0.10) 30%,
    transparent 60%
  );
}
body:hover .spotlight { opacity: 1; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 24px 80px; }

/* ===== Server IP top bar ===== */
.ip-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background: rgba(12, 10, 20, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex-wrap: wrap;
  font-size: 15px;
}
.ip-bar-item {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.ip-bar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}
.ip-bar .ip-label {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 12px;
}
.ip-bar .ip-address {
  font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffffff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ip-bar .discord-link {
  font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
  color: #b4a5ff;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.15s ease;
}
.ip-bar .discord-link:hover { color: #ffffff; }
@media (max-width: 640px) {
  .ip-bar-divider { display: none; }
}
.ip-bar .copy-btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ip-bar .copy-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.ip-bar .copy-btn.copied {
  background: #059669;
  border-color: #059669;
  color: white;
}

/* ===== Header ===== */
header { text-align: center; margin-bottom: 40px; }
.logo {
  width: 128px;
  height: 128px;
  margin: 0 auto 16px;
  display: block;
  filter: drop-shadow(0 8px 24px var(--accent-glow));
}
header h1 {
  margin: 0 0 8px;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
header p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

/* ===== Back link on subpages ===== */
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 20px;
  padding: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.back:hover { color: var(--text); border-color: var(--border-strong); }

/* ===== Username card ===== */
.username-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 28px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  backdrop-filter: blur(12px);
}
.username-card label { color: var(--muted); font-size: 14px; }
.username-card input {
  flex: 1;
  min-width: 200px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font: inherit;
}
.username-card input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.username-card .status { font-size: 13px; color: var(--muted); }
.username-card .status.saved { color: #6bd48a; }

.head {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 24px;
  overflow: hidden;
  transition: opacity 0.15s ease;
}
.head img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
}
.head.loading { opacity: 0.5; }

/* ===== Section grid (landing) ===== */
.sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 32px;
}
.section-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.section-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at 50% -50px, var(--accent-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.section-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--border-strong);
}
.section-card:hover::after { opacity: 1; }
.section-card .icon {
  font-size: 120px;
  line-height: 1;
  margin-bottom: 16px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
  /* Explicit resets to prevent black-box rendering */
  width: auto !important;
  height: auto !important;
  background: none !important;
  border: none !important;
  border-radius: 0;
  overflow: visible;
  display: block;
}
.section-card h2 { margin: 0 0 6px; font-size: 28px; font-weight: 700; }
.section-card p { margin: 0; color: var(--muted); font-size: 14px; }
.section-card .cta {
  margin-top: 16px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

/* ===== Product grid (section pages) ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.card h3 { margin: 0 0 6px; font-size: 20px; }
.card .price { color: var(--accent); font-weight: 600; font-size: 22px; margin-bottom: 10px; }
.card p { margin: 0 0 20px; color: var(--muted); font-size: 14px; flex: 1; }
.card .desc { margin: 0 0 20px; color: var(--muted); font-size: 14px; flex: 1; }
.card .desc ul {
  margin: 0;
  padding: 0 0 0 18px;
  list-style: disc;
}
.card .desc ul li {
  margin-bottom: 4px;
  line-height: 1.5;
}
.card button {
  background: var(--accent);
  color: white;
  border: 0;
  padding: 12px 16px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.card button:hover { background: var(--accent-hover); }
.card button:disabled { background: #333844; color: #6b7285; cursor: not-allowed; }

/* ===== Section page header ===== */
.section-header { margin-bottom: 24px; text-align: center; }
.section-header h1 {
  margin: 0 0 8px;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-header p { margin: 0; color: var(--muted); font-size: 17px; }

footer {
  text-align: center;
  margin-top: 48px;
  color: var(--muted);
  font-size: 13px;
}
footer .footer-links {
  margin-top: 10px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
footer .footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
footer .footer-links a:hover {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

/* ===== Terms of Service page ===== */
.terms {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 36px;
  backdrop-filter: blur(12px);
  color: var(--text);
  line-height: 1.65;
}
.terms-item {
  margin-bottom: 24px;
}
.terms-item:last-of-type {
  margin-bottom: 16px;
}
.terms-item h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}
.terms-item p {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 15px;
}
.terms-item p:last-child { margin-bottom: 0; }
.terms-ack {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
  text-align: center;
}

.error {
  background: rgba(42, 20, 24, 0.9);
  border: 1px solid #5a2530;
  color: #ffb4b4;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}
