:root {
  --background: 0 0% 3%;
  --foreground: 0 0% 92%;
  --card: 0 0% 7%;
  --card-foreground: 0 0% 92%;
  --primary: 247 60% 61%;
  --primary-hover: 247 50% 52%;
  --primary-foreground: 0 0% 100%;
  --secondary: 0 0% 10%;
  --secondary-foreground: 0 0% 95%;
  --muted: 0 0% 12%;
  --muted-foreground: 0 0% 48%;
  --accent: 0 0% 12%;
  --accent-foreground: 0 0% 95%;
  --border: 0 0% 13%;
  --border-light: 0 0% 18%;
  --ring: 247 60% 61%;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --green: 142 71% 45%;
  --discord: 227 70% 60%;
}

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

body {
  font-family: "DM Sans", "Inter", system-ui, -apple-system, sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ── Background layers ── */
.bg-layer {
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
}

/* Orbs */
.bg-orbs { z-index: -1; }
.bg-orbs::before {
  content: ''; position: absolute;
  width: 700px; height: 700px;
  top: -20%; left: -15%;
  background: radial-gradient(circle, hsl(0 0% 100% / 0.025) 0%, transparent 65%);
  animation: orb1 25s ease-in-out infinite alternate;
}
.bg-orbs::after {
  content: ''; position: absolute;
  width: 550px; height: 550px;
  bottom: -25%; right: -15%;
  background: radial-gradient(circle, hsl(0 0% 100% / 0.02) 0%, transparent 65%);
  animation: orb2 30s ease-in-out infinite alternate;
}
.bg-orbs .o3 {
  position: absolute;
  width: 400px; height: 400px;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, hsl(247 60% 61% / 0.02) 0%, transparent 65%);
  animation: orb3 22s ease-in-out infinite alternate;
}
@keyframes orb1 {
  0%   { transform: translate(0,0) scale(1);   opacity: .3; }
  100% { transform: translate(100px,80px) scale(1.3); opacity: .7; }
}
@keyframes orb2 {
  0%   { transform: translate(0,0) scale(1);   opacity: .2; }
  100% { transform: translate(-100px,-120px) scale(1.25); opacity: .6; }
}
@keyframes orb3 {
  0%   { transform: translate(-50%,-50%) scale(1);   opacity: .1; }
  100% { transform: translate(-30%,-40%) scale(1.5); opacity: .35; }
}

/* Grid */
.bg-grid { z-index: -1; }
.bg-grid::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(hsl(0 0% 100% / 0.015) 1px, transparent 1px),
    linear-gradient(90deg, hsl(0 0% 100% / 0.015) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* Full background — repeating logo pattern, auto-scroll vertically */
.bg-pattern::before {
  content: ''; position: absolute;
  inset: 0;
  background-image: url('./logo.svg');
  background-repeat: repeat;
  background-size: 120px 120px;
  opacity: 0.035;
  will-change: background-position;
  animation: patternSlide 20s linear infinite;
}
@keyframes patternSlide {
  0%   { background-position: 0 0; }
  100% { background-position: 120px -120px; }
}

/* ── Header (glass) ── */
header {
  position: sticky; top: 0; z-index: 40;
  width: 100%; height: 68px;
  display: flex; align-items: center;
  background: hsl(var(--background) / 0.75);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid hsl(var(--border));
  transition: background 0.5s;
}

.header-inner {
  max-width: 1440px; width: 100%; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 24px; gap: 24px;
}

.header-left { display: flex; align-items: center; gap: 12px; }

.header-left a {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: hsl(var(--foreground));
}

.header-left img {
  width: 28px; height: 28px; border-radius: 6px;
}

.header-left span {
  font-size: 1.25rem; font-weight: 700;
  font-family: "Comfortaa", "DM Sans", system-ui, sans-serif;
}

.header-nav { display: flex; align-items: center; gap: 6px; }

.header-nav a {
  font-size: 0.85rem; font-weight: 600;
  color: hsl(var(--foreground));
  text-decoration: none;
  padding: 8px 18px;
  border-radius: var(--radius-lg);
  transition: all 0.25s;
  background: hsl(var(--card) / 0.5);
  border: 1px solid hsl(var(--border));
  backdrop-filter: blur(8px);
}

.header-nav a:hover {
  border-color: hsl(var(--primary) / 0.3);
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  box-shadow: 0 0 24px hsl(var(--primary) / 0.12);
}



.header-right { display: flex; align-items: center; gap: 2px; }

.header-right a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius);
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: all 0.2s;
}

