/* Codex Astralis - Estilos Victoriano-Espacial Mejorados */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Cormorant+Garamond:wght@300;400;500;600&display=swap');

:root {
    --primary-gold: #d4af37;
    --secondary-blue: #1a1a2e;
    --dark-bg: #0a0a0a;
    --text-light: #e8e8e8;
    --accent-cyan: #00ffff;
    --accent-purple: #ff00ff;
    --success-green: #27ae60;
    --info-blue: #3498db;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--secondary-blue) 50%, #16213e 100%);
    color: var(--text-light);
    min-height: 100vh;
    height: 100%;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Prevenir scroll extra más allá del contenido */
html, body {
    max-width: 100%;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Forzar que el scroll termine en el footer */
html {
    height: 100%;
}

/* Asegurar que el contenido no se extienda más allá de la viewport */
body::after {
    content: '';
    display: block;
    height: 0;
    clear: both;
}

/* Regla específica para evitar scroll extra en móvil */
body {
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.main-content {
    flex: 1 0 auto;
    min-height: calc(100vh - 200px); /* Asegurar altura mínima menos el footer aproximado */
}

/* Cortina de transición mejorada con fade */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.page-transition.active {
    opacity: 1;
    pointer-events: all;
}

.page-transition::before {
    content: 'STELLARMARCH';
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
    letter-spacing: 0.2em;
    animation: titlePulse 1.5s infinite;
}

.page-transition::after {
    content: 'Cargando el Codex...';
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--text-light);
    animation: textFade 2s infinite ease-in-out;
    text-align: center;
}

@keyframes titlePulse {
    0%, 100% { 
        opacity: 0.8; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.05);
    }
}

@keyframes textFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Fade in para las páginas */
body {
    opacity: 0;
    animation: pageLoad 1s ease 0.2s forwards;
}

@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efectos hover adicionales para elementos interactivos */
a, button, .cta-button, .content-item, .logo {
    position: relative;
    overflow: hidden;
}

/* Efecto hover universal con barrita */
a:hover::after,
button:hover::after,
.content-item:hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
    transform: translateX(-50%);
    animation: slideIn 0.3s ease;
    pointer-events: none;
}

/* Excepciones para elementos que ya tienen efectos específicos */
.nav-list a:hover::after,
.nav-list a.active::after,
.mobile-navbar-list a:hover::after,
.mobile-navbar-list a.active::after {
    background: linear-gradient(90deg, var(--primary-gold), #f4d03f);
    height: 2px;
    animation: none;
}

/* Efecto ripple mejorado */
.cta-button, .nav-list a, .mobile-navbar-list a {
    transition: all 0.3s ease;
}

.cta-button:hover, .nav-list a:hover, .mobile-navbar-list a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

/* Efectos para iframes y multimedia */
iframe, .embed-container {
    transition: all 0.3s ease;
    cursor: pointer;
}

iframe:hover, .embed-container:hover iframe {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 255, 255, 0.3);
}

/* Mejoras para formularios y elementos interactivos */
input, select, textarea {
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    outline: none;
    transform: translateY(-1px);
}

/* Efecto hover para las estrellas de fondo */
.stars:hover, .stars2:hover, .stars3:hover {
    animation-play-state: paused;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .slideIn, .bounce, .heroGlow, .moveStars {
        animation: none !important;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

/* Hero Section para la página principal */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, 
        rgba(10, 10, 10, 0.9) 0%, 
        rgba(26, 26, 46, 0.8) 50%, 
        rgba(22, 33, 62, 0.9) 100%
    );
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 700;
    color: var(--primary-gold);
    text-shadow: 
        0 0 20px rgba(212, 175, 55, 0.8),
        0 0 40px rgba(212, 175, 55, 0.6),
        0 0 80px rgba(212, 175, 55, 0.4);
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    animation: heroGlow 4s ease-in-out infinite alternate;
    transform: perspective(1000px) rotateX(15deg);
    transition: all 1s ease;
}

.hero-title.scrolled {
    font-size: clamp(2rem, 6vw, 3rem);
    transform: perspective(1000px) rotateX(0deg);
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 150;
    background: rgba(10, 10, 10, 0.9);
    padding: 10px 30px;
    border-radius: 25px;
    backdrop-filter: blur(15px);
}

@keyframes heroGlow {
    from {
        text-shadow: 
            0 0 20px rgba(212, 175, 55, 0.8),
            0 0 40px rgba(212, 175, 55, 0.6),
            0 0 80px rgba(212, 175, 55, 0.4);
    }
    to {
        text-shadow: 
            0 0 30px rgba(212, 175, 55, 1),
            0 0 60px rgba(212, 175, 55, 0.8),
            0 0 120px rgba(212, 175, 55, 0.6),
            0 0 200px rgba(212, 175, 55, 0.3);
    }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--accent-cyan);
    margin-bottom: 3rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.5s both;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.4rem);
    max-width: 800px;
    line-height: 1.8;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 1s both;
}

