@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Exo+2:wght@300;400;600;700&display=swap');

:root {
  --bg-deep:    #080b10;
  --bg-surface: #0d1117;
  --bg-card:    #111822;
  --bg-hover:   #161e2c;
  --accent:     #00e5a0;
  --accent2:    #00aaff;
  --accent3:    #7b5ea7;
  --text-pri:   #e8edf5;
  --text-sec:   #7a8a9e;
  --text-muted: #3d4d60;
  --border:     rgba(0,229,160,0.12);
  --border2:    rgba(255,255,255,0.06);
  --glow:       0 0 20px rgba(0,229,160,0.25);
  --glow2:      0 0 40px rgba(0,229,160,0.15);
  --font-head:  'Rajdhani', sans-serif;
  --font-body:  'Exo 2', sans-serif;
  --r:          10px;
  --r-lg:       16px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text-pri);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

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

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

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700; font-size: 14px; color: #000;
}
.nav-logo-text {
  font-family: var(--font-head);
  font-size: 20px; font-weight: 700;
  color: var(--text-pri);
  letter-spacing: 1px;
}
.nav-logo-text span { color: var(--accent); }

.nav-left { display: flex; align-items: center; gap: 2rem; margin-left: 2.5rem; }
.nav-right { display: flex; align-items: center; gap: 1rem; }

.nav-link {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 600;
  color: var(--text-sec);
  text-decoration: none;
  letter-spacing: 0.5px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Language selector */
.lang-select {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  color: var(--text-sec);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 5px 10px;
  border-radius: var(--r);
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
}
.lang-select:hover { border-color: var(--accent); color: var(--text-pri); }

/* Connect button */
.btn-connect {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, box-shadow .2s;
}
.btn-connect:hover {
  background: rgba(0,229,160,0.08);
  box-shadow: var(--glow);
}
.btn-connect svg { width: 16px; height: 16px; }

/* ─── HERO ───────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 100px 2rem 4rem;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,229,160,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,160,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 0%, transparent 70%);
}

.hero-glow-orb {
  position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none;
}
.hero-glow-orb.g1 {
  width: 600px; height: 600px; top: -100px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0,229,160,0.08) 0%, transparent 70%);
}
.hero-glow-orb.g2 {
  width: 400px; height: 400px; bottom: 0; right: 10%;
  background: radial-gradient(circle, rgba(0,170,255,0.06) 0%, transparent 70%);
}

.hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 3rem;
  width: 100%; max-width: 1100px;
}

.hero-stat {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero-stat-number {
  font-family: var(--font-head);
  font-size: 48px; font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stat-label {
  font-size: 13px; color: var(--text-sec);
  text-transform: uppercase; letter-spacing: 2px;
  display: flex; align-items: center; gap: 6px;
}
.hero-stat-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100%{ box-shadow: 0 0 8px var(--accent); }
  50%{ box-shadow: 0 0 18px var(--accent), 0 0 30px var(--accent); }
}

.hero-logo-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.hero-logo-img {
  width: 180px; height: 180px;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-hover) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow2), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative; overflow: hidden;
}
.hero-logo-img::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,229,160,0.06) 0%, transparent 60%);
}
.hero-logo-svg { width: 100px; height: 100px; position: relative; z-index: 1; }
.hero-server-name {
  font-family: var(--font-head);
  font-size: 28px; font-weight: 700; letter-spacing: 3px;
  color: var(--text-pri);
  text-transform: uppercase;
}
.hero-server-name span { color: var(--accent); }
.hero-server-ip {
  font-size: 13px; color: var(--text-muted);
  font-family: monospace;
  background: var(--bg-card);
  padding: 4px 12px; border-radius: 6px;
  border: 1px solid var(--border2);
}

/* Discord stat with blue accent */
.hero-stat.discord .hero-stat-number {
  background: linear-gradient(135deg, #fff 30%, var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stat.discord .hero-stat-dot { background: var(--accent2); box-shadow: 0 0 8px var(--accent2); }

/* ─── GAME MODES ─────────────────────────────────── */
.section {
  position: relative; z-index: 1;
  padding: 5rem 2rem;
  max-width: 1200px; margin: 0 auto;
}

.section-title {
  font-family: var(--font-head);
  font-size: 36px; font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.section-title span { color: var(--accent); }
.section-subtitle {
  color: var(--text-sec); font-size: 15px;
  margin-bottom: 3rem;
}
.section-divider {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-bottom: 1rem;
}

.gamemodes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gamemode-card {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  cursor: pointer;
}
.gamemode-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 40px rgba(0,229,160,0.12);
}
.gamemode-img {
  width: 100%; height: 128px;
  object-fit: cover;
  display: block;
  background: var(--bg-hover);
  position: relative;
}
.gamemode-img-placeholder {
  width: 100%; height: 128px;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  position: relative; overflow: hidden;
}
.gamemode-img-placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--from), var(--to));
  opacity: 0.3;
}
.gamemode-body { padding: 1.25rem; }
.gamemode-tag {
  display: inline-block;
  font-size: 10px; font-family: var(--font-head); font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); background: rgba(0,229,160,0.1);
  border: 1px solid rgba(0,229,160,0.25);
  padding: 2px 8px; border-radius: 4px;
  margin-bottom: 8px;
}
.gamemode-name {
  font-family: var(--font-head);
  font-size: 22px; font-weight: 700;
  margin-bottom: 6px;
}
.gamemode-desc { font-size: 13px; color: var(--text-sec); line-height: 1.5; }
.gamemode-players {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border2);
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
}
.gamemode-players span { color: var(--accent); font-weight: 600; }

