* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0a0515;
  --bg-mid: #1a0f2e;
  --portal-blue: #00d4ff;
  --portal-orange: #ff6b35;
  --neon-cyan: #00ffff;
  --neon-pink: #ff10f0;
  --neon-green: #00ff88;
  --text-light: #ffffff;
  --text-dim: #b8b8d1;
}

body {
  font-family: 'Segoe UI', 'Arial', sans-serif;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.game-container {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.home-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  background: rgba(0, 212, 255, 0.3);
  color: var(--text-light);
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid rgba(0, 212, 255, 0.5);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  z-index: 100;
  font-size: 16px;
}

.home-btn:hover {
  background: rgba(0, 212, 255, 0.6);
  border-color: var(--portal-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.game-header {
  text-align: center;
  margin-bottom: 20px;
  margin-top: 60px;
}

.game-header h1 {
  font-size: 3rem;
  font-weight: bold;
  background: linear-gradient(135deg, var(--portal-blue), var(--portal-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
  text-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.score-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  background: rgba(0, 0, 0, 0.3);
  padding: 20px 40px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.player-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.player-name {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
}

.player-name.blue {
  color: var(--portal-blue);
  text-shadow: 0 0 10px var(--portal-blue);
}

.player-name.orange {
  color: var(--portal-orange);
  text-shadow: 0 0 10px var(--portal-orange);
}

.score {
  font-size: 3rem;
  font-weight: bold;
  color: var(--text-light);
}

.timer {
  font-size: 2rem;
  font-weight: bold;
  color: var(--neon-cyan);
  text-shadow: 0 0 20px var(--neon-cyan);
}

.game-area {
  position: relative;
  max-width: 1000px;
  width: 100%;
}

#gameCanvas {
  width: 100%;
  height: auto;
  border: 3px solid rgba(0, 212, 255, 0.4);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 
    0 0 40px rgba(0, 212, 255, 0.3),
    inset 0 0 60px rgba(0, 0, 0, 0.8);
}

.game-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(10, 5, 21, 0.95);
  border: 3px solid var(--portal-blue);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  z-index: 10;
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.6);
  min-width: 400px;
}

.game-message.hidden {
  display: none;
}

.message-content h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--portal-blue), var(--portal-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.message-content p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: var(--text-dim);
  line-height: 1.8;
}

.btn-primary, .btn-secondary {
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  margin: 10px;
  text-transform: uppercase;
}

.btn-primary {
  background: linear-gradient(135deg, var(--portal-blue), #0088cc);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.6);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--portal-orange), #cc4400);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6);
}

.controls-info {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 15px 25px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.player-label {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.player-label.blue {
  color: var(--portal-blue);
}

.player-label.orange {
  color: var(--portal-orange);
}

.control-group span {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Footer Styles - Unified Design */
.site-footer {
  padding: 0.6rem 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.18));
  backdrop-filter: blur(6px) saturate(120%);
  color: rgba(234, 246, 255, 0.86);
  margin-top: auto;
}

.site-footer a {
  color: rgba(0, 212, 255, 1);
  text-decoration: none;
  font-weight: 600;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-inner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.footer-left {
  flex: 0 0 auto;
  color: #99b8d1;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.footer-left > a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.footer-left .powered-logo {
  height: 20px;
  width: auto;
  max-height: 20px;
  max-width: 120px;
  display: inline-block;
  margin-left: 0;
  vertical-align: middle;
  filter: drop-shadow(0 6px 12px rgba(124, 92, 255, 0.06));
  object-fit: contain;
  flex-shrink: 0;
}

.footer-center {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.footer-center a {
  color: #99b8d1;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.18s, border-color 0.18s;
  font-size: 0.95rem;
}

.footer-center a:hover {
  color: rgba(0, 212, 255, 1);
  border-color: rgba(0, 212, 255, 0.25);
}

.footer-right {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.social-icon {
  height: 28px;
  width: 28px;
  display: inline-block;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(124, 92, 255, 0.1));
}

.logo-footer {
  height: 40px;
  margin-right: 12px;
  filter: drop-shadow(0 8px 22px rgba(124, 92, 255, 0.08));
}

/* Responsive */
@media (max-width: 768px) {
  .game-header h1 {
    font-size: 2rem;
  }

  .score-display {
    gap: 20px;
    padding: 15px 20px;
  }

  .score {
    font-size: 2rem;
  }

  .timer {
    font-size: 1.5rem;
  }

  .game-message {
    min-width: 90%;
    padding: 30px 20px;
  }

  .controls-info {
    gap: 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    padding: 0;
  }

  .footer-center {
    order: 3;
  }

  .footer-left {
    justify-content: center;
  }

  .site-footer {
    padding: 1rem 0;
  }
}