.hero-cta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 1s ease 1.5s both;
}

.cta-button {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid var(--primary-gold);
    background: linear-gradient(135deg, var(--primary-gold), #f4d03f);
    color: var(--dark-bg);
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
}

.cta-button.secondary {
    background: transparent;
    color: var(--primary-gold);
}

.cta-button.secondary:hover {
    background: rgba(212, 175, 55, 0.1);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--primary-gold);
    font-size: 2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Tarjetas de navegación para index principal */
.simple-nav {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.nav-card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(22, 33, 62, 0.8) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    padding: 30px 20px;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.6s ease;
}

.nav-card:hover::before {
    left: 100%;
}

.nav-card:hover {
    border-color: var(--primary-gold);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.2);
}

.nav-card .nav-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
}

.nav-card h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary-gold);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.nav-card p {
    color: rgba(232, 232, 232, 0.8);
    font-size: 1rem;
    line-height: 1.4;
}

.nav-card:hover h3 {
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
}

.nav-card:hover .nav-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.8));
}

/* Navegación elegante mejorada */
.elegant-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, rgba(26, 26, 46, 0.9) 100%);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
}

.nav-brand {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.nav-items {
    display: flex;
    gap: 30px;
    flex: 1;
    position: relative;
}

.nav-item {
    color: var(--text-light);
    text-decoration: none;
    padding: 10px 15px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 20px;
}

.nav-item:hover {
    color: var(--primary-gold);
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.nav-indicator {
    position: absolute;
    bottom: -15px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-gold), #f4d03f);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
    opacity: 0;
}

.nav-item.loading .nav-indicator {
    width: 100%;
    opacity: 1;
    animation: loadingBar 0.6s ease-in-out;
}

@keyframes loadingBar {
    0% {
        width: 0%;
        opacity: 0;
        box-shadow: 0 0 0 rgba(212, 175, 55, 0);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
    }
    100% {
        width: 100%;
        opacity: 1;
        box-shadow: 0 0 15px rgba(212, 175, 55, 1);
    }
}

/* Efecto de pulso en la barra de carga */
.nav-item.loading {
    color: var(--primary-gold) !important;
    background: rgba(212, 175, 55, 0.2) !important;
    animation: navItemPulse 0.6s ease-in-out;
}

@keyframes navItemPulse {
    0%, 100% {
        transform: translateY(-2px) scale(1);
    }
    50% {
        transform: translateY(-2px) scale(1.05);
    }
}
    

/* Estrellas animadas mejoradas */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    pointer-events: none;
    z-index: 1;
}

.stars {
    background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="25" cy="25" r="0.5" fill="white" opacity="0.8"/><circle cx="75" cy="15" r="0.3" fill="white" opacity="0.6"/><circle cx="90" cy="75" r="0.4" fill="white" opacity="0.7"/><circle cx="15" cy="85" r="0.2" fill="white" opacity="0.5"/><circle cx="50" cy="60" r="0.3" fill="white" opacity="0.8"/></svg>') repeat;
    background-size: 200px 200px;
    animation: moveStars 50s linear infinite;
}

.stars2 {
    background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="35" cy="45" r="0.4" fill="white" opacity="0.6"/><circle cx="65" cy="25" r="0.2" fill="white" opacity="0.4"/><circle cx="20" cy="70" r="0.3" fill="white" opacity="0.7"/><circle cx="80" cy="90" r="0.5" fill="white" opacity="0.5"/></svg>') repeat;
    background-size: 150px 150px;
    animation: moveStars 80s linear infinite;
}

.stars3 {
    background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="40" cy="20" r="0.2" fill="white" opacity="0.4"/><circle cx="85" cy="55" r="0.3" fill="white" opacity="0.6"/><circle cx="10" cy="40" r="0.4" fill="white" opacity="0.5"/></svg>') repeat;
    background-size: 300px 300px;
    animation: moveStars 120s linear infinite;
}

@keyframes moveStars {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

/* Header mejorado */
.header {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, rgba(26, 26, 46, 0.9) 100%);
    backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--primary-gold);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    min-height: inherit;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: relative;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--primary-gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
    letter-spacing: 2px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.8);
}

/* Navegación mejorada */
.nav {
    position: relative;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-list li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-list li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-gold), #f4d03f);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-list li a:hover::before,
.nav-list li a.active::before {
    left: 100%;
}

.nav-list li a:hover::after,
.nav-list li a.active::after {
    width: 80%;
}