/* ─── SECTIONS BATEAU ─────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  transition: border-color .2s;
}
.feature-card:hover { border-color: rgba(0,229,160,0.3); }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(0,229,160,0.1);
  border: 1px solid rgba(0,229,160,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 1rem;
}
.feature-card h3 {
  font-family: var(--font-head);
  font-size: 18px; font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-card p { font-size: 13px; color: var(--text-sec); line-height: 1.6; }

/* CTA banner */
.cta-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 3rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
  position: relative; overflow: hidden;
  margin-top: 5rem;
}
.cta-banner::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,160,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.cta-banner h2 {
  font-family: var(--font-head);
  font-size: 30px; font-weight: 700;
  margin-bottom: 0.5rem;
}
.cta-banner p { font-size: 15px; color: var(--text-sec); }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-head); font-size: 16px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  border: none; border-radius: var(--r);
  cursor: pointer; text-decoration: none;
  transition: box-shadow .2s, transform .15s;
  white-space: nowrap;
}
.btn-primary:hover { box-shadow: var(--glow); transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 28px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-head); font-size: 16px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  border: 1px solid var(--accent); border-radius: var(--r);
  cursor: pointer; text-decoration: none;
  transition: background .2s, box-shadow .2s;
}
.btn-secondary:hover { background: rgba(0,229,160,0.08); box-shadow: var(--glow); }

/* ─── LEADERBOARD PAGE ────────────────────────────── */
.page-hero {
  padding: 100px 2rem 3rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.page-hero h1 {
  font-family: var(--font-head);
  font-size: 52px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
}
.page-hero h1 span { color: var(--accent); }
.page-hero p { color: var(--text-sec); font-size: 16px; margin-top: 0.5rem; }

.leaderboard-tabs {
  display: flex; gap: 1rem; margin-bottom: 2rem;
  border-bottom: 1px solid var(--border2);
  padding-bottom: 1rem;
}
.tab-btn {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 600; letter-spacing: 0.5px;
  color: var(--text-sec);
  background: none; border: none; cursor: pointer;
  padding: 6px 16px; border-radius: var(--r);
  transition: color .2s, background .2s;
}
.tab-btn:hover { color: var(--text-pri); background: var(--bg-card); }
.tab-btn.active { color: var(--accent); background: rgba(0,229,160,0.08); }

.leaderboard-table {
  width: 100%;
  border-collapse: separate; border-spacing: 0 4px;
}
.leaderboard-table thead th {
  padding: 10px 16px;
  font-family: var(--font-head); font-size: 12px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
}
.leaderboard-table thead th:first-child { width: 60px; text-align: center; }
.leaderboard-table tbody tr {
  background: var(--bg-card);
  border-radius: var(--r);
  transition: background .15s;
}
.leaderboard-table tbody tr:hover { background: var(--bg-hover); }
.leaderboard-table tbody td {
  padding: 14px 16px;
  font-size: 14px;
}
.leaderboard-table tbody td:first-child {
  text-align: center; border-radius: var(--r) 0 0 var(--r);
}
.leaderboard-table tbody td:last-child { border-radius: 0 var(--r) var(--r) 0; }

.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  font-family: var(--font-head); font-size: 14px; font-weight: 700;
}
.rank-badge.gold   { background: rgba(255,197,0,0.15); color: #ffc500; }
.rank-badge.silver { background: rgba(180,190,200,0.15); color: #b4bec8; }
.rank-badge.bronze { background: rgba(180,100,40,0.15); color: #c87020; }
.rank-badge.other  { background: var(--bg-hover); color: var(--text-muted); }

.player-cell { display: flex; align-items: center; gap: 10px; }
.player-avatar {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border2);
  overflow: hidden; flex-shrink: 0;
}
.player-avatar img { width: 100%; height: 100%; object-fit: cover; }
.player-name { font-family: var(--font-head); font-size: 15px; font-weight: 600; }

.stat-val {
  font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--text-pri);
}
.stat-val.accent { color: var(--accent); }
.stat-val.blue   { color: var(--accent2); }
.stat-val.red    { color: #ff5555; }

.stat-bar-wrap { display: flex; align-items: center; gap: 10px; }
.stat-bar {
  flex: 1; height: 4px; background: var(--bg-hover);
  border-radius: 2px; overflow: hidden; min-width: 80px;
}
.stat-bar-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .4s;
}

/* Table container */
.table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  overflow-x: auto;
}

