/* ==========================================================================
   Arca Activa (arcaactiva.com) — Estilos Modernos UI/UX & Animaciones
   Paleta: Oscuro Profundo / Selva Nocturna + Oro Imperial + Esmeralda Activo
   ========================================================================== */

:root {
  --bg-deep: #070d0b;
  --bg-card: rgba(14, 25, 21, 0.82);
  --bg-card-hover: rgba(20, 36, 30, 0.94);
  --gold-light: #ffe074;
  --gold-primary: #f5b625;
  --gold-dark: #c67d0a;
  --emerald-light: #34d399;
  --emerald-primary: #10b981;
  --emerald-dark: #047857;
  --crimson-roulette: #dc2626;
  --border-subtle: rgba(245, 182, 37, 0.18);
  --border-gold-strong: rgba(245, 182, 37, 0.65);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: #f8fafc;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-deep);
  overflow-x: hidden;
  selection-background-color: var(--gold-primary);
  selection-color: #070d0b;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Outfit', sans-serif;
}

.font-mono-num {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Fondos Ambientales con Arte Oficial */
.hero-Stage-bg {
  position: relative;
  background-color: #070d0b;
  background-image:
    radial-gradient(circle at 18% 15%, rgba(16, 185, 129, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 82% 20%, rgba(245, 182, 37, 0.20) 0%, transparent 50%),
    linear-gradient(180deg, rgba(7, 13, 11, 0.72) 0%, rgba(7, 13, 11, 0.92) 65%, #070d0b 100%),
    url('selva_bg_landscape.jpeg');
  background-size: cover;
  background-position: center top;
  background-attachment: scroll;
}

/* Patrón sutil de rejilla técnica para pizarra */
.bg-grid-pattern {
  background-size: 36px 36px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
}

/* Textos Dorados Metálicos */
.text-gold-gradient {
  background: linear-gradient(135deg, #fff3b0 0%, #f5b625 45%, #e08b00 85%, #ffd86b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-emerald-gradient {
  background: linear-gradient(135deg, #6ee7b7 0%, #10b981 55%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Botones y Badges Dorados */
.btn-gold {
  background: linear-gradient(135deg, #ffd866 0%, #f59e0b 50%, #d97706 100%);
  color: #09110e;
  font-weight: 800;
  box-shadow: 0 8px 25px -4px rgba(245, 158, 11, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -4px rgba(245, 158, 11, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  filter: brightness(1.05);
}

.btn-gold:active {
  transform: translateY(0);
}

/* Tarjetas Glassmorphism */
.glass-panel {
  background: rgba(13, 23, 19, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 182, 37, 0.16);
}

.glass-panel-emerald {
  background: linear-gradient(145deg, rgba(6, 48, 36, 0.65) 0%, rgba(11, 22, 18, 0.88) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

/* Tarjeta Destacada cuando tiene ARCA PLUS COMODÍN */
.card-arca-plus-glow {
  position: relative;
  border: 1.5px solid rgba(245, 182, 37, 0.75) !important;
  box-shadow: 
    0 0 35px -5px rgba(245, 182, 37, 0.32),
    0 0 15px -2px rgba(16, 185, 129, 0.25),
    inset 0 0 25px rgba(245, 182, 37, 0.08);
}

/* Componente Insignia Fusionada "Arca Plus / Comodín" en Esquina Inferior */
.figure-stage-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wildcard-fused-badge {
  position: absolute;
  bottom: -6px;
  right: -8px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #1b1305 0%, #3b2506 55%, #063829 100%);
  border: 2px solid #fbbf24;
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.75),
    0 0 16px rgba(251, 191, 36, 0.65);
  animation: pulseGoldBadge 2.4s infinite ease-in-out;
}

.wildcard-fused-badge-sm {
  position: absolute;
  bottom: -4px;
  right: -6px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px 2px 2px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #1f1403 0%, #422905 60%, #064e3b 100%);
  border: 1.5px solid #fbbf24;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8), 0 0 10px rgba(251, 191, 36, 0.55);
}

/* Animaciones */
@keyframes pulseGoldBadge {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.75), 0 0 14px rgba(251, 191, 36, 0.55);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.85), 0 0 24px rgba(251, 191, 36, 0.9);
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmerSweep {
  0% {
    transform: translateX(-120%) skewX(-15deg);
  }
  100% {
    transform: translateX(220%) skewX(-15deg);
  }
}

.animate-float {
  animation: floatSlow 4s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spinSlow 42s linear infinite;
}

.animate-spin-fast {
  animation: spinSlow 0.9s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
}

/* Efecto brillo en tarjetas de resultados */
.result-card {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.result-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 182, 37, 0.48);
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.65), 0 0 20px -4px rgba(245, 182, 37, 0.18);
}

/* Tarjetas del catálogo de figuras */
.figure-catalog-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.figure-catalog-card:hover {
  transform: translateY(-5px) scale(1.02);
}

.figure-catalog-card:hover .figure-img {
  transform: scale(1.08);
}

.figure-img {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Colores de bolilla según ruleta oficial */
.pill-color-red {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
  border: 1px solid rgba(252, 165, 165, 0.4);
}

.pill-color-black {
  background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.pill-color-green {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #ffffff;
  border: 1px solid rgba(110, 231, 183, 0.45);
}

.pill-color-gold {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 55%, #b45309 100%);
  color: #090d0b;
  border: 1px solid #fef08a;
  font-weight: 900;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #070d0b;
}

::-webkit-scrollbar-thumb {
  background: #1e352d;
  border-radius: 9999px;
  border: 1px solid rgba(245, 182, 37, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: #2c4c40;
}
