* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary: #1a1a2e;
  --secondary: #16213e;
  --accent: #e94560;
  --text: #eaeaea;
  --text-muted: #a0a0a0;
}

body {
  background: var(--primary);
  color: var(--text);
  min-height: 100vh;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--secondary);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent);
}

.btn-primary, .btn-secondary, .btn-large {
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn-large {
  background: var(--accent);
  color: white;
  padding: 1rem 2rem;
  font-size: 1.2rem;
}

.btn-primary:hover, .btn-large:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
}

.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.1) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.features {
  padding: 4rem 2rem;
  background: var(--secondary);
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--primary);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-card h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}

.rooms-section {
  padding: 4rem 2rem;
}

.rooms-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.rooms-controls {
  text-align: center;
  margin-bottom: 2rem;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.room-card {
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid #333;
  cursor: pointer;
  transition: all 0.3s;
}

.room-card:hover {
  border-color: var(--accent);
  transform: scale(1.02);
}

.room-card h3 {
  margin-bottom: 0.5rem;
}

.room-card .players {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.room-card .status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.status.waiting {
  background: #4caf50;
}

.status.full {
  background: #f44336;
}

.game-section {
  padding: 4rem 2rem;
  background: var(--secondary);
}

.game-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

#gameContainer {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

#gamePlaceholder {
  background: var(--primary);
  padding: 4rem;
  border-radius: 10px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

#gameFrame {
  border-radius: 10px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.modal-content {
  background: var(--secondary);
  margin: 10% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  position: relative;
}

.close {
  position: absolute;
  right: 1rem;
  top: 0.5rem;
  font-size: 2rem;
  cursor: pointer;
}

.modal-content h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-content input {
  padding: 0.75rem;
  border: 1px solid #333;
  border-radius: 5px;
  background: var(--primary);
  color: var(--text);
}

.modal-content button {
  width: 100%;
}

.register-link {
  text-align: center;
  margin-top: 1rem;
  color: var(--text-muted);
}

.register-link a {
  color: var(--accent);
}

footer {
  text-align: center;
  padding: 2rem;
  background: var(--secondary);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
