/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0f1923;
  --bg-secondary: #1a2634;
  --bg-card: #1e2d3d;
  --accent: #00d4ff;
  --accent-hover: #00b8e6;
  --text-primary: #e8edf2;
  --text-secondary: #8899aa;
  --border: #2a3f52;
  --success: #00e676;
  --warning: #ffab00;
  --danger: #ff5252;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary) url('../img/bg.png') no-repeat center center fixed;
  background-size: cover;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 35, 0.82);
  z-index: -1;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ===== Navigation ===== */
.navbar {
  background: rgba(26, 38, 52, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(42, 63, 82, 0.6);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand svg, .nav-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(0, 212, 255, 0.1);
}

.nav-links a.active { color: var(--accent); }

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Layout ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: rgba(30, 45, 61, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(42, 63, 82, 0.6);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.card p, .card li {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card ul li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.card ul li:last-child { border-bottom: none; }

/* ===== Info Table ===== */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr { border-bottom: 1px solid var(--border); }
.info-table tr:last-child { border-bottom: none; }

.info-table td {
  padding: 0.6rem 0;
  font-size: 0.95rem;
}

.info-table td:first-child {
  color: var(--text-secondary);
  width: 40%;
}

/* ===== Status Indicators ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-online { background: rgba(0,230,118,0.12); color: var(--success); }
.status-online .dot { background: var(--success); animation: pulse 2s infinite; }

.status-offline { background: rgba(255,82,82,0.12); color: var(--danger); }
.status-offline .dot { background: var(--danger); }

.status-maintenance { background: rgba(255,171,0,0.12); color: var(--warning); }
.status-maintenance .dot { background: var(--warning); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-loading { background: rgba(0,212,255,0.12); color: var(--accent); }
.status-loading .dot { background: var(--accent); animation: pulse 1s infinite; }

/* ===== Race Icons ===== */
.race-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
}

.hero-logo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--accent), #7c4dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 550px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Stats Row ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.stat-card {
  background: rgba(30, 45, 61, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(42, 63, 82, 0.6);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ===== Discord Specific ===== */
.discord-widget {
  background: rgba(30, 45, 61, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(42, 63, 82, 0.6);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.discord-widget .discord-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.discord-widget h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.member-list {
  margin-top: 1.5rem;
  text-align: left;
}

.member-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.member-item:last-child { border-bottom: none; }

.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.member-name { font-weight: 500; }
.member-role { font-size: 0.8rem; color: var(--text-secondary); }

/* ===== Progress Bar ===== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-primary);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.5s ease;
}

/* ===== Fire Flare Effects ===== */
.flare-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.flare-layer::before,
.flare-layer::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}

/* Blue/white flare top-right */
.flare-layer::before {
  width: 500px;
  height: 500px;
  top: -120px;
  right: -120px;
  background: radial-gradient(circle, rgba(0,212,255,0.7) 0%, rgba(0,100,255,0.2) 50%, transparent 70%);
  animation: flarePulse 6s ease-in-out infinite;
}

/* Red/orange fire flare bottom-left */
.flare-layer::after {
  width: 600px;
  height: 600px;
  bottom: -180px;
  left: -180px;
  background: radial-gradient(circle, rgba(255,100,0,0.7) 0%, rgba(255,0,0,0.25) 45%, transparent 70%);
  animation: flarePulse 7s ease-in-out infinite reverse;
}

/* Floating embers */
.ember {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 140, 0, 0.8);
  box-shadow: 0 0 8px rgba(255, 100, 0, 0.9);
  animation: rise 8s linear infinite;
  opacity: 0;
}

.ember:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 7s; }
.ember:nth-child(2) { left: 25%; animation-delay: 2s; animation-duration: 9s; }
.ember:nth-child(3) { left: 40%; animation-delay: 4s; animation-duration: 8s; }
.ember:nth-child(4) { left: 55%; animation-delay: 1s; animation-duration: 10s; }
.ember:nth-child(5) { left: 70%; animation-delay: 3s; animation-duration: 7.5s; }
.ember:nth-child(6) { left: 85%; animation-delay: 5s; animation-duration: 9.5s; }
.ember:nth-child(7) { left: 15%; animation-delay: 6s; animation-duration: 8.5s; }
.ember:nth-child(8) { left: 60%; animation-delay: 7s; animation-duration: 11s; }

@keyframes flarePulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.15); opacity: 0.6; }
}

@keyframes rise {
  0% {
    transform: translateY(100vh) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-20vh) scale(1.2);
    opacity: 0;
  }
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(26, 38, 52, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid rgba(42, 63, 82, 0.6);
  }

  .nav-links.open { display: flex; }
  .hamburger { display: block; }

  .hero h1 { font-size: 2rem; }
  .card-grid { grid-template-columns: 1fr; }
}
