/* ===== RESET Y VARIABLES ===== */
:root {
    /* Esquema de colores pulido - tonos tierra y cristales */
    --primary-brown: #3E2723;
    --secondary-brown: #5D4037;
    --accent-gold: #FFB300;
    --crystal-cyan: #00BCD4;
    --crystal-purple: #7E57C2;
    --crystal-blue: #2196F3;
    --earth-dark: #2E2E2E;
    --earth-light: #F5F5DC;
    --stone-gray: #424242;
    --warm-amber: #FF8F00;
    
    /* Colores de texto optimizados */
    --text-primary: #FFFFFF;
    --text-secondary: #E0E0E0;
    --text-muted: #BDBDBD;
    --text-accent: var(--accent-gold);
    
    /* Fondos con gradientes mejorados */
    --bg-primary: linear-gradient(135deg, #1A1A1A 0%, #2E2E2E 50%, #3E2723 100%);
    --bg-card: rgba(62, 39, 35, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.1);
    
    /* Sombras refinadas */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(255, 179, 0, 0.4);
    --shadow-crystal: 0 0 20px rgba(0, 188, 212, 0.6);
    
    /* Transiciones suaves */
    --transition: all 0.3s ease;
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

body.loading {
    overflow: hidden !important;
    height: 100vh;
}

html.loading {
    overflow: hidden !important;
    height: 100vh;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #282828;
}
::-webkit-scrollbar-thumb {
    background-color: var(--accent-gold);
    border-radius: 10px;
    border: 2px solid var(--primary-brown);
}
::-webkit-scrollbar-thumb:hover {
    background-color: var(--warm-amber);
}


/* ===== CANVAS DE PARTÍCULAS 3D ===== */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.content-overlay {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: var(--text-primary);
}

.loading-logo-container {
    position: relative;
    width: 250px;
    height: auto;
}

.loading-logo-base,
.loading-logo-color {
    width: 100%;
    height: auto;
    display: block;
}

.loading-logo-base {
    filter: grayscale(100%);
    filter: drop-shadow(10px 10px 10px rgba(0, 0, 0, 0.137));
}

.loading-logo-color-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    overflow: hidden;
    animation: width-reveal 4.5s ease-in-out forwards;
    animation-delay: 0.3s;
}

.loading-logo-color {
    filter: drop-shadow(10px 10px 10px rgba(0, 0, 0, 0.103));
    width: 250px;
    height: auto;
    display: block;
}

@keyframes width-reveal {
    0% {
        width: 0;
    }
    20% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}



/* ===== LOGO DEL ESTUDIO ===== */
.studio-logo-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.studio-logo {
    max-width: 120px;
    height: auto;
    transition: var(--transition);
    opacity: 0.9;
}

.studio-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* ===== SELECTOR DE IDIOMA MINIMALISTA ===== */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    background: var(--bg-glass);
    border-radius: 20px;
    padding: 4px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
}

.lang-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background: var(--accent-gold);
    color: var(--primary-brown);
    font-weight: 600;
}

/* ===== CONTENIDO DE IDIOMAS ===== */
.language-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.language-content.active {
    display: block;
    opacity: 1;
}

/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 40px 20px;
}

.logo-container {
    position: relative;
    margin-bottom: 30px;
    animation: logoFloat 3s ease-in-out infinite;
}

.main-logo {
    max-width: 500px;
    width: 90%;
    height: auto;
    transition: var(--transition);
    filter: drop-shadow(10px 10px 10px BLACK);
}

.main-logo:hover {
    transform: scale(1.02);
}

.hero-content {
    max-width: 800px;
    animation: heroSlideUp 1s ease-out 0.5s both;
}

.hero-title {
    font-family: 'Cinzel', serif;
    margin-bottom: 30px;
}

