/* --- PALETA DE COLORES MICROSOFT STORE --- */
:root {
    --bg-store-dark: #050302;
    --bg-card-dark: #120d0c;
    --bg-navbar: #0a0706;
    --accent-red: #7a0000;      /* Rojo sangre oscuro */
    --accent-gold: #c5a059;     /* Oro envejecido */
    --text-pergamino: #d1ccc0;  /* Color pergamino */
    --text-muted: #736b5e;
    --border-old: 1px solid #3d3122;
    --shadow-dark: 0 4px 15px rgba(0,0,0,0.8);
}

/* --- ESTILOS GENERALES (MÁS OSCUROS Y MEDIEVALES) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cinzel', serif, Georgia, 'Times New Roman';
}

body {
    background-color: var(--bg-store-dark);
    color: var(--text-pergamino);
    padding-top: 70px;
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

/* --- EFECTO DE FUEGO/BRASAS --- */
.fire-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: -1; /* Cambiado a -1 para que estén detrás de todo */
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -50px;
    background: radial-gradient(circle, #ff4500, transparent);
    border-radius: 50%;
    opacity: 0.4;
    animation: rise 8s infinite ease-in;
}

/* Generamos variaciones aleatorias para las 25 partículas */
.particle:nth-child(1) { left: 2%; animation-delay: 0s; width: 6px; height: 6px; }
.particle:nth-child(2) { left: 6%; animation-delay: 2s; width: 4px; height: 4px; }
.particle:nth-child(3) { left: 10%; animation-delay: 4s; width: 8px; height: 8px; }
.particle:nth-child(4) { left: 14%; animation-delay: 1s; width: 5px; height: 5px; }
.particle:nth-child(5) { left: 18%; animation-delay: 3s; width: 3px; height: 3px; }
.particle:nth-child(6) { left: 22%; animation-delay: 5s; width: 6px; height: 6px; }
.particle:nth-child(7) { left: 26%; animation-delay: 0.5s; width: 4px; height: 4px; }
.particle:nth-child(8) { left: 30%; animation-delay: 2.5s; width: 7px; height: 7px; }
.particle:nth-child(9) { left: 34%; animation-delay: 4.5s; width: 5px; height: 5px; }
.particle:nth-child(10) { left: 38%; animation-delay: 1.5s; width: 8px; height: 8px; }
.particle:nth-child(11) { left: 42%; animation-delay: 3.5s; width: 4px; height: 4px; }
.particle:nth-child(12) { left: 46%; animation-delay: 6.5s; width: 6px; height: 6px; }
.particle:nth-child(13) { left: 50%; animation-delay: 0.2s; width: 5px; height: 5px; }
.particle:nth-child(14) { left: 54%; animation-delay: 2.2s; width: 7px; height: 7px; }
.particle:nth-child(15) { left: 58%; animation-delay: 4.2s; width: 3px; height: 3px; }
.particle:nth-child(16) { left: 62%; animation-delay: 1.2s; width: 5px; height: 5px; }
.particle:nth-child(17) { left: 66%; animation-delay: 3.2s; width: 9px; height: 9px; }
.particle:nth-child(18) { left: 70%; animation-delay: 5.2s; width: 4px; height: 4px; }
.particle:nth-child(19) { left: 74%; animation-delay: 0.8s; width: 6px; height: 6px; }
.particle:nth-child(20) { left: 78%; animation-delay: 2.8s; width: 5px; height: 5px; }
.particle:nth-child(21) { left: 82%; animation-delay: 4.8s; width: 7px; height: 7px; }
.particle:nth-child(22) { left: 86%; animation-delay: 1.8s; width: 4px; height: 4px; }
.particle:nth-child(23) { left: 90%; animation-delay: 3.8s; width: 6px; height: 6px; }
.particle:nth-child(24) { left: 94%; animation-delay: 5.8s; width: 8px; height: 8px; }
.particle:nth-child(25) { left: 98%; animation-delay: 0.3s; width: 5px; height: 5px; }

@keyframes rise {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translateY(-100vh) scale(0.2); opacity: 0; }
}

/* --- BARRA SUPERIOR (NAV) --- */
.ms-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px; /* Aumentamos a 100px para dar espacio al diseño */
    background-color: transparent;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Cambiado de 'center' a 'flex-start' */
    padding: 10px 90px;      /* Añadido un padding superior para subir los elementos */
    z-index: 1000;
    border-bottom: none;
    box-shadow: none;
    overflow: hidden;
}

