.ttt-page .intro { max-width: 42rem; }

.ttt-shell {
  max-width: 520px;
  margin: 0 auto;
}

.ttt-panel {
  background: rgba(12, 18, 28, 0.72);
  border: 1px solid rgba(120, 255, 210, 0.14);
  border-radius: 1.25rem;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
}

.ttt-panel h2 {
  font-family: Syne, sans-serif;
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.ttt-stake-row label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.5rem;
}

.stake-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stake-chip {
  border: 1px solid rgba(120, 255, 210, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: #e8fff8;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.stake-chip.is-active {
  border-color: #5dffb8;
  background: rgba(93, 255, 184, 0.12);
}

.ttt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.ttt-msg {
  min-height: 1.25rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0.75rem 0 0;
}

.ttt-msg.is-error { color: #ff8a8a; }
.ttt-msg.is-win { color: #5dffb8; }

.ttt-rooms { margin-top: 1.25rem; }
.ttt-rooms h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.room-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.room-item strong { color: #5dffb8; }

.ttt-room-code strong {
  font-family: Syne, monospace;
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  color: #5dffb8;
}

.ttt-share {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.72);
}

.ttt-share-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin: 0.35rem 0 1rem;
}

.ttt-link {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.ttt-share-row .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.ttt-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ttt-player {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.ttt-player.opp { justify-content: flex-end; }

.ttt-player .sym {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  font-weight: 700;
  font-family: Syne, sans-serif;
}

.ttt-player.you .sym {
  background: rgba(93, 255, 184, 0.15);
  color: #5dffb8;
}

.ttt-player.opp .sym {
  background: rgba(255, 140, 120, 0.15);
  color: #ff9a88;
}

.ttt-pot-badge {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

.ttt-pot-badge strong {
  display: block;
  font-size: 1.1rem;
  color: #5dffb8;
}

.ttt-turn {
  text-align: center;
  font-size: 0.95rem;
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.75);
}

.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  aspect-ratio: 1;
  max-width: 360px;
  margin: 0 auto;
}

.ttt-cell {
  border: none;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: Syne, sans-serif;
  font-size: clamp(2rem, 10vw, 3.5rem);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.ttt-cell:hover:not(:disabled) {
  background: rgba(93, 255, 184, 0.1);
}

.ttt-cell:disabled { cursor: default; }

.ttt-cell.sym-x { color: #5dffb8; }
.ttt-cell.sym-o { color: #ff9a88; }

.ttt-cell.win {
  background: rgba(93, 255, 184, 0.2);
  box-shadow: 0 0 0 2px rgba(93, 255, 184, 0.45);
}

.ttt-login-note {
  text-align: center;
  padding: 1rem;
}

.ttt-login-note a { color: #5dffb8; }

.ttt-empty {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}
