footer .footer-link {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
}
.win-highlight {
  position: absolute;
  pointer-events: none;
  border: 7px solid #ff1744;
  border-radius: 12px;
  animation: win-blink 0.5s linear infinite;
  z-index: 10;
  box-sizing: border-box;
}

@keyframes win-blink {
  0% {
    border-color: #ff1744;
    box-shadow: 0 0 0 0 #ff1744;
  }
  50% {
    border-color: #fff;
    box-shadow: 0 0 10px 2px #fff;
  }
  100% {
    border-color: #ff1744;
    box-shadow: 0 0 0 0 #ff1744;
  }
}
:root {
  font-size: 16px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: #1a2233;
}

body {
  margin: 0;
  background: #1a2233;
  color: #fff;
}

header {
  text-align: center;
  font-family: "Macondo", cursive;
  font-size: 2.2rem;
  color: #0bebebf3;
  margin: 1.5rem 0 0.5rem 0;
  letter-spacing: 2px;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80vh;
}

.setup-panel {
  background: #23272f;
  padding: 2rem 2.5rem 1.5rem 2.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: center;
  min-width: 340px;
}

.setup-panel label {
  font-size: 1.1rem;
  color: #00e6e6;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.setup-panel input[type="text"] {
  padding: 7px 12px;
  border-radius: 5px;
  border: 1px solid #444;
  background: #181c22;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.symbol-select {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #ffd700;
  font-size: 1.1rem;
}

.player-symbol-group,
.symbol-options {
  display: contents;
}

.symbol-select label {
  color: #ffd700;
  font-weight: 500;
}
.setup-panel button {
  margin-top: 1rem;
  padding: 8px 20px;
  border-radius: 5px;
  border: none;
  background: #00e6e6;
  color: #23272f;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.setup-panel button:hover {
  background: #00b3b3;
}

.game-panel {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.turn-indicator {
  font-size: 1.3rem;
  color: #ffd700;
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.game-board {
  display: flex;
  flex-wrap: wrap;
  width: 300px;
  height: 300px;
  background: #23272f;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 2px solid #00e6e6;
  position: relative;
}
.cell {
  width: 33.33%;
  height: 33.33%;
  min-width: 100px;
  min-height: 100px;
  box-sizing: border-box;
  border: 1px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #ffd700;
  cursor: pointer;
  background: transparent;
  transition: background 0.2s;
}
.cell.filled {
  cursor: not-allowed;
  color: #00e6e6;
}
.cell:hover:not(.filled) {
  background: #2a2f3a;
}
.utility-buttons {
  margin-top: 1rem;
}
.utility-buttons button {
  padding: 7px 18px;
  border-radius: 5px;
  border: none;
  background: #ffd700;
  color: #23272f;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  margin-right: 10px;
  transition: background 0.2s;
}
.utility-buttons button:hover {
  background: #e6c200;
}
.utility-buttons button#reset-game {
  background: #ff5722;
}

.utility-buttons button#reset-game:hover {
  background: #e64a19;
}
.show-result {
  margin-top: 1rem;
  font-size: 1.3rem;
  color: #ff6ec7;
  font-weight: bold;
  min-height: 2rem;
}
footer {
  text-align: center;
  color: #00e6e6;
  font-size: 1rem;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: #181c22;
  padding: 0.7rem 0 0.5rem 0;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
}

/* --- Responsive Design --- */
/* Styles for screens smaller than 480px (e.g., mobile phones) */
@media (max-width: 480px) {
  .setup-panel {
    min-width: 90%; /* Use a percentage for better flexibility */
    padding: 1.5rem;
  }

  .symbol-select {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
  }

  .player-symbol-group,
  .symbol-options {
    display: flex; /* Override display: contents */
    align-items: center;
    gap: 1rem;
  }

  .player-symbol-group > span:first-child {
    min-width: 125px;
  }

  #auto-symbol {
    margin-left: 0; /* Remove the left margin for the auto-symbol span */
  }

  .game-board {
    width: 270px; /* Slightly smaller board for small screens */
    height: 270px;
  }

  .cell {
    min-width: 90px; /* Adjust cell size accordingly */
    min-height: 90px;
    font-size: 2rem; /* Make the X/O symbols a bit smaller */
  }
}
