* { box-sizing: border-box; }
:root {
  /* Modern Palette */
  --bg-gradient-1: #e0eafc;
  --bg-gradient-2: #cfdef3;
  
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  
  /* Table */
  --table-gradient-1: #1a4a2a;
  --table-gradient-2: #0f2e1a;
  
  /* Accents */
  --accent: #f59e0b;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --accent-glow: rgba(245, 158, 11, 0.4);
  
  --green: #10b981;
  --red: #ef4444;
  --blue: #3b82f6;
  
  /* Text */
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #ffffff;
  
  --border: rgba(0,0,0,0.08);
  
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(-45deg, #e0eafc, #cfdef3, #e2ebf0, #fdfbfb);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: var(--text);
  overflow-x: hidden;
}

/* ===== SCREENS ===== */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; flex-direction: column; }

/* ===== WELCOME SCREEN ===== */
#welcomeScreen {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.welcome-box {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--glass-shadow);
  animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.welcome-logo {
  width: 140px;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
  animation: float 6s ease-in-out infinite;
}

.welcome-box h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 8px 0;
  background: var(--table-gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

.welcome-box p { 
  color: var(--text-muted); 
  margin: 0 0 32px 0; 
  font-size: 1rem; 
  font-weight: 400;
}

.welcome-box input {
  width: 100%;
  padding: 16px 20px;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid transparent;
  border-radius: 12px;
  background: rgba(255,255,255,0.8);
  color: var(--text);
  margin-bottom: 16px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.welcome-box input:focus { 
  outline: none; 
  border-color: var(--accent); 
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.welcome-box input::placeholder { color: var(--text-muted); opacity: 0.7; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  width: 100%;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 8px 20px var(--accent-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255,255,255,0.5);
  border: 2px solid var(--border);
  color: var(--text-muted);
  margin-top: 12px;
  width: 100%;
}

.btn-secondary:hover { 
  border-color: var(--accent); 
  color: var(--accent); 
  background: #fff;
}

.app-version {
  position: fixed;
  bottom: 16px;
  right: 16px;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.15);
  font-weight: 400;
  user-select: none;
  pointer-events: none;
  z-index: 2;
}

/* ===== SCREENS ===== */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; flex-direction: column; }

/* ===== NAME MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: var(--glass-shadow);
}

.modal h2 { 
  margin: 0 0 8px 0; 
  color: var(--text);
  font-weight: 800;
  font-size: 1.5rem;
}

.modal p { color: var(--text-muted); margin: 0 0 24px 0; font-size: 1rem; }

.modal input { 
  width: 100%; 
  padding: 14px 16px; 
  font-size: 1rem; 
  border: 2px solid transparent; 
  border-radius: 12px; 
  background: rgba(255,255,255,0.8); 
  color: var(--text); 
  margin-bottom: 16px; 
  transition: all 0.3s ease;
}
.modal input:focus { outline: none; border-color: var(--accent); background: #fff; }

/* ===== GAME SCREEN ===== */
#gameScreen { background: transparent; }

.game-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  z-index: 10;
}

