/* Tic Tac Toe Index - Lobby Page Styles (Standardized) */

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  color: #e0e0e0;
}

.game-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.game-header h1 {
  font-size: 1.5rem;
  color: #4facfe;
  /* Blue for TicTacToe */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #e0e0e0;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #4facfe;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.game-intro {
  text-align: center;
  margin-bottom: 2rem;
}

.game-intro h2 {
  font-size: 1.3rem;
  color: #aaa;
}

/* Mode Selection */
.mode-selection {
  margin-bottom: 3rem;
}

.mode-selection h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #4facfe;
  font-size: 1.2rem;
}

.mode-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.mode-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 172, 254, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mode-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.mode-icon.ai {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.mode-icon i {
  font-size: 1.5rem;
  color: white;
}

.mode-card h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.mode-card p {
  color: #888;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.mode-options {
  margin-bottom: 1.5rem;
}

.option-group {
  margin-bottom: 1rem;
}

.option-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #aaa;
  font-size: 0.9rem;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.radio-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.radio-option input {
  accent-color: #4facfe;
}

.radio-option input:checked+span {
  color: #4facfe;
}

.mode-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
}

.mode-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
}

.mode-btn.ai-btn {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.mode-btn.ai-btn:hover {
  box-shadow: 0 5px 20px rgba(67, 233, 123, 0.4);
}

.mode-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Rules Section */
.rules-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rules-section h3 {
  color: #4facfe;
  margin-bottom: 1.5rem;
}

.rules-list {
  list-style: none;
}

.rules-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #ccc;
  font-size: 0.95rem;
}

.rules-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #4facfe;
}

/* Join Page Styles (if ported from dice10000, probably not used in index but good to have) */
/* ... omitted or simplified since join is separate page ... */

/* Responsive */
@media (max-width: 768px) {
  .game-header {
    padding: 0.8rem 1rem;
  }

  .game-header h1 {
    font-size: 1.2rem;
  }

  .main-content {
    padding: 1rem;
  }

  .mode-cards {
    grid-template-columns: 1fr;
  }

  .mode-card {
    padding: 1.5rem;
  }

  .radio-group {
    flex-direction: column;
  }
}

/* Join Page Styles */
.join-content {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.join-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 400px;
  width: 100%;
}

.join-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.join-icon i {
  font-size: 2rem;
  color: white;
}

.join-card h2 {
  margin-bottom: 0.5rem;
}

.join-description {
  color: #888;
  margin-bottom: 1.5rem;
}

.room-info {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.room-label {
  display: block;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.room-id {
  font-family: monospace;
  font-size: 1.1rem;
  color: #4facfe;
}

.join-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  transition: all 0.3s ease;
}

.join-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(46, 204, 113, 0.4);
}

.join-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.join-status {
  margin-top: 1rem;
  color: #e74c3c;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .join-card {
    padding: 2rem;
  }
}