/* JUEGO TOP RANKING — Ultra Premium Design System v3.0 */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* Core Palette — Midnight & Solar Gold */
  --primary: 222 47% 11%; /* #0f172a */
  --primary-foreground: 0 0% 100%;
  
  --secondary: 45 93% 47%; /* #fbbf24 Amber 400 */
  --secondary-foreground: 222 47% 11%;

  --accent: 188 94% 41%; /* #06b6d4 Cyan 500 */
  --accent-foreground: 222 47% 11%;

  --background: 222 47% 7%; /* Deeper dark */
  --foreground: 213 27% 84%;

  --card: 222 47% 13%;
  --card-foreground: 213 27% 84%;

  --muted: 222 47% 18%;
  --muted-foreground: 215 20% 65%;

  --border: 222 47% 20%;
  --ring: 45 93% 47%;

  --success: 142 71% 45%;
  --error: 0 84% 60%;

  --radius: 1rem;
}

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', 'Inter', sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Premium Gradients */
.bg-mesh {
  background: radial-gradient(at 0% 0%, hsla(222, 47%, 15%, 1) 0, transparent 50%),
              radial-gradient(at 100% 0%, hsla(45, 93%, 47%, 0.1) 0, transparent 50%),
              radial-gradient(at 50% 100%, hsla(188, 94%, 41%, 0.05) 0, transparent 50%);
}

.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 15px rgba(251, 191, 36, 0.1); }
  50% { box-shadow: 0 0 30px rgba(251, 191, 36, 0.3); }
}

@keyframes slideIn {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.animate-fade-in { animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-slide-in { animation: slideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* ── HEADER ── */
header {
  background: rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(251, 191, 36, 0.15) !important;
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.logo-img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.3));
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

nav a {
  position: relative;
  color: hsl(var(--foreground));
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: hsl(var(--secondary));
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* ── HERO SECTION ── */
section.bg-primary {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  padding: 80px 0 !important;
  position: relative;
  overflow: hidden;
}

section.bg-primary::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 70%);
  z-index: 0;
}

section.bg-primary h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  background: linear-gradient(to bottom right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

.stat-item h3 {
  font-size: 2.5rem;
  font-weight: 800;
  color: hsl(var(--secondary));
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

/* ── BUTTONS ── */
.btn-premium {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #0f172a !important;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-premium:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(217, 119, 6, 0.5);
  filter: brightness(1.1);
}

.btn-outline {
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.05);
}

.btn-outline:hover {
  background: rgba(251, 191, 36, 0.1);
  border-color: #fbbf24;
}

/* ── CASINO CARDS ── */
.casino-card {
  background: hsl(var(--card));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.casino-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(251, 191, 36, 0.03), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.casino-card:hover {
  transform: translateY(-8px);
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.casino-card:hover::before {
  transform: translateX(100%);
}

.rank-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.4);
}

/* Score Pill */
.score-pill {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Bonus Box */
.bonus-box {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, rgba(217, 119, 6, 0.1) 100%);
  border: 1px solid rgba(251, 191, 36, 0.15);
  padding: 1rem;
  border-radius: 0.75rem;
  text-align: center;
}

/* ── TABLES ── */
.premium-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.75rem;
}

.premium-table thead tr {
  background: rgba(255, 255, 255, 0.02);
}

.premium-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #94a3b8;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.premium-table tbody tr {
  background: hsl(var(--card));
  transition: all 0.3s ease;
}

.premium-table td {
  padding: 1.25rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.premium-table td:first-child { border-left: 1px solid rgba(255, 255, 255, 0.03); border-radius: 12px 0 0 12px; }
.premium-table td:last-child { border-right: 1px solid rgba(255, 255, 255, 0.03); border-radius: 0 12px 12px 0; }

.premium-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(251, 191, 36, 0.2);
}

/* ── FOOTER ── */
footer {
  background: #020617 !important;
  border-top: 1px solid rgba(251, 191, 36, 0.1) !important;
  padding: 80px 0 40px !important;
}

footer h4 {
  color: #fbbf24;
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #fbbf24;
}

/* ── MOBILE FIXES ── */
@media (max-width: 768px) {
  section.bg-primary { padding: 60px 0 !important; }
  .hero-stats { grid-template-columns: 1fr; gap: 1rem; }
  .premium-table { display: block; overflow-x: auto; }
}

/* ── UTILITIES ── */
.text-gold { color: #fbbf24; }
.bg-gold { background-color: #fbbf24; }
.border-gold { border-color: rgba(251, 191, 36, 0.3); }

/* Glow Effects */
.shadow-gold { box-shadow: 0 0 20px rgba(251, 191, 36, 0.2); }

/* Transitions */
.hover-lift { transition: transform 0.3s ease; }
.hover-lift:hover { transform: translateY(-5px); }

/* Specific Overrides for user-provided classes if they exist */
.bg-destructive, a.bg-destructive, button.bg-destructive {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%) !important;
  color: #0f172a !important;
}

.bg-primary { background-color: hsl(var(--primary)) !important; }
.text-primary-foreground { color: hsl(var(--primary-foreground)) !important; }

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed, .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* Global Utilities */
.text-pretty { text-wrap: pretty; }
.text-balance { text-wrap: balance; }
