:root {
  --primary-color: #FF6B6B;
  --secondary-color: #4ECDC4;
  --board-bg: #f9f7f7;
  --x-color: #FF6B6B;
  --o-color: #4ECDC4;
  --grid-line: #333;
  --win-line: #FFD166;
}

.game-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.game-status {
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-weight: bold;
  color: var(--primary-color);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  padding: 10px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.7);
}

.tic-tac-toe-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
  background-color: var(--grid-line);
  max-width: 450px;
  margin: 0 auto 20px;
  aspect-ratio: 1/1;
  border-radius: 12px;
  padding: 12px;
  position: relative;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.cell {
  background-color: var(--board-bg);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 4rem;
  font-weight: bold;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cell:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 214, 102, 0.5);
}

.cell.x::before, .cell.x::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 80%;
  background-color: var(--x-color);
  border-radius: 5px;
}

.cell.x::before {
  transform: rotate(45deg);
}

.cell.x::after {
  transform: rotate(-45deg);
}

.cell.o::before {
  content: '';
  position: absolute;
  width: 70%;
  height: 70%;
  border: 10px solid var(--o-color);
  border-radius: 50%;
  box-sizing: border-box;
}

#restart-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin-top: 20px;
}

#restart-button:hover {
  background-color: #FF8C8C;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.winning-message {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 100;
}

.winning-message.show {
  opacity: 1;
  pointer-events: all;
}

.winning-message-text {
  color: white;
  font-size: 3rem;
  margin-bottom: 30px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.back-button {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.back-button:hover {
  background-color: #5EDFD7;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: var(--win-line);
  animation: confetti-fall 5s ease-in-out infinite;
  opacity: 0;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(1000px) rotate(720deg);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .tic-tac-toe-board {
    max-width: 350px;
    gap: 8px;
    padding: 8px;
  }
  
  .cell {
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .tic-tac-toe-board {
    max-width: 280px;
    gap: 6px;
    padding: 6px;
  }
  
  .cell {
    font-size: 2.5rem;
  }
  
  .game-status {
    font-size: 1.2rem;
  }
} 