/* SorpresaBox · estilos base (compartidos por todas las pantallas) */
:root {
  --bg: #0a0a0f;
  --bg2: #11111a;
  --card: #1a1a25;
  --card-2: #22222e;
  --fg: #f5f5f5;
  --muted: #94a3b8;
  --border: #2a2a3a;
  --primary: #f59e0b;
  --primary-2: #fbbf24;
  --emerald: #10b981;
  --red: #ef4444;
  --sky: #3b82f6;
  --violet: #8b5cf6;
  --slate: #64748b;
  --radius: 0.75rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; color: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1rem; border-radius: var(--radius); border: 0; cursor: pointer;
  font-weight: 600; transition: all 0.15s; background: var(--card-2); color: var(--fg);
}
.btn:hover { background: var(--border); }
.btn-primary { background: var(--primary); color: #1a1a00; }
.btn-primary:hover { background: var(--primary-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); }
.btn-sm { padding: 0.375rem 0.625rem; font-size: 0.875rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.input, select, textarea {
  width: 100%; padding: 0.625rem 0.875rem; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--fg);
}
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
label { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 0.375rem; font-weight: 500; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-title { font-size: 1.125rem; font-weight: 700; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }

.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-emerald { color: var(--emerald); }
.text-red { color: var(--red); }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.badge {
  display: inline-flex; align-items: center; padding: 0.25rem 0.625rem;
  border-radius: 9999px; font-size: 0.75rem; font-weight: 600;
  background: var(--card-2); color: var(--muted);
}
.badge-success { background: rgba(16,185,129,0.15); color: var(--emerald); }
.badge-danger  { background: rgba(239,68,68,0.15);  color: var(--red); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--primary); }
.badge-info    { background: rgba(59,130,246,0.15); color: var(--sky); }
.badge-violet  { background: rgba(139,92,246,0.15); color: var(--violet); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.625rem 0.875rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: 0.75rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; }
tr:hover td { background: var(--card-2); }

.scroll-fancy::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll-fancy::-webkit-scrollbar-track { background: transparent; }
.scroll-fancy::-webkit-scrollbar-thumb { background: var(--border); border-radius: 9999px; }
.scroll-fancy::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.spinner {
  width: 24px; height: 24px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.shimmer-text {
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: shimmer 3s linear infinite;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

@keyframes confetti-fall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Layouts */
.min-h-screen { min-height: 100vh; }
.flex-col { flex-direction: column; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-4xl { max-width: 56rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.hidden { display: none; }

/* Toasts */
.toast-wrap {
  position: fixed; top: 1rem; right: 1rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem; max-width: 360px;
}
.toast {
  padding: 0.75rem 1rem; background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--primary); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4); animation: slidein 0.3s;
}
.toast.success { border-left-color: var(--emerald); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--sky); }
@keyframes slidein { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }


/* =========================================================================
   ANIMACIONES LLAMATIVAS "MODO CASINO" PARA LA BARRA "ÚLTIMOS 10"
   ========================================================================= */

/* 1. Latido súper llamativo en el botón amarillo "ÚLTIMOS 10" */
.ps-recent-ticker-label {
  animation: pulse-label-casino 1s ease-in-out infinite alternate !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.8) !important;
  border: 2px solid #fff !important;
  z-index: 10;
}
@keyframes pulse-label-casino {
  0% { transform: scale(1); filter: drop-shadow(0 0 5px #f59e0b); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 20px #fbbf24); background-color: #fbbf24; color: #000; }
}

/* 2. Barra inferior completa con neón y resplandor vibrante */
.ps-recent-ticker {
  border-top: 3px solid #f59e0b !important;
  background: linear-gradient(to right, rgba(10,10,15,0.9), rgba(245, 158, 11, 0.2), rgba(10,10,15,0.9)) !important;
  animation: bar-glow-casino 1.2s infinite alternate !important;
}
@keyframes bar-glow-casino {
  from { box-shadow: 0 -5px 15px rgba(245, 158, 11, 0.2), inset 0 5px 10px rgba(245, 158, 11, 0.1); border-top-color: #f59e0b; }
  to { box-shadow: 0 -15px 40px rgba(251, 191, 36, 0.8), inset 0 10px 20px rgba(251, 191, 36, 0.3); border-top-color: #fff; }
}

/* 3. Fichas de ganadores (y consolación) con brillo dorado intenso y pulso */
.ps-recent-chip.win, .ps-recent-chip.retry {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(251, 191, 36, 0.5)) !important;
  border: 2px solid #fbbf24 !important;
  color: #fff !important;
  font-weight: 900 !important;
  font-size: 1.05rem !important; 
  padding: 0.4rem 1rem !important;
  border-radius: 999px !important;
  animation: chip-neon-casino 1s infinite alternate !important;
  margin: 0 5px !important;
}
@keyframes chip-neon-casino {
  from { box-shadow: 0 0 10px rgba(251, 191, 36, 0.5); transform: scale(1); border-color: #f59e0b; }
  to { box-shadow: 0 0 30px rgba(251, 191, 36, 1), inset 0 0 15px rgba(255,255,255,0.6); transform: scale(1.08); border-color: #fff; text-shadow: 0 0 8px #fff; }
}

/* 4. Rayo de luz diagonal rápido cruzando las fichas ganadoras */
.ps-recent-chip.win::after, .ps-recent-chip.retry::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.9), transparent);
  transform: skewX(-25deg);
  animation: shine-ray-casino 2s infinite !important;
}
@keyframes shine-ray-casino {
  0% { left: -150%; }
  15% { left: 200%; }
  100% { left: 200%; }
}