/* ==========================================================================
   Game Zone Theme Variables & Base Styles
   Palette: Royal Blue (#003893), Crimson Red (#DC143C), Neon Accents
   ========================================================================== */

:root {
  --primary-blue: #003893;
  --primary-red: #DC143C;
  --neon-cyan: #00d4ff;
  --neon-blue: #0070f3;
  --neon-pink: #ff007a;
  
  --bg-dark-1: #12121c;
  --bg-dark-2: #181829;
  --glass-bg: rgba(24, 24, 41, 0.65);
  --glass-border: rgba(255, 255, 255, 0.12);
  
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  
  --text-main: #f5f6fa;
  --text-muted: #a0a0b8;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.game-zone-body {
  background: radial-gradient(circle at 50% 0%, #1a1a36 0%, #12121c 100%);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 60px;
}

/* ==========================================================================
   Fixed Glassmorphism Header
   ========================================================================== */

.gz-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(18, 18, 28, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  display: flex;
  justify-content: center;
}

.gz-nav-container {
  width: 100%;
  max-width: 1100px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gz-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.gz-logo span {
  color: var(--primary-red);
}

.gz-nav-links {
  display: flex;
  gap: 24px;
}

.gz-nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.gz-nav-links a:hover,
.gz-nav-links a.active-link {
  color: var(--neon-cyan);
}

.gz-btn-back {
  font-family: var(--font-code);
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.gz-btn-back:hover {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  box-shadow: 0 0 12px rgba(0, 56, 147, 0.5);
  transform: translateY(-2px);
}

/* ==========================================================================
   Main Content & Hero Section
   ========================================================================== */

.gz-main-content {
  margin-top: 100px;
  width: 100%;
  max-width: 800px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gz-hero-section {
  text-align: center;
  margin-bottom: 30px;
}

.gz-status-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(220, 20, 60, 0.1);
  border: 1px solid rgba(220, 20, 60, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-code);
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.gz-live-indicator {
  width: 8px;
  height: 8px;
  background-color: var(--primary-red);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary-red);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.4; transform: scale(0.9); }
}

.gz-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.gz-title span {
  background: linear-gradient(135deg, var(--neon-cyan), var(--primary-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gz-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ==========================================================================
   Selector Bar (Tabs)
   ========================================================================== */

.gz-selector-bar {
  display: flex;
  gap: 12px;
  background: var(--bg-dark-2);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  margin-bottom: 30px;
  width: 100%;
  max-width: 600px;
  justify-content: space-between;
}

.gz-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 16px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gz-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.gz-tab-btn.active {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-red));
  color: #fff;
  box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

/* ==========================================================================
   Glassmorphism Game Cards & Terminal Header
   ========================================================================== */

.gz-card {
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  display: none;
}

.gz-card.active {
  display: block;
}

.terminal-header {
  background: #12121c;
  padding: 12px 20px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  position: relative;
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.game-card-body {
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Glowing Status Badge */
.gz-status-badge {
  font-family: var(--font-code);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 30px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.25);
  text-align: center;
  transition: all 0.3s ease;
}

/* Common Restart / Control Buttons */
.gz-btn-restart, .gz-btn-action {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 24px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gz-btn-restart:hover, .gz-btn-action:hover {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  box-shadow: 0 0 12px rgba(0, 56, 147, 0.6);
  transform: translateY(-2px);
}

/* ==========================================================================
   GAME 1: Tic-Tac-Toe Specifics
   ========================================================================== */

.ttt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
}

.ttt-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ttt-cell:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.04);
}

.ttt-cell.x {
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

.ttt-cell.o {
  color: var(--primary-red);
  text-shadow: 0 0 12px rgba(220, 20, 60, 0.6);
}

/* ==========================================================================
   GAME 2: Rock Paper Scissors Specifics
   ========================================================================== */

.rps-choices {
  display: flex;
  gap: 20px;
}

.rps-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 2.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.rps-btn:hover {
  transform: scale(1.15) rotate(8deg);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 0, 122, 0.4);
}

.rps-result-box {
  width: 100%;
  max-width: 400px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.rps-matchup {
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-family: var(--font-code);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.vs-divider {
  color: var(--primary-red);
  font-weight: 700;
  font-size: 0.9rem;
}

.rps-outcome {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   GAME 3: Guess Number Specifics
   ========================================================================== */

.gn-input-wrapper {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 360px;
}

.gn-input-wrapper input {
  flex: 1;
  background: var(--bg-dark-1);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px 16px;
  color: #fff;
  font-family: var(--font-code);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.gn-input-wrapper input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

.gn-feedback-box {
  text-align: center;
  font-family: var(--font-code);
}

.gn-feedback {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  min-height: 28px;
}

.gn-attempts {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 768px) {
  .gz-nav-links {
    display: none; /* Collapses for simplicity in dedicated game view */
  }
}

@media (max-width: 600px) {
  .gz-selector-bar {
    flex-direction: column;
    gap: 8px;
  }
  
  .gz-tab-btn {
    width: 100%;
    justify-content: center;
  }

  .rps-choices {
    gap: 12px;
  }

  .rps-btn {
    width: 65px;
    height: 65px;
    font-size: 1.8rem;
  }

  .gn-input-wrapper {
    flex-direction: column;
  }

  .gn-input-wrapper input,
  .gn-input-wrapper button {
    width: 100%;
  }
}