/* TRUCO ARGENTINO HD - STYLESHEET */
:root {
  --felt-green: #0d4b2e;
  --felt-green-light: #156d44;
  --felt-shadow: #052215;
  --wood-mahogany: #2b1810;
  --wood-rim: #3d2317;
  --gold-accent: #d4af37;
  --gold-light: #f5d77f;
  --chalk-board: #1a221f;
  --chalk-white: #e8edea;
  --crimson: #a31d1d;
  --dark-bg: #121517;
  --text-light: #f0f4f8;
  --font-title: 'Cinzel', serif;
  --font-main: 'Montserrat', sans-serif;
  --font-serif: 'Playfair Display', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  -moz-text-size-adjust: 100% !important;
}

body {
  font-family: var(--font-main);
  background: var(--dark-bg);
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(30, 24, 20, 0.6) 0%, rgba(10, 10, 10, 0.95) 100%),
    repeating-linear-gradient(45deg, #161210 0px, #161210 2px, #1a1614 2px, #1a1614 4px);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

#app-container {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen {
  width: 100%;
  flex: 1;
  display: flex;
}

.hidden,
.screen.hidden,
#game-screen.hidden,
#lobby-screen.hidden,
.modal-overlay.hidden {
  display: none !important;
}

/* =========================================================
   LOBBY SCREEN
   ========================================================= */
#lobby-screen {
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lobby-card {
  background: linear-gradient(145deg, #241c18 0%, #17110e 100%);
  border: 2px solid var(--gold-accent);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.2);
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  text-align: center;
}

.lobby-header {
  padding: 30px 20px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.flag-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.flag-stripe.sky {
  width: 28px;
  height: 6px;
  background: #75aadb;
  border-radius: 3px;
}

.flag-stripe.sun {
  font-size: 14px;
}

.game-title {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 3px;
  background: linear-gradient(180deg, #fff3c4 0%, #e6be44 50%, #997314 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.game-subtitle {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #a39587;
  margin-top: 6px;
}

.server-status-pill {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.35);
  transition: all 0.4s ease;
}
.server-status-pill.connected {
  color: #51cf66;
  border-color: rgba(81, 207, 102, 0.4);
}
.server-status-pill.disconnected {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.4);
}
.server-status-pill.hidden-fade {
  opacity: 0;
  pointer-events: none;
}

.lobby-body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: #d1c4b2;
}

.input-group input, .input-group select {
  background: #120e0c;
  border: 1px solid #4a382e;
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-size: 15px;
  font-family: var(--font-main);
  outline: none;
  transition: all 0.2s ease;
}

.input-group input:focus, .input-group select:focus {
  border-color: var(--gold-accent);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.lobby-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Common Buttons */
.btn {
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-family: var(--font-main);
  text-decoration: none;
}

.btn-large {
  padding: 14px 20px;
  gap: 14px;
  text-align: left;
}

.btn-large .btn-icon {
  font-size: 24px;
}

.btn-large .btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.btn-large .btn-text strong {
  font-size: 15px;
  letter-spacing: 0.5px;
}

.btn-large .btn-text small {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, #1e7040 0%, #114a28 100%);
  color: #fff;
  border: 1px solid #3ca568;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #258c50 0%, #155e34 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 112, 64, 0.4);
}

.btn-gold {
  background: linear-gradient(135deg, #d4af37 0%, #aa841c 100%);
  color: #1a1202;
  border: 1px solid #fae17d;
  font-weight: 700;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #e6bf44 0%, #bd9323 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #37474f 0%, #263238 100%);
  color: #eceff1;
  border: 1px solid #546e7a;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #455a64 0%, #37474f 100%);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid #5a463b;
  color: #b09f92;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
}

.btn-outline:hover {
  border-color: var(--gold-accent);
  color: var(--gold-light);
}

.btn-block {
  width: 100%;
  padding: 14px;
  font-weight: 700;
}

.lobby-footer {
  padding: 14px;
  background: rgba(0, 0, 0, 0.4);
  font-size: 11px;
  color: #7d6b5e;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================================
   GAME SCREEN
   ========================================================= */
#game-screen {
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.game-top-bar {
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  flex: 0 0 48px;
  background: #17110e;
  border-bottom: 1px solid #3d2a1f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 50;
}

.room-pill {
  display: flex;
  align-items: center;
  background: #251b16;
  border: 1px solid #4d3627;
  border-radius: 20px;
  padding: 4px 12px;
  gap: 8px;
  font-size: 13px;
}

.room-pill .pill-label {
  color: #9e897a;
  font-weight: 600;
}

.room-pill .room-code {
  font-family: monospace;
  font-weight: 800;
  font-size: 15px;
  color: var(--gold-accent);
  letter-spacing: 1px;
}

.btn-pill {
  background: #3d2b20;
  border: 1px solid #664936;
  color: #fff;
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
}

.btn-pill:hover {
  background: #543b2c;
}

.top-controls {
  display: flex;
  gap: 8px;
}

.btn-icon-top {
  background: #281d17;
  border: 1px solid #4a3427;
  color: #cfc2b6;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}

.btn-icon-top:hover {
  background: #38281f;
  color: #fff;
}

.btn-danger-top {
  border-color: #6d1b1b;
  color: #ef9a9a;
}

.btn-danger-top:hover {
  background: #6d1b1b;
  color: #fff;
}

/* =========================================================
   TABLE & SIDEBAR LAYOUT
   ========================================================= */
.table-layout {
  flex: 1;
  display: flex;
  position: relative;
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
  min-height: 0;
  overflow: hidden;
}

/* Centered Green Felt Truco Table */
.felt-table-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: radial-gradient(circle at 50% 50%, #1e1713 0%, #0d0a09 100%);
  overflow: hidden;
}

/* Luxury Wood Frame & Padded Leather Armrest Rail */
.table-outer-frame {
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(135deg, #3d2317 0%, #20110a 35%, #140905 100%),
    repeating-linear-gradient(45deg, rgba(0,0,0,0.12) 0px, rgba(0,0,0,0.12) 3px, transparent 3px, transparent 6px);
  border: 4px solid #1a0b06;
  border-radius: 46px;
  padding: 12px;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.95),
    0 10px 25px rgba(0, 0, 0, 0.8),
    inset 0 3px 5px rgba(255, 230, 180, 0.18),
    inset 0 -3px 6px rgba(0, 0, 0, 0.85);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Recessed Felt Baize Surface */
.felt-table {
  width: 100%;
  height: 100%;
  background-color: #0b3d26;
  background-image: 
    /* Overhead Table Spotlight */
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(30, 138, 84, 0.96) 0%, rgba(13, 72, 44, 0.95) 45%, #052417 84%, #03150d 100%),
    /* Micro-weave lines */
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.04) 0px, rgba(0, 0, 0, 0.04) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 4px);
  border-radius: 36px;
  border: 2px solid rgba(212, 175, 55, 0.55);
  box-shadow: 
    inset 0 0 50px rgba(0, 0, 0, 0.9),
    inset 0 0 110px rgba(0, 0, 0, 0.72),
    inset 0 0 0 3px rgba(20, 10, 5, 0.9),
    inset 0 0 0 5px rgba(212, 175, 55, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  padding: 12px 18px;
  overflow: hidden;
}

/* Ornate Brass Corner Brackets */
.table-corner-bracket {
  position: absolute;
  width: 38px;
  height: 38px;
  pointer-events: none;
  z-index: 25;
}

.table-corner-bracket::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid #d4af37;
  border-radius: 12px;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4), inset 0 0 4px rgba(0,0,0,0.8);
}

.table-corner-bracket::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff5c0 0%, #b28a1c 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.corner-tl { top: 6px; left: 6px; }
.corner-tl::before { border-right: none; border-bottom: none; }
.corner-tl::after { top: 6px; left: 6px; }

.corner-tr { top: 6px; right: 6px; }
.corner-tr::before { border-left: none; border-bottom: none; }
.corner-tr::after { top: 6px; right: 6px; }

.corner-bl { bottom: 6px; left: 6px; }
.corner-bl::before { border-right: none; border-top: none; }
.corner-bl::after { bottom: 6px; left: 6px; }

.corner-br { bottom: 6px; right: 6px; }
.corner-br::before { border-left: none; border-top: none; }
.corner-br::after { bottom: 6px; right: 6px; }

/* Perimeter Brass Studs Along the Leather Rail */
.table-studs-bar {
  position: absolute;
  left: 60px;
  right: 60px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 24;
}

.studs-top { top: 4px; }
.studs-bottom { bottom: 4px; }

.table-rim-stud {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff7cc 0%, #d4af37 55%, #7a580a 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.8), inset 0 1px 1px rgba(255,255,255,0.7);
}

/* Inlaid Gold Pinstripe Frame on Felt */
.felt-pinstripe-frame {
  position: absolute;
  inset: 18px;
  border: 1.5px solid rgba(212, 175, 55, 0.28);
  border-radius: 26px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3);
  z-index: 2;
}

/* Subtle Wool Weave Layer */
.felt-weave-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: radial-gradient(circle at 50% 50%, rgba(255, 235, 170, 0.05) 0%, transparent 65%);
}

/* Central Watermark Crest (Embossed on Felt) */
.felt-center-watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  height: 380px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.16;
}

.watermark-svg {
  width: 100%;
  height: 100%;
}

.wm-outer-ring, .wm-inner-ring {
  fill: none;
  stroke: #f5d77f;
  stroke-width: 1.5;
}

.wm-dash-ring {
  fill: none;
  stroke: #f5d77f;
  stroke-width: 1;
}

.wm-sol-face {
  fill: none;
  stroke: #f5d77f;
  stroke-width: 1.5;
}

.wm-ray, .wm-knife, .wm-laurel {
  stroke: #f5d77f;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.wm-banner-text {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 4px;
  fill: #f5d77f;
}

.wm-subtext {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  fill: #f5d77f;
}

.wm-suits {
  font-size: 15px;
  fill: #f5d77f;
}

/* PLAYER & RIVAL ZONES */
.player-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.user-zone {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 22px;
}

/* Big, bold cards centered in the middle of the table (Matching Reference Screenshot) */
.user-zone .user-hand {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  margin: 0 auto;
  z-index: 25;
}

.user-zone .avatar-timer-badge .timer-number {
  bottom: -6px;
}

.player-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-ring {
  position: relative;
  width: 58px;
  height: 58px;
  background: #18281e;
  border: 2px solid var(--gold-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Circular Turn Countdown Timer Badge on Avatar (30s) */
.avatar-timer-badge {
  position: absolute;
  inset: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 15;
}

.avatar-timer-badge .timer-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.avatar-timer-badge .timer-circle-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.65);
  stroke-width: 5.5px;
}

