/* Reset básico y configuración de fuentes */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 
   NAVBAR: Efecto Glassmorphism Avanzado
*/
#navbar.scrolled {
    background-color: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

/* 
   BENTO CARDS
*/
.bento-card {
    position: relative;
    overflow: hidden;
}

.bento-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.bento-card:hover::after {
    opacity: 1;
}

/* 
   CINEMATIC VIDEO BACKGROUND (NETFLIX STYLE) 
   Usado en Index Hero y Scout Dashboard
*/
.cinematic-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    background-color: #000;
}

.cinematic-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%) scale(1.35);
    /* Zoom para cortar bordes negros y UI */
    pointer-events: none;
    /* El usuario no puede pausar el fondo con click */
}

/* Estilos específicos para la sección Hero Dinámica en Index */
.hero-dynamic-section {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Pantalla completa */
    overflow: hidden;
    background: #000;
}

.hero-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, #050505 5%, rgba(5, 5, 5, 0.8) 40%, transparent 100%);
    z-index: 20;
    pointer-events: none;
}

/* En pantallas muy anchas, ajustar aspecto */
@media (min-aspect-ratio: 16/9) {
    .cinematic-iframe {
        height: 56.25vw;
    }
}

@media (max-aspect-ratio: 16/9) {
    .cinematic-iframe {
        width: 177.78vh;
    }
}

.live-pulse {
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }

    70% {
        opacity: 1;
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }

    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* Animación para texto con gradiente */
@keyframes gradientX {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradientX 5s ease infinite;
}

/*
    TACTICAL BASEBALL FIELD (Pro & Symmetric)
*/
/* 
    TACTICAL BASEBALL FIELD (Pro & Symmetric)
    Coordinate System: 
    - Container aspect ratio 1:1
    - Home Plate at (50%, 82%) approx to allow deep infield
    - Distance between bases must be equal
*/
.baseball-field-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background: radial-gradient(circle at 50% 100%, #1a1a1a 0%, #0a0a0a 70%);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8);
}

/* Base Geometry Calculation
   Diamond size: 42% width
   Rotated 45deg
   Center of diamond: 50% 55%
*/

.field-diamond {
    position: absolute;
    top: 55%;
    left: 50%;
    width: 42%;
    height: 42%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%) rotate(45deg);
    background: transparent;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Infield Dirt - centered on the diamond center, but slightly offset down */
.field-dirt-arc {
    position: absolute;
    top: 34%;
    left: 50%;
    width: 65%;
    height: 65%;
    transform: translate(-50%, 0);
    border-radius: 50%;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.02);
    pointer-events: none;
    z-index: 0;
}

/* Bases - Absolute positioning relative to container for easier manipulation */
/* 
   Diamond Top: 55% - 21% (half height) = 34% (2B)
   Diamond Bottom: 55% + 21% = 76% (Home)
   Diamond Left: 50% - 21% = 29% (3B) [Before rotation? No, rotation logic is tricky]
   
   Better approach: Place bases on the diamond corners using the diamond container?
   No, distinct elements are better for z-index and styling.
   
   If center is 50%, 55%. Radius (half diagonal) ~ 30% of width.
   2B Top: ~25%
   Home Bottom: ~85%
   1B Right: 80%
   3B Left: 20%
*/

.field-base-abs {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #e5e5e5;
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    z-index: 5;
}

.base-2b {
    top: 25.4%;
    left: 50%;
}

/* Apex Top */
.base-1b {
    top: 55.4%;
    right: 20%;
}

/* Apex Right */
.base-3b {
    top: 55.4%;
    left: 20%;
}

/* Apex Left */
.field-home-plate {
    position: absolute;
    top: 85.4%;
    left: 50%;
    width: 14px;
    height: 14px;
    background: white;
    transform: translate(-50%, -50%) rotate(45deg);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 100%, 0 100%);
    /* Pentagon-ish */
    z-index: 5;
}

/* Foul Lines */
.field-foul-line {
    position: absolute;
    top: 85.4%;
    /* Starts from Home */
    left: 50%;
    width: 140%;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    transform-origin: left center;
    z-index: 2;
}

.field-foul-line.left {
    transform: rotate(-135deg);
}

.field-foul-line.right {
    transform: rotate(-45deg);
}

/* Mound */
.field-mound {
    position: absolute;
    top: 55.4%;
    /* Center of diamond */
    left: 50%;
    width: 10%;
    height: 10%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
}

.field-rubber {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40%;
    height: 2px;
    background: #fff;
    transform: translate(-50%, -50%);
}

/* Outfield Arc */
.field-outfield-arc {
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    height: 70%;
    border-top-left-radius: 300px;
    /* Specific curve */
    border-top-right-radius: 300px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

/* Position Markers */
.pos-marker {
    position: absolute;
    width: 28px;
    height: 28px;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #555;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 9px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pos-marker.filled {
    background: #fff;
    border-color: #fff;
    color: #000;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: markerPulse 2s infinite;
}

@keyframes markerPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.pos-marker:hover {
    border-color: #fff;
    color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.pos-marker.filled:hover {
    background: #e5e5e5;
    color: #000;
}

/* Tactical Positions (Standard Depth) */
.pos-p {
    top: 55.4%;
    left: 50%;
}

/* Mound */
.pos-c {
    top: 92%;
    left: 50%;
}

/* Behind plate */

/* Infielders */
.pos-1b {
    top: 50%;
    right: 28%;
}

/* Playing off base */
.pos-3b {
    top: 50%;
    left: 28%;
}

/* Playing off base */
.pos-2b {
    top: 38%;
    left: 58%;
}

/* Deep */
.pos-ss {
    top: 38%;
    left: 42%;
}

/* Deep */

/* Outfielders */
.pos-lf {
    top: 22%;
    left: 20%;
}

.pos-cf {
    top: 15%;
    left: 50%;
}

.pos-rf {
    top: 22%;
    right: 20%;
}