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

:root {
  --bg-color: #070817;
  --panel-bg: #0d0f2a;
  --card-bg: #12153b;
  --accent-cyan: #00f0ff;
  --accent-magenta: #ff007f;
  --accent-gold: #ffd700;
  --accent-green: #39ff14;
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --border-neon: rgba(0, 240, 255, 0.4);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Press Start 2P', monospace, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(255, 0, 127, 0.1), transparent 50%),
    radial-gradient(circle at 80% 75%, rgba(0, 240, 255, 0.1), transparent 50%),
    radial-gradient(circle at 20% 85%, rgba(57, 255, 20, 0.06), transparent 50%);
  background-attachment: fixed;
  padding-bottom: 40px;
}

/* Header */
.hub-header {
  width: 100%;
  max-width: 1040px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--panel-bg);
  border-bottom: 2px solid var(--border-neon);
  box-shadow: 0 4px 25px rgba(0, 240, 255, 0.18);
  margin-bottom: 24px;
  gap: 14px;
}

.brand-group h1 {
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--accent-magenta);
  text-shadow: 0 0 10px rgba(255, 0, 127, 0.8);
  margin-bottom: 4px;
}

.brand-group .hub-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  color: var(--accent-cyan);
  letter-spacing: 1.5px;
}

.user-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pilot-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(7, 8, 23, 0.8);
  border: 1.5px solid var(--accent-gold);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 9px;
  color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.btn-hub {
  background: rgba(13, 15, 42, 0.9);
  border: 1.5px solid var(--accent-cyan);
  color: var(--text-main);
  padding: 7px 12px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-hub:hover {
  background: var(--accent-cyan);
  color: #070817;
  box-shadow: 0 0 14px var(--accent-cyan);
}

.btn-hub.primary {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-hub.primary:hover {
  background: var(--accent-gold);
  color: #070817;
  box-shadow: 0 0 14px var(--accent-gold);
}

/* Main Hub Container */
.hub-main {
  width: 100%;
  max-width: 1040px;
  padding: 0 16px;
}

/* Hero Banner */
.hero-arcade-banner {
  background: linear-gradient(135deg, #1b1642, #0d0f2a);
  border: 2px solid var(--accent-magenta);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 28px;
  box-shadow: 0 0 30px rgba(255, 0, 127, 0.25);
  position: relative;
  overflow: hidden;
}

.hero-arcade-banner h2 {
  font-size: 18px;
  color: #ffffff;
  text-shadow: 0 0 12px var(--accent-magenta);
  margin-bottom: 12px;
}

.hero-arcade-banner p {
  font-size: 9px;
  line-height: 1.8;
  color: var(--text-dim);
  max-width: 700px;
  margin: 0 auto 16px auto;
}

.quick-stats-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.stat-pill {
  font-size: 8px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  color: var(--accent-cyan);
}

/* Games Grid */
.section-title {
  font-size: 13px;
  color: var(--accent-cyan);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 35px;
}

.game-card {
  background: var(--card-bg);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}

.game-card.featured {
  border-color: var(--accent-magenta);
  box-shadow: 0 0 25px rgba(255, 0, 127, 0.2);
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.3);
}

.card-screen {
  height: 150px;
  background: #08091a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  padding: 10px;
}

.card-icon {
  font-size: 48px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 10px var(--accent-cyan));
}

.badge-live {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-green);
  color: #070817;
  font-size: 7px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.badge-soon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #555c7a;
  color: #ffffff;
  font-size: 7px;
  padding: 4px 8px;
  border-radius: 4px;
}

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 {
  font-size: 12px;
  color: #ffffff;
  margin-bottom: 8px;
}

.card-body p {
  font-size: 8px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 16px;
  flex: 1;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  font-size: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 6px;
  border-radius: 3px;
  color: var(--accent-gold);
}

.btn-play-game {
  background: var(--accent-magenta);
  color: #ffffff;
  text-align: center;
  padding: 12px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.4);
}

.btn-play-game:hover {
  background: #ff2d95;
  box-shadow: 0 0 25px rgba(255, 0, 127, 0.8);
  transform: scale(1.02);
}

.btn-disabled {
  background: #2a2e4d;
  color: #64748b;
  text-align: center;
  padding: 12px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  border-radius: 6px;
  cursor: not-allowed;
}

/* Global Leaderboard Section */
.leaderboard-section {
  background: var(--panel-bg);
  border: 1px solid var(--border-neon);
  border-radius: 10px;
  padding: 20px;
}

.leader-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.podium-box {
  background: #14173e;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  padding: 14px;
}

.podium-box h4 {
  font-size: 10px;
  color: var(--accent-gold);
  margin-bottom: 12px;
  text-align: center;
}

.podium-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.podium-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8px;
  padding: 8px;
  background: rgba(7, 8, 23, 0.6);
  border-radius: 4px;
}

.podium-item .p-score {
  color: var(--accent-gold);
}

/* Dialog Styles */
dialog:modal {
  overscroll-behavior: contain;
  background: #0d102d;
  color: var(--text-main);
  border: 2px solid var(--accent-cyan);
  border-radius: 8px;
  padding: 24px;
  max-width: 480px;
  width: 90vw;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.4);
  margin: auto;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(4, 5, 14, 0.85);
  backdrop-filter: blur(4px);
}

dialog h2 {
  font-size: 13px;
  color: var(--accent-gold);
  margin-bottom: 14px;
  text-align: center;
}