.error-box {
  text-align: center; padding: 3rem;
  color: var(--text-sec); font-size: 14px;
}
.error-box .icon { font-size: 36px; margin-bottom: 1rem; display: block; }
.error-box code {
  background: var(--bg-card); padding: 4px 10px;
  border-radius: 6px; font-size: 12px; color: var(--text-muted);
}

/* ─── SHOP ───────────────────────────────────────── */
.coming-soon {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60vh; gap: 1rem;
}
.coming-soon h2 {
  font-family: var(--font-head);
  font-size: 42px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
}
.coming-soon h2 span { color: var(--accent); }
.coming-soon p { color: var(--text-sec); font-size: 16px; }

/* ─── MODAL ──────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 2rem;
  width: 100%; max-width: 400px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal h3 {
  font-family: var(--font-head); font-size: 22px; font-weight: 700;
  margin-bottom: 0.25rem;
}
.modal p { font-size: 13px; color: var(--text-sec); margin-bottom: 1.5rem; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 20px;
  transition: color .15s;
}
.modal-close:hover { color: var(--text-pri); }
.input-group { margin-bottom: 1rem; }
.input-group label { display: block; font-size: 12px; color: var(--text-sec); margin-bottom: 6px; letter-spacing: 0.5px; }
.input-group input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-card); border: 1px solid var(--border2);
  border-radius: var(--r); color: var(--text-pri);
  font-family: var(--font-body); font-size: 14px;
  outline: none; transition: border-color .2s;
}
.input-group input:focus { border-color: var(--accent); }
.modal-actions { display: flex; gap: 10px; margin-top: 1.5rem; }
.modal-actions .btn-primary { flex: 1; justify-content: center; }
.modal-actions .btn-secondary { padding: 11px 20px; }

/* ─── FOOTER ─────────────────────────────────────── */
footer {
  position: relative; z-index: 1;
  background: var(--bg-surface);
  border-top: 1px solid var(--border2);
  padding: 3rem 2rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 3rem;
}
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.footer-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 15px; color: #000;
}
.footer-logo-text {
  font-family: var(--font-head);
  font-size: 22px; font-weight: 700; color: var(--text-pri);
  letter-spacing: 1px;
}
.footer-logo-text span { color: var(--accent); }
.footer-copy {
  font-size: 13px; color: var(--text-muted);
  padding-left: 50px;
}
.footer-links { display: flex; gap: 4rem; }
.footer-col h4 {
  font-family: var(--font-head); font-size: 13px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-sec); margin-bottom: 1rem;
}
.footer-col a {
  display: block; font-size: 14px; color: var(--text-muted);
  text-decoration: none; margin-bottom: 8px;
  transition: color .15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px;
  background: var(--bg-card); border: 1px solid var(--border2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sec); text-decoration: none; font-size: 16px;
  transition: border-color .2s, color .2s;
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── UTILS ──────────────────────────────────────── */
.hidden { display: none !important; }
.text-accent { color: var(--accent); }
.text-sec { color: var(--text-sec); }

/* Scroll reveal */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s, transform .5s;
}
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .gamemodes-grid, .features-grid { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-inner { flex-direction: column; }
  .footer-links { flex-wrap: wrap; gap: 2rem; }
  .nav-left { gap: 1.2rem; }
}
