/* ==========================================================================
   LIGA DE SOFTBALL DE SANTA CRUZ - CUSTOM STYLES
   Mobile-First Design System & Micro-Interactions
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --color-primary-navy: #081B2C;
  --color-accent-blue: #0066FF;
  --color-accent-sky: #0284C7;
  --color-bg-light: #F8FAFC;
  --color-team-chapita: #1C1917;
  --color-team-bravos: #0B2A56;
  --color-team-caciques: #35080D;
  --color-team-brewer: #191508;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  font-family: var(--font-body);
  background-color: var(--color-bg-light);
  color: #1E293B;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Nav Active Indicator */
.nav-link {
  position: relative;
  transition: color 0.2s ease-in-out;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent-blue);
  border-radius: 2px;
  animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* Glassmorphism & Header backdrop */
.nav-glass {
  background: rgba(8, 27, 44, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Hero Sequence Video Canvas */
#hero-sequence-canvas {
  will-change: transform;
  display: block;
  pointer-events: none;
}

/* Subtle translucent dark blue gradient from left to right */
.hero-subtle-gradient {
  background: linear-gradient(
    to right,
    rgba(8, 27, 44, 0.75) 0%,
    rgba(8, 27, 44, 0.50) 35%,
    rgba(8, 27, 44, 0.18) 65%,
    transparent 100%
  );
  pointer-events: none;
}

/* Team Card Hover Effects */
.team-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  will-change: transform;
}
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.15);
}
.team-card:focus-visible {
  outline: 3px solid var(--color-accent-blue);
  outline-offset: 4px;
}

/* Circular Arrow Button animation inside team card */
.team-card .arrow-btn {
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.team-card:hover .arrow-btn {
  transform: scale(1.12);
  background-color: #FFFFFF;
  color: #081B2C;
}

/* Interactive Match Card Hover */
.match-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.match-card:hover {
  border-color: #93C5FD;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.08);
  transform: translateX(4px);
}

/* Metric Cards */
.metric-card {
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.metric-card:hover {
  transform: translateY(-2px);
  border-color: #BFDBFE;
}

/* Table Row Highlights */
.table-row-hover {
  transition: background-color 0.15s ease;
}
.table-row-hover:hover {
  background-color: #F8FAFC;
}

/* Modal Animations */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  transform: scale(0.95) translateY(15px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .modal-content {
  transform: scale(1) translateY(0);
}

/* Mobile Menu Transitions */
.mobile-menu-container {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1), opacity 0.25s ease-in-out;
}
.mobile-menu-container.open {
  max-height: 500px;
  opacity: 1;
  padding-top: 0.5rem;
  padding-bottom: 1.5rem;
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
}

/* Accessibility Focus Ring */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: 2px;
}

/* Admin Dashboard & Table Custom Inputs */
.admin-tab-btn {
  transition: all 0.2s ease;
}
.admin-tab-btn.active {
  border-color: var(--color-accent-blue);
  color: var(--color-accent-blue);
}

#admin-standings-tbody input:focus {
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.15);
  outline: none;
}

/* Floating admin toolbar animation */
#admin-floating-bar {
  animation: floatIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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