.title-subtitle {
    display: block;
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    font-weight: 600;
    color: var(--text-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.hero-description {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta-button {
    margin-top: 30px;
}

/* ===== SHOWCASE SECTION ===== */
.game-showcase {
    padding: 40px 20px;
    position: relative;
}

.showcase-container {
    max-width: 1200px;
    margin: 0 auto;
}

.game-banner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.game-banner:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.banner-video {
    width: 100%;
    height: auto;
    display: block;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 179, 0, 0.1) 100%);
    pointer-events: none;
}

/* ===== FEATURES SECTION ===== */
.features-section {
    padding: 100px 20px;
    background: rgb(0 0 0 / 30%);
    backdrop-filter: blur(10px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i.fa-gem {
    animation: glowing-gem 5s infinite;
}

@keyframes glowing-gem {
    0% { color: #2451C9; text-shadow: 0 0 10px #2451C9; }
    12.5% { color: #811551; text-shadow: 0 0 10px #811551; }
    25% { color: #529FAE; text-shadow: 0 0 10px #529FAE; }
    37.5% { color: #186247; text-shadow: 0 0 10px #186247; }
    50% { color: #B85014; text-shadow: 0 0 10px #B85014; }
    62.5% { color: #998D0B; text-shadow: 0 0 10px #998D0B; }
    75% { color: #E8E9E2; text-shadow: 0 0 10px #E8E9E2; }
    87.5% { color: #4F4DC5; text-shadow: 0 0 10px #4F4DC5; }
    100% { color: #2451C9; text-shadow: 0 0 10px #2451C9; }
}

.section-title i {
    /* color: var(--crystal-cyan); */ /* Moved to animation */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 179, 0, 0.2);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 3rem;
    color: var(--crystal-cyan);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--text-accent);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 100px 20px;
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--text-accent);
    margin-bottom: 20px;
}

.cta-description {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    overflow: hidden;
}

.cta-button.primary {
    background: linear-gradient(45deg, var(--accent-gold), var(--warm-amber));
    color: var(--primary-brown);
    box-shadow: var(--shadow-glow);
}

.cta-button.primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(255, 179, 0, 0.6);
}

.cta-button.secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 2px solid var(--crystal-cyan);
    backdrop-filter: blur(10px);
}

.cta-button.secondary:hover {
    background: var(--crystal-cyan);
    color: var(--primary-brown);
    transform: translateY(-3px);
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover .button-glow {
    left: 100%;
}

.social-proof {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.proof-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.proof-item i {
    color: var(--crystal-cyan);
    font-size: 1.3rem;
}

/* ===== FOOTER ===== */
.footer {
    padding: 60px 20px 30px;
    background: var(--primary-brown);
    border-top: 1px solid rgba(255, 179, 0, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--text-accent);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255, 179, 0, 0.3);
    backdrop-filter: blur(10px);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-accent);
    transform: scale(1.1);
}

/* ===== ANIMACIONES ===== */
@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes heroSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes crystalRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes crystalPulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; }
}

@keyframes progressLoad {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ===== NATIVE SCROLL ANIMATIONS ===== */
.hero-content, .game-banner, .section-title, .feature-card, .cta-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-content.visible, .game-banner.visible, .section-title.visible, .feature-card.visible, .cta-content.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .studio-logo-container {
        top: 15px;
        left: 15px;
    }
    
    .studio-logo {
        max-width: 100px;
    }
    
    .language-switcher {
        top: 15px;
        right: 15px;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .hero-section {
        padding: 60px 15px 40px;
    }
    
    .main-logo {
        max-width: 350px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .social-proof {
        gap: 20px;
    }
    
    .footer-links {
        gap: 20px;
    }
    
    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .studio-logo {
        max-width: 80px;
    }
    
    .main-logo {
        max-width: 280px;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== FALLBACK CSS PARTICLES ===== */
.css-particles-fallback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.css-particle {
    position: absolute;
    background: var(--crystal-cyan);
    border-radius: 50%;
    opacity: 0.6;
    animation: floatParticle 10s linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}
