:root {
  --bg: #0a0a0f;
  --bg-lighter: #121218;
  --accent: #CC0000;
  --accent-hover: #ff2222;
  --accent-dim: rgba(204,0,0,0.15);
  --accent-glow: rgba(204,0,0,0.5);
  --text: #ffffff;
  --text-muted: #888888;
  --text-dim: #444444;
  --border: rgba(255,255,255,0.1);
  --card-bg: rgba(255,255,255,0.03);
}

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

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

body {
  background: var(--bg);
  background-image: 
    radial-gradient(ellipse at top center, rgba(80,0,0,0.15) 0%, transparent 60%),
    linear-gradient(180deg, rgba(10,10,15,0) 0%, rgba(10,10,15,1) 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
}

.hex-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath fill='%23cc0000' fill-opacity='1' d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L16 6.35V0h-1zm0 49v-7.5L27.99 34H28v2.31h-.01L16 42.65V49h-1z'/%3E%3C/svg%3E");
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--accent-dim);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 32px;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.nav-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent);
}

.nav-auth { display: flex; gap: 12px; }

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 24px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 10px 20px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}
.btn-ghost:hover {
  color: white;
  border-color: rgba(255,255,255,0.3);
}

.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 32px 60px;
  position: relative;
  z-index: 1;
}

.hero-content { max-width: 600px; }

.hero-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 40px var(--accent-glow);
  margin-bottom: 16px;
}
.hero-title .accent { color: var(--accent); }

.hero-sub {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  letter-spacing: 8px;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
}

.games-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 32px;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--accent);
  text-align: center;
  margin-bottom: 48px;
  text-shadow: 0 0 20px var(--accent-glow);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.game-card {
  background: var(--card-bg);
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}
.game-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(204,0,0,0.25);
  transform: translateY(-4px);
}

.game-thumb {
  height: 160px;
  background: linear-gradient(135deg, #1a0505 0%, #0d0202 100%);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--accent-dim);
}

.game-info { padding: 20px; }

.game-category {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
}

.game-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0;
}

.game-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.btn-play {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 24px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}
.btn-play:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 15px var(--accent-glow);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  place-items: center;
  z-index: 10000;
}
.modal-overlay.active { display: grid; }

.modal-box {
  background: var(--bg-lighter);
  border: 1px solid var(--accent-dim);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover { color: white; }

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab:hover { color: white; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form.hidden { display: none; }

.auth-form h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  margin-bottom: 8px;
}

.auth-form input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  color: white;
  font-size: 14px;
  transition: border-color 0.2s;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
}
.auth-form input::placeholder { color: var(--text-muted); }

.form-footer {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}
.form-footer a {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}
.form-footer a:hover { color: var(--accent-hover); }

.user-badge {
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-badge b { color: white; }

.footer {
  text-align: center;
  padding: 48px 32px;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--text-dim);
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.footer-tagline {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--accent);
  margin-top: 12px;
}

@media (max-width: 768px) {
  .navbar { padding: 12px 16px; }
  .nav-title { display: none; }
  .hero { padding-top: 100px; }
  .games-section { padding: 40px 16px; }
  .games-grid { grid-template-columns: 1fr; }
  .modal-box { margin: 16px; padding: 24px; }
}
