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

:root {
  --bg: #0f0e0e;
  --bg-card: #1a1919;
  --bg-hover: #242323;
  --border: #2a2828;
  --text: #e8e0d3;
  --text-muted: #8a8580;
  --accent: #f57c2a;
  --accent-hover: #e06d1f;
  --accent-dim: #b85a1a;
  --green: #4ade80;
  --red: #ef4444;
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --steam: #1b2838;
  --radius: 8px;
  --radius-lg: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .2s;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Navbar */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text) !important;
}

.logo-img {
  height: 40px;
  width: auto;
  filter: brightness(1.3);
}

.logo-text {
  background: linear-gradient(135deg, var(--accent), #ffb347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-links a {
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: .9rem;
  transition: all .2s;
}

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

.discord-link {
  color: var(--discord) !important;
}

.discord-link:hover {
  background: rgba(88, 101, 242, .15) !important;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text) !important;
  font-weight: 600;
  font-size: .85rem;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius);
  transition: background .2s;
}

.user-btn:hover {
  background: var(--bg-hover);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  border: none;
  transition: all .2s;
  white-space: nowrap;
}

.btn-sm { padding: 6px 14px; font-size: .82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

.btn-primary {
  background: var(--accent);
  color: #fff !important;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text) !important;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
}

.btn-steam {
  background: var(--steam);
  color: #fff !important;
  border: 1px solid #2a475e;
}

.btn-steam:hover {
  background: #2a475e;
  transform: translateY(-1px);
}

.steam-icon {
  width: 18px;
  height: 18px;
  filter: brightness(10);
}

.btn-discord {
  background: var(--discord);
  color: #fff !important;
}

.btn-discord:hover {
  background: var(--discord-hover);
  transform: translateY(-1px);
}

/* Hero */
.hero {
  padding: 0;
  text-align: center;
}

.hero-banner {
  max-width: 700px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  background: var(--bg-card);
  min-height: 200px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 32px 20px 60px;
  line-height: normal;
  background: var(--bg);
}

/* Sections */
.section {
  padding: 60px 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-subtitle {
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* Server Grid */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.server-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  transition: all .2s;
}

.server-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.server-card.offline {
  opacity: .5;
}

.server-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: absolute;
  top: 16px;
  right: 16px;
}

.server-card.online .server-status-dot { background: var(--green); box-shadow: 0 0 8px rgba(74, 222, 128, .4); }
.server-card.offline .server-status-dot { background: var(--red); }

.server-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.server-info {
  display: flex;
  gap: 12px;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.server-players {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.server-players span {
  font-size: 1.8rem;
}

.server-meta .status-badge {
  font-size: .75rem;
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 600;
}

.status-badge.online { background: rgba(74, 222, 128, .15); color: var(--green); }
.status-badge.offline { background: rgba(239, 68, 68, .15); color: var(--red); }

/* Events Preview */
.events-preview {
  display: grid;
  gap: 16px;
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  gap: 20px;
  transition: all .2s;
}

.event-card:hover {
  border-color: var(--accent-dim);
}

.event-card.featured {
  border-color: var(--accent-dim);
  background: linear-gradient(135deg, var(--bg-card), rgba(245, 124, 42, .06));
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 12px;
  background: rgba(245, 124, 42, .1);
  border-radius: var(--radius);
}

.event-day {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.event-month {
  font-size: .7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
}

.event-body h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.event-body p {
  color: var(--text-muted);
  font-size: .88rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.event-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.event-badge {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(245, 124, 42, .15);
  color: var(--accent);
  letter-spacing: .5px;
}

.event-badge.scrim {
  background: rgba(74, 222, 128, .12);
  color: var(--green);
}

.event-badge.workshop {
  background: rgba(99, 102, 241, .12);
  color: #818cf8;
}

.event-prize {
  font-size: .82rem;
  font-weight: 700;
  color: #fbbf24;
}

.event-details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Events Page */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Discord Card */
.discord-card {
  background: linear-gradient(135deg, rgba(88, 101, 242, .1), rgba(88, 101, 242, .04));
  border: 1px solid rgba(88, 101, 242, .2);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}

.discord-content h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.discord-content p {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* Server Table */
.server-table-wrap {
  overflow-x: auto;
}

.server-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.server-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.server-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}

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

.server-table tr:hover {
  background: var(--bg-hover);
}

.server-table .offline-row {
  opacity: .5;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.green { background: var(--green); }
.status-dot.red { background: var(--red); }

.offline-text {
  color: var(--text-muted);
  font-size: .85rem;
}

.server-ip {
  display: block;
  margin-top: 4px;
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  user-select: all;
}

/* Profile */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  max-width: 400px;
}

.profile-avatar img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 3px solid var(--accent-dim);
}

.profile-card h2 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.profile-steamid {
  color: var(--text-muted);
  font-size: .82rem;
  margin-bottom: 16px;
}

.profile-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
}

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

/* Responsive */
@media (max-width: 768px) {
  .nav-links, .nav-auth {
    display: none;
  }

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  margin: 0 4px;
}

.lang-switcher a {
  color: var(--text-muted);
  padding: 2px 4px;
  border-radius: 4px;
  transition: all .2s;
}

.lang-switcher a:hover,
.lang-switcher a.active {
  color: var(--accent);
}

.lang-sep {
  color: var(--border);
  font-size: .7rem;
}

.hamburger {
    display: block;
  }

  .nav-links.active, .nav-auth.active {
    display: flex;
  }

  .nav-links.active {
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 8px;
  }

  .nav-auth.active {
    position: absolute;
    top: 200px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 16px;
    border-bottom: 1px solid var(--border);
  }

  .server-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    flex-direction: column;
  }

  .event-date {
    flex-direction: row;
    gap: 8px;
    min-width: auto;
    padding: 8px 16px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
