/* SportMagic Béisbol - Design System */
:root {
  --primary: #1d4ed8;        /* Azul Béisbol Clásico */
  --primary-hover: #1e40af;  /* Azul oscuro */
  --primary-light: #eff6ff;  /* Fondo suave azul */
  --dark: #0f172a;           /* Slate 900 */
  --dark-blue: #1e3a8a;      /* Azul Marino Profundo */
  --text-main: #44403c;      /* Stone 700 (Cálido) */
  --text-muted: #78716c;     /* Stone 500 */
  --bg-body: #fafaf9;        /* Stone 50 (Tono arena de diamante) */
  --card-bg: #ffffff;
  --red: #ef4444;            /* Acento Rojo Costura */
  --border-color: #e7e5e4;   /* Stone 200 */
  --font-title: 'Outfit', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(29, 78, 216, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 0;
}

/* Nav back container */
.nav-back-container {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 0 20px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dark-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  padding: 8px 16px;
  border-radius: 30px;
  background: white;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-back:hover {
  color: var(--primary);
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.1);
  border-color: var(--primary);
}

/* Béisbol Hero */
.beisbol-hero {
  position: relative;
  max-width: 1200px;
  margin: 20px auto 40px;
  padding: 60px 40px;
  border-radius: 24px;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  color: white;
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.beisbol-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 80%),
                    radial-gradient(circle at 90% 80%, rgba(0, 0, 0, 0.2) 0%, transparent 80%);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"><path d="M0 0 L120 120 M120 0 L0 120" stroke="rgba(255,255,255,0.02)" stroke-width="1"/></svg>') repeat;
  opacity: 0.4;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.beisbol-icon-badge {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: white;
  backdrop-filter: blur(10px);
  animation: bounceBall 5s ease-in-out infinite;
}

.hero-kicker {
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  color: var(--red);
  margin-bottom: 10px;
}

.beisbol-hero h1 {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.15);
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 400;
  line-height: 1.7;
}

@keyframes bounceBall {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-12px) scale(0.98); }
  50% { transform: translateY(-12px) rotate(10deg) scale(0.98); }
  90% { transform: translateY(1px) scale(1.02); }
}

/* Sections General */
.showcase-section,
.demo-section,
.cta-section {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  color: var(--dark);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background-color: var(--primary);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(29, 78, 216, 0.2);
}

.feature-card:hover::before {
  height: 100%;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  transition: var(--transition);
}

.feature-card:hover .card-icon {
  background: var(--primary);
  color: white;
}

.feature-card h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* Demo Section & Table */
.demo-section {
  background: white;
  border-radius: 24px;
  padding: 50px 30px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #ef4444;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); opacity: 0.5; box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.9); opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.tabla-beisbol {
  width: 100%;
  border-collapse: collapse;
  background: white;
  text-align: center;
  font-size: 0.95rem;
}

.tabla-beisbol thead {
  background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary) 100%);
  color: white;
}

.tabla-beisbol th {
  padding: 16px 20px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  font-family: var(--font-title);
}

.tabla-beisbol td {
  padding: 16px 20px;
  border-bottom: 1px solid #f2f0ed;
  color: var(--text-main);
}

.tabla-beisbol tr:last-child td {
  border-bottom: none;
}

.tabla-beisbol tbody tr:hover {
  background-color: var(--primary-light);
  transition: background-color 0.2s ease;
}

.tabla-beisbol td:first-child {
  text-align: left;
  font-weight: 700;
  color: var(--dark-blue);
}

.tabla-beisbol th:first-child {
  text-align: left;
}

.pct {
  font-weight: 800;
  color: var(--primary);
  background-color: var(--primary-light);
  border-radius: 8px;
  padding: 6px 12px;
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

.loading-state {
  text-align: center;
  padding: 40px !important;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.loading-state i {
  color: var(--primary);
  margin-right: 10px;
}

/* Call to Action */
.cta-section {
  background: linear-gradient(135deg, var(--dark) 0%, #101c3f 100%);
  color: white;
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-section h2 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-cta {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.4);
}

.btn-cta:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 78, 216, 0.6);
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border-color);
  background: white;
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer strong {
  color: var(--dark);
}

/* Responsiveness */
@media (max-width: 768px) {
  .beisbol-hero {
    padding: 40px 20px;
    margin: 10px;
  }
  .beisbol-hero h1 {
    font-size: 2.2rem;
  }
  .hero-desc {
    font-size: 0.95rem;
  }
  .section-title h2 {
    font-size: 1.8rem;
  }
  .cta-section {
    padding: 40px 20px;
    margin: 0 10px 40px;
  }
  .cta-section h2 {
    font-size: 1.8rem;
  }
  .demo-section {
    padding: 30px 15px;
    margin: 0 10px 40px;
  }
  .tabla-beisbol th, .tabla-beisbol td {
    padding: 12px 14px;
    font-size: 0.85rem;
  }
}