/* =============================================
   30 SECONDS IN THE BIBLE — Visual Design
   
   Clean, intentional, tactile.
   White background. Red and green accents.
   Typography carries the identity.
   ============================================= */

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

:root {
  /* Core palette */
  --white: #FFFFFF;
  --off-white: #FAFAFA;
  --bg: #F5F5F5;
  --bg-alt: #EEEEEE;
  --bg-pattern: url('pc-bg.png');
  --border: #E5E7EB;
  --border-light: #F0F0F0;
  
  /* Typography */
  --text: #111111;
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #888888;
  
  /* Accent: Red */
  --red: #D93025;
  --red-hover: #B9261C;
  --red-light: #FEE8E7;
  
  /* Accent: Green */
  --green: #2D8659;
  --green-light: #E8F5EE;
  
  /* Team colors */
  --team1: #D93025;
  --team1-bg: #FEE8E7;
  --team2: #2D8659;
  --team2-bg: #E8F5EE;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  
  /* Shadows - subtle only */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  background-image: url('pc-bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

@media (max-width: 768px) {
  html, body {
    background-image: url('mobile-bg.png');
  }
}

/* =============================================
   SCREENS
   ============================================= */

.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  background: rgba(245, 245, 245, 0.6);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.screen.active {
  display: flex;
}

.screen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg) var(--space-md);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.center-content {
  justify-content: center;
  align-items: center;
}

/* =============================================
   HOME SCREEN
   ============================================= */

.logo-area {
  text-align: center;
  margin-bottom: 48px;
}

.game-title {
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--text);
}

.game-title .accent {
  color: var(--red);
}

.tagline {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 400;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 280px;
}

.btn-sound-toggle {
  position: absolute;
  top: 20px;
  right: 16px;
  background: none;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-sound-toggle:hover {
  background: var(--off-white);
  color: var(--text-secondary);
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

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

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--red-hover);
}

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

.btn-secondary:hover:not(:disabled) {
  background: var(--off-white);
}

.btn-large {
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 600;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
  padding: 12px 16px;
}

.btn-ghost:hover {
  color: var(--text-secondary);
}

.btn-back {
  align-self: flex-start;
  background: none;
  border: none;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-md);
  font-weight: 500;
}

.btn-back:hover {
  color: var(--text);
}

.btn-back-fixed {
  position: absolute;
  top: 20px;
  left: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.btn-correct {
  background: var(--green);
  color: var(--white);
  flex: 1;
  padding: 18px;
  font-size: 16px;
}

.btn-correct:hover:not(:disabled) {
  background: #24704B;
}

.btn-skip {
  background: var(--white);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  flex: 1;
  padding: 18px;
  font-size: 16px;
}

.btn-skip:hover:not(:disabled) {
  background: var(--off-white);
}

.btn-copy {
  background: none;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-copy:hover {
  background: var(--off-white);
  color: var(--text-secondary);
}

/* =============================================
   SECTION TITLES
   ============================================= */

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  text-align: center;
  letter-spacing: -0.5px;
}

/* =============================================
   FORMS
   ============================================= */

.input-large {
  width: 100%;
  max-width: 300px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s;
  background: var(--white);
  text-align: center;
  color: var(--text);
}

.input-large::placeholder {
  color: var(--text-muted);
}

.input-large:focus {
  border-color: var(--red);
}

.input-code {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
}

.create-form,
.join-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.error-text {
  color: var(--red);
  font-size: 14px;
  font-weight: 500;
  margin-top: var(--space-md);
  text-align: center;
}

.text-secondary {
  font-size: 13px;
  color: var(--text-secondary);
}

/* =============================================
   LOBBY
   ============================================= */

.lobby-header {
  text-align: center;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.room-code-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.room-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.room-code {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--red);
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
}

.qr-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-sm);
}

#qr-canvas {
  border-radius: var(--radius-sm);
  background: white;
  padding: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.qr-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.lobby-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.lobby-players-section h3,
.lobby-settings h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lobby-players-section h3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

#player-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 13px;
}

.lobby-players {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.lobby-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 15px;
}

.lobby-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
}

.host-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--red-light);
  color: var(--red);
  letter-spacing: 0.5px;
}