.navbar-bg-img {
        position: absolute;
    top: 0;
        left: 0;
        width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center center;
    z-index: -1;
    pointer-events: none;
    }

.nav-left {
    display: flex;
    align-items: center;
    gap: 22px;
}

.ms-nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-divider {
    height: 20px;
    margin: 0 15px;
    vertical-align: middle;
    position: relative;
    top: -2px;
}
.ms-nav-menu li {
    display: flex;
    align-items: center;
}

.ms-nav-menu li a {
    color: var(--text-pergamino);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ms-nav-menu li.active a, .ms-nav-menu li a:hover {
    color: var(--text-white);
}

.ms-nav-menu li.active {
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 2px;
}

.login-pill {
    background-color: var(--accent-red);
    border: 1px solid var(--accent-gold);
    color: white;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 6px 18px;
    border-radius: 15px;
    transition: background-color 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-pill:hover {
    background-color: #333333;
}

.login-wrapper {
    position: absolute;
    top: 15px;
    right: 30px;
    width: 140px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    z-index: 2;
    cursor: pointer;
}

.login-btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    object-fit: fill;
    transition: opacity 0.3s ease;
}

.login-default {
    z-index: 0;
}

.login-hover {
    z-index: 1;
    opacity: 0;
}

.login-wrapper:hover .login-hover {
    opacity: 1;
}

.login-wrapper:active .login-hover {
    opacity: 0 !important;
}

#btn-login-header {
    position: absolute;
    top: 0;
    left: 0;
        width: 100%;
    height: 100%;
    z-index: 2;
    background: transparent;
        border: none;
    text-shadow: 1px 1px 2px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
        cursor: pointer;
    }

.brand-logo-container {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.nav-brand-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
    -webkit-filter: none;
    filter: none;
    background-color: transparent !important;
    image-rendering: -webkit-optimize-contrast;
}

.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #0a0706;
    border-right: 2px solid var(--accent-red);
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 80px;
    z-index: 2000;
}

.sidebar.open { width: 250px; }

.sidebar-links { list-style: none; padding: 20px; }
.sidebar-links li { margin: 25px 0; }
.sidebar-links a {
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 1.4rem;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
}

.close-btn {
    position: absolute; top: 10px; right: 25px;
    font-size: 36px; background: none; border: none; color: white; cursor: pointer;
}

/* --- FOOTER GLOBAL --- */
.ms-footer {
    position: relative;
    padding: 60px 20px;
    border-top: none;
    color: #aaa;
    margin-top: 50px;
    overflow: hidden;
    background-color: transparent;
    min-height: 250px; /* Asegura una altura mínima para que la imagen tenga espacio */
}

.footer-bg-img {
        position: absolute;
    top: 0;
        left: 0;
        width: 100%;
    height: 100%;
    object-fit: fill; /* Probamos fill para que la imagen se adapte al contenedor sin recortarse */
    z-index: 0;
    pointer-events: none;
    }

.footer-content {
        display: flex;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center; /* Asegura que el texto esté centrado en sus contenedores */
    position: relative;
    z-index: 1;
    }

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra horizontalmente los enlaces dentro de la sección */
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    font-size: 0.8em;
    position: relative;
    z-index: 1;
}

.footer-section a {
    display: block;
    color: var(--accent-gold);
    text-decoration: none;
    margin-bottom: 5px;
}

/* --- RESPONSIVE NAV --- */
@media (max-width: 1024px) {
    .ms-nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100px;
        left: 0;
        width: 100%;
        background: #141414;
        padding: 20px;
        z-index: 1000;
        border-bottom: 2px solid #ff2a2a;
    }

    .ms-nav-menu.show {
        display: flex;
    }
}

.menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: absolute;
    top: 15px;
    left: 29px;
}

.menu-toggle img {
    height: 40px; /* Ajusta el tamaño del logo */
    width: auto;
    transition: transform 0.2s;
}

.menu-toggle:hover img {
    transform: scale(1.1);
}

@media (max-width: 1024px) {
    /* Mantenemos el bloque pero ajustamos si es necesario */
    .menu-toggle {
        display: block;
    }
}

#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    background: #e4c153;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    z-index: 999;
}

