/* General Styles */

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #1e293b, #4f46e5);
  color: white;
  text-align: center;
  transition: background 0.5s ease;
}



/* Header */
header {
  
  display: flex;
  justify-content: space-between;
  padding: 20px;
  font-size: 2rem;
  font-weight: bold;
  align-items: center;
}

#dark-mode-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: white;
  transition: transform 0.3s ease;
  
}

#dark-mode-toggle:hover {
  transform: scale(1.2);
}

/* Welcome Screen */
#welcome-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #ff6b6b, #ff9f43);
  animation: gradient-animation 5s infinite alternate;
}

.hidden {
  display: none;
}

.welcome-container {
  text-align: center;
  animation: fadeIn 2s ease-out;
}

h2 {
  font-size: 2.5rem;
  font-weight: bold;
}

.welcome-message {
  font-size: 1.8rem;
  margin-bottom: 20px;
  animation: bounceText 2s infinite alternate;
}

#play-button {
  background: #f87171;
  color: white;
  font-size: 1.5rem;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

#play-button:hover {
  background: #ef4444;
  transform: scale(1.1);
}

/* Game Board */
.board-container {
  max-width: 400px;
  margin: 20px auto;
  padding: 20px;
  background: #1e293b;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 10px;
  width: 100%;
  aspect-ratio: 1;
}

.cell {
  background: #f3f3f3;
  border-radius: 12px;
  font-size: 3rem;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease;
}

.cell:hover {
  cursor: pointer;
  transform: scale(1.1);
  background: #ffd700;
}

.cell.X { color: #ff6b6b; }
.cell.O { color: #4a90e2; }

#status {
  font-size: 1.5rem;
  margin: 20px 0;
}

#restart-button {
  background: #f87171;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

#restart-button:hover {
  transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bounceText {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

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