.header-right a:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--muted) / 0.5);
}

.header-right svg { width: 18px; height: 18px; }

.version-badge {
  font-size: 0.75rem; font-weight: 600;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--card) / 0.8);
  border: 1px solid hsl(var(--border));
  backdrop-filter: blur(8px);
  padding: 2px 10px;
  border-radius: 999px;
  margin-left: 8px;
}

/* ── Main ── */
main {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 40px 24px 20px;
}

.container {
  max-width: 1440px; width: 100%; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  flex: 1;
}

/* ── Hero ── */
.hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; max-width: 640px; width: 100%;
}

.hero-icon {
  width: 72px; height: 72px;
  border-radius: 15px;
  background: hsl(var(--primary) / 0.08);
  border: 1px solid hsl(var(--primary) / 0.15);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 60px hsl(var(--primary) / 0.08);
  animation: hero-pulse 4s ease-in-out infinite alternate;
}

@keyframes hero-pulse {
  0%   { box-shadow: 0 0 30px hsl(var(--primary) / 0.06); }
  100% { box-shadow: 0 0 70px hsl(var(--primary) / 0.18); }
}

.hero-icon img { width: 68px; height: 68px; object-fit: contain; }

.hero h1 {
  font-size: 2.8rem; font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1;
  color: hsl(var(--foreground));
  margin-bottom: 8px;
}

.hero p {
  font-size: 1rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── Buttons (glass) ── */
.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-lg);
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary) / 0.5);
  box-shadow: 0 4px 24px hsl(var(--primary) / 0.25);
}

.btn-primary:hover {
  background: hsl(var(--primary-hover));
  transform: translateY(-2px);
  box-shadow: 0 8px 32px hsl(var(--primary) / 0.35);
}

.btn-secondary {
  background: hsl(var(--card) / 0.6);
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: hsl(var(--card) / 0.8);
  border-color: hsl(var(--border-light));
  transform: translateY(-1px);
}

.btn:active { transform: scale(0.97); }

/* ── Hero meta ── */
.hero-meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 20px;
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  flex-wrap: wrap; justify-content: center;
}

.hero-meta .sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: hsl(var(--muted-foreground) / 0.3);
}

.hero-meta .verified {
  color: hsl(var(--green));
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}

.hero-meta .verified svg { width: 12px; height: 12px; }

/* ── Stats (glass) ── */
.stats-wrap {
  background: hsl(var(--card) / 0.5);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-xl);
  padding: 20px 32px;
  margin-top: 28px;
}

.stats {
  display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap; justify-content: center;
}

.stat-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
}

.stat-item strong {
  font-weight: 700;
  color: hsl(var(--foreground));
}

.stat-sep {
  width: 1px; height: 20px;
  background: hsl(var(--border));
}

/* ── Features (glass cards) ── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
  width: 100%;
  max-width: 900px;
  padding: 0 24px;
}

.feature {
  background: hsl(var(--card) / 0.5);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-xl);
  padding: 20px 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: all 0.3s ease;
}

.feature:hover {
  border-color: hsl(var(--primary) / 0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px hsl(0 0% 0% / 0.3);
}

.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.12);
  display: flex; align-items: center; justify-content: center;
}

.feature-icon svg {
  width: 20px; height: 20px;
  color: hsl(var(--primary));
}

.feature h3 {
  font-size: 1rem; font-weight: 700;
  color: hsl(var(--foreground));
}

.feature p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

/* ── Footer ── */
footer {
  text-align: center;
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground) / 0.5);
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 16px 24px;
}

footer .sep { opacity: 0.4; }

