/* General Reset */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f4f4; /* Slightly off-white for a cleaner background */
  color: #333;
  text-align: center;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

h1 {
  font-size: 2.5em;
  font-weight: 600;
  color: #444;
  margin-bottom: 20px;
  text-transform: uppercase;
}

/* Game container to center the game and style it */
#game-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

/* Game board */
#game-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 5px;
  width: 80vw; /* 80% of viewport width */
  height: 80vh; /* 80% of viewport height */
  max-width: 600px; /* Max width to prevent stretching */
  max-height: 600px; /* Max height to prevent stretching */
  margin: 20px;
}

/* Individual cells */
.cell {
  background-color: #fff;
  border: 2px solid #333;
  font-size: 2.5em;
  font-weight: 350;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

.cell:hover {
  background-color: #f7f7f7; /* Lighter shade for hover effect */
}

.cell:active {
  transform: scale(0.98); /* Slightly shrink on click for better interaction feel */
}

/* X and O colors */
.cell.x {
  color: #e53935; /* Red color for X */
}

.cell.o {
  color: #1e88e5; /* Blue color for O */
}

/* Button styling */
button {
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 1.1em;
  cursor: pointer;
  border-radius: 5px;
  background-color: #3d3d3d;
  color: white;
  border: none;
  transition: background-color 0.3s, transform 0.1s;
}

button:hover {
  background-color: #1a1a1a;
  transform: scale(1.05); /* Subtle button grow effect */
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Message text */
#message {
  margin-top: 20px;
  font-size: 1.5em;
  font-weight: 500;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

/* Optional subtle animation */
.message-fade {
  opacity: 0;
}


/* Media queries for responsiveness */
@media (max-width: 600px) {
  #game-board {
    width: 90vw;
    height: 90vh;
  }
  
  .cell {
    font-size: 2em;
  }
  
  h1 {
    font-size: 2em;
  }
  
  button {
    font-size: 1em;
    padding: 10px 20px;
  }
}
.loss-highlight {
  border: 5px solid red;
  border-radius: 8px;
  box-sizing: border-box;
  animation: pulse-border 0.5s ease-in-out 3;
}

@keyframes pulse-border {
  0% {
    border-color: red;
    transform: scale(1);
  }
  50% {
    border-color: darkred;
    transform: scale(1.05);
  }
  100% {
    border-color: red;
    transform: scale(1);
  }
}
.weak-ai-mode {
  background-color: #dcffdc; /* light green */
}

.strong-ai-mode {
  background-color: #f6dddd; /* light red */
}
#start-weak-ai {
  background-color: #c8f7c5;  /* light green */
  color: #2e7d32;
 
  padding: 10px 16px;
  margin-right: 10px;
  border-radius: 6px;
  cursor: pointer;
}

#start-strong-ai {
  background-color: #f9c5c5;  /* light red */
  color: #b71c1c;
  border: 1px solid #ef9a9a;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
}

#start-weak-ai:hover {
  background-color: #b2f2b2;
}

#start-strong-ai:hover {
  background-color: #f4aaaa;
}
