/* activity/styles/tictactoe.css */
/* 2-Player Tic Tac Toe overlay styles */

/* ─── Overlay backdrop ─── */
.ttt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.ttt-overlay.ttt-overlay-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Inner card ─── */
.ttt-overlay-inner {
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(110, 60, 200, 0.15);
  animation: ttt-pop-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ttt-pop-in {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* ─── Typography ─── */
.ttt-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.ttt-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 28px;
}

/* ─── Lobby ─── */
.ttt-lobby-id {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

.ttt-lobby-id strong {
  color: rgba(255, 255, 255, 0.75);
  font-family: monospace;
  font-size: 15px;
}

.ttt-players {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px;
}

.ttt-player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: #fff;
}

.ttt-waiting-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
  padding: 4px 0;
}

/* ─── Symbols X / O ─── */
.ttt-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 14px;
}

.ttt-x {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1.5px solid rgba(239, 68, 68, 0.4);
}

.ttt-o {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1.5px solid rgba(59, 130, 246, 0.4);
}

/* ─── Buttons ─── */
.ttt-btn {
  display: block;
  width: 100%;
  padding: 13px 0;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.ttt-btn:active { transform: scale(0.97); }

.ttt-btn-primary {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.ttt-btn-primary:hover { opacity: 0.9; }

.ttt-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ttt-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* ─── Game screen ─── */
.ttt-scoreline {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ttt-turn-indicator {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 18px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── Board ─── */
.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 auto 20px;
  max-width: 270px;
}

.ttt-cell {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.ttt-cell.ttt-x { color: #ef4444; }
.ttt-cell.ttt-o { color: #3b82f6; }

.ttt-cell-clickable {
  cursor: pointer;
  border-color: rgba(255, 255, 255, 0.2);
}

.ttt-cell-clickable:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(124, 58, 237, 0.6);
  transform: scale(1.05);
}

.ttt-cell-win {
  background: rgba(124, 58, 237, 0.25) !important;
  border-color: rgba(124, 58, 237, 0.7) !important;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.4);
}

/* ─── Game-over result ─── */
.ttt-win  { color: #22c55e; font-size: 20px; font-weight: 700; }
.ttt-lose { color: rgba(255, 255, 255, 0.55); font-size: 20px; font-weight: 700; }
.ttt-draw { color: #f59e0b; font-size: 20px; font-weight: 700; }

.ttt-countdown-wrap {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 6px;
  width: 100%;
  text-align: center;
}

/* ─── Error text ─── */
.ttt-error {
  color: #f87171;
  font-size: 13px;
  margin: 8px 0 0;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