/* ── Discord (glass) ── */
.discord-btn {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; align-items: center; gap: 10px;
  background: hsl(var(--discord) / 0.15);
  color: #fff;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: var(--radius-xl);
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  border: 1px solid hsl(var(--discord) / 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  box-shadow: 0 4px 24px hsl(var(--discord) / 0.15);
}

.discord-btn svg {
  width: 20px; height: 20px;
  transition: transform 0.3s;
}

.discord-btn:hover {
  background: hsl(var(--discord) / 0.25);
  border-color: hsl(var(--discord) / 0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 36px hsl(var(--discord) / 0.25);
}

.discord-btn:hover svg {
  transform: rotate(-8deg) scale(1.1);
}

/* ── Modal (glass) ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: hsl(var(--background) / 0.85);
  backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s;
}

.modal-overlay.show { opacity: 1; pointer-events: auto; }

.modal {
  background: hsl(var(--card) / 0.85);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid hsl(var(--primary) / 0.12);
  border-radius: calc(var(--radius-xl) * 1.5);
  max-width: 460px; width: 100%;
  padding: 34px 24px 24px;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 24px 80px hsl(0 0% 0% / 0.5);
}

.modal-overlay.show .modal { transform: scale(1); }

.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.5);
  color: hsl(var(--muted-foreground));
  cursor: default; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; line-height: 1; font-family: inherit;
  transition: all 0.2s;
}

.modal-close.ready { cursor: pointer; pointer-events: auto; }
.modal-close.ready:hover { background: hsl(var(--primary) / 0.15); color: hsl(var(--primary)); }

.modal-close.countdown {
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.3);
  font-size: 0.85rem;
}

.modal h2 {
  font-size: 1.25rem; font-weight: 800;
  color: hsl(var(--foreground));
  margin-bottom: 20px; padding-right: 30px;
}

.modal h2 span { color: hsl(var(--primary)); }

.modal ul {
  list-style: none; display: flex; flex-direction: column;
  gap: 6px; margin-bottom: 18px;
}

.modal ul li {
  font-size: 0.85rem; color: hsl(var(--muted-foreground));
  line-height: 1.5; padding-left: 18px; position: relative;
}

.modal ul li::before {
  content: ''; position: absolute; left: 2px; top: 9px;
  width: 4px; height: 4px; border-radius: 50%;
  background: hsl(var(--primary)); opacity: 0.5;
}

.modal ul li strong { color: hsl(var(--foreground)); font-weight: 600; }

.modal .sub-list { margin-top: -12px; }
.modal .sub-list li { font-size: 0.8rem; }
.modal .sub-list li::before { background: hsl(var(--muted-foreground) / 0.4); }

.modal-btn {
  display: block; text-align: center;
  padding: 13px 20px;
  border-radius: var(--radius-lg);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 20px hsl(var(--primary) / 0.25);
  transition: all 0.25s;
}

.modal-btn:hover { opacity: 0.9; transform: translateY(-1px); }

.modal-footer {
  text-align: center;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground) / 0.5);
  margin-top: 12px;
}

.modal-dl { display: none; flex-direction: column; align-items: center; gap: 16px; padding: 32px 0; }
.modal-dl.show { display: flex; }

.modal-dl .spinner {
  width: 22px; height: 22px;
  border: 2px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  border-radius: 50%; animation: spin 0.7s linear infinite;
}

.modal-dl-text { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── 404 ── */
.error-404 {
  font-size: 5.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, hsl(247 60% 61%), hsl(265 50% 65%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  animation: glitch 3s ease-in-out infinite;
}

@keyframes glitch {
  0%,90%,100% { transform: none; opacity: 1; }
  92% { transform: skew(-2deg) translateX(2px); opacity: 0.8; }
  94% { transform: skew(1deg) translateX(-1px); opacity: 0.9; }
  96% { transform: none; opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .bg-pattern::before { background-size: 50px 50px; }

  header { height: 60px; }
  .header-inner { padding: 0 16px; gap: 12px; }
  .header-left span { font-size: 1.1rem; }
  .header-left img { width: 24px; height: 24px; }
  .header-nav a { font-size: 0.8rem; padding: 6px 12px; }
  .header-nav a:first-child { display: none; }
  .version-badge { display: none; }

  main { padding: 24px 16px 12px; }

  .hero-icon { width: 64px; height: 64px; margin-bottom: 14px; }
  .hero-icon img { width: 42px; height: 42px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 0.9rem; margin-bottom: 16px; }
  .hero-meta { font-size: 0.75rem; gap: 8px; margin-top: 14px; }

  .stats-wrap { padding: 12px 16px; margin-top: 20px; }
  .stats { gap: 10px; }
  .stat-sep { display: none; }
  .stat-item { font-size: 0.78rem; }

  .features { grid-template-columns: 1fr; gap: 8px; margin-top: 20px; max-width: 100%; }
  .feature { padding: 14px 16px; }

  .discord-btn { bottom: 16px; right: 16px; padding: 10px 14px; font-size: 0.8rem; }
}

@media (max-width: 400px) {
  .header-nav a { padding: 6px 10px; font-size: 0.75rem; }
}
