/* Dino Games - Multi-Game Platform */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Classic poker colors */
  --felt-green: #1b5e3a;
  --felt-dark: #0f3d25;
  --felt-light: #247a4a;
  --wood-dark: #2c1810;
  --wood-mid: #4a2c1a;
  --wood-light: #6b3d22;
  --cream: #f4efe4;
  --cream-dark: #e8e0d0;
  --gold: #d4af37;
  --gold-dark: #b8942e;
  --text-light: #f0ebe0;
  --text-dark: #1a1a1a;
  --text-muted: #a09080;
  
  /* Card suit colors - traditional */
  --suit-red: #c41e3a;
  --suit-black: #1a1a1a;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--wood-dark);
  color: var(--text-light);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Screens */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.25rem;
}

.screen.active {
  display: flex;
}

/* Typography */
h1 {
  font-size: 1.875rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.25rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

h2 {
  font-size: 1.375rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.9375rem;
}

/* Buttons */
.btn {
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.1);
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--suit-red);
  color: white;
}

.btn.secondary {
  background: var(--wood-mid);
  color: var(--text-light);
  border: 1px solid var(--wood-light);
}

.btn.danger {
  background: #6b2020;
  color: var(--text-light);
}

.btn.accent {
  background: var(--gold);
  color: var(--wood-dark);
}

/* Inputs */
input[type="text"] {
  padding: 0.875rem 1rem;
  border: 2px solid var(--wood-mid);
  border-radius: 6px;
  background: var(--wood-dark);
  color: var(--text-light);
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--gold-dark);
}

input[type="text"]::placeholder {
  color: var(--text-muted);
}

/* Join Screen */
#join-screen {
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background: var(--wood-dark);
}

.logo {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

.join-form {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.status {
  text-align: center;
  color: var(--text-muted);
  min-height: 1.25rem;
  font-size: 0.8125rem;
}

/* Lobby Screen */
#lobby-screen {
  align-items: center;
  padding-top: 3rem;
  background: var(--wood-dark);
}

.lobby-header {
  text-align: center;
  margin-bottom: 0.25rem;
}

.lobby-header .label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

#room-code-display {
  display: inline-block;
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold);
  background: var(--wood-mid);
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  border: 2px solid var(--gold-dark);
}

.player-list {
  width: 100%;
  max-width: 320px;
  margin: 1.5rem 0;
}

.lobby-player {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  background: var(--wood-mid);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255,255,255,0.05);
}

.player-number {
  width: 1.75rem;
  height: 1.75rem;
  background: var(--felt-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}

.lobby-player .player-name {
  font-weight: 500;
  font-size: 0.9375rem;
}

.dealer-tag {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  background: var(--gold);
  color: var(--wood-dark);
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hint {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-top: 1rem;
}

/* Game Screen - Poker Table */
#game-screen {
  background: var(--felt-green);
  position: relative;
  overflow: hidden;
}

/* Felt texture overlay */
#game-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 40%, var(--felt-light) 0%, transparent 70%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.03) 2px,
      rgba(0,0,0,0.03) 4px
    );
  pointer-events: none;
}

/* Table rail */
#game-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 12px solid var(--wood-mid);
  border-radius: 0;
  pointer-events: none;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}

#community-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

.pot-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.25);
  border-radius: 4px;
}

.pot-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  font-weight: 500;
}

#pot-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
}

.chip-icon {
  font-size: 1rem;
}

#community-cards {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  min-height: 90px;
}

.phase-indicator {
  margin-top: 0.75rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}

/* Cards */
.card-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.card {
  width: 58px;
  height: 82px;
  background: var(--cream);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.2),
    0 0 0 1px rgba(0,0,0,0.1);
  position: relative;
}

.card.small {
  width: 36px;
  height: 50px;
  border-radius: 3px;
}

.card.face-down {
  background: 
    repeating-linear-gradient(
      45deg,
      #c41e3a,
      #c41e3a 3px,
      #a01830 3px,
      #a01830 6px
    );
  border: 2px solid #8b1425;
}

.card-back {
  font-size: 1.25rem;
}

.card.small .card-back {
  font-size: 0.875rem;
}

.card-rank {
  font-size: 0.5625rem;
  text-align: center;
  line-height: 1.2;
  font-weight: 600;
  max-width: 100%;
}