.lobby-waiting {
  text-align: center;
  padding: var(--space-lg);
  color: var(--text-muted);
  font-size: 14px;
}

.lobby-team-select {
  padding: var(--space-lg);
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.lobby-team-select h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.team-select-buttons {
  display: flex;
  gap: var(--space-sm);
}

.btn-team-select {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-team-select.team-1-bg {
  background: var(--red);
  color: white;
}

.btn-team-select.team-2-bg {
  background: var(--green);
  color: white;
}

.btn-team-select:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-team-select.selected {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--text-primary);
}

.team-status {
  margin-top: var(--space-sm);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.team-status strong {
  color: var(--text-primary);
  font-weight: 600;
}

.team-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: white;
}

.team-badge.team-1 {
  background: var(--red);
}

.team-badge.team-2 {
  background: var(--green);
}

/* =============================================
   SETTINGS
   ============================================= */

.lobby-settings {
  display: none;
}

.settings-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.setting-row label {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary);
}

.setting-row select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  background: var(--white);
  cursor: pointer;
  outline: none;
  color: var(--text);
}

.mode-description {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-sm) 0;
  font-style: italic;
}

/* =============================================
   CUSTOM CARDS
   ============================================= */

.custom-cards-list {
  margin-bottom: var(--space-lg);
}

.empty-state {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

.custom-card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.custom-card-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.custom-card-info {
  flex: 1;
  min-width: 0;
}

.custom-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.custom-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.custom-card-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
}

.custom-card-delete:hover {
  color: var(--red);
}

.custom-card-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.custom-card-form h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.form-field {
  margin-bottom: var(--space-md);
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  outline: none;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--red);
}

.custom-cards-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.custom-cards-actions .btn {
  flex: 1;
  min-width: 80px;
}

/* =============================================
   RULES
   ============================================= */