.avatar-timer-badge .timer-circle-progress {
  fill: none;
  stroke: #ffd700;
  stroke-width: 5.5px;
  stroke-linecap: round;
  stroke-dasharray: 169.65;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.95s linear, stroke 0.3s ease;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
}

.avatar-timer-badge .timer-number {
  position: absolute;
  bottom: -13px;
  background: #0d0906;
  border: 2px solid #ffd700;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 900;
  padding: 2px 9px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.95);
  z-index: 16;
}

.avatar-timer-badge.warning .timer-circle-progress {
  stroke: #ff9800;
  filter: drop-shadow(0 0 8px rgba(255, 152, 0, 0.9));
}
.avatar-timer-badge.warning .timer-number {
  border-color: #ff9800;
  color: #ffe082;
}

.avatar-timer-badge.danger .timer-circle-progress {
  stroke: #ff1744;
  animation: timerPulse 0.6s infinite alternate;
  filter: drop-shadow(0 0 12px rgba(255, 23, 68, 1));
}
.avatar-timer-badge.danger .timer-number {
  border-color: #ff1744;
  color: #fff;
  background: #2d0a05;
  animation: timerNumberPulse 0.6s infinite alternate;
}

@keyframes timerPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 5px #ff3d00); }
  100% { transform: scale(1.05); filter: drop-shadow(0 0 12px #ff1744); }
}

@keyframes timerNumberPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

.avatar-icon {
  font-size: 30px;
}

.player-details {
  display: flex;
  flex-direction: column;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-name-text {
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.badge-mano {
  background: #ffd54f;
  color: #3e2723;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.badge-envido {
  background: #1565c0;
  color: #e3f2fd;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid #42a5f5;
}

/* Center Zone for Player & Rival Shouts / Calls (Perfect Center Alignment) */
.zone-call-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 10px;
  pointer-events: none;
  z-index: 35;
  white-space: nowrap;
}

.rival-zone .zone-call-center,
.user-zone .zone-call-center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Active Call Badges - Prominent, Centered, and Vivid */
.badge-active-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 10px 28px;
  border-radius: 12px;
  text-transform: uppercase;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.75), inset 0 1px 1px rgba(255,255,255,0.4);
  white-space: nowrap;
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: auto;
}

.badge-active-call.call-truco {
  background: linear-gradient(135deg, #e64a19 0%, #bf360c 100%);
  color: #fff8e1;
  border-color: #ffab91;
  box-shadow: 0 0 22px rgba(255, 87, 34, 0.8), 0 6px 20px rgba(0,0,0,0.7);
}

.badge-active-call.call-envido {
  background: linear-gradient(135deg, #0288d1 0%, #01579b 100%);
  color: #ffffff;
  border-color: #81d4fa;
  box-shadow: 0 0 22px rgba(3, 169, 244, 0.8), 0 6px 20px rgba(0,0,0,0.7);
}

.badge-active-call.call-flor {
  background: linear-gradient(135deg, #c2185b 0%, #880e4f 100%);
  color: #ffffff;
  border-color: #f48fb1;
  box-shadow: 0 0 22px rgba(233, 30, 99, 0.8), 0 6px 20px rgba(0,0,0,0.7);
}

.badge-active-call.call-quiero {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  color: #ffffff;
  border-color: #a5d6a7;
  box-shadow: 0 0 22px rgba(76, 175, 80, 0.8), 0 6px 20px rgba(0,0,0,0.7);
}

.badge-active-call.call-no_quiero,
.badge-active-call.call-al_mazo {
  background: linear-gradient(135deg, #424242 0%, #212121 100%);
  color: #ffffff;
  border-color: #9e9e9e;
  box-shadow: 0 6px 20px rgba(0,0,0,0.8);
}

@keyframes callPulse {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.08); filter: brightness(1.28); }
  100% { transform: scale(1); filter: brightness(1); }
}

.badge-active-call.active-pulse {
  animation: callPulse 2s ease-in-out infinite;
}

@keyframes scoreBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.4); color: #76ff03; text-shadow: 0 0 16px rgba(118, 255, 3, 0.9); }
  100% { transform: scale(1); }
}

.score-bump {
  animation: scoreBump 0.8s ease-out;
}

.score-display {
  font-size: 15px;
  color: #b9d8c2;
  font-weight: 700;
  margin-top: 2px;
}

/* Hands */
.cards-hand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.rival-hand .rival-card {
  width: 112px;
  height: 168px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.65);
}

.user-hand .player-card {
  width: 160px;
  height: 238px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.7);
}

/* TABLE CENTER FELT */
.table-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 270px;
  width: 100%;
}

/* Status Banner positioned higher, well above the cards */
.status-banner {
  position: absolute;
  top: 4px;
  background: rgba(8, 28, 17, 0.92);
  border: 1.5px solid rgba(212, 175, 55, 0.65);
  padding: 6px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.65);
  text-align: center;
  max-width: 90%;
  letter-spacing: 0.5px;
  z-index: 20;
}

/* Battlefield Arena (Face to Face, Tapete Verde HD) */
.battlefield-arena {
  position: relative;
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vh, 52px);
  margin: auto;
  perspective: 1000px;
}

/* Dedicated Inlaid Playing Mat in Center Table */
.battlefield-mat-inlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(8, 48, 29, 0.95) 0%, rgba(4, 28, 17, 0.98) 100%);
  border: 2px dashed rgba(212, 175, 55, 0.38);
  border-radius: 22px;
  box-shadow: 
    inset 0 0 30px rgba(0, 0, 0, 0.65),
    0 8px 24px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
}

.mat-zone-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: rgba(212, 175, 55, 0.5);
  text-transform: uppercase;
}