.card-suit {
  font-size: 1.125rem;
  margin-top: 0.125rem;
}

/* Suit colors */
.card.spades .card-rank,
.card.clubs .card-rank { color: var(--suit-black); }
.card.hearts .card-rank,
.card.diamonds .card-rank { color: var(--suit-red); }

.card.spades .card-suit { color: var(--suit-black); }
.card.hearts .card-suit { color: var(--suit-red); }
.card.diamonds .card-suit { color: var(--suit-red); }
.card.clubs .card-suit { color: var(--suit-black); }

/* Other Players */
#other-players {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.5rem;
  position: relative;
  z-index: 1;
}

.other-player {
  background: rgba(0,0,0,0.35);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  min-width: 95px;
  text-align: center;
}

.other-player.active {
  background: rgba(0,0,0,0.5);
  box-shadow: 0 0 0 2px var(--gold);
}

.other-player.folded {
  opacity: 0.4;
}

.player-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-bottom: 0.375rem;
}

.player-name {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.player-chips {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 500;
}

.player-status {
  font-size: 0.5625rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.player-bet {
  font-size: 0.6875rem;
  color: #7dcea0;
  font-weight: 600;
}

.player-cards {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
}

.dealer-badge {
  font-size: 0.75rem;
  margin-left: 0.125rem;
}

/* Your Area */
#your-area {
  padding: 1rem;
  background: rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

#your-cards {
  margin-bottom: 0.5rem;
}

#your-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
}

#your-name {
  font-weight: 600;
  color: var(--text-light);
}

.divider {
  color: rgba(255,255,255,0.3);
}

#your-chips {
  color: var(--gold);
  font-weight: 600;
}

/* Actions */
#actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.75rem;
  justify-content: center;
  background: var(--wood-dark);
}

#actions.hidden {
  display: none;
}

#actions .btn {
  flex: 1;
  min-width: 75px;
  max-width: 130px;
  padding: 0.75rem 0.5rem;
  font-size: 0.75rem;
}

/* Game Status */
#game-status {
  text-align: center;
  padding: 0.625rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--wood-dark);
}

#game-status.your-turn {
  color: var(--gold);
  font-weight: 600;
}

/* Showdown Screen */
#showdown-screen {
  align-items: center;
  padding-top: 2rem;
  background: var(--felt-green);
  position: relative;
}

#showdown-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 12px solid var(--wood-mid);
  pointer-events: none;
}

.showdown-header {
  text-align: center;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.trophy {
  font-size: 2.5rem;
  margin-bottom: 0.375rem;
}

#showdown-title {
  color: var(--gold);
  font-size: 1.25rem;
}

#showdown-results {
  width: 100%;
  max-width: 340px;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.showdown-player {
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.625rem;
  text-align: center;
}

.showdown-player.winner {
  background: rgba(0,0,0,0.4);
  box-shadow: 0 0 0 2px var(--gold);
}

.showdown-player-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.showdown-cards {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.mini-card {
  padding: 0.375rem 0.5rem;
  background: var(--cream);
  border-radius: 3px;
  font-size: 0.6875rem;
  font-weight: 600;
}

.mini-card.spades,
.mini-card.clubs { color: var(--suit-black); }
.mini-card.hearts,
.mini-card.diamonds { color: var(--suit-red); }

.showdown-hand {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
}

.showdown-pot {
  margin-top: 0.5rem;
  font-size: 1.125rem;
  color: var(--gold);
  font-weight: 700;
}

#next-hand-btn {
  position: relative;
  z-index: 1;
}

/* Responsive */
@media (min-width: 400px) {
  .card {
    width: 66px;
    height: 94px;
  }
  
  .card-rank {
    font-size: 0.625rem;
  }
  
  .card-suit {
    font-size: 1.375rem;
  }
  
  .card.small {
    width: 40px;
    height: 56px;
  }
}

@media (min-width: 600px) {
  .card {
    width: 76px;
    height: 108px;
    border-radius: 6px;
  }
  
  .card-rank {
    font-size: 0.6875rem;
  }
  
  .card-suit {
    font-size: 1.5rem;
  }
  
  #other-players {
    gap: 1rem;
  }
  
  .other-player {
    min-width: 120px;
    padding: 0.625rem 1rem;
  }
  
  #actions .btn {
    min-width: 90px;
    max-width: 140px;
    font-size: 0.8125rem;
  }
}