.rules-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.rule {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.rule-number {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.rule-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.rule-text strong {
  color: var(--text);
  font-weight: 600;
}

.difficulty-info {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.difficulty-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.diff-level {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--space-sm) 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.diff-badge {
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.diff-badge.easy {
  background: var(--green-light);
  color: var(--green);
}

.diff-badge.medium {
  background: #FEF3CD;
  color: #856404;
}

.diff-badge.hard {
  background: var(--red-light);
  color: var(--red);
}

/* =============================================
   ROUND TRANSITION
   ============================================= */

.transition-card {
  text-align: center;
  background: var(--white);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 340px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.transition-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.round-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: var(--space-sm);
}

.transition-team {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-xl);
  letter-spacing: -0.5px;
}

.transition-players {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.transition-role {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.role-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.role-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.transition-vs {
  font-size: 18px;
  color: var(--text-muted);
}

.transition-scores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  font-weight: 600;
  font-size: 18px;
}

.role-hint {
  margin-top: var(--space-md);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
}

.role-hint.role-describer {
  background: var(--red);
  color: white;
}

.role-hint.role-guesser {
  background: var(--green);
  color: white;
}

.role-hint.role-wait {
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.transition-wait {
  margin-top: var(--space-md);
  font-size: 14px;
  color: var(--text-muted);
}

/* =============================================
   GAME SCREEN — COMMON
   ============================================= */

.game-layout {
  justify-content: space-between;
  padding: var(--space-md) var(--space-md);
}

.game-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
}

.game-role-badge {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-role-badge.role-describer {
  background: var(--red);
  color: white;
}

.game-role-badge.role-guesser {
  background: var(--green);
  color: white;
}

.game-team-badge {
  background: var(--red);
  color: var(--white);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-round-info {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-scores-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
}

.mini-score {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  min-width: 30px;
  text-align: center;
}

.team-1-color {
  color: var(--team1);
}

.team-2-color {
  color: var(--team2);
}

.mini-score-divider {
  color: var(--text-muted);
}

.game-card-area {
  text-align: center;
  padding: var(--space-lg) 0;
}

.game-item-number {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
}

.game-clue {
  font-size: 15px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: var(--space-md);
  padding: 0 20px;
  line-height: 1.5;
}

.game-answer {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: var(--space-sm);
  word-break: break-word;
  line-height: 1.1;
}

.game-category {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.guesser-prompt {
  color: var(--text-muted);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0;
}

/* =============================================
   TIMER
   ============================================= */

.game-timer-area {
  display: flex;
  justify-content: center;
  padding: var(--space-sm) 0;
}

.timer-ring {
  position: relative;
  width: 110px;
  height: 110px;
}

.timer-ring svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.timer-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 5;
}

.timer-progress {
  fill: none;
  stroke: var(--text);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.2s;
}

.timer-progress.warning {
  stroke: #D97706;
}

.timer-progress.danger {
  stroke: var(--red);
}

.timer-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.timer-text.warning {
  color: #D97706;
}

.timer-text.danger {
  color: var(--red);
}

@keyframes timer-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.timer-text.danger {
  animation: timer-pulse 0.5s ease-in-out infinite;
}

/* =============================================
   GAME ACTIONS & FOOTER
   ============================================= */

.game-actions {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
}

.game-footer {
  text-align: center;
  padding: var(--space-sm) 0;
}

.turn-info {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

.turn-info strong {
  color: var(--text);
  font-weight: 600;
}

/* =============================================
   REVEALED ITEMS
   ============================================= */

.revealed-section {
  width: 100%;
  max-height: 160px;
  overflow: hidden;
}

.revealed-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  text-align: center;
}

.revealed-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  max-height: 120px;
  overflow-y: auto;
  padding: 2px 0;
}

.revealed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  animation: revealed-slide 0.2s ease-out;
}

@keyframes revealed-slide {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.revealed-item.correct {
  background: var(--green-light);
  color: var(--green);
}

.revealed-item.skipped {
  background: var(--off-white);
  color: var(--text-muted);
}

.revealed-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.revealed-item.correct .revealed-icon {
  background: var(--green);
  color: var(--white);
}

.revealed-item.skipped .revealed-icon {
  background: var(--border);
  color: var(--text-muted);
}

.revealed-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.revealed-name {
  font-weight: 600;
  font-size: 13px;
}

.revealed-category {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.streak-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background: #FEF3CD;
  color: #856404;
}

.bonus-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--green);
  color: var(--white);
}

/* =============================================
   WAITING SCREEN
   ============================================= */

.waiting-card {
  text-align: center;
  background: var(--white);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 320px;
  max-height: 80vh;
  overflow-y: auto;
}

.waiting-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.3px;
}

.waiting-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

.waiting-card .flash-risk-banner {
  margin-bottom: var(--space-md);
}

.waiting-card .memorization-number {
  margin: var(--space-md) 0;
}

.waiting-scores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: var(--space-md);
}

/* =============================================
   FLASH RISK ROUND
   ============================================= */

.flash-risk-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
}

.flash-risk-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.flash-risk-points {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--white);
  color: var(--red);
  border-radius: 3px;
}

.memorize-area {
  text-align: center;
  padding: var(--space-md) 0;
}

.memorize-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.memorization-number {
  font-size: 64px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: var(--space-sm);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}

.memorization-number.warning {
  color: #D97706;
}

.memorization-number.danger {
  color: var(--red);
}

@keyframes memorize-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.memorization-number.danger {
  animation: memorize-pulse 0.5s ease-in-out infinite;
}

.memorization-locked {
  font-size: 40px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 3px;
}

@keyframes lock-in {
  0% { transform: scale(1.1); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.memorization-locked {
  animation: lock-in 0.3s ease-out;
}

.memorize-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.mem-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  transition: opacity 0.4s;
}

.mem-cards.locked {
  opacity: 0;
  pointer-events: none;
}

.mem-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.mem-card:nth-child(5) {
  grid-column: 1 / -1;
}

.mem-card-number {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mem-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.mem-card-category {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.flash-risk-waiting-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-md) 0;
  text-align: center;
}

.flash-risk-waiting-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.5;
}

.points-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--red);
  color: var(--white);
}

/* =============================================
   TURN SUMMARY
   ============================================= */

.summary-card {
  text-align: center;
  background: var(--white);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 340px;
  transition: transform 0.2s ease;
}

.summary-team {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--red);
  margin-bottom: var(--space-sm);
}

.summary-flash-badge {
  margin-bottom: var(--space-md);
}

.summary-flash-badge .flash-risk-banner {
  margin-bottom: 0;
}

.summary-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.3px;
}

.summary-score-big {
  font-size: 56px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: var(--space-lg);
  line-height: 1;
  letter-spacing: -2px;
}

