/* ── Reset & Variables ── */
:root {
  --bg-primary:    #080810;
  --bg-secondary:  #0d0d1a;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --accent-1:  #667eea;
  --accent-2:  #764ba2;
  --accent-3:  #f093fb;
  --text-primary:   #e8eaf6;
  --text-secondary: #9fa8da;
  --text-muted:     #546e7a;
  --border:        rgba(255,255,255,0.08);
  --border-accent: rgba(102,126,234,0.4);
  --success: #00e676;
  --warning: #ffab40;
  --danger:  #ff5252;
  --discord: #5865F2;
  --gradient:      linear-gradient(135deg, #667eea, #764ba2);
  --gradient-wide: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --shadow:        0 8px 32px rgba(0,0,0,0.4);
  --shadow-accent: 0 8px 32px rgba(102,126,234,0.25);
  --radius:    12px;
  --radius-lg: 20px;
}

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

html { scroll-behavior: smooth; }

body { padding-top: 68px; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-1); border-radius: 3px; }

/* ── Typography ── */
h1,h2,h3,h4,h5 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; }

.gradient-text {
  background: var(--gradient-wide);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section   { padding: 5rem 0; }

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(8,8,16,0.85);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.navbar.scrolled { background: rgba(8,8,16,0.97); box-shadow: var(--shadow); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; height: 68px;
}

.nav-logo {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: var(--text-primary);
  font-weight: 800; font-size: 1.2rem;
}
.nav-logo-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 900; color: white;
}

.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links.open { display: flex; }

.nav-link {
  text-decoration: none; color: var(--text-secondary);
  padding: 0.5rem 0.9rem; border-radius: 8px;
  font-size: 0.9rem; font-weight: 500; transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); background: var(--bg-card-hover); }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.nav-user {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.9rem; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  text-decoration: none; color: var(--text-primary);
  font-size: 0.875rem; font-weight: 500; transition: all 0.2s;
}
.nav-user:hover { background: var(--bg-card-hover); border-color: var(--border-accent); }
.nav-user img { width: 26px; height: 26px; border-radius: 50%; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 0.5rem; background: none; border: none;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.3s; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.4rem; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  text-decoration: none; border: none; transition: all 0.25s;
  white-space: nowrap; font-family: inherit;
}
.btn-primary {
  background: var(--gradient); color: white;
  box-shadow: 0 4px 15px rgba(102,126,234,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(102,126,234,0.5); }

.btn-secondary {
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-accent); transform: translateY(-1px); }

.btn-discord { background: var(--discord); color: white; box-shadow: 0 4px 15px rgba(88,101,242,0.35); }
.btn-discord:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(88,101,242,0.5); filter: brightness(1.1); }

.btn-danger  { background: var(--danger);  color: white; }
.btn-danger:hover  { filter: brightness(1.1); transform: translateY(-1px); }

.btn-success { background: var(--success); color: #000; font-weight: 700; }
.btn-success:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-sm  { padding: 0.4rem 0.9rem;  font-size: 0.8rem;  border-radius: 8px; }
.btn-lg  { padding: 0.85rem 2rem;   font-size: 1rem;    border-radius: 14px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s;
}
.card:hover { border-color: var(--border-accent); background: var(--bg-card-hover); }
.card-body  { padding: 1.75rem; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.75rem; border-radius: 20px;
  font-size: 0.78rem; font-weight: 600;
}
.badge-success { background: rgba(0,230,118,0.15);  color: var(--success); border: 1px solid rgba(0,230,118,0.3); }
.badge-warning { background: rgba(255,171,64,0.15); color: var(--warning); border: 1px solid rgba(255,171,64,0.3); }
.badge-danger  { background: rgba(255,82,82,0.15);  color: var(--danger);  border: 1px solid rgba(255,82,82,0.3);  }
.badge-info    { background: rgba(102,126,234,0.15);color: var(--accent-1);border: 1px solid rgba(102,126,234,0.3); }
.badge-muted   { background: rgba(255,255,255,0.07);color: var(--text-muted); border: 1px solid var(--border); }

/* ── Status Dots ── */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-green  { background: var(--success); box-shadow: 0 0 8px var(--success); }
.dot-red    { background: var(--danger);  box-shadow: 0 0 8px var(--danger);  }
.dot-orange { background: var(--warning); box-shadow: 0 0 8px var(--warning); }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block; margin-bottom: 0.5rem;
  font-size: 0.875rem; font-weight: 600; color: var(--text-secondary);
}
.form-control {
  width: 100%; padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-primary);
  font-size: 0.9rem; transition: all 0.2s; font-family: inherit;
}
.form-control:focus {
  outline: none; border-color: var(--accent-1);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
select.form-control option { background: var(--bg-secondary); }
.form-hint  { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.35rem; }

/* ── Alerts ── */
.alert {
  padding: 1rem 1.25rem; border-radius: var(--radius);
  border-left: 3px solid; margin-bottom: 1rem; font-size: 0.9rem;
}
.alert ul { margin-top: .5rem; padding-left: 1.2rem; }
.alert-success { background: rgba(0,230,118,0.08);  border-color: var(--success); color: var(--success); }
.alert-warning { background: rgba(255,171,64,0.08); border-color: var(--warning); color: var(--warning); }
.alert-danger  { background: rgba(255,82,82,0.08);  border-color: var(--danger);  color: var(--danger);  }
.alert-info    { background: rgba(102,126,234,0.08);border-color: var(--accent-1);color: var(--text-primary); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
table thead tr { background: rgba(255,255,255,0.05); }
table th {
  padding: 0.9rem 1.25rem; text-align: left;
  font-size: 0.78rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}
table td {
  padding: 1rem 1.25rem; font-size: 0.875rem; color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
table tbody tr { transition: background 0.2s; }
table tbody tr:hover { background: var(--bg-card-hover); }
table tbody tr:last-child td { border-bottom: none; }

/* ── Toast ── */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.toast {
  padding: 0.85rem 1.25rem; border-radius: var(--radius);
  background: var(--bg-secondary); border: 1px solid var(--border);
  font-size: 0.875rem; font-weight: 500; color: var(--text-primary);
  box-shadow: var(--shadow); animation: toastIn 0.3s ease;
  display: flex; align-items: center; gap: 0.5rem; min-width: 260px;
}
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
.toast.info    { border-color: var(--accent-1); }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ── Section Header ── */
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header .label {
  display: inline-block; padding: 0.35rem 0.9rem; border-radius: 20px;
  background: rgba(102,126,234,0.12); border: 1px solid rgba(102,126,234,0.25);
  font-size: 0.78rem; font-weight: 700; color: var(--accent-1);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem;
}
.section-header p { color: var(--text-muted); max-width: 520px; margin: 0.75rem auto 0; }

/* ── Player ping colors ── */
.player-ping.good { color: var(--success); }
.player-ping.ok   { color: var(--warning); }
.player-ping.bad  { color: var(--danger);  }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }

/* ── Utility ── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.hidden { display: none !important; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ── Footer ── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem; margin-bottom: 2.5rem;
}
.footer-brand p { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.75rem; line-height: 1.7; max-width: 260px; }
.footer-links h5 { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a  { text-decoration: none; color: var(--text-muted); font-size: 0.875rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--text-primary); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; gap: 0.5rem;
}
.social-links { display: flex; gap: 0.5rem; }
.social-link {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: all 0.2s;
}
.social-link:hover { color: var(--text-primary); background: var(--bg-card-hover); border-color: var(--border-accent); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 1rem; gap: .25rem; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