.nav-list li a:hover,
.nav-list li a.active {
    color: var(--primary-gold);
    border-color: var(--primary-gold);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

/* Menu móvil */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-gold);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Contenido principal */
.main-content {
    position: relative;
    z-index: 10;
    padding: 40px 0;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-area {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(22, 33, 62, 0.9) 100%);
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.content-area:hover {
    box-shadow: 0 15px 50px rgba(212, 175, 55, 0.2);
}

.page-header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-gold), transparent);
}

.page-header h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--primary-gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    margin: 0;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(212, 175, 55, 0.8), 0 0 40px rgba(212, 175, 55, 0.3);
    }
}

.page-content {
    animation: slideInUp 0.6s ease 0.2s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-item {
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.content-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.05), transparent);
    transition: left 0.8s ease;
}

.content-item:hover::before {
    left: 100%;
}

.content-item:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.1);
    transform: translateY(-5px);
}

.content-item h3 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: var(--accent-cyan);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.content-item h4 {
    color: #66ff66;
    margin: 20px 0 15px 0;
    font-size: 1.3rem;
}

.content-item p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: justify;
}

.content-item ul {
    margin: 20px 0;
    padding-left: 30px;
}

.content-item li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Estilos especiales */
.text-center {
    text-align: center;
}

.embed-container {
    margin: 30px 0;
    text-align: center;
}

.embed-container iframe {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.embed-container iframe:hover {
    box-shadow: 0 15px 40px rgba(0, 255, 255, 0.3);
    transform: scale(1.02);
}

.discord-link {
    text-align: center;
    padding: 20px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 15px;
    margin: 20px 0;
}

.discord-link a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.discord-link a:hover {
    color: white;
    text-shadow: 0 0 10px var(--accent-cyan);
}

.note {
    background: rgba(255, 215, 0, 0.1);
    padding: 15px;
    border-left: 4px solid var(--primary-gold);
    border-radius: 5px;
    margin: 20px 0;
    font-style: italic;
}

.coming-soon {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 15px;
    border: 2px dashed rgba(212, 175, 55, 0.3);
    margin: 30px 0;
    text-align: center;
}

.coming-soon h4 {
    color: var(--primary-gold);
    margin-bottom: 15px;
}

/* Footer */
.site-footer {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.8) 0%, rgba(0, 0, 0, 0.95) 100%);
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid var(--primary-gold);
    color: rgba(232, 232, 232, 0.7);
    font-size: 0.9rem;
    margin-top: auto;
    backdrop-filter: blur(10px);
    flex-shrink: 0; /* Evitar que el footer se encoja */
    position: relative;
    z-index: 10;
}

/* Responsive Design */
/* Navbar móvil - Oculto en desktop */
.mobile-navbar {
    display: none;
}

