:root {
    --bg-color: #000000;
    --card-bg: #111111;
    --text-color: #f5f5f5;
    --accent-color: #c0392b;
    /* Rojo Medieval */
    --accent-glow: rgba(192, 57, 43, 0.4);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    /* Sin Scroll */
}

/* Video de Fondo - Fuego Real */
.video-bg {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -2;
    /* Detrás de todo */
    object-fit: cover;
    filter: brightness(0.6) contrast(1.2) grayscale(0.2);
    /* Ajuste visual 'dark' */
}

/* Overlay para oscurecer el video y que se lea el texto */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    /* Capa oscura semitransparente */
    z-index: -1;
}

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Quitamos la imagen de fondo estática, dejamos transparente */
    background: transparent;
    padding: 20px 40px;
    box-sizing: border-box;
    gap: 20px;
    position: relative;
}

/* Layout Containers Compactos */
.top-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-grow: 0;
    margin-bottom: 0;
    /* Controlado por gap del padre */
}

.content-body {
    /* Eliminamos estilos que fuerzan separación */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Menu Nuevo */
.medieval-nav {
    margin: 10px 0;
    /* Margen reducido */
    display: flex;
    gap: 30px;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.medieval-nav a {
    color: #ccc;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

.medieval-nav a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}

.medieval-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

.medieval-nav a:hover::after {
    width: 100%;
}

.logo-img {
    max-width: 140px;
    max-height: 140px;
}

h1 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 3rem;
    margin: 0;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow:
        0 0 5px var(--accent-color),
        0 0 10px var(--accent-color),
        0 0 20px var(--accent-color),
        0 0 30px var(--accent-glow);
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 5px;
    line-height: 1.1;
}

.description {
    max-width: 900px;
    margin: 10px auto;
    /* Reducido */
    font-size: 1.1rem;
    line-height: 1.5;
    color: #ddd;
    font-weight: 300;
    text-shadow: 1px 1px 2px #000;
}

.action-buttons {
    display: flex;
    gap: 20px;
    margin: 15px 0 25px 0;
    /* Separación justa antes de cards */
}

.medieval-box {
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
    color: #fff;
    padding: 10px 30px;
    font-size: 1.1rem;
    font-family: 'Cinzel', serif;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Stats Grid */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    margin-top: 0;
    /* Sin margen enorme */
    padding-bottom: 0;
}

.stat-card {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid #333;
    border-top: 3px solid var(--accent-color);
    padding: 1.5rem 1rem;
    /* Más compacto */
    min-width: 180px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-number {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    /* Ajustado */
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.2rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.stat-label {
    color: var(--accent-color);
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-weight: bold;
}

.stat-icon {
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 0.5rem;
}

footer {
    margin-top: 0;
    padding: 10px;
    font-size: 0.8rem;
    color: #555;
    flex-grow: 0;
}

@media (max-width: 768px) {
    body {
        overflow: auto;
        height: auto;
    }

    /* En móvil sí permitimos scroll */
    .hero {
        height: auto;
        padding: 40px 10px;
        display: block;
    }

    .top-header {
        flex-direction: column;
    }

    h1 {
        font-size: 2rem;
    }

    .medieval-nav {
        flex-direction: column;
        gap: 10px;
    }

    .stats-container {
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
    }
}

/* Utilities */
.mr-1 {
    margin-right: 0.25rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mr-3 {
    margin-right: 1rem;
}

.ml-1 {
    margin-left: 0.25rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.ml-3 {
    margin-left: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

/* Firefly Animation */
.firefly {
    position: fixed;
    bottom: -5vh;
    left: 50%;
    width: 0.4vw;
    height: 0.4vw;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0;
    /* box-shadow es costoso, lo reducimos o quitamos si causa lag.
       Lo dejamos sutil. */
    box-shadow: 0 0 5px var(--accent-color);
    pointer-events: none;
    z-index: -1;

    /* Usamos variables CSS para la aleatoriedad */
    transform: translateX(var(--x-pos)) scale(var(--size));
    animation: rise var(--duration) ease-in infinite;
    animation-delay: var(--delay);

    /* Optimización de Rendimiento para la GPU */
    will-change: transform, opacity;
}

@keyframes rise {
    0% {
        bottom: -5vh;
        opacity: 0;
        transform: translateX(var(--x-pos)) scale(var(--size));
    }

    10% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        bottom: 110vh;
        opacity: 0;
        transform: translateX(calc(var(--x-pos) + 20px)) scale(var(--size));
    }
}