/* Hero Section */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 5rem 0 3rem;
}

.hero-background {
    position: fixed;
    inset: 0;
    z-index: -2;
}

.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -3;
    transform: scale(1.04);
    transform-origin: center;
    filter: blur(0.5px) brightness(0.65) saturate(1.3);
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
}

.background-video.loaded {
    opacity: 1;
}

.video-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(4, 120, 87, 0.1) 0, transparent 55%),
                radial-gradient(circle at 100% 100%, rgba(8, 47, 73, 0.2) 0, transparent 55%),
                linear-gradient(160deg, rgba(5, 6, 10, 0.55), rgba(5, 6, 10, 0.65));
    z-index: -1;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1.15fr;
    gap: 2.75rem;
    align-items: center;
    z-index: 2;
}

.hero-text {
    text-align: left; /* Asegurar alineación izquierda por defecto */
    width: 100%;
    display: flex;
    flex-direction: column;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 0.9;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-self: flex-start; /* Mantener alineación consistente */
}

.title-line {
    display: block;
}

.title-line.glow {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: var(--shadow-primary);
    animation: glow 2s ease-in-out infinite alternate;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    align-self: flex-start; /* Mantener alineación consistente */
}

.hero-description {
    font-size: 1.02rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
    width: 100%; /* Asegurar que ocupe todo el ancho disponible */
    align-self: flex-start; /* Prevenir centrado automático */
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-self: flex-start; /* Mantener alineación consistente */
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.9rem 1.7rem;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(var(--blur-glass));
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(74, 242, 197, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 360px;
    width: 100%;
    position: relative;
    transform: perspective(1300px) rotateX(-4deg) rotateY(3deg);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    z-index: 5;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    display: block;
}

/* Fuentes más pequeñas para slots máximos y jugadores online */
/* #max-players,
#players-online {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
} */

.stat-label {
    font-size: 0.9rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    z-index: 3;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-top: none;
    border-right: none;
    transform: rotate(-45deg);
}

/* Nuevo display del mapa con imagen de fondo */
.map-display {
    position: relative;
    overflow: visible; /* Cambiado de hidden a visible para que el tooltip no se corte */
    border-radius: 15px;
    height: 120px; /* Altura fija para el contenedor del mapa */
    /* margin-bottom: 0.5rem; */
    cursor: help; /* Indica que hay información adicional */
    transition: transform 0.3s ease;
    border: 2px solid rgba(45, 239, 233, 0.3); /* Border sutil cyan */
    z-index: 10; /* Asegurar que esté por encima de otros elementos */
}

.map-display:hover {
    transform: scale(1.02); /* Pequeño efecto de escala */
}

.map-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(1px) brightness(0.8);
    border-radius: 13px; /* Un poco menos que el contenedor */
    z-index: 1;
}

.map-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 1rem;
}

.map-name {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color); /* Color cyan igual que los otros textos principales */
    text-align: center;
    margin-bottom: 0.5rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 0, 0, 0.5); /* Sombras más fuertes */
    word-break: break-word;
    hyphens: auto;
    line-height: 1.2;
    /* Removido: background, padding, border-radius */
    position: relative;
    z-index: 10;
    filter: none; /* Anula el filtro del padre */
}

.map-score {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    color: white; /* Color base blanco para los números */
    text-align: center;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 0, 0, 0.5); /* Sombras más fuertes */
    letter-spacing: 0.5px;
    /* Removido: background, padding, border-radius */
    position: relative;
    z-index: 10;
    filter: none; /* Anula el filtro del padre */
    white-space: nowrap; /* Mantiene el formato CT: X | T: Y en una sola línea */
    overflow: visible; /* Asegura que el texto no se corte */
}

/* Colores específicos para puntuaciones CT y T */
.ct-score {
    color: #00BFFF !important; /* Azul más brillante */
    font-weight: 700;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.8);
}

.t-score {
    color: #FF8C00 !important; /* Naranja más brillante */
    font-weight: 700;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.8);
}

.map-display .stat-label {
    position: relative;
    z-index: 10; /* Mismo nivel que el texto */
    margin-top: 0.5rem;
    filter: none; /* Anula el filtro del padre */
    color: var(--text-light); /* Color más claro para "Mapa Actual" */
}

/* Tooltip para el mapa */
.map-display[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 115%; /* Bajado un poco para estar menos arriba */
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(45, 239, 233, 0.1));
    color: var(--text-light);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 3000; /* Aumentado z-index */
    border: 1px solid rgba(45, 239, 233, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: tooltipFadeIn 0.4s ease-out;
    max-width: 320px;
    word-wrap: normal;
    text-align: center;
    margin-bottom: 5px;
    pointer-events: none; /* Para que no interfiera con otros elementos */
}

.map-display[title]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(115% - 5px); /* Ajustado para coincidir con el tooltip bajado */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(45, 239, 233, 0.3);
    z-index: 3001; /* Aumentado z-index */
    pointer-events: none;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Media queries para responsividad del score del mapa */
@media (max-width: 768px) {
    .map-score {
        font-size: 1rem; /* Reduce ligeramente el tamaño en tablets */
    }
}

@media (max-width: 480px) {
    .map-score {
        font-size: 0.9rem; /* Reduce más en móviles pequeños */
        letter-spacing: 0.3px; /* Reduce espaciado para ahorrar espacio */
    }
}

@media (max-width: 360px) {
    .map-score {
        font-size: 0.8rem; /* Tamaño mínimo en móviles muy pequeños */
        letter-spacing: 0.2px;
    }
}