/* ===== DRUNK RACING GAME ===== */
/* ===================================================================
   DRUNK RACING GAME
   File: /games/drunk-racing-game/styles-drunk-racing-game.css
   All class names prefixed with: drunk-racing-game-
   =================================================================== */

/* --- BASE WRAPPER --- */

#game-drunk-racing-game {
  background: #1a0e08;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  position: relative;
}


#drunk-racing-game-start {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 20px;
  background: radial-gradient(ellipse at 50% 30%, #3a2412 0%, #1a0e08 70%);
  /* No-scroll start overlay — same fix as Spicy Spin: this overlay is just
     icon + title + how-to + two buttons, identical in shape to every other
     game's start overlay. The old 480px min-height + 60px top padding +
     explicit overflow-y:auto were unnecessary for that little content and
     caused a visible scrollbar on shorter viewports. */
  overflow: hidden;
  box-sizing: border-box;
}
#drunk-racing-game-start > * { flex-shrink: 0; }
#drunk-racing-game-start .so-howto { flex: 0 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.drunk-racing-game-start-title {
  font-size: 2.4rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  text-shadow: 0 0 32px rgba(188,110,14,0.8), 0 2px 8px rgba(0,0,0,0.8);
}

.drunk-racing-game-start-sub {
  font-size: 0.9rem;
  color: rgba(255,126,42,0.75);
  margin: 0 0 28px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.drunk-racing-game-start-button {
  background: linear-gradient(135deg, #a8651e 0%, #d9923c 50%, #5c3814 100%);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: 50px;
  padding: 18px 52px;
  cursor: pointer;
  box-shadow: 0 0 32px rgba(156,99,7,0.55), 0 4px 16px rgba(0,0,0,0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.drunk-racing-game-start-button:active {
  transform: scale(0.96);
  box-shadow: 0 0 16px rgba(156,99,7,0.35);
}

/* --- SHARED BUTTONS --- */

.drunk-racing-game-primary-button {
  width: 100%;
  background: linear-gradient(135deg, #94591c 0%, #c9852e 50%, #4a2c10 100%);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: 50px;
  padding: 16px;
  cursor: pointer;
  box-shadow: 0 0 22px rgba(140,88,3,0.45), 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.15s, opacity 0.15s;
}

.drunk-racing-game-primary-button:active {
  transform: scale(0.97);
  opacity: 0.88;
}

.drunk-racing-game-secondary-button {
  width: 100%;
  background: rgba(255,255,255,0.08);
  color: #cceebb;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1.5px solid rgba(220,110,21,0.3);
  border-radius: 50px;
  padding: 14px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.drunk-racing-game-secondary-button:active {
  transform: scale(0.97);
  background: rgba(255,255,255,0.13);
}

.drunk-racing-game-ghost-button {
  width: 100%;
  background: none;
  color: rgba(255,121,52,0.55);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  padding: 12px;
  cursor: pointer;
  transition: color 0.15s;
}

.drunk-racing-game-ghost-button:active {
  color: rgba(255,121,52,0.9);
}

.drunk-racing-game-back-button {
  background: none;
  border: none;
  color: rgba(255,121,35,0.65);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0 0 16px;
  text-align: left;
  display: block;
  transition: color 0.15s;
}

.drunk-racing-game-back-button:active {
  color: rgba(255,121,35,1);
}

/* --- SETUP SCREEN --- */

.drunk-racing-game-setup-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 480px;
  background: radial-gradient(ellipse at 50% 15%, #2e1c0e 0%, #1a0e08 60%);
  padding: 0 0 48px;
}

.drunk-racing-game-setup-inner {
  width: 100%;
  max-width: 480px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drunk-racing-game-setup-title {
  font-size: 1.9rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 0 18px rgba(188,110,10,0.6);
}

.drunk-racing-game-setup-sub {
  font-size: 0.85rem;
  color: rgba(255,121,35,0.65);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.drunk-racing-game-textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(188,99,10,0.45);
  border-radius: 14px;
  padding: 14px 16px;
  color: #ffffff;
  font-size: 1rem;
  font-family: system-ui, sans-serif;
  resize: none;
  outline: none;
  line-height: 1.6;
  transition: border-color 0.2s;
}

.drunk-racing-game-textarea::placeholder {
  color: rgba(255,121,35,0.35);
  font-size: 0.9rem;
}

.drunk-racing-game-textarea:focus {
  border-color: rgba(220,121,17,0.85);
  background: rgba(255,255,255,0.09);
}

.drunk-racing-game-setup-error {
  font-size: 0.88rem;
  color: #ff7070;
  min-height: 20px;
  font-weight: 600;
}

/* --- CONFIG SCREEN --- */

.drunk-racing-game-config-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 480px;
  max-height: 100%;
  background: radial-gradient(ellipse at 50% 10%, #2e1c0e 0%, #1a0e08 55%);
  padding: 0 0 24px;
  /* Defensive: this screen must never get visually "locked" with no way to
     reach content below the fold — if it's ever taller than the space the
     wrapper gives it, it scrolls within itself rather than being clipped
     silently by a parent's overflow. */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.drunk-racing-game-config-inner {
  width: 100%;
  max-width: 480px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drunk-racing-game-config-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 0 16px rgba(188,110,10,0.5);
}

.drunk-racing-game-config-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drunk-racing-game-config-label {
  font-size: 0.78rem;
  color: rgba(255,121,35,0.65);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
}

/* Mode grid */

.drunk-racing-game-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
}

.drunk-racing-game-mode-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 14px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(188,88,10,0.25);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  text-align: left;
}

.drunk-racing-game-mode-button.active {
  background: rgba(156,88,7,0.22);
  border-color: rgba(188,110,14,0.75);
  box-shadow: 0 0 14px rgba(156,99,7,0.25);
}

.drunk-racing-game-mode-button:active {
  transform: scale(0.97);
}

.drunk-racing-game-mode-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.drunk-racing-game-mode-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.drunk-racing-game-mode-desc {
  font-size: 0.72rem;
  color: rgba(255,126,49,0.55);
  line-height: 1.3;
}

/* Duration + Rounds button row */

.drunk-racing-game-button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.drunk-racing-game-option-button {
  flex: 1;
  min-width: 44px;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(188,88,10,0.25);
  border-radius: 10px;
  color: rgba(255,132,56,0.8);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: center;
}

.drunk-racing-game-option-button.active {
  background: rgba(156,88,7,0.25);
  border-color: rgba(188,110,14,0.8);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(156,99,7,0.2);
}

.drunk-racing-game-option-button:active {
  transform: scale(0.95);
}

/* Track options toggle row */

.drunk-racing-game-toggle-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.drunk-racing-game-toggle-button {
  flex: 1;
  min-width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(188,88,10,0.22);
  border-radius: 10px;
  color: rgba(255,126,45,0.65);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 12px 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.drunk-racing-game-toggle-button.active {
  background: rgba(156,88,7,0.22);
  border-color: rgba(188,110,14,0.75);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(156,99,7,0.2);
}

.drunk-racing-game-toggle-icon {
  font-size: 1rem;
}

/* Duration + Track Options combined row */

.drunk-racing-game-config-row {
  display: flex;
  gap: 12px;
}

.drunk-racing-game-config-half {
  flex: 1;
  min-width: 0;
}

/* Compact mode buttons — this class was applied in the HTML
   (drunk-racing-game-mode-button-compact) but had no matching CSS rule at
   all, so the Race Mode buttons rendered at full default size (14px
   padding, 1.4rem icon, no height cap) regardless of the "-compact"
   class name — this is what made them look oversized and pushed the whole
   Race Settings screen past one screen's height, forcing a scroll. */
.drunk-racing-game-mode-button-compact {
  align-items: center;
  text-align: center;
  padding: 8px 4px;
  gap: 2px;
  border-radius: 10px;
}
.drunk-racing-game-mode-button-compact .drunk-racing-game-mode-icon {
  font-size: 0.95rem;
}
.drunk-racing-game-mode-button-compact .drunk-racing-game-mode-name {
  font-size: 0.6rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.drunk-racing-game-button-row-compact {
  gap: 5px;
}

.drunk-racing-game-option-button-compact {
  min-width: 0;
  flex-basis: calc(33.333% - 6px);
  padding: 6px 2px;
  font-size: 0.68rem;
  border-radius: 8px;
}

.drunk-racing-game-toggle-row-compact {
  gap: 5px;
}

.drunk-racing-game-toggle-button-compact {
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding: 7px 2px;
  font-size: 0.68rem;
  border-radius: 8px;
}

.drunk-racing-game-toggle-button-compact .drunk-racing-game-toggle-icon {
  font-size: 0.9rem;
}

/* Racer preview */

.drunk-racing-game-racers-preview {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(188,88,10,0.2);
  border-radius: 12px;
  padding: 8px 12px;
}

.drunk-racing-game-preview-label {
  font-size: 0.66rem;
  color: rgba(255,121,35,0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 5px;
}

.drunk-racing-game-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drunk-racing-game-preview-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 5px 10px 5px 6px;
}

.drunk-racing-game-preview-icon {
  width: 32px;
  height: 22px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.drunk-racing-game-preview-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f0e0c8;
}

/* --- PREDICTION SCREEN --- */

.drunk-racing-game-prediction-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 480px;
  max-height: 100%;
  background: radial-gradient(ellipse at 50% 20%, #2e1c0e 0%, #1a0e08 65%);
  padding: 0;
  /* Defensive scroll — see the matching comment on
     .drunk-racing-game-config-screen above. */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.drunk-racing-game-prediction-inner {
  width: 100%;
  max-width: 480px;
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.drunk-racing-game-prediction-emoji {
  font-size: 1.8rem;
  line-height: 1;
}

.drunk-racing-game-prediction-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  text-align: center;
  text-shadow: 0 0 16px rgba(188,110,10,0.5);
}

.drunk-racing-game-prediction-sub {
  font-size: 0.72rem;
  color: rgba(255,121,35,0.6);
  margin: 0 0 4px;
  text-align: center;
}

.drunk-racing-game-prediction-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100%;
}

.drunk-racing-game-prediction-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  /* 2x size per explicit request — doubled from the previous compact
     sizing (padding 2px/6px, 14x10 icon, 0.62rem name, 6px radius) below. */
  padding: 4px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(188,88,10,0.22);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  text-align: left;
  box-sizing: border-box;
  min-width: 0;
}

.drunk-racing-game-prediction-button:active {
  transform: scale(0.97);
  background: rgba(156,88,7,0.18);
  border-color: rgba(188,110,14,0.65);
}

.drunk-racing-game-mini-drink {
  width: 28px;
  height: 20px;
  flex-shrink: 0;
}

.drunk-racing-game-prediction-name {
  font-size: 1.24rem;
  font-weight: 700;
  color: #f0e0c8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.drunk-racing-game-skip-button {
  background: none;
  border: none;
  color: rgba(255,121,35,0.5);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.15s;
}

.drunk-racing-game-skip-button:active {
  color: rgba(255,121,35,0.9);
}

/* --- RACE SCREEN --- */

.drunk-racing-game-race-screen {
  display: flex;
  flex-direction: column;
  /* Matches #game-drunk-racing-game's min-height (480px) — the wrapper's
     rendered height during the start overlay — so starting the race
     doesn't grow/shift the card's height. Previously this was 560px,
     taller than the overlay, causing a visible jump when gameplay began. */
  height: 480px;
  background: #1a0e08;
  overflow: hidden;
}

.drunk-racing-game-race-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(76,16,1,0.95) 0%, rgba(76,14,3,0.8) 100%);
  border-bottom: 1px solid rgba(156,77,7,0.2);
  flex-shrink: 0;
  gap: 10px;
}

.drunk-racing-game-race-mode-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,121,35,0.7);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.drunk-racing-game-race-timer {
  font-size: 1.4rem;
  font-weight: 900;
  color: #e8a849;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(220,140,17,0.6);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.drunk-racing-game-timer-urgent {
  color: #ff5544;
  text-shadow: 0 0 16px rgba(255, 60, 30, 0.7);
  animation: drunk-racing-game-timer-pulse 0.5s ease infinite alternate;
}

@keyframes drunk-racing-game-timer-pulse {
  from { opacity: 1; }
  to   { opacity: 0.65; }
}

.drunk-racing-game-pause-button {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(188,88,10,0.3);
  border-radius: 8px;
  color: rgba(255,132,56,0.8);
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.drunk-racing-game-pause-button:active {
  background: rgba(255,255,255,0.15);
}

.drunk-racing-game-canvas-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  /* Canvas is top-aligned (not centered — centering put equal empty space
     above AND below whenever the canvas is shorter than the available
     flex space, e.g. 2-4 players). But fully flush-to-top left ALL of that
     freed space stacked at the bottom instead. padding-top here gives back
     roughly half of that space to the gap above the first lane, leaving
     the other half below — a deliberate split rather than all-or-nothing. */
  align-items: flex-start;
  justify-content: center;
  padding-top: 10%;
  box-sizing: border-box;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: #1a0e08;
}

.drunk-racing-game-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Countdown overlay */

.drunk-racing-game-countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(68,8,1,0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 10;
}

.drunk-racing-game-countdown-number {
  font-size: 6rem;
  font-weight: 900;
  color: #e8a849;
  text-shadow: 0 0 40px rgba(220,140,17,0.9), 0 0 80px rgba(156,110,7,0.5);
  line-height: 1;
}

.drunk-racing-game-countdown-pop {
  animation: drunk-racing-game-countdown-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes drunk-racing-game-countdown-pop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Pause overlay */

.drunk-racing-game-pause-overlay {
  position: absolute;
  inset: 0;
  background: rgba(68,8,1,0.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.drunk-racing-game-pause-text {
  font-size: 2.5rem;
  font-weight: 900;
  color: #e8a849;
  text-shadow: 0 0 24px rgba(220,140,17,0.7);
}

.drunk-racing-game-pause-sub {
  font-size: 0.88rem;
  color: rgba(255,121,35,0.6);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Relay player-change toast strip — sits below the lanes, above the
   commentary bar. Empty (zero height) except during handoffs; stacks one
   row per simultaneous switch. */
.drunk-racing-game-relay-toast {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 12px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  pointer-events: none;
}
.drunk-racing-game-relay-toast:empty {
  padding: 0;
}
.drunk-racing-game-relay-toast-row {
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffe6b0;
  background: linear-gradient(180deg, rgba(120,52,4,0.96) 0%, rgba(92,34,2,0.96) 100%);
  border: 1px solid rgba(232,168,73,0.5);
  border-radius: 999px;
  padding: 5px 14px;
  margin: 3px 0;
  text-align: center;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.drunk-racing-game-relay-toast-row-show {
  opacity: 1;
  transform: translateY(0);
}

/* Commentary */

.drunk-racing-game-commentary {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,132,52,0.0);
  text-align: center;
  min-height: 36px;
  width: 100%;
  background: linear-gradient(180deg, rgba(76,14,3,0.8) 0%, rgba(76,14,3,0.95) 100%);
  transition: none;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drunk-racing-game-commentary-show {
  animation: drunk-racing-game-commentary-in 0.3s ease forwards;
}

@keyframes drunk-racing-game-commentary-in {
  0%   { color: rgba(255,132,52,0); transform: translateY(4px); }
  20%  { color: rgba(255,132,52,1); transform: translateY(0); }
  70%  { color: rgba(255,132,52,1); }
  100% { color: rgba(255,132,52,0.2); }
}

/* --- RESULTS OVERLAY --- */

.drunk-racing-game-results-overlay {
  position: absolute;
  inset: 0;
  background: rgba(66,6,1,0.92);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  padding: 0;
  /* The parent race screen is a fixed height with overflow:hidden, so the
     results sheet must scroll WITHIN this overlay — otherwise a tall
     standings list pushed the bottom button past the clip and it could
     not be scrolled to on mobile web. */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: drunk-racing-game-results-fade 0.3s ease;
}

@keyframes drunk-racing-game-results-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.drunk-racing-game-results-card {
  width: 100%;
  max-width: 520px;
  /* Cap to the visible overlay height (not 92vh, which overflowed the
     fixed-height race screen) and scroll internally so the final button
     is always reachable. */
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #0f2a08 0%, #1a0e08 100%);
  border: 1px solid rgba(188,99,10,0.3);
  border-radius: 24px 24px 0 0;
  padding: 28px 22px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: drunk-racing-game-results-slide 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes drunk-racing-game-results-slide {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.drunk-racing-game-results-winner-banner {
  font-size: 1.7rem;
  font-weight: 900;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 0 24px rgba(220,140,17,0.6);
  letter-spacing: -0.01em;
}

/* Prediction result */

.drunk-racing-game-prediction-result {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
}

.drunk-racing-game-prediction-result.correct {
  background: rgba(156,99,7,0.18);
  color: #88ee44;
  border: 1px solid rgba(188,110,10,0.35);
}

.drunk-racing-game-prediction-result.wrong {
  background: rgba(200, 60, 30, 0.14);
  color: #ff8866;
  border: 1px solid rgba(200, 60, 30, 0.3);
}

/* Podium */

.drunk-racing-game-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 0;
}

.drunk-racing-game-podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  max-width: 110px;
}

.drunk-racing-game-podium-slot.empty {
  opacity: 0;
}

.drunk-racing-game-podium-snail {
  display: flex;
  align-items: center;
  justify-content: center;
}

.drunk-racing-game-podium-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f0e0c8;
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drunk-racing-game-podium-medal {
  font-size: 1.3rem;
  line-height: 1;
}

.drunk-racing-game-podium-block {
  width: 100%;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 -3px 12px rgba(0,0,0,0.4);
}

/* Rankings */

.drunk-racing-game-rankings {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drunk-racing-game-ranking-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}

.drunk-racing-game-ranking-pos {
  font-size: 0.85rem;
  font-weight: 800;
  width: 24px;
  height: 24px;
  line-height: 24px;
  border-radius: 50%;
  text-align: center;
  flex-shrink: 0;
  color: #ffffff;
  background: linear-gradient(160deg, #e63946, #b71c2c);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.3);
}

.drunk-racing-game-ranking-pos.rank-2 {
  background: linear-gradient(160deg, #f4a300, #c17e00);
}

.drunk-racing-game-ranking-pos.rank-3 {
  background: linear-gradient(160deg, #2a9d8f, #1c6e64);
}

.drunk-racing-game-ranking-pos.rank-other {
  background: linear-gradient(160deg, #6b6b6b, #454545);
}

.drunk-racing-game-ranking-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 5px rgba(255,255,255,0.25);
}

.drunk-racing-game-ranking-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ede0c8;
}

.drunk-racing-game-ranking-time {
  font-size: 0.8rem;
  color: rgba(255,121,35,0.55);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Tournament scores */

.drunk-racing-game-tournament-scores,
.drunk-racing-game-elimination-status {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(188,88,10,0.18);
  border-radius: 12px;
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drunk-racing-game-scores-title {
  font-size: 0.74rem;
  color: rgba(255,121,35,0.6);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  margin-bottom: 4px;
}

.drunk-racing-game-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}

.drunk-racing-game-score-pos {
  width: 22px;
  height: 22px;
  line-height: 22px;
  font-weight: 800;
  font-size: 0.78rem;
  color: #ffffff;
  text-align: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(160deg, #e63946, #b71c2c);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.3);
}

.drunk-racing-game-score-pos.rank-2 {
  background: linear-gradient(160deg, #f4a300, #c17e00);
}

.drunk-racing-game-score-pos.rank-3 {
  background: linear-gradient(160deg, #2a9d8f, #1c6e64);
}

.drunk-racing-game-score-pos.rank-other {
  background: linear-gradient(160deg, #6b6b6b, #454545);
}

.drunk-racing-game-score-name {
  flex: 1;
  color: #ede0c8;
  font-weight: 600;
}

.drunk-racing-game-score-pts {
  font-weight: 800;
  color: #e8a849;
  font-variant-numeric: tabular-nums;
}

.drunk-racing-game-eliminated-name {
  font-size: 0.88rem;
  color: rgba(255, 120, 100, 0.8);
  font-weight: 600;
}

/* Result buttons */

.drunk-racing-game-result-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

/* --- FINAL RESULTS SCREEN --- */

.drunk-racing-game-final-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 480px;
  background: radial-gradient(ellipse at 50% 20%, #2e1c0e 0%, #1a0e08 65%);
  padding: 0 0 48px;
}

.drunk-racing-game-final-inner {
  width: 100%;
  max-width: 480px;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.drunk-racing-game-final-trophy {
  font-size: 4rem;
  line-height: 1;
  animation: drunk-racing-game-trophy-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes drunk-racing-game-trophy-bounce {
  from { transform: scale(0.3) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

.drunk-racing-game-final-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  text-align: center;
  text-shadow: 0 0 22px rgba(188,110,10,0.6);
}

.drunk-racing-game-final-winner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.drunk-racing-game-final-winner-name {
  font-size: 1.5rem;
  font-weight: 900;
  color: #e8a849;
  text-shadow: 0 0 16px rgba(220,140,17,0.6);
  text-align: center;
}

/* --- RESPONSIVE --- */

@media (max-width: 380px) {
  .drunk-racing-game-start-title { font-size: 2.2rem; }
  .drunk-racing-game-toggle-row  { flex-direction: column; }
  .drunk-racing-game-results-winner-banner { font-size: 1.4rem; }
}