.summary-details {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.summary-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  text-align: left;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.summary-item.reviewable {
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.15s ease;
  position: relative;
}

.summary-item.reviewable::after {
  content: 'TAP TO TOGGLE';
  position: absolute;
  right: 8px;
  bottom: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  opacity: 0.6;
}

.summary-item.reviewable:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.summary-item.reviewable:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

.review-hint {
  margin: var(--space-sm) 0;
  padding: 8px 12px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  border: 1px dashed var(--border);
}

.summary-item.correct {
  background: var(--green-light);
  color: var(--green);
}

.summary-item.skipped {
  background: var(--off-white);
  color: var(--text-muted);
}

.summary-item-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.summary-item.correct .summary-item-icon {
  background: var(--green);
  color: var(--white);
}

.summary-item.skipped .summary-item-icon {
  background: var(--border);
  color: var(--text-muted);
}

.summary-scores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  font-weight: 600;
  font-size: 18px;
}

/* =============================================
   GAME OVER
   ============================================= */

.gameover-card {
  text-align: center;
  background: var(--white);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 340px;
}

.gameover-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.gameover-winner {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-xl);
  letter-spacing: -0.5px;
}

.gameover-scores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.final-score {
  text-align: center;
}

.final-team-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

.final-points {
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
}

.final-score.team-1-color .final-points {
  color: var(--team1);
}

.final-score.team-2-color .final-points {
  color: var(--team2);
}

.final-score-divider {
  font-size: 24px;
  font-weight: 300;
  color: var(--text-muted);
}

.gameover-message {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.gameover-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* =============================================
   GAME STATS
   ============================================= */

#gameover-stats {
  margin-bottom: var(--space-lg);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.stat-block {
  text-align: left;
}

.stat-block-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border);
}

.stat-block-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
}

.stat-block-row span:first-child {
  color: var(--text-secondary);
}

.stat-block-row span:last-child {
  font-weight: 600;
  color: var(--text);
}

.stats-flash-risk {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

/* =============================================
   OVERLAY
   ============================================= */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.overlay-card {
  background: var(--white);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  text-align: center;
  max-width: 300px;
  width: 90%;
}

.overlay-card h2 {
  margin-bottom: var(--space-sm);
  font-size: 20px;
  font-weight: 700;
}

.overlay-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

/* =============================================
   ANIMATIONS — Purposeful only
   ============================================= */

@keyframes go-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 48, 37, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(217, 48, 37, 0); }
}

.pulse {
  animation: go-pulse 1.5s ease-in-out infinite;
}

/* =============================================
   ANIMATIONS & MOTION
   ============================================= */

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes popIn {
  0% { transform: scale(0); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes correctFlash {
  0% { background: var(--green-light); transform: scale(1); }
  50% { background: var(--green); color: white; transform: scale(1.03); }
  100% { background: var(--green-light); transform: scale(1); }
}

@keyframes skipFlash {
  0% { background: var(--off-white); }
  50% { background: #f0d0d0; }
  100% { background: var(--off-white); }
}

@keyframes scorePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

@keyframes revealItem {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

@keyframes countdownBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.screen { animation: fadeIn 0.25s ease-out; }

.transition-card { animation: scaleIn 0.3s ease-out; }

.summary-card { animation: slideUp 0.3s ease-out; }

.game-card-area { animation: slideUp 0.25s ease-out; }

.summary-item {
  animation: revealItem 0.2s ease-out;
  animation-fill-mode: both;
}

.summary-item:nth-child(1) { animation-delay: 0s; }
.summary-item:nth-child(2) { animation-delay: 0.05s; }
.summary-item:nth-child(3) { animation-delay: 0.1s; }
.summary-item:nth-child(4) { animation-delay: 0.15s; }
.summary-item:nth-child(5) { animation-delay: 0.2s; }

.summary-item.animate-correct { animation: correctFlash 0.4s ease-out; }
.summary-item.animate-skip { animation: skipFlash 0.3s ease-out; }

.mini-score.animate { animation: scorePop 0.3s ease-out; }

.mem-card { animation: scaleIn 0.3s ease-out; }
.mem-card:nth-child(1) { animation-delay: 0s; }
.mem-card:nth-child(2) { animation-delay: 0.05s; }
.mem-card:nth-child(3) { animation-delay: 0.1s; }
.mem-card:nth-child(4) { animation-delay: 0.15s; }
.mem-card:nth-child(5) { animation-delay: 0.2s; }

.memorization-number { animation: countdownBounce 1s ease-in-out infinite; }

.gameover-card { animation: popIn 0.4s ease-out; }

.btn { transition: transform 0.1s ease, box-shadow 0.1s ease; }
.btn:active { transform: scale(0.96); }

.role-hint { animation: slideDown 0.3s ease-out; }

.waiting-card { animation: fadeIn 0.3s ease-out; }

.lobby-player { animation: slideUp 0.2s ease-out; }
.lobby-player:nth-child(1) { animation-delay: 0s; }
.lobby-player:nth-child(2) { animation-delay: 0.05s; }
.lobby-player:nth-child(3) { animation-delay: 0.1s; }
.lobby-player:nth-child(4) { animation-delay: 0.15s; }

/* =============================================
   SPLASH / LOADING SCREEN
   ============================================= */

.splash-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  background-image: var(--bg-pattern);
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  text-align: center;
}

.splash-title {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--text);
}

.splash-title .accent {
  color: var(--red);
  font-size: 28px;
  letter-spacing: 4px;
  display: block;
  margin-top: 2px;
}

.splash-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 28px;
}

.splash-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: splashDot 1.2s ease-in-out infinite;
}