.game-header h1 { 
  font-size: 1.4rem; 
  margin: 0; 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.header-logo {
  width: 36px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.room-code {
  background: var(--bg-gradient-1);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: 'Outfit', monospace;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s;
  font-weight: 600;
}
.room-code:hover { 
  background: #fff; 
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.game-status { 
  color: var(--text-muted); 
  font-size: 0.9rem; 
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.game-status::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.game-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  grid-template-rows: 1fr auto;
  gap: 0;
  flex: 1;
  min-height: 0;
  height: 100%; /* Ensure layout takes full height */
  overflow: hidden; /* Prevent layout from growing beyond viewport */
}

/* Sidebar */
.sidebar {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  grid-row: 1 / 3;
  overflow-y: auto; /* Allow sidebar to scroll independently */
  max-height: 100vh; /* Constrain height to viewport */
}

.sidebar h3 { 
  margin: 0 0 12px 0; 
  font-size: 0.8rem; 
  text-transform: uppercase; 
  color: var(--text-muted); 
  letter-spacing: 1.5px; 
  font-weight: 700;
}

.players-list { display: flex; flex-direction: column; gap: 8px; }

.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 16px;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.player-row.is-turn { 
  border-color: var(--accent); 
  background: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
  transform: scale(1.02);
}

.player-row.is-you .player-name { color: var(--green); font-weight: 700; }

.player-avatar {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; color: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  position: relative; /* For absolute positioning of last card */
}

.player-last-card {
  position: absolute;
  width: 24px;
  height: 36px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 2;
  transform: rotate(10deg) translate(10px, -5px);
  border: 1px solid #fff;
  background-color: #fff;
}

.player-info { flex: 1; min-width: 0; }
.player-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.player-cards-count {
  background: var(--bg-gradient-1);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

/* Scoreboard */
.scoreboard { 
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.score-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-size: 0.85rem;
}

.score-table th {
  text-align: left;
  padding: 6px 4px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.score-table th:not(:first-child) { text-align: center; }

.score-table td {
  padding: 6px 4px;
  background: var(--bg-gradient-1);
}
.score-table td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.score-table td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.score-table td:not(:first-child) { text-align: center; }

.score-table .score-name { 
  font-weight: 600;
  color: var(--text);
}
.score-table .score-total { 
  font-weight: 800; 
  color: var(--accent);
}
.score-table .has-bonus { color: var(--green); font-weight: 700; }

.start-section { margin-top: auto; }
.btn-start {
  background: var(--accent-gradient);
  color: #ffffff;
  width: 100%;
  font-size: 1rem;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 4px 12px var(--accent-glow);
}
.btn-start:hover:not(:disabled) { 
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--accent-glow);
}
.btn-start.ready {
  background: var(--green);
  box-shadow: none;
  opacity: 0.8;
}
.start-hint { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-top: 10px; font-weight: 500; }

/* Table area */
.table-area {
  background: radial-gradient(circle at center, var(--table-gradient-1) 0%, var(--table-gradient-2) 100%);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  border-radius: 24px;
  margin: 16px;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.5), 0 10px 40px rgba(0,0,0,0.2);
  border: 4px solid #2d3a2f;
  position: relative;
}

/* Felt texture overlay */
.table-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

.turn-banner {
  text-align: center;
  padding: 12px 24px;
}

/* Winner Message Overlay */
.winner-message {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.winner-message.active {
  opacity: 1;
  pointer-events: auto;
}

.winner-message.hidden {
  display: none;
}

.winner-content {
  background: #fff;
  padding: 32px;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 90%;
  width: 320px;
}

.winner-message.active .winner-content {
  transform: scale(1);
}

.winner-content h2 {
  margin: 0 0 16px 0;
  color: var(--text-muted);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.winner-name {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.winner-details {
  font-size: 1rem;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 24px;
  min-height: 1.5em;
}

  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  border-radius: 16px;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.1);
  max-width: 400px;
  margin: 0 auto;
  z-index: 2;
}
.turn-banner.your-turn { 
  background: rgba(245, 158, 11, 0.2); 
  color: #ffd700; 
  font-weight: 700; 
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
  animation: float 3s ease-in-out infinite;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  flex: 1;
  z-index: 2;
}

.suit-column {
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.suit-header {
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(0,0,0,0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.suit-header.oros { color: #ffd700; border: 1px solid rgba(255, 215, 0, 0.3); }
.suit-header.copas { color: #ff6b6b; border: 1px solid rgba(255, 107, 107, 0.3); }
.suit-header.espadas { color: #60a5fa; border: 1px solid rgba(96, 165, 250, 0.3); }
.suit-header.bastos { color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.3); }

.suit-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  width: 100%;
}
.suit-empty { color: rgba(255,255,255,0.3); font-size: 0.9rem; font-style: italic; margin-top: 20px; }

/* Card stack */
.card-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  height: 240px;
  justify-content: center;
  width: 100%;
}
.card-sprite.stacked {
  position: absolute;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 -2px 6px rgba(0,0,0,0.2);
}

/* Card sprite */
.card-sprite {
  width: 68px;
  height: 102px;
  background-image: url('/imgs/baraja_esp.png');
  background-size: 1300% 400%;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  background-color: #fff;
}
.card-sprite.large {
  width: 90px;
  height: 135px;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
.card-sprite.dimmed {
  filter: brightness(0.4) grayscale(0.3);
}

/* Hand area */
.hand-area {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  z-index: 10;
  position: relative;
}
.hand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}
.hand-header h3 { margin: 0; font-size: 1rem; color: var(--text); font-weight: 700; }
.hand-hint { 
  color: var(--text-muted); 
  font-size: 0.9rem; 
  flex: 1; 
  text-align: center; 
  font-weight: 500;
  background: var(--bg-gradient-1);
  padding: 6px 12px;
  border-radius: 8px;
}

.hand-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 10px 0;
}
.hand-card {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border-radius: 8px;
  transform-origin: bottom center;
}
.hand-card:hover { 
  transform: translateY(-12px) scale(1.05); 
  z-index: 10;
}
.hand-card.playable { 
  box-shadow: 0 0 0 3px var(--accent), 0 8px 20px rgba(245, 158, 11, 0.3); 
  animation: float 4s ease-in-out infinite;
}
.hand-card.playable:hover { 
  transform: translateY(-16px) scale(1.1); 
  box-shadow: 0 0 0 4px var(--accent), 0 12px 24px rgba(245, 158, 11, 0.4);
}
.hand-card.disabled { opacity: 0.6; cursor: not-allowed; filter: grayscale(0.8); }
.hand-card.disabled:hover { transform: none; }

.btn-pass {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  color: #fff;
  padding: 18px 48px;
  font-size: 1.2rem;
  border-radius: 16px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  display: none;
}
.btn-pass:not(:disabled) {
  display: block;
  animation: pulse-pass 2s ease-in-out infinite;
}
.btn-pass:hover:not(:disabled) { 
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 12px 32px rgba(239, 68, 68, 0.6);
  filter: brightness(1.1);
}
.btn-pass:disabled {
  display: none;
}

@keyframes pulse-pass {
  0% { box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 8px 32px rgba(239, 68, 68, 0.7); }
  100% { box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4); }
}

/* Log */
.log-section { 
  padding: 16px 24px; 
  border-top: 1px solid var(--border); 
  background: #fff; 
  max-height: 120px; 
  overflow-y: auto; 
}
.log-section h4 { 
  margin: 0 0 8px 0; 
  font-size: 0.75rem; 
  text-transform: uppercase; 
  color: var(--text-muted); 
  letter-spacing: 1px;
  font-weight: 700;
}
#log { 
  font-family: 'Outfit', monospace; 
  font-size: 0.85rem; 
  color: var(--text-muted); 
  white-space: pre-wrap; 
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 800px) {
  .game-layout { 
    grid-template-columns: 1fr; 
    grid-template-rows: auto auto auto;
  }
  /* Mesa y mano primero, sidebar al final */
  .table-area { 
    order: 1; 
    margin: 0; 
    border-radius: 0; 
    border: none;
    border-bottom: 4px solid #1a4a2a;
  }
  .hand-area { order: 2; }
  .sidebar { 
    order: 3; 
    grid-row: auto; 
    border-right: none; 
    border-top: 1px solid var(--border); 
    flex-direction: column; 
    flex-wrap: nowrap; 
    background: #fff;
  }
  .sidebar > div { flex: 0 1 auto; width: 100%; }
  .start-section { margin-top: 0; }
  .table-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .suit-column { padding: 6px 2px; }
  .card-sprite { width: 74px; height: 111px; }
  .card-sprite.large { width: 96px; height: 144px; }
  .card-stack { height: 260px; }
  .log-section { order: 4; }
}
@media (max-width: 500px) {
  .table-grid { grid-template-columns: repeat(4, 1fr); gap: 2px; }
  .suit-column { padding: 4px 2px; border-radius: 6px; }
  .suit-header { font-size: 0.7rem; margin-bottom: 4px; padding: 2px 6px; }
  .card-sprite { width: 80px; height: 120px; }
  .card-sprite.large { width: 104px; height: 156px; }
  .card-stack { height: 320px; }
}

/* ===== PARTICLES ===== */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

#table-effects {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  overflow: hidden;
  pointer-events: none;
  border-radius: 24px;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  pointer-events: none;
  animation: float-particle linear infinite;
  opacity: 0.7;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100px) translateX(20px) rotate(360deg);
    opacity: 0;
  }
}

.hand-hint.must-lower {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
  font-weight: 700;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) translateX(var(--tx, 0)) rotate(var(--rotate, 360deg));
    opacity: 0.3;
  }
}

/* Game Actions */
.game-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  padding-bottom: 2rem;
}

.game-actions .btn {
  width: auto;
  flex: 1;
  min-width: 200px;
}

.game-actions.compact {
  margin-top: 1rem;
  padding-bottom: 1rem;
}

.game-actions.compact .btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  min-width: auto;
  flex: 0 1 auto;
}

.btn-whatsapp {
  background: #25D366;
  color: white;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}
.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
  filter: brightness(1.1);
}

.btn-kick {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: auto;
  padding: 4px 8px;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.btn-kick:hover {
  opacity: 1;
  transform: scale(1.1);
}


.btn-danger {
  background: var(--red);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
  filter: brightness(1.1);
}