@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
        padding: 15px;
    }
    
    .nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(26, 26, 46, 0.95);
        border-radius: 15px;
        padding: 20px;
        gap: 15px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        animation: slideDown 0.3s ease;
        z-index: 200;
    }
    
    .nav-list.active {
        display: flex;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .nav-list li {
        width: 100%;
    }
    
    .nav-list li a {
        display: block;
        text-align: center;
        width: 100%;
        padding: 15px;
        border-radius: 10px;
    }
    
    .nav-list li a::after {
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .content-area {
        padding: 25px;
        margin: 20px 15px;
    }
    
    .content-item {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    /* Hero responsive */
    .hero-section {
        padding: 20px;
        min-height: 100vh;
    }
    
    .hero-title {
        font-size: clamp(3rem, 12vw, 8rem);
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.5rem);
        margin-bottom: 2rem;
    }
    
    .hero-description {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
        margin-bottom: 2rem;
    }
    
    .hero-title.scrolled {
        font-size: clamp(1.5rem, 5vw, 2rem);
        padding: 8px 20px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .cta-button {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    /* Tarjetas de navegación responsive */
    .nav-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .nav-card {
        padding: 20px 15px;
    }
    
    .nav-card .nav-icon {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .nav-card h3 {
        font-size: 1.2rem;
    }
    
    .nav-card p {
        font-size: 0.9rem;
    }
    
    /* Navegación elegante responsive */
    .elegant-nav {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 10px 15px;
        flex-direction: row;
        justify-content: space-between;
        position: relative;
    }
    
    .nav-brand {
        font-size: 1.3rem;
    }
    
    /* Hamburger menu para navegación elegante */
    .nav-items {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, rgba(10, 10, 10, 0.98) 0%, rgba(26, 26, 46, 0.95) 100%);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(212, 175, 55, 0.3);
        flex-direction: column;
        gap: 0;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
    
    .nav-items.mobile-active {
        display: flex;
    }
    
    .nav-item {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(212, 175, 55, 0.1);
        text-align: center;
        border-radius: 0;
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    /* Botón hamburger para navegación elegante */
    .elegant-mobile-toggle {
        display: flex;
        flex-direction: column;
        gap: 4px;
        cursor: pointer;
        padding: 8px;
        background: none;
        border: none;
    }
    
    .elegant-mobile-toggle span {
        width: 25px;
        height: 3px;
        background: var(--primary-gold);
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    .elegant-mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .elegant-mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .elegant-mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* En desktop, mostrar nav-items normalmente */
}

@media (min-width: 769px) {
    .elegant-nav .nav-items {
        display: flex !important;
        position: static;
        background: none;
        backdrop-filter: none;
        border: none;
        flex-direction: row;
        gap: 30px;
        padding: 0;
        box-shadow: none;
    }
    
    .elegant-mobile-toggle {
        display: none;
    }
    
    .nav-item {
        padding: 10px 15px;
        border: none;
        border-radius: 20px;
    }

    /* Navbar fijo móvil */
    .mobile-navbar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, rgba(26, 26, 46, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
        backdrop-filter: blur(15px);
        border-top: 2px solid var(--primary-gold);
        z-index: 1000;
        padding: 10px 0;
    }
    
    .mobile-navbar-list {
        display: flex;
        justify-content: space-around;
        align-items: center;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .mobile-navbar-list li {
        flex: 1;
    }
    
    .mobile-navbar-list a {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px 4px;
        color: var(--text-light);
        text-decoration: none;
        font-size: 0.7rem;
        transition: all 0.3s ease;
        border-radius: 8px;
        position: relative;
    }
    
    .mobile-navbar-list a::before {
        content: '';
        font-size: 1.2rem;
        margin-bottom: 4px;
    }
    
    .mobile-navbar-list a[href*="index"]::before { content: '🏠'; }
    .mobile-navbar-list a[href*="comunidades"]::before { content: '🌐'; }
    .mobile-navbar-list a[href*="armas"]::before { content: '⚔️'; }
    .mobile-navbar-list a[href*="mapa"]::before { content: '🗺️'; }
    .mobile-navbar-list a[href*="lore"]::before { content: '📚'; }
    .mobile-navbar-list a[href*="discord"]::before { content: '💬'; }
    
    .mobile-navbar-list a:hover,
    .mobile-navbar-list a.active {
        color: var(--primary-gold);
        background: rgba(212, 175, 55, 0.1);
        transform: translateY(-2px);
    }
    
    .mobile-navbar-list a::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--primary-gold);
        transition: width 0.3s ease;
        transform: translateX(-50%);
    }
    
    .mobile-navbar-list a:hover::after,
    .mobile-navbar-list a.active::after {
        width: 80%;
    }
    
    /* Ajustar contenido para navbar móvil */
    body {
        padding-bottom: 70px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .content-area {
        padding: 20px;
        margin: 15px 10px;
    }
    
    .content-item {
        padding: 15px;
    }
    
    .page-header h2 {
        font-size: 1.8rem;
    }
    
    .content-item h3 {
        font-size: 1.3rem;
    }
    
    .content-item p,
    .content-item li {
        font-size: 1rem;
    }
    
    .embed-container iframe {
        height: 250px;
    }
}

/* Fix para prevenir scroll extra - regla final */
* {
    box-sizing: border-box;
}

body {
    overflow-anchor: none; /* Prevenir anchor scrolling que puede causar scroll extra */
}

/* Asegurar que el scroll termine exactamente en el footer */
.site-footer {
    position: relative;
    bottom: 0;
}

/* Medida final: height específica para páginas */
.page-content:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Mejoras adicionales para interactividad */
@media (hover: hover) {
    .content-item:hover {
        transform: translateY(-5px);
    }
    
    .nav-list li a:hover {
        transform: translateY(-2px);
    }
}

/* Optimizaciones de rendimiento */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, iframe {
    will-change: transform;
}

.page-transition {
    will-change: left;
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .stars,
    .stars2,
    .stars3 {
        animation: none;
    }
}

/* Estilos para la Guía Táctica */
.tactical-section {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.3), rgba(212, 175, 55, 0.1));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.tactical-section:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.1);
}

.tactical-section h4 {
    color: var(--primary-gold);
    font-family: 'Cinzel', serif;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.tactical-section ul {
    margin-left: 1.5rem;
    margin-top: 0.8rem;
}

.tactical-section li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: var(--text-light);
}

.tactical-section li strong {
    color: var(--accent-cyan);
    font-weight: 600;
}

.tactical-section ul ul {
    margin-top: 0.5rem;
    margin-left: 1rem;
}

.tactical-section ul ul li {
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: #c8c8c8;
}

.note {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.1));
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--text-light);
}

.note strong {
    color: var(--accent-cyan);
}

/* Focus states para accesibilidad */
a:focus,
button:focus {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 26, 46, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-gold), #b8941f);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f4d03f, var(--primary-gold));
}
