* {
  padding: 0;
  margin: 0;
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
}

:root {
  --bg-gradient: linear-gradient(135deg, #84fab0, #8fd3f4);
  --board-bg: rgba(255, 255, 255, 0.2);
  --cell-bg: rgba(0, 0, 0, 0.5);
  --cell-hover: rgba(0, 0, 0, 0.7);
  --x-color: #e74c3c;
  --o-color: #3498db;
  --btn-bg: #2f2f2f;
  --btn-hover: #444;
  --modal-bg: linear-gradient(135deg, #ffffff, #f0f0f0);
}

body {
  background: var(--bg-gradient);
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Overlay modal */
.model {
  background: var(--modal-bg);
  position: absolute;
  z-index: 10;
  height: 40vh;
  width: 55vh;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.6s ease;
}
.hide {
  display: none;
}
.blur {
  opacity: 0.2;
  pointer-events: none;
}

/* Game container */
#game {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100dvh;
  width: 100dvw;
}

.yellow-font {
  color: #333;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 2px;
}
.game-container {
  width: 100%;
  height: 100%;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.game-container h1 {
  margin-bottom: 3rem;
}
#game-wrapper {
  height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#game-board {
  display: grid;
  grid: 1fr 1fr 1fr / 1fr 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  background: var(--board-bg);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
}

/* Cells */
.btn {
  width: 7rem;
  height: 7rem;
  font-size: 4rem;
  border-radius: 15px;
  border: none;
  background: var(--cell-bg);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn:hover {
  background: var(--cell-hover);
  transform: scale(1.05);
}

/* Colors for X and O */
.btn:disabled {
  cursor: not-allowed;
}
.btn:contains("X") {
  color: var(--x-color);
}
.btn:contains("O") {
  color: var(--o-color);
}

/* Default buttons */
.default-btn {
  padding: 1rem;
  font-size: 1.2rem;
  border-radius: 12px;
  border: none;
  width: 12rem;
  background: var(--btn-bg);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.default-btn:hover {
  background: var(--btn-hover);
  transform: translateY(-3px) scale(1.05);
}
#restart {
  margin-top: 2rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