.splash-dots span:nth-child(2) { animation-delay: 0.2s; }
.splash-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes splashDot {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.4); opacity: 1; }
}

/* =============================================
   CONFETTI CANVAS
   ============================================= */

#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-hide {
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
}

.toast-info {
  background: var(--text);
  color: white;
}

.toast-success {
  background: var(--green);
  color: white;
}

.toast-error {
  background: var(--red);
  color: white;
}

/* =============================================
   CONNECTION STATUS
   ============================================= */

.connection-status {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.connection-status.connected {
  background: var(--green);
  color: white;
}

.connection-status.disconnected {
  background: var(--red);
  color: white;
  opacity: 1;
  animation: pulse-bar 1.5s ease-in-out infinite;
}

@keyframes pulse-bar {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* =============================================
   TIMER URGENCY STATES
   ============================================= */

.timer-text.warning {
  color: #E67E22;
  transition: color 0.3s ease;
}

.timer-text.danger {
  color: var(--red);
  animation: countdownBounce 0.5s ease-in-out infinite;
}

.timer-progress.warning {
  stroke: #E67E22;
  transition: stroke 0.3s ease;
}

.timer-progress.danger {
  stroke: var(--red);
  transition: stroke 0.3s ease;
}

/* =============================================
   BUTTON RIPPLE EFFECT
   ============================================= */

.btn {
  position: relative;
  overflow: hidden;
}

.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* =============================================
   GAMEOVER TROPHY
   ============================================= */

.gameover-trophy {
  font-size: 56px;
  margin-bottom: 8px;
  animation: trophyBounce 0.6s ease-out;
}

@keyframes trophyBounce {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.gameover-card {
  animation: cardSlideUp 0.5s ease-out;
}

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

/* =============================================
   TEAM COLOR TURN BAR
   ============================================= */

.team-turn-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 9998;
  transition: background-color 0.4s ease, transform 0.4s ease;
  transform: scaleX(0);
  transform-origin: left;
}

.team-turn-bar.active {
  transform: scaleX(1);
}

.team-turn-bar.team-1 {
  background: var(--team1);
}

.team-turn-bar.team-2 {
  background: var(--team2);
}

/* =============================================
   ROLE BADGE PULSE GLOW
   ============================================= */

.game-role-badge.active-role {
  animation: roleGlow 1.5s ease-in-out infinite;
}

.role-describer.active-role {
  box-shadow: 0 0 0 0 rgba(217, 48, 37, 0.4);
}

.role-guesser.active-role {
  box-shadow: 0 0 0 0 rgba(45, 134, 89, 0.4);
}

@keyframes roleGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
  50% { box-shadow: 0 0 12px 4px rgba(0,0,0,0.15); }
}

/* =============================================
   SCORE PARTICLE BURST
   ============================================= */

.score-particle-container {
  position: absolute;
  pointer-events: none;
  z-index: 50;
}

.score-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation: particleBurst 0.6s ease-out forwards;
}