/* ============================================ */
/* GAME SELECTOR */
/* ============================================ */

.game-selector {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.selector-label {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}

.game-options {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.game-option {
  background: var(--wood-mid);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 85px;
}

.game-option:hover {
  background: var(--wood-light);
}

.game-option.selected {
  border-color: var(--gold);
  background: var(--wood-light);
}

.game-icon {
  font-size: 1.5rem;
}

.game-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
}

.game-desc {
  font-size: 0.625rem;
  color: var(--text-muted);
}

/* Game Type Badge in Lobby */
.game-type-badge {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

/* ============================================ */
/* PICTIONARY */
/* ============================================ */

#pictionary-screen {
  background: #f5f0e6;
  color: var(--text-dark);
  padding: 1rem;
}

.pictionary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--wood-mid);
  border-radius: 8px;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.round-info {
  font-size: 0.875rem;
  font-weight: 500;
}

.timer {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 3rem;
  text-align: center;
}

/* Word Display */
.word-display {
  text-align: center;
  padding: 0.75rem 1rem;
  background: var(--felt-green);
  color: white;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.word-display .label {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-right: 0.5rem;
}

.current-word {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.word-hint {
  text-align: center;
  padding: 0.75rem 1rem;
  background: var(--cream-dark);
  border-radius: 8px;
  margin-bottom: 1rem;
}

#pict-word-blanks {
  font-family: 'SF Mono', monospace;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  color: var(--wood-dark);
}

/* Word Picker */
.word-picker {
  text-align: center;
  padding: 1.5rem;
  background: var(--cream-dark);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.word-picker p {
  margin-bottom: 1rem;
  font-weight: 500;
}

.word-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.word-choices .btn {
  min-width: 100px;
}

/* Canvas */
.canvas-container {
  background: #fffef5;
  border-radius: 8px;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 3px solid var(--wood-mid);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.1);
}

#pict-canvas {
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 4/3;
  background: #fffef5;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
  touch-action: none;
  cursor: crosshair;
}

.draw-tools {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s;
}

.tool-btn:hover {
  transform: scale(1.1);
}

.color-btn.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-dark);
}

#pict-clear-btn {
  width: auto;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  background: var(--wood-mid);
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Guess Area */
.guess-area {
  background: var(--cream-dark);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.guesses-list {
  max-height: 120px;
  overflow-y: auto;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: white;
  border-radius: 4px;
}

.guess {
  padding: 0.25rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--cream-dark);
}

.guess:last-child {
  border-bottom: none;
}

.guess.correct {
  color: var(--felt-green);
  font-weight: 600;
}

.guess-input-row {
  display: flex;
  gap: 0.5rem;
}

.guess-input-row input {
  flex: 1;
  background: white;
  border-color: var(--cream-dark);
  color: var(--text-dark);
}

/* Scoreboard */
.scoreboard {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.75rem;
  background: var(--wood-mid);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.scoreboard-player {
  background: rgba(0,0,0,0.2);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--text-light);
}

.scoreboard-player.drawing {
  background: var(--felt-green);
}

.scoreboard-player .player-name {
  font-size: 0.8125rem;
  font-weight: 500;
}

.scoreboard-player .player-score {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gold);
}

/* Round End */
.round-end {
  text-align: center;
  padding: 2rem;
  background: var(--cream-dark);
  border-radius: 8px;
}

.round-end p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.round-end strong {
  color: var(--felt-green);
}

/* ============================================ */
/* CODENAMES */
/* ============================================ */

#codenames-screen {
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
  color: var(--text-light);
  padding: 1rem;
}

