/* Jogo da Velha Premium - Styles */

.game-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
}

.game-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* MODES & DIFFICULTY */
.controls-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.segmented-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  padding: 4px;
  border-radius: 14px;
  display: flex;
  gap: 4px;
}

.segmented-control button {
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.segmented-control button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
}

/* SCOREBOARD */
.scoreboard {
  display: flex;
  gap: 40px;
  background: rgba(255, 255, 255, 0.03);
  padding: 15px 40px;
  border-radius: 24px;
  border: 1px solid var(--card-border);
}

.score-item {
  text-align: center;
  position: relative;
}

.score-item .label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 5px;
}

.score-item .value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.score-item.active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 10px;
  box-shadow: 0 0 10px var(--accent);
}

/* GAME BOARD */
.board-container {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 24px;
  padding: 12px;
  border: 1px solid var(--card-border);
}

.cell {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 48px;
  font-weight: 900;
  border: 1px solid transparent;
}

.cell:hover:not(.occupied) {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.98);
}

.cell.occupied {
  cursor: default;
}

.cell.winner {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(227, 6, 19, 0.4);
  z-index: 2;
}

.cell span {
  animation: symbolAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes symbolAppear {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.symbol-x { color: var(--accent); }
.symbol-o { color: #3b82f6; }

/* OVERLAY */
.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}

.game-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.overlay-content {
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.5s;
}

.game-overlay.visible .overlay-content {
  transform: translateY(0);
}

.overlay-content h3 {
  font-size: 32px;
  margin-bottom: 20px;
}

/* ACTIONS */
.action-buttons {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

.btn-reset {
  padding: 12px 32px;
  border-radius: 100px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-reset:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(227, 6, 19, 0.3);
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 480px) {
  .board-container {
    max-width: 300px;
  }
  .cell {
    font-size: 36px;
  }
  .scoreboard {
    padding: 12px 24px;
    gap: 20px;
  }
}