@keyframes particleBurst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--px), var(--py)) scale(0); opacity: 0; }
}

/* =============================================
   CARD FLIP ANIMATION (3D)
   ============================================= */

.card-flip-container {
  perspective: 800px;
}

.card-flip-inner {
  position: relative;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.card-flip-inner.flipped {
  transform: rotateY(180deg);
}

.card-flip-front,
.card-flip-back {
  backface-visibility: hidden;
}

.card-flip-back {
  transform: rotateY(180deg);
}

/* =============================================
   SHIMMER SWEEP ON REVEAL
   ============================================= */

.shimmer-reveal {
  position: relative;
  overflow: hidden;
}

.shimmer-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.3) 50%,
    transparent 100%
  );
  animation: shimmerSweep 0.6s ease-out;
  pointer-events: none;
}

@keyframes shimmerSweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* =============================================
   CARD MICRO-LIFT
   ============================================= */

.card-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-lift:hover,
.card-lift:active {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* =============================================
   SCREEN TRANSITION WIPE
   ============================================= */

.screen-wipe-enter {
  animation: screenWipeIn 0.35s ease-out;
}

@keyframes screenWipeIn {
  0% { clip-path: circle(0% at 50% 50%); opacity: 0; }
  100% { clip-path: circle(100% at 50% 50%); opacity: 1; }
}

.screen-slide-enter {
  animation: screenSlideIn 0.3s ease-out;
}

@keyframes screenSlideIn {
  0% { transform: translateX(30px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* =============================================
   TEAM COLOR FILL TRANSITION
   ============================================= */

.team-fill-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.team-fill-overlay.active {
  opacity: 1;
}

.team-fill-overlay.team-1 {
  background: var(--team1);
}

.team-fill-overlay.team-2 {
  background: var(--team2);
}

/* =============================================
   STREAK FLAME
   ============================================= */

.streak-flame {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.streak-flame.level-1 {
  font-size: 12px;
  color: #E67E22;
}

.streak-flame.level-2 {
  font-size: 16px;
  color: var(--red);
}

.streak-flame.level-3 {
  font-size: 20px;
  color: var(--red);
  animation: flamePulse 0.5s ease-in-out infinite;
}

@keyframes flamePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* =============================================
   SCORE COUNT-UP ANIMATION
   ============================================= */

.score-counting {
  transition: none;
}

@keyframes scoreCountBump {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.score-counting.animate {
  animation: scoreCountBump 0.3s ease-out;
}

/* =============================================
   PROGRESS BAR
   ============================================= */

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 4px 0;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease, background-color 0.3s ease;
}

.progress-bar-fill.team-1 {
  background: var(--team1);
}

.progress-bar-fill.team-2 {
  background: var(--team2);
}

/* =============================================
   PAPER GRAIN OVERLAY
   ============================================= */

.screen-content::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* =============================================
   SHADOW DEPTH ON INTERACTIONS
   ============================================= */

.interactive-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.interactive-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-sm);
}

/* =============================================
   ACTIVE TEAM HEADER BAR
   ============================================= */

.game-header {
  position: relative;
}

.game-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 1px;
  transition: background-color 0.3s ease;
}

.game-header.header-team-1::after {
  background: var(--team1);
}

.game-header.header-team-2::after {
  background: var(--team2);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 380px) {
  .game-title {
    font-size: 36px;
  }
  
  .game-answer {
    font-size: 30px;
  }
  
  .timer-ring {
    width: 96px;
    height: 96px;
  }
  
  .timer-text {
    font-size: 32px;
  }
  
  .room-code {
    font-size: 36px;
    letter-spacing: 5px;
  }
  
  .memorization-number {
    font-size: 52px;
  }
  
  .summary-score-big {
    font-size: 48px;
  }
  
  .final-points {
    font-size: 38px;
  }
}

@media (min-width: 768px) {
  .game-answer {
    font-size: 48px;
  }
  
  .timer-ring {
    width: 130px;
    height: 130px;
  }
  
  .timer-text {
    font-size: 46px;
  }
  
  .memorization-number {
    font-size: 80px;
  }
}