.codenames-header {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.turns-remaining,
.green-remaining {
  font-size: 0.875rem;
}

.green-remaining span span {
  color: #4ade80;
  font-weight: 700;
}

/* Clue Display */
.clue-display {
  text-align: center;
  padding: 1rem;
  background: var(--wood-mid);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.clue-word {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-right: 0.5rem;
}

.clue-count {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-light);
}

.guesses-left {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Codenames Board */
.codenames-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.cn-card {
  background: var(--cream);
  color: var(--text-dark);
  padding: 0.75rem 0.25rem;
  border-radius: 4px;
  text-align: center;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
  word-break: break-word;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cn-card:hover:not(.revealed) {
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Revealed cards */
.cn-card.revealed {
  cursor: default;
}

.cn-card.revealed.green {
  background: #22c55e;
  color: white;
}

.cn-card.revealed.neutral {
  background: #6b7280;
  color: white;
}

.cn-card.revealed.assassin {
  background: #1a1a1a;
  color: #ef4444;
}

/* Hints for clue giver */
.cn-card.hint-green {
  box-shadow: inset 0 0 0 3px #22c55e;
}

.cn-card.hint-neutral {
  box-shadow: inset 0 0 0 3px #6b7280;
}

.cn-card.hint-assassin {
  box-shadow: inset 0 0 0 3px #ef4444;
}

/* Clue Controls */
.clue-controls {
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.clue-controls p {
  margin-bottom: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
}

.clue-input-row {
  display: flex;
  gap: 0.5rem;
}

.clue-input-row input[type="text"] {
  flex: 1;
}

.clue-input-row input[type="number"] {
  width: 60px;
  padding: 0.875rem 0.5rem;
  border: 2px solid var(--wood-mid);
  border-radius: 6px;
  background: var(--wood-dark);
  color: var(--text-light);
  font-size: 1rem;
  text-align: center;
}

.clue-input-row input[type="number"]:focus {
  outline: none;
  border-color: var(--gold-dark);
}

/* Guess Controls */
.guess-controls {
  text-align: center;
  padding: 1rem;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.guess-controls p {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Game Over */
.game-over {
  text-align: center;
  padding: 2rem;
  background: rgba(0,0,0,0.5);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.game-over h2 {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

/* Players */
.codenames-players {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.cn-player {
  background: rgba(255,255,255,0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8125rem;
}

/* ============================================ */
/* TRANSITIONS & ANIMATIONS */
/* ============================================ */

/* Smooth screen transitions */
.screen {
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card deal animation */
.card {
  animation: cardDeal 0.3s ease-out;
}

@keyframes cardDeal {
  from {
    opacity: 0;
    transform: translateY(-20px) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

/* Button press feedback */
.btn:active:not(:disabled) {
  transform: scale(0.96);
}

/* Smooth hover transitions */
.game-option,
.cn-card,
.lobby-player,
.scoreboard-player {
  transition: all 0.15s ease;
}

/* Winner highlight pulse */
.showdown-player.winner {
  animation: winnerPulse 0.6s ease-in-out;
}

@keyframes winnerPulse {
  0%, 100% {
    box-shadow: 0 0 0 2px var(--gold);
  }
  50% {
    box-shadow: 0 0 20px 4px var(--gold);
  }
}

/* Canvas stroke feedback */
#pict-canvas {
  transition: box-shadow 0.1s ease;
}

#pict-canvas:active {
  box-shadow: inset 0 0 0 2px var(--gold);
}

/* Codenames card reveal */
.cn-card.revealed {
  animation: cardReveal 0.3s ease-out;
}

@keyframes cardReveal {
  0% {
    transform: rotateY(90deg);
  }
  100% {
    transform: rotateY(0);
  }
}

/* Timer warning */
.timer.warning {
  color: #ef4444;
  animation: timerPulse 0.5s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Active player highlight */
.other-player.active {
  animation: activeGlow 1.5s ease-in-out infinite alternate;
}

@keyframes activeGlow {
  from {
    box-shadow: 0 0 0 2px var(--gold);
  }
  to {
    box-shadow: 0 0 8px 2px var(--gold);
  }
}

/* Correct guess celebration */
.guess.correct {
  animation: correctGuess 0.4s ease-out;
}

@keyframes correctGuess {
  0% {
    background: transparent;
  }
  50% {
    background: rgba(74, 222, 128, 0.3);
  }
  100% {
    background: transparent;
  }
}

/* ============================================ */
/* UTILITY */
/* ============================================ */

.hidden {
  display: none !important;
}

/* Responsive adjustments for Codenames */
@media (min-width: 400px) {
  .cn-card {
    font-size: 0.6875rem;
    padding: 1rem 0.375rem;
    min-height: 56px;
  }
}

@media (min-width: 500px) {
  .cn-card {
    font-size: 0.75rem;
    padding: 1rem 0.5rem;
    min-height: 60px;
  }
  
  .codenames-board {
    gap: 0.5rem;
  }
}
