/* =============================================
   tictactoe.css — Tic Tac Toe Specific Styles
   Mini Games Hub
   ============================================= */

/* ---- Board wrapper ---- */
.ttt-game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  width: 100%;
  max-width: 400px;
}

/* ---- Board ---- */
.ttt-board {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
}

/* ---- Cell enter animation ---- */
.ttt-cell[data-value] {
  animation: cellEnter 0.2s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes cellEnter {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ---- X cell ---- */
.ttt-cell[data-value="X"] {
  color: #6c63ff;
  text-shadow: 0 0 20px rgba(108,99,255,0.8), 0 0 40px rgba(108,99,255,0.3);
  border-color: rgba(108,99,255,0.5);
  background: rgba(108,99,255,0.05);
}

/* ---- O cell ---- */
.ttt-cell[data-value="O"] {
  color: #ffab40;
  text-shadow: 0 0 20px rgba(255,171,64,0.8), 0 0 40px rgba(255,171,64,0.3);
  border-color: rgba(255,171,64,0.5);
  background: rgba(255,171,64,0.05);
}

/* ---- Winning cells ---- */
.ttt-cell.win-cell {
  animation: winPulse 0.6s cubic-bezier(0.34,1.56,0.64,1), glow 1s ease infinite 0.6s;
}

@keyframes winPulse {
  0%   { transform: scale(0.9); }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ---- Result banner ---- */
.ttt-result-banner {
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: 800;
  text-align: center;
  min-width: 220px;
  animation: fadeInUp 0.4s ease;
}

.ttt-result-banner.x-wins {
  background: rgba(108,99,255,0.15);
  border: 2px solid rgba(108,99,255,0.4);
  color: #6c63ff;
  box-shadow: 0 0 30px rgba(108,99,255,0.2);
}

.ttt-result-banner.o-wins {
  background: rgba(255,171,64,0.15);
  border: 2px solid rgba(255,171,64,0.4);
  color: #ffab40;
  box-shadow: 0 0 30px rgba(255,171,64,0.2);
}

.ttt-result-banner.draw {
  background: rgba(0,229,255,0.1);
  border: 2px solid rgba(0,229,255,0.3);
  color: #00e5ff;
}

.ttt-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: rgba(0, 229, 255, 0.08);
  color: var(--clr-text-secondary);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: center;
}

.ttt-status-pill.thinking {
  border-color: rgba(255, 171, 64, 0.3);
  background: rgba(255, 171, 64, 0.12);
  color: #ffd19c;
}

/* ---- Score row ---- */
.ttt-scoreboard {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  justify-content: center;
}

.ttt-score-box {
  flex: 1;
  max-width: 120px;
  text-align: center;
  padding: var(--space-3) var(--space-4);
  background: var(--clr-bg-card);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}

.ttt-score-box.x-box {
  border-color: rgba(108,99,255,0.3);
}

.ttt-score-box.draw-box {
  border-color: rgba(0,229,255,0.2);
}

.ttt-score-box.o-box {
  border-color: rgba(255,171,64,0.3);
}

.ttt-score-box.active-turn {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.ttt-score-box.x-box.active-turn {
  background: rgba(108,99,255,0.1);
  border-color: rgba(108,99,255,0.6);
}

.ttt-score-box.o-box.active-turn {
  background: rgba(255,171,64,0.1);
  border-color: rgba(255,171,64,0.6);
}

.ttt-score-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--clr-text-muted);
  margin-bottom: var(--space-1);
}

.ttt-score-value {
  font-size: var(--text-2xl);
  font-weight: 900;
}

.ttt-score-box.x-box .ttt-score-value { color: #6c63ff; }
.ttt-score-box.o-box .ttt-score-value { color: #ffab40; }
.ttt-score-box.draw-box .ttt-score-value { color: #00e5ff; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .ttt-board {
    max-width: 300px;
  }

  .ttt-cell {
    font-size: 2.2rem;
  }

  .ttt-score-box {
    padding: var(--space-2) var(--space-3);
  }
}
