@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Space+Mono:wght@400;700&family=Nunito:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0c10;
  --bg2: #0f1218;
  --bg3: #161b24;
  --surface: #1a2030;
  --surface2: #232d3f;
  --border: #2a3448;
  --accent: #4ade80;
  --accent2: #22d3ee;
  --accent3: #f59e0b;
  --accent4: #a78bfa;
  --text: #e8edf5;
  --text-muted: #7a8aa0;
  --text-dim: #4a5568;
  --red: #f87171;
  --glow: 0 0 30px rgba(74,222,128,0.15);
  --glow2: 0 0 30px rgba(34,211,238,0.15);
  --radius: 12px;
  --radius-lg: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---- NOISE OVERLAY ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ---- GRID BG ---- */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(74,222,128,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,222,128,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,12,16,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-logo .logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-family: 'Space Mono', monospace;
  color: var(--bg);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  transition: all 0.2s;
  font-family: 'Syne', sans-serif;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
  color: var(--bg) !important;
  font-weight: 700 !important;
}

.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ---- MOBILE NAV ---- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ---- MAIN WRAPPER ---- */
main {
  position: relative;
  z-index: 1;
  padding-top: 64px;
}

/* ---- SECTION BASE ---- */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- HERO ---- */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  max-width: 100%;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-orb-1 {
  width: 400px; height: 400px;
  background: rgba(74,222,128,0.08);
  top: 20%; left: 30%;
  transform: translateX(-50%);
  animation: float 8s ease-in-out infinite;
}
.hero-orb-2 {
  width: 300px; height: 300px;
  background: rgba(34,211,238,0.06);
  top: 30%; right: 25%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-family: 'Space Mono', monospace;
  color: var(--accent);
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease both;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero h1 .line-accent {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.6s 0.3s ease both;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #22c55e);
  color: var(--bg);
  box-shadow: 0 4px 20px rgba(74,222,128,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(74,222,128,0.4);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--surface2);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-discord {
  background: #5865F2;
  color: white;
  box-shadow: 0 4px 20px rgba(88,101,242,0.3);
}
.btn-discord:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(88,101,242,0.4);
}

.btn-cyan {
  background: linear-gradient(135deg, var(--accent2), #0891b2);
  color: var(--bg);
  box-shadow: 0 4px 20px rgba(34,211,238,0.3);
}
.btn-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34,211,238,0.4);
}

.btn-amber {
  background: linear-gradient(135deg, var(--accent3), #d97706);
  color: var(--bg);
  box-shadow: 0 4px 20px rgba(245,158,11,0.3);
}
.btn-amber:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245,158,11,0.4);
}

/* ---- CARDS GRID ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  border-color: rgba(74,222,128,0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), var(--glow);
}

.card:hover::before { opacity: 1; }

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 1.2rem;
  font-family: 'Syne', sans-serif;
}

/* ---- SECTION HEADER ---- */
.section-header {
  margin-bottom: 3rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  width: 20px; height: 1px;
  background: var(--accent);
}

.section-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-header p {
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 520px;
  font-size: 1rem;
}

/* ---- PAGE HERO (sub pages) ---- */
.page-hero {
  padding: 5rem 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.page-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.page-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.2rem;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* ---- FEATURE LIST ---- */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.feature-list li::before {
  content: '▸';
  color: var(--accent);
  font-size: 0.8rem;
  margin-top: 3px;
  flex-shrink: 0;
}

/* ---- RULES TABLE ---- */
.rules-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 2rem 0;
}

.rules-section-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg3);
}

.rules-section-header .rule-icon {
  font-size: 1.3rem;
}

.rules-section-header h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.rules-content {
  padding: 1.5rem 2rem;
}

.rule-item {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.rule-item:last-child { border-bottom: none; }

.rule-num {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.2);
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.rule-text strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.rule-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Sanction Table */
.sanction-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.sanction-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.sanction-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(42,52,72,0.5);
  color: var(--text-muted);
}

.sanction-table tr:last-child td { border-bottom: none; }

.sanction-table td:first-child { color: var(--text); font-weight: 600; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
}

.badge-warn { background: rgba(245,158,11,0.15); color: var(--accent3); }
.badge-mute { background: rgba(167,139,250,0.15); color: var(--accent4); }
.badge-ban  { background: rgba(248,113,113,0.15); color: var(--red); }
.badge-perm { background: rgba(248,113,113,0.25); color: #ff4444; border: 1px solid rgba(248,113,113,0.3); }

/* ---- GAME VISUAL BOX ---- */
.game-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.game-screen {
  background: linear-gradient(180deg, #1a3a2a 0%, #0d2218 60%, #071510 100%);
  height: 260px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

/* pixel platforms */
.platform {
  position: absolute;
  background: linear-gradient(180deg, #4ade80, #16a34a);
  border-radius: 3px;
  box-shadow: 0 3px 0 #14532d;
}

/* pixel character */
.pixel-char {
  position: absolute;
  bottom: 50px;
  left: 80px;
  width: 20px;
  height: 28px;
  animation: charBob 1s ease-in-out infinite;
}

@keyframes charBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.pixel-char-body {
  width: 20px; height: 20px;
  background: var(--accent2);
  border-radius: 3px;
  position: relative;
}

.pixel-char-head {
  width: 14px; height: 12px;
  background: #fbbf24;
  border-radius: 3px 3px 0 0;
  margin: 0 auto;
}

/* coin animation */
.pixel-coin {
  position: absolute;
  width: 12px; height: 12px;
  background: var(--accent3);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(245,158,11,0.6);
  animation: coinFloat 2s ease-in-out infinite;
}

@keyframes coinFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.1); }
}

/* spike */
.pixel-spike {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 16px solid #f87171;
}

.game-info {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
}

.game-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.game-stat strong { color: var(--accent); }

/* ---- CONTROLS GRID ---- */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.key-badge {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.key {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--text-dim);
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 5px;
  font-weight: 700;
}

.control-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- TECH STACK ---- */
.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 100px;
}

.tech-pill.highlight {
  background: rgba(74,222,128,0.1);
  border-color: rgba(74,222,128,0.3);
  color: var(--accent);
}

/* ---- CODING PAGE ---- */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: all 0.3s;
}

.tool-card:hover {
  border-color: rgba(167,139,250,0.4);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 30px rgba(167,139,250,0.1);
  transform: translateY(-3px);
}

.tool-card.featured {
  border-color: rgba(167,139,250,0.4);
  background: linear-gradient(135deg, var(--surface), rgba(167,139,250,0.05));
}

.tool-card .tool-logo {
  width: 64px; height: 64px;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* ---- FOOTER ---- */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand .footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 1rem;
  display: block;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 260px;
}

.footer-col h4 {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.25rem;
  }
  .page-hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .controls-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  section { padding: 4rem 1.25rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
}

/* ---- UTILS ---- */
.text-accent { color: var(--accent); }
.text-cyan { color: var(--accent2); }
.text-amber { color: var(--accent3); }
.text-purple { color: var(--accent4); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}
