:root {
  /* New Cyberpunk Color Palette */
  --bg-color: #0f0f1c;
  --primary-color: #00f0ff;
  --secondary-color: #ff00f0;
  --accent-color: #ffffff;
  --primary-hover-color: #00b3cc;
  
  /* Additional supporting colors */
  --bg-overlay: rgba(15, 15, 28, 0.85);
  --card-bg: rgba(0, 240, 255, 0.1);
  --input-bg: rgba(255, 255, 255, 0.1);
  --border-color: rgba(0, 240, 255, 0.3);
  --shadow-primary: rgba(0, 240, 255, 0.4);
  --shadow-secondary: rgba(255, 0, 240, 0.4);
}

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

body {
  min-height: 100vh;
  background: var(--bg-color);
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(0, 240, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 0, 240, 0.1) 0%, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--accent-color);
  overflow-x: hidden;
}

/* Logo styling */
.logo {
  display: block;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 0 20px var(--shadow-primary));
  animation: logoGlow 2s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from {
    filter: drop-shadow(0 0 20px var(--shadow-primary));
  }
  to {
    filter: drop-shadow(0 0 30px var(--shadow-primary)) drop-shadow(0 0 40px var(--shadow-secondary));
  }
}

/* Auth Container */
.auth-container {
  background: var(--bg-overlay);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px;
  width: 360px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  opacity: 0.6;
  z-index: -1;
}

.auth-container h2 {
  text-align: center;
  margin-bottom: 25px;
  color: var(--primary-color);
  font-size: 24px;
  font-weight: 600;
  text-shadow: 0 0 10px var(--shadow-primary);
}

.auth-container form {
  margin-bottom: 20px;
}

/* Input Styling */
.auth-container input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--accent-color);
  font-size: 14px;
  transition: all 0.3s ease;
}

.auth-container input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.auth-container input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Button Styling */
.auth-container button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--primary-color);
  color: var(--bg-color);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.auth-container button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow-primary);
}

.auth-container button:active {
  transform: translateY(0);
}

.auth-container button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.auth-container button:hover::before {
  left: 100%;
}

/* Links */
.auth-container a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.auth-container a:hover {
  color: var(--secondary-color);
  text-shadow: 0 0 5px var(--shadow-secondary);
}

/* Game Canvas Styling */
#myCanvas {
  background: var(--bg-color);
  position: absolute;
  top: 0;
  left: 0;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 20px var(--shadow-primary);
}

canvas {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  box-shadow: 0 0 30px var(--shadow-primary);
}

/* Game UI Elements */
.game-ui {
  position: absolute;
  top: 20px;
  left: 20px;
  color: var(--accent-color);
  font-family: 'Courier New', monospace;
  z-index: 100;
}

.game-ui .score {
  background: var(--bg-overlay);
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 10px;
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 480px) {
  .auth-container {
    width: 90%;
    padding: 20px;
  }
  
  .logo {
    width: 60px;
    height: 60px;
  }
}

/* Game-specific styles */
.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-color);
}

/* Lobby styles */
.lobby-container {
  background: var(--bg-overlay);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px;
  width: 500px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.player-list {
  list-style: none;
  padding: 0;
}

.player-list li {
  padding: 10px;
  margin: 5px 0;
  background: var(--input-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  color: var(--accent-color);
}

/* Chat styles */
.chat-container {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
  max-height: 200px;
  overflow-y: auto;
}

.chat-input {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.chat-input input {
  flex: 1;
}

.chat-input button {
  width: auto;
  padding: 12px 20px;
}

/* Tab Navigation */
.tab-container {
  display: flex;
  margin-bottom: 20px;
  background: transparent;
  border-radius: 8px;
  padding: 0;
  gap: 0;
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--accent-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:first-child {
  border-radius: 8px 0 0 8px;
}

.tab-btn:last-child {
  border-radius: 0 8px 8px 0;
}

.tab-btn.active[data-tab="login"] {
  background: var(--bg-color);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.tab-btn.active[data-tab="register"] {
  background: var(--bg-color);
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.tab-btn:not(.active):hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Divider */
.divider {
  text-align: center;
  margin: 20px 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border-color);
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

/* Guest Button */
.guest-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--secondary-color);
  border-radius: 8px;
  background: var(--secondary-color);
  color: var(--bg-color);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.guest-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow-secondary);
}

.guest-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.guest-btn:hover::before {
  left: 100%;
}