.mat-divider {
  width: 90%;
  border-top: 1px dashed rgba(212, 175, 55, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto 0;
}

.mat-divider-text {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: rgba(212, 175, 55, 0.5);
  background: rgba(6, 32, 19, 0.95);
  padding: 0 8px;
  margin-top: -6px;
}

.battlefield-row {
  position: relative;
  width: 320px;
  height: clamp(155px, 20vh, 195px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}

.battlefield-rival {
  z-index: 10;
}

.battlefield-player {
  z-index: 15;
}

/* Stacking & Shadows for Cards on Table */
.table-card {
  width: clamp(110px, 14vh, 136px);
  height: clamp(168px, 21.4vh, 208px);
  position: absolute;
  left: 50%;
  top: 50%;
  user-select: none;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.table-card .truco-card-inner {
  border-radius: 9px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.72), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.table-card .truco-card-img {
  border-radius: 9px;
}

/* 1ª Mano / Trick 1 */
.table-card.trick-hand-0 {
  z-index: 10;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
}

/* 2ª Mano / Trick 2 (Lands ON TOP of 1st) */
.table-card.trick-hand-1 {
  z-index: 20;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.78);
}

/* 3ª Mano / Trick 3 (Lands ON TOP of 2nd) */
.table-card.trick-hand-2 {
  z-index: 30;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.88);
}

/* =========================================================
   TABLE AMBIENCE PROPS (DECK, POT, MATE)
   ========================================================= */
.table-prop {
  position: absolute;
  z-index: 8;
  pointer-events: auto;
  user-select: none;
}

/* Left Flank: 3D Stacked Deck of Cards */
.prop-deck-caddy {
  left: clamp(16px, 2.5vw, 36px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 12;
}

.prop-deck-coaster {
  background: radial-gradient(circle, #22140c 0%, #0d0603 100%);
  border: 2px solid rgba(212, 175, 55, 0.55);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 
    0 12px 28px rgba(0, 0, 0, 0.8),
    inset 0 1px 2px rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.prop-deck-stack {
  position: relative;
  width: clamp(96px, 11vw, 120px);
  height: clamp(140px, 16vw, 175px);
}

.deck-paper-edge {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: repeating-linear-gradient(
    to bottom,
    #f2ede4 0px,
    #f2ede4 2px,
    #d8d0c0 2px,
    #d8d0c0 4px
  );
  border: 1px solid #b8af9a;
}

.edge-4 { top: 12px; left: -6px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.75); }
.edge-3 { top: 9px; left: -4.5px; }
.edge-2 { top: 6px; left: -3px; }
.edge-1 { top: 3px; left: -1.5px; }

.deck-card-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7);
  transform: rotate(-3.5deg);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.deck-card-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.prop-plaque {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #ffd54f;
  text-shadow: 0 0 6px rgba(255, 213, 79, 0.4);
  text-transform: uppercase;
  background: rgba(14, 10, 8, 0.85);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* Right Flank: 3D Gleaming Gold Coin Pot */
.prop-pot-caddy {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.prop-pot-coaster {
  background: radial-gradient(circle, #0e291b 0%, #06170e 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.7), inset 0 1px 2px rgba(255,255,255,0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.prop-pot-stack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pot-coins-stack-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: -4px;
}

.stack-coin-3d {
  font-size: 24px;
  line-height: 13px;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.7));
}

.prop-pot-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(10, 8, 6, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 3px 8px;
  border-radius: 6px;
}

.pot-badge-title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #cfd8dc;
  text-transform: uppercase;
}

.pot-badge-val {
  font-size: 13px;
  font-weight: 900;
  color: #ffd54f;
  text-shadow: 0 0 8px rgba(255, 213, 79, 0.6);
}

/* Bottom-Left Flank: Mate Criollo con Bombilla */
.prop-mate-caddy {
  left: 24px;
  bottom: 16px;
}

.prop-mate-coaster {
  background: radial-gradient(circle, #2a1a12 0%, #150c08 100%);
  border: 1.5px solid rgba(180, 140, 70, 0.4);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.7), inset 0 1px 1px rgba(255,255,255,0.2);
  position: relative;
}

.prop-mate-icon {
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.prop-mate-tag {
  font-size: 7px;
  font-weight: 800;
  color: #bcaaa4;
  letter-spacing: 0.5px;
  margin-top: -2px;
}

/* Responsive Hide for Small Mobile Screens */
@media (max-width: 900px) {
  .prop-deck-caddy, .prop-pot-caddy, .prop-mate-caddy {
    display: none !important;
  }
}

/* =========================================================
   RIGHT SIDEBAR (SCOREBOARD + ACTIONS + LEADERBOARD & CHAT)
   ========================================================= */
.game-sidebar {
  width: 440px;
  min-width: 420px;
  max-width: 460px;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  background: #18120e;
  border-left: 2px solid #3d2a1f;
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  gap: 8px;
  overflow: hidden; /* ZERO SCROLLBAR on desktop sidebar */
  box-sizing: border-box;
}

/* Scoreboard Chalkboard */
.scoreboard-wrapper {
  flex: 0 0 auto;
  width: 100%;
}

.anotador-board {
  background: #141b17;
  border: 4px solid #4a3424;
  border-radius: 10px;
  box-shadow: inset 0 0 18px rgba(0,0,0,0.85), 0 4px 12px rgba(0,0,0,0.6);
  padding: 8px 10px;
  color: var(--chalk-white);
  box-sizing: border-box;
  width: 100%;
}

.anotador-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.anotador-title {
  font-family: var(--font-title);
  font-size: 13.5px;
  letter-spacing: 1.5px;
  color: #e0e6ed;
  font-weight: 900;
}

.anotador-target {
  font-size: 12.5px;
  color: var(--gold-light);
  font-weight: 800;
}

.anotador-columns {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 8px;
}

.anotador-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.anotador-col.active-col {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 2px;
}

.anotador-divider {
  width: 1.5px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 4px;
  flex-shrink: 0;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 800;
  padding-bottom: 2px;
}

.player-label {
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  color: #fff;
  font-weight: 800;
}

.score-badge {
  background: #23302a;
  border: 1px solid #607d8b;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 16px;
  font-weight: 900;
  color: #ffd54f;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.score-phase-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.score-phase-label.malas {
  color: #ff8a80;
}

.score-phase-label.buenas {
  color: #b9f6ca;
}

.score-phase-label.partida-corta {
  color: #ffe082;
}

.match-boxes-row {
  display: flex;
  gap: 4px;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0;
  flex-wrap: nowrap;
}

.match-box {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.6);
  box-sizing: border-box;
  flex-shrink: 0;
}

/* ACTION CONTROLS DOCK */
.action-dock {
  flex: 0 0 auto;
  background: #201813;
  border: 1.5px solid #4a3526;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.dock-header {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #dcd0c5;
  text-align: center;
}

.dynamic-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.btn-action {
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14.5px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-align: center;
  min-height: 40px;
  letter-spacing: 0.5px;
}

.btn-accept {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  color: #fff;
  border: 1.5px solid #66bb6a;
}
.btn-accept:hover { background: #388e3c; }

.btn-reject {
  background: linear-gradient(135deg, #c62828 0%, #8e0000 100%);
  color: #fff;
  border: 1.5px solid #ef5350;
}
.btn-reject:hover { background: #d32f2f; }

.btn-call-envido {
  background: linear-gradient(135deg, #0277bd 0%, #01579b 100%);
  color: #fff;
  border: 1.5px solid #29b6f6;
}
.btn-call-envido:hover { background: #0288d1; }

.btn-call-truco {
  background: linear-gradient(135deg, #f57f17 0%, #e65100 100%);
  color: #fff;
  border: 1.5px solid #ffb74d;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(230, 81, 0, 0.45);
}
.btn-call-truco:hover { background: #ff8f00; }

.btn-raise {
  background: linear-gradient(135deg, #fbc02d 0%, #f57f17 100%);
  color: #1a1002;
  font-weight: 800;
  border: 1.5px solid #ffe082;
}

.btn-raise-danger {
  background: linear-gradient(135deg, #d84315 0%, #bf360c 100%);
  color: #fff;
  font-weight: 800;
  grid-column: span 2;
  border: 1.5px solid #ff7043;
}

.btn-flor {
  background: linear-gradient(135deg, #ad1457 0%, #880e4f 100%);
  color: #fff;
  grid-column: span 2;
  border: 1.5px solid #f06292;
}

.dock-bottom-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 6px;
}

.tapar-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #d7c8bc;
  cursor: pointer;
}

.btn-dock-danger {
  background: #2a1616;
  border: 1px solid #6b2828;
  color: #ef9a9a;
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.btn-dock-danger:hover { background: #4a1f1f; color: #fff; }

.btn-dock-gold {
  background: linear-gradient(135deg, #ffd54f 0%, #ffb300 100%);
  color: #261603;
  padding: 8px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  border: none;
}

/* =========================================================
   TOP 20 GLOBAL LEADERBOARD & IN-GAME LIVE CHAT
   ========================================================= */
.leaderboard-chat-dock {
  flex: 1 1 auto;
  min-height: 140px;
  background: #1a130f;
  border: 1.5px solid #4a3526;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 5px;
  flex: 0 0 auto;
}

.lb-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lb-trophy {
  font-size: 14px;
}

.lb-title {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gold-light);
}

.lb-live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #81c784;
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.35);
  padding: 2px 7px;
  border-radius: 10px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #66bb6a;
  box-shadow: 0 0 6px #66bb6a;
  animation: livePulse 1.6s infinite alternate;
}

@keyframes livePulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}

/* Scrollable Ranking Table */
.leaderboard-table {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 80px;
  max-height: 220px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #543b2b #1a120c;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.leaderboard-table::-webkit-scrollbar {
  width: 4px;
}

.leaderboard-table::-webkit-scrollbar-track {
  background: #140d09;
}

.leaderboard-table::-webkit-scrollbar-thumb {
  background: #543b2b;
  border-radius: 4px;
}

.lb-loading {
  font-size: 11.5px;
  color: #9e8e7e;
  text-align: center;
  padding: 16px 0;
  font-style: italic;
}

/* Row in Leaderboard */
.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  transition: all 0.15s ease;
}

.lb-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.lb-row.current-user {
  background: linear-gradient(90deg, rgba(255, 213, 79, 0.22) 0%, rgba(255, 179, 0, 0.08) 100%);
  border: 1.5px solid #ffd54f;
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.25);
}

.lb-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.lb-rank-badge {
  font-family: monospace;
  font-weight: 900;
  font-size: 11px;
  width: 22px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #2a1f18;
  color: #d1c2b4;
  flex-shrink: 0;
}

.lb-row.rank-1 .lb-rank-badge {
  background: linear-gradient(135deg, #ffd54f 0%, #ff8f00 100%);
  color: #1a0f02;
  box-shadow: 0 0 6px rgba(255, 213, 79, 0.6);
}

.lb-row.rank-2 .lb-rank-badge {
  background: linear-gradient(135deg, #cfd8dc 0%, #90a4ae 100%);
  color: #1a2327;
}

.lb-row.rank-3 .lb-rank-badge {
  background: linear-gradient(135deg, #d7ccc8 0%, #a1887f 100%);
  color: #271d18;
}

.lb-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  color: #f5ece3;
}

.lb-row.current-user .lb-name {
  color: #ffd54f;
  font-weight: 900;
}

.lb-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.lb-coins-val {
  font-weight: 800;
  color: #ffd54f;
  font-size: 12px;
}

/* Sticky Pin for Current User Rank */
.leaderboard-user-pin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2b1f14;
  border: 1.5px solid #d4af37;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  flex: 0 0 auto;
}

.lb-pin-tag {
  font-size: 9.5px;
  font-weight: 800;
  color: #d4af37;
  letter-spacing: 0.5px;
}

.lb-pin-rank {
  font-family: monospace;
  font-weight: 900;
  color: #fff;
}

.lb-pin-name {
  font-weight: 800;
  color: #ffd54f;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-pin-coins {
  font-weight: 900;
  color: #ffd54f;
}

/* Chat Input Row */
.chat-input-row {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.chat-input-row input {
  flex: 1;
  background: #120c08;
  border: 1px solid #4a3526;
  border-radius: 6px;
  padding: 6px 10px;
  color: #fff;
  font-size: 13px;
  height: 34px;
  outline: none;
  box-sizing: border-box;
}

.chat-input-row input:focus {
  border-color: var(--gold-light);
}

.btn-chat-send {
  background: #3e281b;
  border: 1px solid #66432c;
  color: #ffd54f;
  padding: 0 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-chat-send:hover {
  background: #543725;
}

/* SPEECH BUBBLES */
.speech-bubble {
  position: absolute;
  background: #fff;
  color: #1a1a1a;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.25s ease;
  white-space: nowrap;
  z-index: 50;
}

.speech-bubble.visible {
  opacity: 1;
  transform: translateY(0);
}

.speech-rival {
  top: 56px;
  left: 0;
  border-top-left-radius: 2px;
}

.speech-player {
  bottom: 56px;
  left: 0;
  border-bottom-left-radius: 2px;
}

/* =========================================================
   MODALS & OVERLAYS
   ========================================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-card {
  background: linear-gradient(145deg, #241c18 0%, #17110e 100%);
  border: 2px solid var(--gold-accent);
  border-radius: 14px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  max-height: 90dvh;
  padding: 24px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d7ccc8;
  font-size: 20px;
  cursor: pointer;
  z-index: 40;
  transition: all 0.2s ease;
}
.modal-close:hover {
  background: rgba(212, 175, 55, 0.3);
  color: #fff;
  border-color: var(--gold-accent);
  transform: scale(1.06);
}

.modal-title {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--gold-light);
  margin-bottom: 18px;
  text-align: center;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #d1c4b2;
}

.rules-card {
  max-width: 580px;
}

.rules-scrollable {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 8px;
  text-align: left;
}

.rules-section {
  margin-bottom: 18px;
}

.rules-section h3 {
  font-size: 14px;
  color: var(--gold-light);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.rules-section p, .rules-section ul {
  font-size: 12px;
  color: #cfd8dc;
  line-height: 1.6;
}

.card-hierarchy-list {
  padding-left: 20px;
  font-size: 12px;
  color: #eceff1;
  line-height: 1.7;
}

/* Victory Modal */
.victory-card {
  text-align: center;
  padding: 36px 24px;
}

.victory-trophy {
  font-size: 64px;
  margin-bottom: 12px;
  animation: pulseTrophy 1.8s infinite ease-in-out;
}

.victory-title {
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.victory-subtitle {
  font-size: 14px;
  color: #cfd8dc;
  margin-bottom: 24px;
}

.victory-actions-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(20, 15, 12, 0.95);
  border: 1px solid var(--gold-accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.7);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

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

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
  .table-layout {
    flex-direction: column;
    overflow-y: auto;
  }
  .game-sidebar {
    width: 100%;
    border-left: none;
    border-top: 2px solid #3d2a1f;
  }
  .felt-table {
    min-height: 520px;
    border-width: 12px;
  }
}

/* =========================================================
   WALLET, TIENDA DE MONEDAS & ADMIN PANEL STYLES
   ========================================================= */
.lobby-wallet-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.wallet-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2b1f14 0%, #17110c 100%);
  border: 1px solid var(--gold-accent);
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wallet-pill:hover {
  transform: scale(1.03);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.wallet-amount {
  font-weight: 800;
  font-size: 14px;
  color: var(--gold-light);
}

.wallet-label {
  font-size: 11px;
  color: #c9b9ab;
}

.btn-wallet-add {
  background: var(--gold-accent);
  color: #1a1202;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.btn-pill-admin {
  background: transparent;
  border: 1px solid #5a463b;
  color: #ad9b8d;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.btn-pill-admin:hover {
  border-color: var(--gold-accent);
  color: #fff;
}

.pot-pill {
  border-color: #ffd54f !important;
  background: #332110 !important;
}

.pot-amount {
  color: #ffd54f !important;
}

.top-bar-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.game-wallet-pill {
  padding: 3px 10px;
  font-size: 12px;
}

/* Wallet Modal Details */
.wallet-card {
  max-width: 660px;
  width: 95%;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  padding: 18px 22px 16px;
  overflow: hidden;
  box-sizing: border-box;
}

.wallet-header {
  text-align: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.wallet-icon-big {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 2px;
}

.wallet-header .modal-title {
  margin-bottom: 6px;
  font-size: 17px;
}

.wallet-current-balance {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  margin-top: 2px;
  font-size: 13px;
  color: #d7ccc8;
}

.wallet-current-balance-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 6px 0 10px;
  flex-wrap: wrap;
}

.wallet-balance-box {
  background: rgba(0, 0, 0, 0.55);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 12px;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 170px;
}

.wallet-balance-box.ranking-highlight-box {
  border-color: #ffd54f;
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.12) 0%, rgba(0, 0, 0, 0.6) 100%);
  box-shadow: 0 0 12px rgba(255, 213, 79, 0.15);
}

.wallet-box-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #cbbba8;
  margin-bottom: 2px;
}

.wallet-balance-box strong {
  font-size: 20px;
  font-weight: 900;
  color: #ffd54f;
  font-family: var(--font-title), 'Cinzel', serif;
}

.wallet-balance-box small {
  font-size: 10px;
  color: #a89f91;
  margin-top: 2px;
  text-align: center;
}

.ranking-pill {
  border-color: #ffd54f !important;
  background: linear-gradient(135deg, #38240f 0%, #17110c 100%) !important;
}

.ranking-pill:hover {
  box-shadow: 0 0 12px rgba(255, 213, 79, 0.5) !important;
}

.ranking-distinction-banner {
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.12) 0%, rgba(30, 20, 10, 0.6) 100%);
  border: 1.5px solid #d4af37;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  text-align: left;
}

.distinction-icon {
  font-size: 20px;
  line-height: 1;
}

.distinction-text strong {
  color: #ffd54f;
  font-size: 12.5px;
  display: block;
  margin-bottom: 2px;
}

.distinction-text p {
  font-size: 11px;
  color: #e0d5c8;
  line-height: 1.4;
  margin: 0;
}

/* iOS Free Rewards Grid */
.ios-free-coins-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.ios-free-badge {
  background: rgba(117, 170, 219, 0.12);
  border: 1px solid rgba(117, 170, 219, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: left;
}

.ios-free-badge span {
  color: #75aadb;
  font-weight: 800;
  font-size: 12px;
  display: block;
}

.ios-free-badge p {
  color: #cfd8dc;
  font-size: 11px;
  margin: 3px 0 0;
  line-height: 1.35;
}

.ios-free-rewards-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ios-reward-card {
  background: rgba(20, 14, 10, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ios-reward-card.highlight {
  border-color: #ffd54f;
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.08) 0%, rgba(20, 14, 10, 0.8) 100%);
}

.ios-card-icon {
  font-size: 24px;
}

.ios-card-details {
  flex: 1;
  text-align: left;
}

.ios-card-title {
  color: #ffe082;
  font-weight: 800;
  font-size: 13px;
}

.ios-card-sub {
  color: #a89f91;
  font-size: 11px;
  margin-top: 1px;
}

.ios-reward-card .btn {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.store-modal-subtitle {
  font-size: 11.5px;
  color: #cbbba8;
  margin: -2px 0 8px;
  line-height: 1.35;
}

.store-balance-banner {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #e0d5c8;
}

.store-balance-banner.buy-mode {
  background: rgba(76, 175, 80, 0.08);
  border-color: rgba(76, 175, 80, 0.3);
}

.btn-banner-recharge {
  background: linear-gradient(135deg, #ffd54f 0%, #ff8f00 100%);
  color: #1a0f02;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.btn-banner-recharge:hover {
  transform: scale(1.04);
}

.btn-banner-recharge.btn-banner-decks {
  background: linear-gradient(135deg, #66bb6a 0%, #388e3c 100%);
  color: #fff;
}

.wallet-current-balance strong {
  font-size: 20px;
  color: var(--gold-light);
}

.wallet-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 10px;
  flex-shrink: 0;
}

.wallet-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 6px;
  color: #b0a092;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wallet-tab-btn.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold-accent);
}

.wallet-tab-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #d4af37 rgba(0, 0, 0, 0.4);
}

.wallet-tab-content::-webkit-scrollbar {
  width: 8px;
}

.wallet-tab-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
}

.wallet-tab-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffd54f 0%, #d4af37 100%);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.wallet-tab-content::-webkit-scrollbar-thumb:hover {
  background: #ffe082;
}

.tab-description {
  font-size: 12px;
  color: #b0bec5;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Packages Grid */
/* Google AdMob Rewarded Video Banner in Store */
.rewarded-ad-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.16) 0%, rgba(255, 152, 0, 0.22) 100%);
  border: 1.5px solid #ffb300;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(255, 179, 0, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rewarded-ad-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 179, 0, 0.28);
}

.ad-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ad-banner-icon {
  font-size: 28px;
}

.ad-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ad-banner-title {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.ad-banner-sub {
  color: #ffe082;
  font-size: 11px;
  font-weight: 600;
}

.ad-banner-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ad-banner-reward {
  font-size: 13px;
  font-weight: 900;
  color: #ffd700;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.btn-ad-claim {
  padding: 8px 14px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
}

.coin-packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.package-card {
  background: #17110e;
  border: 1px solid #4a382e;
  border-radius: 10px;
  padding: 16px 8px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.package-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-light);
}

.package-card.featured {
  border-color: var(--gold-accent);
  background: linear-gradient(180deg, #2a1c12 0%, #17110e 100%);
  box-shadow: 0 4px 14px rgba(255, 215, 0, 0.15);
}

.badge-pop {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold-accent);
  color: #1a1202;
  font-size: 8px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-pop.badge-best-value {
  background: #e65100;
  color: #fff;
}

.badge-pop.badge-premium {
  background: #7b1fa2;
  color: #fff;
}

.badge-pop.badge-init {
  background: #37474f;
  color: #cfd8dc;
}

.pkg-title {
  font-size: 11px;
  font-weight: 800;
  color: #e0e0e0;
  letter-spacing: 0.3px;
}

.pkg-coins {
  font-weight: 900;
  font-size: 17px;
  color: #fff;
}

.pkg-bonus {
  font-size: 9px;
  font-weight: 800;
  color: #81c784;
  background: rgba(76, 175, 80, 0.18);
  border: 1px solid rgba(76, 175, 80, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  align-self: center;
}

.pkg-price {
  font-size: 13px;
  color: var(--gold-light);
  font-weight: 800;
  margin-top: 2px;
}

.btn-tiny-buy {
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 4px;
}

.custom-buy-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  margin-top: 6px;
}

.custom-buy-row label {
  font-size: 13px;
  color: #cfd8dc;
  font-weight: 700;
}

.custom-buy-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.custom-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.custom-coin-icon {
  position: absolute;
  left: 10px;
  font-size: 16px;
  pointer-events: none;
}

.custom-input-unit {
  position: absolute;
  right: 12px;
  color: #9e8e7e;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  text-transform: uppercase;
}

.custom-input-wrap input {
  width: 100%;
  padding: 10px 50px 10px 34px;
  background: #120e0c;
  border: 1.5px solid #4a382e;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  transition: border-color 0.2s ease;
}

.custom-input-wrap input:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.25);
}

.custom-price-tag {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 135px;
}

.custom-price-tag .price-label {
  font-size: 11px;
  color: #cbbba8;
}

.custom-price-tag .price-amount {
  font-size: 17px;
  color: var(--gold-light);
  font-weight: 800;
}

.btn-custom-buy-cta {
  padding: 12px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.fee-note {
  font-size: 11px;
  color: #8d7a6e;
}

/* Permanent Lobby Wager Error Banner (Above play buttons) */
.lobby-wager-warning {
  background: linear-gradient(135deg, rgba(183, 28, 28, 0.95) 0%, rgba(120, 15, 15, 0.95) 100%);
  border: 2px solid #ef5350;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(239, 83, 80, 0.35);
  animation: warningPulse 1.8s infinite alternate;
}

@keyframes warningPulse {
  0% { transform: scale(1); box-shadow: 0 4px 16px rgba(239, 83, 80, 0.3); }
  100% { transform: scale(1.015); box-shadow: 0 6px 22px rgba(239, 83, 80, 0.6); }
}

.lobby-wager-warning .warning-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.lobby-wager-warning .warning-body {
  flex: 1;
}

.lobby-wager-warning strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.lobby-wager-warning p {
  font-size: 13.5px;
  color: #ffcdd2;
  margin: 0;
  line-height: 1.35;
  font-weight: 600;
}

.btn-warning-recharge {
  background: linear-gradient(135deg, #ffd54f 0%, #ffb300 100%);
  color: #261603;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.btn-warning-recharge:hover {
  transform: scale(1.05);
}

.btn-disabled-wager {
  opacity: 0.55 !important;
  filter: grayscale(0.5) !important;
  cursor: not-allowed !important;
}

/* Cashout Summary */
.cashout-summary-box {
  background: #140e0b;
  border: 1px solid #3d2a1f;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 16px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #b0bec5;
}

.summary-line.total {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 6px;
  font-size: 13px;
  color: #fff;
}

.fee-text {
  color: #ef9a9a;
}

.net-text {
  color: #a5d6a7;
  font-size: 14px;
}

/* Admin Modal */
.admin-card {
  max-width: 540px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.admin-stat-card {
  background: #17110e;
  border: 1px solid #4a382e;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-title {
  font-size: 11px;
  color: #b0bec5;
  font-weight: 600;
}

.stat-number {
  font-size: 22px;
  color: #fff;
  font-weight: 800;
}

.gold-stat {
  color: var(--gold-light);
}

.admin-stat-card small {
  font-size: 10px;
  color: #8d7a6e;
}

.admin-section-subtitle {
  font-size: 13px;
  color: var(--gold-light);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.admin-form-grid small {
  font-size: 10px;
  color: #8d7a6e;
}

.victory-pot-badge {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid var(--gold-accent);
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #fff;
  font-size: 14px;
}

.victory-pot-badge strong {
  color: var(--gold-light);
  font-size: 16px;
}

/* =========================================================
   MATCH WAGER DOCK (COMPACT & SLEEK)
   ========================================================= */
.match-wager-dock {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #1b1612 0%, #251c16 100%);
  border: 1.5px solid #4a3526;
  border-radius: 8px;
  padding: 5px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.wager-dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 2px;
}

.wager-dock-badge {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.wager-dock-min-badge {
  font-size: 10px;
  color: #a89f91;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
}

.wager-dock-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.wager-dock-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.wager-dock-label {
  color: #b5a494;
  font-weight: 600;
}

.wager-dock-val {
  font-weight: 800;
  color: #ffffff;
}

.wager-dock-row.pot-row {
  background: rgba(255, 179, 0, 0.12);
  border: 1px dashed rgba(255, 179, 0, 0.35);
  border-radius: 6px;
  padding: 2px 8px;
}

.wager-dock-row.pot-row .wager-dock-label {
  color: #ffe082;
  font-weight: 800;
  font-size: 11.5px;
}

.wager-dock-row.pot-row .pot-val {
  color: #ffd54f;
  font-weight: 900;
  font-size: 13.5px;
  text-shadow: 0 0 8px rgba(255, 213, 79, 0.5);
}

/* Wager configuration in Lobby & Create modal */
.wager-config-group {
  margin-top: 10px;
  margin-bottom: 14px;
}

.wager-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.wager-note {
  font-size: 11px;
  color: #ffca28;
  font-weight: 600;
}

.wager-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.wager-input-icon {
  position: absolute;
  left: 12px;
  font-size: 18px;
  pointer-events: none;
}

.wager-input-currency {
  position: absolute;
  right: 14px;
  color: #9e8e7e;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  text-transform: uppercase;
}

.wager-input-wrapper input {
  width: 100%;
  padding: 10px 80px 10px 42px;
  background: #18110b;
  border: 1.5px solid #4a3424;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  outline: none;
  transition: border-color 0.2s ease;
}

.wager-input-wrapper input:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.25);
}

.wager-chip-presets {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-wager-chip {
  background: #241a13;
  border: 1px solid #4a3526;
  color: #cfbfb2;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-wager-chip:hover {
  background: #38271c;
  color: #fff;
  border-color: #6d4c38;
}

.btn-wager-chip.active {
  background: linear-gradient(135deg, #ffd54f 0%, #ffb300 100%);
  color: #211202;
  border-color: #ffca28;
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.4);
}

/* =========================================================
   MOBILE ORIENTATION PROMPT & LANDSCAPE ADAPTIVE ENGINE
   ========================================================= */

/* Default: hidden on desktop */
.orientation-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 7, 5, 0.94);
  backdrop-filter: blur(10px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.orientation-box {
  background: linear-gradient(135deg, #241710 0%, #170f0a 100%);
  border: 2px solid var(--gold-accent);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  max-width: 340px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9), 0 0 25px rgba(255, 215, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.rotate-phone-anim {
  position: relative;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-glyph {
  font-size: 42px;
  display: inline-block;
  animation: rotatePhoneAnim 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes rotatePhoneAnim {
  0%, 25% { transform: rotate(0deg); }
  60%, 85% { transform: rotate(-90deg); }
  100% { transform: rotate(-90deg); }
}

.rotate-arrow-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 20px;
  color: var(--gold-light);
  font-weight: 900;
  animation: pulseArrow 1.2s infinite alternate;
}

@keyframes pulseArrow {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 1; }
}

.orient-title {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
  margin: 0;
}

.orient-desc {
  font-size: 13px;
  color: #d7ccc8;
  line-height: 1.45;
  margin: 0;
}

.orient-desc strong {
  color: var(--gold-light);
}

.btn-orient-dismiss {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #b0bec5;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 14px;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.2s;
}

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

/* Show orientation overlay ONLY on mobile devices in Portrait */
@media (max-width: 950px) and (orientation: portrait) {
  body:not(.dismiss-orient) .orientation-overlay {
    display: flex;
  }
}

@media (orientation: landscape) {
  .orientation-overlay {
    display: none !important;
  }
}

/* ---------------------------------------------------------
   MOBILE LANDSCAPE: 100% ZERO-SCROLL RESPONSIVE FIT
   --------------------------------------------------------- */
@media (orientation: landscape) and (max-height: 540px),
       (orientation: landscape) and (max-width: 1024px) and (max-height: 600px) {
  
  html, body {
    width: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  #app-container {
    width: 100% !important;
    min-height: 100% !important;
    min-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Lobby in Landscape Mobile: Smooth Touch Scrolling & Compact Card */
  #lobby-screen {
    width: 100% !important;
    min-height: 100% !important;
    min-height: 100dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 10px 14px 40px !important;
    box-sizing: border-box !important;
  }

  .lobby-card {
    max-width: 480px !important;
    margin: 0 auto !important;
    border-radius: 12px !important;
  }

  .lobby-header {
    padding: 12px 14px 8px !important;
  }

  .flag-banner {
    margin-bottom: 4px !important;
  }

  .game-title {
    font-size: 22px !important;
    letter-spacing: 2px !important;
  }

  .game-subtitle {
    font-size: 9px !important;
    letter-spacing: 2px !important;
    margin-top: 2px !important;
  }

  .lobby-body {
    padding: 12px 16px !important;
    gap: 10px !important;
  }

  .input-group {
    gap: 4px !important;
  }

  .input-group label {
    font-size: 11.5px !important;
  }

  .input-group input, .input-group select {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }

  .wager-quick-chips {
    gap: 5px !important;
    margin-top: 2px !important;
  }

  .btn-wager-chip {
    padding: 3px 8px !important;
    font-size: 10.5px !important;
  }

  .lobby-buttons {
    gap: 8px !important;
  }

  .btn-large {
    padding: 9px 12px !important;
    gap: 10px !important;
    border-radius: 8px !important;
  }

  .btn-large .btn-icon {
    font-size: 18px !important;
  }

  .btn-large .btn-text strong {
    font-size: 12.5px !important;
  }

  .btn-large .btn-text small {
    font-size: 9.5px !important;
  }

  .lobby-footer {
    padding: 8px !important;
  }

  .btn-outline {
    padding: 7px !important;
    font-size: 11px !important;
  }

  /* Modals in landscape: scrollable */
  .modal-overlay {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 8px !important;
    align-items: flex-start !important;
  }

  .modal-card {
    max-height: none !important;
    margin: 8px auto !important;
    padding: 16px !important;
  }

  /* Game Screen: Strictly locked to viewport ONLY when active (Zero Scroll) */
  #game-screen:not(.hidden) {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 100 !important;
  }

  #game-screen.hidden {
    display: none !important;
  }

  /* Ultra-slim Top Bar (26px) */
  .game-top-bar {
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    padding: 0 6px !important;
    flex: 0 0 26px !important;
    border-bottom: 1px solid #3d2a1f !important;
    z-index: 50;
  }

  .game-top-bar .room-info {
    gap: 4px !important;
  }

  .game-top-bar .room-pill {
    padding: 1px 6px !important;
    font-size: 9px !important;
    gap: 3px !important;
    border-radius: 10px !important;
  }

  .game-top-bar .room-pill .pill-label {
    font-size: 8.5px !important;
  }

  .game-top-bar .room-pill .room-code {
    font-size: 10.5px !important;
  }

  .game-top-bar .btn-pill {
    padding: 1px 4px !important;
    font-size: 8.5px !important;
    border-radius: 8px !important;
  }

  .game-top-bar .top-controls {
    gap: 3px !important;
  }

  .game-top-bar .game-wallet-pill {
    padding: 1px 5px !important;
    font-size: 8.5px !important;
    border-radius: 10px !important;
  }

  .game-top-bar .game-wallet-pill .wallet-amount {
    font-size: 9px !important;
  }

  .game-top-bar .btn-icon-top {
    padding: 1px 4px !important;
    font-size: 8.5px !important;
    border-radius: 4px !important;
    height: 22px !important;
    line-height: 20px !important;
    white-space: nowrap !important;
    letter-spacing: 0 !important;
  }

  /* Main Table Layout: Left Table + Right Sidebar */
  .table-layout {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: row !important;
    height: calc(100dvh - 26px) !important;
    max-height: calc(100dvh - 26px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Green Felt Table Section */
  .felt-table-wrapper {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    padding: 2px 4px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .table-outer-frame {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    padding: 2px 4px !important;
    border-radius: 12px !important;
    border-width: 2px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .felt-table {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    padding: 2px 6px 12px 6px !important;
    border-radius: 10px !important;
    border-width: 1.5px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .felt-center-watermark {
    width: 120px !important;
    height: 120px !important;
    opacity: 0.08 !important;
  }

  .table-corner-bracket,
  .table-studs-bar,
  .table-prop {
    display: none !important;
  }

  /* Rival Zone (Top of Felt) */
  .player-zone.rival-zone {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 0 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .rival-zone .player-profile {
    gap: 6px !important;
  }

  .rival-zone .avatar-ring {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border-width: 2px !important;
  }

  .rival-zone .avatar-icon {
    font-size: 24px !important;
  }

  .rival-zone .player-details {
    gap: 0 !important;
  }

  .rival-zone .player-name-text {
    font-size: 10px !important;
  }

  .rival-zone .score-display {
    font-size: 9px !important;
    margin-top: 0 !important;
  }

  .rival-zone .badge-mano {
    font-size: 7.5px !important;
    padding: 0 3px !important;
  }

  .rival-hand {
    height: clamp(66px, 16vh, 78px) !important;
    min-height: clamp(66px, 16vh, 78px) !important;
    max-height: clamp(66px, 16vh, 78px) !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .rival-hand .rival-card {
    width: clamp(46px, 6.8vw, 54px) !important;
    height: clamp(68px, 16vh, 80px) !important;
    min-width: clamp(46px, 6.8vw, 54px) !important;
    min-height: clamp(68px, 16vh, 80px) !important;
  }

  /* Center Table / Battlefield */
  .table-center {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding-top: clamp(4px, 1.8vh, 10px) !important;
    gap: 2px !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .status-banner {
    position: static !important;
    font-size: 10px !important;
    padding: 2px 10px !important;
    margin-bottom: 2px !important;
    border-radius: 10px !important;
    border-width: 1px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
  }

  .battlefield-arena {
    width: 100% !important;
    max-width: clamp(440px, 64vw, 580px) !important;
    height: auto !important;
    gap: 0 !important;
    margin: clamp(4px, 1.2vh, 8px) auto clamp(20px, 5vh, 36px) auto !important;
    padding: 0 !important;
    position: relative !important;
  }

  .battlefield-mat-inlay {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: clamp(380px, 60vw, 540px) !important;
    height: clamp(108px, 27vh, 136px) !important;
    padding: 3px 10px !important;
    border-radius: 16px !important;
    border: 1.5px dashed rgba(212, 175, 55, 0.45) !important;
  }

  .mat-zone-label {
    font-size: 7px !important;
    letter-spacing: 0.8px !important;
  }

  .mat-divider {
    display: none !important;
  }

  .battlefield-row {
    width: 100% !important;
    height: clamp(52px, 13.5vh, 68px) !important;
    min-height: clamp(52px, 13.5vh, 68px) !important;
    max-height: clamp(52px, 13.5vh, 68px) !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .truco-card.table-card {
    width: clamp(66px, 9.8vw, 82px) !important;
    height: clamp(98px, 24.5vh, 122px) !important;
    min-width: clamp(66px, 9.8vw, 82px) !important;
    min-height: clamp(98px, 24.5vh, 122px) !important;
  }

  /* User Player Zone (Bottom of Felt) */
  .player-zone.user-zone {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 0 4px 18px 4px !important;
    margin-bottom: 4px !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
  }

  .user-zone .avatar-timer-badge .timer-number {
    bottom: auto !important;
    top: -8px !important;
  }

  .user-hand {
    height: clamp(114px, 29vh, 136px) !important;
    min-height: clamp(114px, 29vh, 136px) !important;
    max-height: clamp(114px, 29vh, 136px) !important;
    display: flex !important;
    align-items: flex-end !important;
    gap: clamp(8px, 1.8vw, 16px) !important;
  }

  .user-hand .player-card {
    width: clamp(78px, 11.5vw, 92px) !important;
    height: clamp(114px, 29vh, 136px) !important;
    min-width: clamp(78px, 11.5vw, 92px) !important;
    min-height: clamp(114px, 29vh, 136px) !important;
  }

  .user-hand .truco-card.can-play:hover {
    transform: translateY(-12px) scale(1.08) rotate(0deg) !important;
  }

  .user-zone .player-profile {
    gap: 6px !important;
  }

  .user-zone .avatar-ring {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border-width: 2px !important;
  }

  .user-zone .avatar-icon {
    font-size: 24px !important;
  }

  .user-zone .player-details {
    gap: 0 !important;
  }

  .user-zone .player-name-text {
    font-size: 10px !important;
  }

  .user-zone .score-display {
    font-size: 9px !important;
    margin-top: 0 !important;
  }

  .user-zone .badge-mano {
    font-size: 7.5px !important;
    padding: 0 3px !important;
  }

  .user-zone .badge-envido {
    font-size: 7.5px !important;
    padding: 0 3px !important;
  }

  /* Call Shouts Center Badges */
  .zone-call-center {
    min-height: 0 !important;
    padding: 0 4px !important;
  }

  .zone-call-center .badge-active-call {
    font-size: 10px !important;
    padding: 2px 7px !important;
    border-width: 1.5px !important;
    border-radius: 6px !important;
  }

  /* RIGHT SIDEBAR (Anotador + Action Dock) - Wide & Thumb-Friendly */
  .game-sidebar {
    flex: 0 0 clamp(250px, 32vw, 275px) !important;
    width: clamp(250px, 32vw, 275px) !important;
    min-width: 245px !important;
    max-width: 285px !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    padding: 4px 8px !important;
    gap: 5px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-left: 2px solid #3d2a1f !important;
    box-sizing: border-box !important;
    background: #18120e !important;
  }

  /* Chalkboard Scoreboard */
  .scoreboard-wrapper {
    flex: 0 0 auto !important;
    width: 100% !important;
  }

  .anotador-board {
    padding: 3px 6px !important;
    border-width: 2px !important;
    border-radius: 6px !important;
  }

  .anotador-header {
    padding-bottom: 1px !important;
    margin-bottom: 2px !important;
    border-bottom-width: 1px !important;
  }

  .anotador-title {
    font-size: 9.5px !important;
    letter-spacing: 0.5px !important;
  }

  .anotador-target {
    font-size: 9px !important;
  }

  .anotador-columns {
    gap: 4px !important;
  }

  .player-header {
    padding-bottom: 0 !important;
    font-size: 9.5px !important;
  }

  .player-label {
    font-size: 10px !important;
    max-width: 75px !important;
  }

  .score-badge {
    font-size: 11px !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
  }

  .score-phase-label {
    font-size: 8px !important;
    margin-bottom: 1px !important;
  }

  .match-boxes-row {
    gap: 2px !important;
    margin-bottom: 1px !important;
  }

  .match-box {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    border-radius: 3px !important;
    border-width: 1px !important;
  }

  .match-box-svg {
    width: 100% !important;
    height: 100% !important;
  }

  /* Action Controls Dock - LARGE, DISTINCT & THUMB-FRIENDLY */
  .action-dock {
    flex: 0 0 auto !important;
    padding: 6px 8px !important;
    gap: 6px !important;
    border-radius: 8px !important;
    background: #201813 !important;
    border: 1.5px solid #4a3526 !important;
  }

  .dock-header {
    font-size: 10px !important;
    letter-spacing: 1px !important;
    margin-bottom: 2px !important;
    color: #f5d77f !important;
  }

  .dynamic-actions-grid {
    gap: 8px !important;
  }

  .btn-action {
    min-height: 42px !important;
    height: auto !important;
    padding: 8px 6px !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.5) !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    cursor: pointer !important;
  }

  /* Specific Button Colors & Clear Contrast on Mobile */
  .btn-accept {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%) !important;
    border: 1.5px solid #66bb6a !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.5) !important;
  }

  .btn-reject {
    background: linear-gradient(135deg, #c62828 0%, #8e0000 100%) !important;
    border: 1.5px solid #ef5350 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(198, 40, 40, 0.5) !important;
  }

  .btn-call-truco {
    background: linear-gradient(135deg, #e65100 0%, #bf360c 100%) !important;
    border: 1.5px solid #ff9800 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(230, 81, 0, 0.5) !important;
  }

  .btn-call-envido {
    background: linear-gradient(135deg, #0277bd 0%, #01579b 100%) !important;
    border: 1.5px solid #29b6f6 !important;
    color: #ffffff !important;
  }

  .btn-raise {
    background: linear-gradient(135deg, #f57f17 0%, #e65100 100%) !important;
    border: 1.5px solid #ffca28 !important;
    color: #ffffff !important;
  }

  .btn-raise-danger {
    background: linear-gradient(135deg, #d84315 0%, #b71c1c 100%) !important;
    border: 1.5px solid #ff5722 !important;
    color: #ffffff !important;
    grid-column: span 2 !important;
  }

  .dock-bottom-controls {
    gap: 6px !important;
    padding-top: 6px !important;
    margin-top: 4px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
  }

  .tapar-checkbox-label {
    font-size: 11px !important;
    gap: 6px !important;
    color: #d7c8bc !important;
  }

  .tapar-checkbox-label input {
    width: 15px !important;
    height: 15px !important;
    transform: none !important;
  }

  .btn-dock-danger {
    min-height: 32px !important;
    height: 32px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    border: 1px solid #7f2626 !important;
    background: #321919 !important;
    color: #ffcdd2 !important;
    font-weight: 700 !important;
  }

  .btn-dock-gold {
    min-height: 36px !important;
    height: 36px !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
  }

  /* Hide Chat Dock and Wager Dock in Landscape Mobile */
  .criollo-chat-dock,
  .leaderboard-chat-dock,
  .match-wager-dock,
  .sidebar-club-footer {
    display: none !important;
  }
}

/* ---------------------------------------------------------
   MOBILE PORTRAIT FALLBACK (When user dismisses landscape)
   --------------------------------------------------------- */
@media (max-width: 768px) and (orientation: portrait) {
  .table-layout {
    flex-direction: column !important;
    height: calc(100vh - 48px) !important;
    overflow-y: auto !important;
  }

  .felt-table-wrapper {
    min-height: 420px !important;
    height: 58vh !important;
    max-height: 64vh !important;
    flex: none !important;
    padding: 3px !important;
  }

  .table-outer-frame {
    padding: 4px !important;
    border-radius: 16px !important;
  }

  .felt-table {
    padding: 4px 6px !important;
  }

  .table-prop {
    display: none !important;
  }

  .rival-hand {
    height: 88px !important;
    min-height: 88px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .rival-hand .rival-card {
    width: clamp(56px, 15vw, 68px) !important;
    height: clamp(82px, 22vw, 100px) !important;
    min-width: clamp(56px, 15vw, 68px) !important;
    min-height: clamp(82px, 22vw, 100px) !important;
  }

  .battlefield-arena {
    max-width: 350px !important;
  }

  .battlefield-mat-inlay {
    width: clamp(260px, 78vw, 320px) !important;
    height: clamp(120px, 18vh, 146px) !important;
    padding: 3px !important;
    border-radius: 14px !important;
  }

  .battlefield-row {
    height: clamp(58px, 9vh, 70px) !important;
    min-height: clamp(58px, 9vh, 70px) !important;
  }

  .truco-card.table-card {
    width: clamp(74px, 19.5vw, 90px) !important;
    height: clamp(110px, 29vw, 134px) !important;
    min-width: clamp(74px, 19.5vw, 90px) !important;
    min-height: clamp(110px, 29vw, 134px) !important;
  }

  .user-hand {
    height: clamp(138px, 22vh, 162px) !important;
    min-height: clamp(138px, 22vh, 162px) !important;
    display: flex !important;
    align-items: flex-end !important;
    gap: clamp(8px, 2.5vw, 16px) !important;
  }

  .user-hand .player-card {
    width: clamp(94px, 25vw, 112px) !important;
    height: clamp(138px, 37vw, 164px) !important;
    min-width: clamp(94px, 25vw, 112px) !important;
    min-height: clamp(138px, 37vw, 164px) !important;
  }

  .game-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    border-left: none !important;
    border-top: 2px solid #3d2a1f !important;
    padding: 10px !important;
    flex: none !important;
  }

  .match-box {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }

  .match-box-svg {
    width: 100% !important;
    height: 100% !important;
  }
}

/* =========================================================
   SEASON BANNER & TOURNAMENT PREVIEW
   ========================================================= */
.season-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.12) 0%, rgba(255, 152, 0, 0.05) 100%);
  border: 1px dashed rgba(255, 213, 79, 0.4);
  border-radius: 6px;
  padding: 4px 8px;
  margin-bottom: 2px;
  flex: 0 0 auto;
}

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

.season-title-text {
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #ffd54f;
}

.season-countdown-badge {
  font-size: 9px;
  color: #cfd8dc;
  font-weight: 700;
}

.btn-season-prizes-pill {
  background: linear-gradient(135deg, #ffd54f 0%, #ff8f00 100%);
  color: #1a0f02;
  border: none;
  border-radius: 12px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: transform 0.15s ease;
}

.btn-season-prizes-pill:hover {
  transform: scale(1.05);
}

/* =========================================================
   SEASON PRIZES MODAL
   ========================================================= */
.season-prizes-card {
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  border-color: #ffd54f;
  box-shadow: 0 0 30px rgba(255, 213, 79, 0.25);
}

.season-prizes-header {
  text-align: center;
  margin-bottom: 14px;
}

.season-trophy-big {
  font-size: 38px;
  filter: drop-shadow(0 0 12px rgba(255, 213, 79, 0.6));
  margin-bottom: 4px;
}

.season-modal-timer {
  display: inline-block;
  background: rgba(255, 213, 79, 0.15);
  border: 1px solid rgba(255, 213, 79, 0.4);
  color: #ffd54f;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 12px;
  margin-bottom: 6px;
}

.season-desc-modal {
  font-size: 12px;
  color: #d7ccc8;
  line-height: 1.4;
  margin: 0;
}

.prizes-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.prize-tier-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
}

.prize-tier-card.gold-tier {
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.2) 0%, rgba(255, 143, 0, 0.08) 100%);
  border: 1.5px solid #ffd54f;
  box-shadow: 0 0 14px rgba(255, 213, 79, 0.2);
}

.prize-tier-card.silver-tier {
  background: linear-gradient(135deg, rgba(207, 216, 220, 0.15) 0%, rgba(144, 164, 174, 0.06) 100%);
  border: 1.5px solid #b0bec5;
}

.prize-tier-card.bronze-tier {
  background: linear-gradient(135deg, rgba(215, 204, 200, 0.15) 0%, rgba(161, 136, 127, 0.06) 100%);
  border: 1.5px solid #bcaaa4;
}

.prize-medal {
  font-size: 26px;
  flex-shrink: 0;
}

.prize-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.prize-rank-title {
  font-family: var(--font-title);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--gold-light);
}

.prize-highlight {
  font-size: 13.5px;
  color: #fff;
  font-weight: 800;
}

.prize-digital {
  font-size: 11px;
  color: #cfd8dc;
}

.season-legal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
  text-align: center;
  color: #a1887f;
  line-height: 1.35;
}

/* =========================================================
   FREE PULPERÍA WAITING BONUS CARD
   ========================================================= */
.free-bonus-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #2b1f14 0%, #1a120b 100%);
  border: 1.5px solid #ffd54f;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 213, 79, 0.15);
}

.bonus-badge {
  position: absolute;
  top: -8px;
  right: 14px;
  background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 1px 8px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.bonus-icon {
  font-size: 32px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.bonus-details {
  flex: 1;
  text-align: left;
}

.bonus-details strong {
  font-size: 13.5px;
  color: #ffd54f;
  display: block;
}

.bonus-details p {
  font-size: 11.5px;
  color: #cfd8dc;
  margin: 2px 0 0;
}

.btn-claim-bonus {
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 8px;
}

/* =========================================================
   STORE COSMETICS: MAZOS & TAPETES
   ========================================================= */
.cosmetics-section-title {
  font-family: var(--font-title);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--gold-light);
  margin: 12px 0 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 4px;
}

.cosmetics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.cosmetic-card {
  background: #19120e;
  border: 1.5px solid #4a3526;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  position: relative;
  transition: all 0.2s ease;
}

.cosmetic-card.equipped {
  border-color: #ffd54f;
  background: linear-gradient(135deg, #261b12 0%, #1b120c 100%);
  box-shadow: 0 0 12px rgba(255, 213, 79, 0.25);
}

.cosmetic-badge-pill,
.cosmetic-badge-rarity {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 8.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffd54f;
  letter-spacing: 0.5px;
}

.cosmetic-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.cosmetic-icon-swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.cosmetic-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.cosmetic-desc {
  font-size: 10.5px;
  color: #a89f91;
  margin: 0 0 8px;
  line-height: 1.35;
}

.cosmetic-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.cosmetic-price-tag {
  font-size: 12px;
  font-weight: 900;
  color: #ffd54f;
}

.btn-cosmetic-action {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-cosmetic-action.btn-buy {
  background: linear-gradient(135deg, #ffd54f 0%, #ff8f00 100%);
  color: #1a0f02;
}

.btn-cosmetic-action.btn-equip {
  background: #2e7d32;
  color: #fff;
}

.btn-cosmetic-action.btn-equipped {
  background: rgba(255, 213, 79, 0.2);
  color: #ffd54f;
  border: 1px solid #ffd54f;
  cursor: default;
}

/* =========================================================
   DYNAMIC TABLE FELT THEMES (Equippable Skins)
   ========================================================= */
.felt-table.felt-theme-green {
  background-color: #0b3d26 !important;
  background-image: 
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(30, 138, 84, 0.96) 0%, rgba(13, 72, 44, 0.95) 45%, #052417 84%, #03150d 100%) !important;
}

.felt-table.felt-theme-blue {
  background-color: #0a2540 !important;
  background-image: 
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(25, 90, 140, 0.96) 0%, rgba(12, 48, 85, 0.95) 45%, #06182c 84%, #030d17 100%) !important;
  border-color: rgba(129, 212, 250, 0.55) !important;
}

.felt-table.felt-theme-leather {
  background-color: #3e2723 !important;
  background-image: 
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(109, 76, 65, 0.96) 0%, rgba(78, 52, 46, 0.95) 45%, #27140e 84%, #150905 100%) !important;
  border-color: rgba(215, 204, 200, 0.5) !important;
}

.felt-table.felt-theme-crimson {
  background-color: #3e0c15 !important;
  background-image: 
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(136, 14, 30, 0.96) 0%, rgba(85, 8, 18, 0.95) 45%, #2a050b 84%, #150205 100%) !important;
  border-color: rgba(244, 143, 177, 0.5) !important;
}

.felt-table.felt-theme-mud {
  background-color: #2b1d14 !important;
  background-image: 
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(94, 62, 40, 0.96) 0%, rgba(68, 44, 28, 0.95) 45%, #23150c 84%, #120904 100%) !important;
  border-color: rgba(193, 145, 110, 0.6) !important;
}

/* =========================================================
   STORE SHORTCUTS & CATEGORY FILTER BAR
   ========================================================= */
.btn-pill-store {
  background: linear-gradient(135deg, #ffb300 0%, #ff8f00 100%);
  color: #1a0f02;
  font-weight: 800;
  font-size: 12.5px;
  border: 1px solid #ffd54f;
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 179, 0, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-pill-store:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(255, 179, 0, 0.55);
  filter: brightness(1.1);
}

.btn-store-banner {
  background: linear-gradient(135deg, #3a2214 0%, #20120a 100%);
  border: 2px solid #ffb300;
  color: #ffd54f;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}
.btn-store-banner:hover {
  background: linear-gradient(135deg, #4e2f1c 0%, #2a180d 100%);
  border-color: #ffe082;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 179, 0, 0.4);
}
.btn-store-banner .btn-icon {
  font-size: 26px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.btn-store-banner .btn-text strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}
.btn-store-banner .btn-text small {
  display: block;
  font-size: 11px;
  color: #ffd54f;
  margin-top: 2px;
}

.btn-store-top {
  background: linear-gradient(135deg, #ffb300 0%, #ff8f00 100%) !important;
  color: #1a0f02 !important;
  font-weight: 800 !important;
  border: 1px solid #ffe082 !important;
}
.btn-store-top:hover {
  filter: brightness(1.15) !important;
}

.store-filter-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #19120e;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 4px 10px;
  margin: 0 0 12px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  scrollbar-width: thin;
}
.store-filter-bar::-webkit-scrollbar {
  height: 4px;
}
.store-filter-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.btn-store-filter {
  background: #251c16;
  border: 1px solid #4a3526;
  color: #d7c8bc;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-store-filter:hover {
  background: #3a2a20;
  color: #fff;
}
.btn-store-filter.active {
  background: linear-gradient(135deg, #ffd54f 0%, #ff8f00 100%);
  color: #1a0f02;
  border-color: #ffd54f;
  box-shadow: 0 2px 8px rgba(255, 179, 0, 0.4);
}

@media (max-width: 540px) {
  .cosmetics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 520px) {
  .wallet-card {
    max-height: 94vh !important;
    max-height: 94dvh !important;
    padding: 10px 14px !important;
  }
  .wallet-icon-big {
    display: none !important;
  }
  .wallet-header {
    margin-bottom: 4px !important;
  }
  .wallet-header .modal-title {
    font-size: 14px !important;
    margin-bottom: 2px !important;
  }
  .wallet-current-balance {
    padding: 3px 10px !important;
    font-size: 11px !important;
  }
  .wallet-current-balance strong {
    font-size: 15px !important;
  }
  .wallet-tabs {
    margin-bottom: 6px !important;
  }
  .wallet-tab-btn {
    padding: 4px 6px !important;
    font-size: 11px !important;
  }
  .tab-description {
    display: none !important;
  }
}

/* =========================================================
   CUSTOM CARD BACK ARTWORKS (Equipped Deck Skins)
   ========================================================= */
.card-back-custom {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3), 0 2px 6px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  padding: 6px;
  text-align: center;
}
.card-back-custom .cb-crest {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}
.card-back-custom .cb-title {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 4px;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.card-back-custom .cb-stars {
  font-size: 10px;
  letter-spacing: 2px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
}

/* Waiting for Rival Panel in Private Table */
.waiting-rival-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(18, 12, 8, 0.9);
  border: 1.5px dashed rgba(212, 175, 55, 0.6);
  border-radius: 12px;
  padding: 16px 14px;
  text-align: center;
  grid-column: 1 / -1;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  animation: pulse-border 2.5s infinite ease-in-out;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(212, 175, 55, 0.4); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7); }
  50% { border-color: rgba(212, 175, 55, 0.9); box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2); }
}

.waiting-rival-panel .waiting-header {
  font-size: 15px;
  font-weight: 800;
  color: #ffd54f;
  letter-spacing: 0.5px;
}

.waiting-rival-panel .waiting-code-chip {
  font-size: 14px;
  font-weight: 700;
  color: #e0e0e0;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.waiting-rival-panel .waiting-code-chip strong {
  color: #81d4fa;
  font-size: 16px;
  letter-spacing: 2px;
  margin-left: 4px;
}

/* -------------------------------------------------------------
   MUSIC TOGGLE BUTTON
   ------------------------------------------------------------- */
#btn-music-toggle {
  transition: all 0.25s ease;
}

#btn-music-toggle.active-music {
  background: linear-gradient(180deg, #2a3d24 0%, #172414 100%) !important;
  border-color: #66bb6a !important;
  color: #c8e6c9 !important;
  box-shadow: 0 0 10px rgba(102, 187, 106, 0.45) !important;
}

#btn-music-toggle.muted-music {
  opacity: 0.65;
  filter: grayscale(0.6);
  border-color: #666 !important;
}

/* -------------------------------------------------------------
   RECONNECT MODAL (30s GRACE PERIOD)
   ------------------------------------------------------------- */
.reconnect-card {
  max-width: 420px;
  background: radial-gradient(circle at center, #241a14 0%, #140d09 100%);
  border: 2px solid #d4af37;
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(212, 175, 55, 0.35);
  animation: modalPopIn 0.35s cubic-bezier(0.18, 0.9, 0.28, 1.15);
}

.reconnect-icon-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  background: rgba(212, 175, 55, 0.12);
  border: 2px solid #d4af37;
  border-radius: 50%;
  margin-bottom: 14px;
}

.reconnect-icon {
  font-size: 34px;
}

.reconnect-pulse-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  background: #ff5252;
  border: 2px solid #fff;
  border-radius: 50%;
  animation: dotPulse 1.2s infinite ease-in-out;
}

.reconnect-title {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 1.5px;
  margin: 0 0 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.reconnect-msg {
  font-size: 14px;
  color: #e0d5c1;
  margin: 0 0 18px;
  line-height: 1.4;
}

.reconnect-countdown-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 14px 0 20px;
}

.reconnect-wait-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #d4af37;
}

.reconnect-ring-wrapper {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.reconnect-svg .rc-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 6;
}

.reconnect-svg .rc-progress {
  fill: none;
  stroke: #ff9800;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 263.89;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.95s linear;
  filter: drop-shadow(0 0 8px rgba(255, 152, 0, 0.7));
}

.reconnect-num {
  position: absolute;
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}

.reconnect-subtext {
  font-size: 12px;
  color: #9e8e7a;
  line-height: 1.4;
}

/* -------------------------------------------------------------
   TIMEOUT LOSS MODAL (30s TURN EXPIRED / ABANDONMENT)
   ------------------------------------------------------------- */
.timeout-card {
  max-width: 440px;
  width: 90%;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, #2a110a 0%, #150804 100%);
  border: 2px solid #d32f2f;
  box-shadow: 0 0 35px rgba(211, 47, 47, 0.5), 0 10px 40px rgba(0, 0, 0, 0.9);
  padding: 28px 24px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  color: #f5ebe6;
  animation: modalPopIn 0.35s cubic-bezier(0.18, 0.9, 0.28, 1.15);
}

.timeout-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #d32f2f, #ff5252, #d32f2f);
}

.timeout-icon-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(211, 47, 47, 0.18);
  border: 2px solid #ff5252;
  margin-bottom: 16px;
  box-shadow: 0 0 20px rgba(255, 82, 82, 0.4);
}

.timeout-icon {
  font-size: 40px;
  animation: timerLossPulse 1.2s infinite ease-in-out;
}

@keyframes timerLossPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(10deg); }
}

.timeout-badge-alert {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #d32f2f;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1.5px solid #fff;
  letter-spacing: 0.5px;
}

.timeout-title {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 900;
  color: #ff5252;
  letter-spacing: 1px;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(255, 82, 82, 0.6);
}

.timeout-subtitle {
  font-size: 15px;
  font-weight: 700;
  color: #ffd54f;
  margin-bottom: 12px;
}

.timeout-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #d7ccc8;
  margin-bottom: 22px;
  padding: 0 8px;
}

.timeout-actions-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}



/* =================================================================
   SALAS DE JUEGO / MESAS CRIOLLAS (ROOM TIERS)
================================================================= */
.lobby-rooms-header {
  margin-top: 14px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lobby-section-tag {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-light, #ffd54f);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.lobby-section-hint {
  font-size: 11.5px;
  color: #a89f91;
}

.lobby-rooms-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

@media (max-width: 680px) {
  .lobby-rooms-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.room-tier-card {
  position: relative;
  background: linear-gradient(145deg, #2a1f18 0%, #1a120d 100%);
  border: 1.5px solid #4a3828;
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.room-tier-card:hover {
  transform: translateY(-2px);
  border-color: #ffd54f;
  box-shadow: 0 4px 14px rgba(255, 213, 79, 0.25);
}

.room-tier-card.active {
  background: linear-gradient(145deg, #3d2a17 0%, #241609 100%);
  border: 2px solid #ffd54f;
  box-shadow: 0 0 16px rgba(255, 213, 79, 0.45), inset 0 0 8px rgba(255, 213, 79, 0.15);
}

.room-tier-badge {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #e0d0b8;
  text-transform: uppercase;
}

.room-tier-badge.badge-popular {
  background: #2e7d32;
  color: #fff;
}

.room-tier-badge.badge-criollo {
  background: #c62828;
  color: #fff;
}

.room-tier-badge.badge-vip {
  background: #6a1b9a;
  color: #fff;
}

.room-tier-badge.badge-legend {
  background: linear-gradient(135deg, #ffd54f 0%, #ff8f00 100%);
  color: #1a120d;
}

.room-tier-icon {
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.room-tier-name {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.room-tier-wager {
  font-size: 14px;
  font-weight: 900;
  color: #ffd54f;
}

.room-tier-pot {
  font-size: 10px;
  color: #b0a495;
  font-weight: 600;
}

/* =================================================================
   BOTÓN DESTACADO: TORNEOS DE ELIMINACIÓN DIRECTA
================================================================= */
.btn-tournament-banner {
  background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 60%, #311b92 100%);
  border: 2px solid #ba68c8;
  box-shadow: 0 4px 18px rgba(123, 31, 162, 0.45);
  margin-bottom: 8px;
  animation: tournPulse 2.5s infinite alternate ease-in-out;
}

@keyframes tournPulse {
  0% { box-shadow: 0 4px 18px rgba(123, 31, 162, 0.45); }
  100% { box-shadow: 0 6px 26px rgba(186, 104, 200, 0.7); transform: scale(1.01); }
}

.btn-tournament-banner:hover {
  background: linear-gradient(135deg, #8e24aa 0%, #6a1b9a 100%);
  border-color: #ffd54f;
}

/* =================================================================
   MODAL: TORNEOS DE ELIMINACIÓN DIRECTA (BRACKET & LOBBY)
================================================================= */
.tournament-card {
  max-width: 820px;
  width: 95%;
  background: linear-gradient(180deg, #1f140e 0%, #120a06 100%);
  border: 2px solid #ba68c8;
  border-radius: 16px;
  padding: 22px;
  color: #fff;
  max-height: 90vh;
  overflow-y: auto;
}

.tournament-header {
  text-align: center;
  margin-bottom: 20px;
}

.tournament-trophy-icon {
  font-size: 42px;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 12px rgba(255, 213, 79, 0.6));
  animation: floatTrophy 2.5s infinite alternate ease-in-out;
}

@keyframes floatTrophy {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

.tournament-subtitle {
  font-size: 13.5px;
  color: #d1c4b8;
  max-width: 580px;
  margin: 6px auto 0 auto;
}

.tournament-tiers-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tournament-tier-box {
  background: linear-gradient(145deg, #2a1b12 0%, #190f0a 100%);
  border: 1.5px solid #4a3424;
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.tournament-tier-box:hover {
  border-color: #ffd54f;
  transform: translateY(-2px);
}

.tournament-tier-box.featured-tier {
  border-color: #ba68c8;
  background: linear-gradient(145deg, #2e1828 0%, #1c0e18 100%);
}

.tournament-tier-box.high-roller-tier {
  border-color: #ffd54f;
  background: linear-gradient(145deg, #3d2c14 0%, #211608 100%);
}

.tourn-tier-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tourn-tier-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.tourn-tier-badge.badge-fast {
  background: #1976d2;
  color: #fff;
}

.tourn-tier-badge.badge-pop {
  background: #7b1fa2;
  color: #fff;
}

.tourn-tier-badge.badge-legend {
  background: linear-gradient(135deg, #ffd54f 0%, #ff8f00 100%);
  color: #261603;
}

.tourn-tier-fee {
  font-size: 13px;
  color: #ffd54f;
}

.tourn-tier-content {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.tourn-tier-icon {
  font-size: 34px;
  flex-shrink: 0;
}

.tourn-tier-info {
  flex: 1;
}

.tourn-tier-name {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px 0;
}

.tourn-tier-desc {
  font-size: 12.5px;
  color: #c7b8aa;
  margin: 0 0 6px 0;
}

.tourn-tier-prizes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prize-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.prize-tag.gold {
  color: #ffd54f;
  border: 1px solid rgba(255, 213, 79, 0.4);
}

.prize-tag.silver {
  color: #e0e0e0;
  border: 1px solid rgba(224, 224, 224, 0.4);
}

/* =================================================================
   BRACKET VIEW (ÁRBOL DE ELIMINACIÓN DIRECTA)
================================================================= */
.tournament-bracket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #4a3424;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.btn-bracket-back {
  background: #332115;
  color: #e0d0b8;
  border: 1px solid #5a402a;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.btn-bracket-back:hover {
  background: #4a3424;
  color: #fff;
}

.bracket-title-box {
  text-align: center;
}

.bracket-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: #ffd54f;
  margin: 0;
}

.bracket-pot-badge {
  font-size: 12px;
  color: #a5d6a7;
  font-weight: 700;
}

.bracket-round-indicator {
  font-size: 12.5px;
  font-weight: 800;
  background: #7b1fa2;
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
}

.bracket-tree-container {
  display: flex;
  justify-content: space-around;
  gap: 16px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding: 10px 0;
}

.bracket-column {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  min-width: 170px;
  gap: 16px;
}

.bracket-round-title {
  font-size: 12px;
  font-weight: 800;
  color: #d1c4b8;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.bracket-match-node {
  background: #25160d;
  border: 1.5px solid #442d1b;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.bracket-match-node.user-match {
  border-color: #ffd54f;
  box-shadow: 0 0 12px rgba(255, 213, 79, 0.35);
}

.bracket-player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid #332013;
  color: #c7b8aa;
}

.bracket-player-row:last-child {
  border-bottom: none;
}

.bracket-player-row.is-user {
  background: rgba(255, 213, 79, 0.15);
  color: #ffd54f;
  font-weight: 800;
}

.bracket-player-row.winner {
  color: #69f0ae;
}

.bracket-player-row.loser {
  opacity: 0.45;
  text-decoration: line-through;
}

.tournament-action-dock {
  background: linear-gradient(135deg, #2b1b11 0%, #1a0f09 100%);
  border: 1.5px solid #ffd54f;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.match-rival-label {
  font-size: 12px;
  color: #b0a495;
  display: block;
}

.match-rival-name {
  font-size: 16px;
  color: #fff;
}

/* Champion celebration */
.champion-trophy-anim {
  font-size: 64px;
  text-align: center;
  margin-bottom: 12px;
  animation: floatTrophy 2s infinite alternate ease-in-out;
}

.champion-title {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  font-weight: 900;
  color: #ffd54f;
  text-align: center;
  margin: 0 0 6px 0;
  text-shadow: 0 2px 12px rgba(255, 213, 79, 0.6);
}

.champion-subtitle {
  text-align: center;
  font-size: 14px;
  color: #e0d0b8;
  margin-bottom: 20px;
}

.champion-prize-badge {
  background: rgba(255, 213, 79, 0.15);
  border: 1.5px solid #ffd54f;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  margin-bottom: 22px;
}

.champion-prize-badge span {
  display: block;
  font-size: 12px;
  color: #d1c4b8;
  margin-bottom: 4px;
}

.champion-prize-badge strong {
  font-size: 22px;
  color: #ffd54f;
  font-weight: 900;
}
