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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
}

.container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 500px;
  width: 100%;
  animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.subtitle {
  color: #666;
  font-size: 1.1rem;
  margin-top: 25px;
  margin-bottom: 25px;
  font-weight: 400;
}

.input-group {
  margin-bottom: 30px;
  text-align: left;
}

.input-label {
  display: block;
  margin-bottom: 8px;
  margin-left: 8px;
  color: #333;
  font-weight: 500;
  font-size: 0.9rem;
}

.name-input, .room-code-input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.room-code-input {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: bold;
}

.name-input:focus, .room-code-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.game-modes {
  display: flex;
  gap: 15px;
  /* margin-bottom: 15px; */
}

.mode-button {
  flex: 1;
  padding: 20px;
  border: none;
  border-radius: 15px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mode-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;
}

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

.mode-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.mode-button:active {
  transform: translateY(-1px);
}

.friends-mode {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.create-mode {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: white;
}

.mode-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
  display: block;
}

.mode-title {
  font-size: 1rem;
  margin-bottom: 4px;
}

.mode-desc {
  font-size: 0.8rem;
  opacity: 0.9;
}

.start-button {
  width: 100%;
  padding: 18px;
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.6;
  pointer-events: none;
}

.start-button.active {
  opacity: 1;
  pointer-events: all;
}

.start-button:hover {
  transform: translateY(-2px);
  background: #667eea;
  color: white;
}

.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 10%;
  animation-delay: 2s;
}

.shape:nth-child(3) {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* Error Alert Styles */
.error-alert {
  text-align: center;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  max-width: 400px;
  width: 90%;
}

.error-alert.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.error-content {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  gap: 12px;
}

.error-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.error-message {
  flex: 1;
  font-weight: 500;
  font-size: 0.95rem;
}

.error-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.error-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 480px) {
  .container {
    padding: 30px 20px;
    margin: 10px;
  }
  
  .game-modes {
    flex-direction: column;
    gap: 10px;
  }
  
  .logo {
    font-size: 2rem;
  }
  
  .mode-button {
    padding: 15px;
  }

  .error-alert {
    top: 10px;
    width: 95%;
  }

  .error-content {
    padding: 12px 16px;
  }

  .error-message {
    font-size: 0.9rem;
  }
}
