:root {
  --bg-dark: #0a0505;
  --bg-mid: #1a0a0a;
  --panel: rgba(30, 12, 12, 0.7);
  --border: rgba(90, 40, 30, 0.4);
  --text: #f2ebe6;
  --muted: #a08a8a;
  --gold: #e0a54a;
  --gold-2: #f4c76e;
  --red: #c62828;
}

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

html, body { height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse at top, #2a1414 0%, #0e0606 60%, #060202 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(198, 40, 40, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(224, 165, 74, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============ TOPBAR ============ */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 1.2rem 2.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.brand img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(198, 40, 40, 0.4);
}
.logo-mark-lobby {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #c62828 0%, #8b1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 0 20px rgba(198, 40, 40, 0.4);
}
.brand-title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  line-height: 1;
}
.brand-sub {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-top: 0.15rem;
}

.topbar nav { margin-left: auto; display: flex; gap: 0.8rem; }
.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  background: linear-gradient(180deg, #5865F2 0%, #4752c4 100%);
  color: white;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn-discord:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

/* ============ LOGIN / USER-BOX ============ */
.btn-steam {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.1rem; border-radius: 8px;
  background: linear-gradient(180deg, #1b2838 0%, #0e1620 100%);
  color: #fff; text-decoration: none; font-weight: 700;
  letter-spacing: 0.05em; font-size: 0.85rem;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s;
}
.btn-steam:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 192, 244, 0.35);
  border-color: #66c0f4;
}

.user-box-lobby {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.4rem 0.8rem; border-radius: 10px;
  background: rgba(0,0,0,0.4); border: 1px solid var(--border);
}
.user-box-lobby .user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
}
.user-box-lobby .user-meta { display: flex; flex-direction: column; gap: 0.15rem; }
.user-box-lobby .user-name {
  color: var(--text); font-weight: 600; font-size: 0.85rem; line-height: 1;
}
.admin-chip-lobby {
  display: inline-block; padding: 0.1rem 0.4rem; border-radius: 4px;
  background: rgba(224, 165, 74, 0.18);
  border: 1px solid rgba(224, 165, 74, 0.5);
  color: var(--gold); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em;
  align-self: flex-start;
}
.btn-logout {
  padding: 0.35rem 0.7rem; border-radius: 6px;
  color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.06em; border: 1px solid transparent;
  transition: all 0.15s;
}
.btn-logout:hover {
  color: #fff; background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
}

/* ============ MAIN ============ */
main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
}

/* ============ HERO ============ */
.hero {
  text-align: center;
  margin-bottom: 4rem;
}
.hero h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(3rem, 10vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: 0.03em;
}
.hero .line1 {
  color: var(--text);
  display: inline-block;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.hero .line2 {
  color: var(--gold);
  display: inline-block;
  text-shadow: 0 0 40px rgba(224, 165, 74, 0.4);
}
.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  margin-top: 1rem;
  letter-spacing: 0.02em;
}

/* ============ CARDS ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.8rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 12, 12, 0.9) 0%, rgba(15, 6, 6, 0.95) 100%);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s, border-color 0.3s;
  min-height: 400px;
}
.card:hover {
  transform: translateY(-8px);
  border-color: var(--card-color);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px color-mix(in srgb, var(--card-color) 25%, transparent);
}
.card:hover .card-glow { opacity: 1; }
.card:hover .card-cta { background: var(--card-color); color: white; }
.card:hover .card-logo img { transform: scale(1.05); }

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, var(--card-color) 0%, transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  filter: blur(50px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}
.card-logo {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,0.35);
  border: 2px solid var(--card-color);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 0 2px rgba(0,0,0,0.4), inset 0 0 20px rgba(0,0,0,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover .card-logo {
  transform: scale(1.08);
  box-shadow: 0 8px 32px var(--card-color), 0 0 0 2px rgba(0,0,0,0.4), inset 0 0 20px rgba(0,0,0,0.3);
}
.card-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.card:hover .card-logo img { transform: scale(1.1); }
.card-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border: 1px solid;
}
.card-status.online {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.08);
}
.card-status.offline {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
}
.card-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.card-body {
  flex: 1;
  margin: 1.8rem 0;
  position: relative;
  z-index: 2;
}
.card-name {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2.2rem;
  color: var(--card-accent);
  letter-spacing: 0.04em;
  line-height: 1;
}
.card-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}
.card-tag {
  color: var(--card-color);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--card-accent);
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  transition: background 0.25s, color 0.25s;
  align-self: flex-start;
  position: relative;
  z-index: 2;
}
.card-cta svg { transition: transform 0.25s; }
.card:hover .card-cta svg { transform: translateX(4px); }

/* ============ FOOTER ============ */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
