@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
    /* image-rendering: -moz-crisp-edges; */
    /* image-rendering: crisp-edges; */
}

html, body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

#main-content-wrapper {
    flex-grow: 1; 
    width: 100%;
}

#footer-anchor {
    width: 100%;
    margin-top: 0; 
    flex-shrink: 0; 
}

#quiz-page {
    flex-grow: 1; 
}

/* Pixel Grid Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* CRT Screen Effect */
body::after {
    content: '';
    position: fixed;
    top: 0px;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9998;
    animation: flicker 0.15s infinite;
}

/* Make images responsive by default */
img, .webapp-screenshot { max-width: 100%; height: auto; display: block; }

/* Starfield Background - More Digital */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(180deg, #0d0221 0%, #1a0b3d 50%, #0d0221 100%);
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ffffff;
    box-shadow: 0 0 4px #ffffff, 0 0 8px #ffffff;
    animation: pixelTwinkle 2s infinite;
}

.star:nth-child(3n) {
    background: #ffffff;
    box-shadow: 0 0 4px #ffffff, 0 0 8px #ffffff;
}

.star:nth-child(5n) {
    background: #ffffff;
    box-shadow: 0 0 4px #ffffff, 0 0 8px #ffffff;
    width: 4px;
    height: 4px;
}

@keyframes pixelTwinkle {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    25% { opacity: 1; transform: scale(0.5); }
}

/* Pixel Art Text Effects */
.neon-cyan {
    color: #ffffff;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 2px;
    display: block !important;
}

.neon-magenta {
    color: #ffffff;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 2px;
}

.neon-yellow {
    color: #ffffff;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 2px;
}

.neon-green {
    color: #00ff00;
    font-family: 'Press Start 2P', cursive;
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 80px 60px;
}

.container-steps {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 10px 10px;
}

/* Estilos para el header-logo-container */
.header-logo-container {
    width: 100%;
    max-width: none;
    margin: 0; 
    padding: 10px 32px; 
    box-sizing: border-box; 
    position: relative; 
    top: 0;
    left: 0;
    z-index: 1000;
}

.nav-container {
    display: flex; 
    align-items: center; 
    justify-content: flex-start; 
    width: auto;
    margin: 0;
    padding: 0;
}

.logo-header-image {
    width: 175px; 
    height: auto;
    margin-right: 15px; 
    flex-shrink: 0; 
    cursor: pointer;
    
}

.header-title {
    text-align: center;
    font-size: 1.2rem;
    margin: 60px 0 40px;
    width: auto;
    position: relative;
    left: 10%;
    line-height: 1.6;
}

.header-title::before,
.header-title::after {
    content: '█';
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

.header-title::before {
    left: -30px;
}

.header-title::after {
    right: -30px;
}


/* Hero Section */
.hero {
    position: relative;
}

/* NUEVO: Estructura de dos columnas para el Hero */
.hero-grid {
    display: flex; 
    gap: 40px; 
    align-items: flex-start; 
}

/* Columna Izquierda: Título y CTA */
.hero-content {
    flex: 3; 
    max-width: 60%; 
    text-align: left;
}

/* Columna Derecha: Preguntas y Respuestas (FAQ) */
.hero-qna .hero-img{
    flex: 2;
    border: 4px solid #5c24b8; 
    background: rgba(13, 2, 33, 0.7); 
    position: relative;
    width: 500px; 
    height: 425px;
}

.hero-qna h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    margin-bottom: 25px;
    padding: 5px;
    border-bottom: 2px solid #ff00ff;
    line-height: 1.5;
}

.qna-item {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #5c24b8;
}

.qna-q {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    margin-bottom: 5px;
    line-height: 1.5;
    color: #b18deb; 
}

.qna-a {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: #fff; 
    line-height: 1.6;
    padding-left: 10px; 
}

.hero h1 {
    font-size: clamp(2rem, 3vw, 2.3rem);
    margin-bottom: 30px;
    margin: 0 0 32px;
    line-height: 1.3;
    display: flex;
    flex-wrap: wrap;
}

.hero h1 span {
    display: block;
}

.hero h1 .part1 {
    color: #b18deb;
    font-size: 2.1rem;
}

.hero h1 .part2 {
    color: #fff;
    font-size: 2.1rem;
    margin: 10px 0;
}

.hero h1 .part3 {
    color: #fff;
    font-size: 2.3rem;
}

h2 .part1 {
    color: #b18deb;
}

h1 .part2 {
    color: #fff;
}

/* Estilo para la lista de beneficios (ul) */
.info-block-initial ul {
    font-family: 'Space Mono', monospace;
    list-style: none; 
    padding-left: 0;
    margin: 15px 0 0 0;
}

/* Estilo para cada elemento de la lista (li) */
.info-block-initial ul li {
    position: relative;
    padding-left: 0px;
    margin-bottom: 10px;
    color: #fff; 
    font-size: 1em;
}

.hero .subtitle {
    font-size: clamp(0.7rem, 2vw, 1rem);
    margin-bottom: 20px;
    line-height: 1.8;
    color: #ffffff;
    font-size: 1.3rem;
    text-align: left;
}

.hero p {
    font-family: 'Space Mono', monospace; 
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 0 40px 0;
    line-height: 1.8;
    color: #ffffff;
    text-align: left;
}

.hero-footer {
    font-size: clamp(0.7rem, 2vw, 1rem);
    margin-bottom: 20px;
    line-height: 1.8;
    color: #ffffff;
    text-align: center;
}

.hero-footer p {
    font-family: 'Space Mono', monospace; 
    font-size: 0.9rem;
    max-width: 100%;
    margin: 0 0 40px 0;
    line-height: 1.8;
    color: #ffffff;
    text-align: center;
}

/* Promo Movil */

/* Contenedor de los botones CTA */
.cta-buttons-container {
    display: flex; 
    gap: 20px; 
    flex-wrap: wrap; 
    margin-top: 40px; 
}

/* Estilo del Botón Principal (Quiz) - Reutiliza el estilo base .btn */
.primary-btn-quiz {
    background: #5c24b8;
    border-color: #5c24b8;
    box-shadow: 0 0 15px #5c24b8; 
}

/* NUEVO Estilo para el Botón Secundario (App) */
.secondary-btn-app { 
    display: inline-block;
    padding: 20px 40px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    text-decoration: none;
    color: #000;
    background: #d6cece;
    border: 2px solid #000000;
    cursor: pointer;
    transition: all 0.1s;
    position: relative;
    text-transform: uppercase;
}

.secondary-btn-app:hover {
    background: var(--neon-cyan, #5c24b8);
    color: #fff;
    box-shadow: 0 0 20px var(--neon-cyan, #5c24b8);
    transform: translate(-2px, -2px); 
}

/* ESTILOS PARA LA SECCIÓN DEL MÓVIL Y WEBAPP */

.webapp-promo-container {
    flex: 2; 
    text-align: center;
    position: relative;
    max-width: 250px; 
    margin: auto; 
    z-index: 5;
}

.mobile-frame {
    width: 100%;
    max-width: 300px; 
    margin: 0 auto;
    border: 10px solid #222; 
    border-radius: 20px; 
    overflow: hidden; 
    position: relative;
    background-color: #000;
    box-shadow: 0 0 25px #ff00ff, 0 0 10px rgba(255, 0, 255, 0.5); 
    aspect-ratio: 9 / 19; 
    
    border-right: 5px solid #333;
    border-bottom: 5px solid #333;
}

.webapp-screenshot {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; 
}

.mobile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 2, 33, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0; 
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
    font-family: 'Space Mono', monospace;
}

.mobile-frame:hover .mobile-overlay {
    opacity: 1; 
}

.overlay-text {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 15px;
    text-shadow: 0 0 8px #00ffff;
    text-align: center !important;
    font-family: 'Press Start 2P', cursive;
    line-height: 1.5;
}

.overlay-btn {
    background: #ff00ff;
    border-color: #ff00ff;
    box-shadow: 0 0 10px #ff00ff;
    padding: 5px 15px;
    font-size: 0.6rem;
}

.overlay-btn:hover {
    background: #e600e6;
    box-shadow: 0 0 20px #ff00ff;
}

.download-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.7rem;
    color: #ffffff;
    text-shadow: 10px 0 10px #ff00ff, 0 0 5px #fff;
    transform: rotate(-7deg); 
    bottom: -50px; 
    right: 0px; 
    z-index: 5;
}

/* Terminal-Style Buttons with Pixel Art */
.btn {
    display: inline-block;
    padding: 20px 40px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    text-decoration: none;
    color: #ffffff;
    background: #5c24b8;
    border: 1px solid #000000;
    cursor: pointer;
    transition: all 0.1s;
    position: relative;
    text-transform: uppercase;
}

.btn-footer  {
    display: inline-block;
    padding: 20px 40px;
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    text-decoration: none;
    color: #ffffff;
    background: #5c24b8;
    border: 1px solid #000000;
    cursor: pointer;
    transition: all 0.1s;
    position: relative;
    text-transform: uppercase;
    text-align: center;
}

.btn:hover {
    background: var(--neon-cyan, #ff00ff);
    color: #0d0221;
    box-shadow: 0 0 20px var(--neon-cyan, #ff00ff);
    transform: translate(-2px, -2px);
}

.btn:active {
    transform: translate(4px, 4px);
}

/* Terminal Window Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.card {
    background: linear-gradient(135deg, #1a0b3d 0%, #0d0221 100%);
    border: 6px solid #5c24b8;
    padding: 30px;
    text-align: center;
    position: relative;
    transition: all 0.2s;
}

/* Terminal Header Bar */
.card::before {
    content: '█ SYSTEM.EXE';
    position: absolute;
    top: -30px;
    left: 0;
    right: 0;
    height: 30px;
    background: #5c24b8;
    color: #000;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.card::after {
    content: '■ ■ ■';
    position: absolute;
    top: -30px;
    right: 10px;
    color: #000;
    font-size: 0.8rem;
    line-height: 30px;
}

.card:hover {
    border-color: #ff00ff;
    transform: translate(-4px, -4px);
}

.card:hover::before {
    background: #ff00ff;
}

.card:nth-child(2) {
    border-color: #ff00ff;
    margin-top: 30px;
}

.card:nth-child(2)::before {
    background: #ff00ff;
}

.card:nth-child(2):hover {
    border-color: #5c1558;
}

.card:nth-child(2):hover::before {
    background: #5c1558;
}

.card:nth-child(3) {
    border-color: #5c1558;
    margin-top: 30px;
}

.card:nth-child(3)::before {
    background: #5c1558;
}

.card:nth-child(3):hover {
    border-color: #5c24b8;
}

.card:nth-child(3):hover::before {
    background: #5c24b8;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px currentColor);
}

.card h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card p {
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #fff;
}

/* Section Titles with Pixel Border */
.section-title {
    text-align: center;
    font-size: clamp(1rem, 1.3vw, 2rem);
    margin: 60px 0 40px;
    padding: 20px;
    width: auto;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1.6;
}

.section-title::before,
.section-title::after {
    content: '█';
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

.section-title::before {
    left: -30px;
}

.section-title::after {
    right: -30px;
}

/* Steps - Game Level Style */
.steps {
    max-width: 900px;
    margin: 0 auto;
}

.step {
    background: linear-gradient(135deg, #1a0b3d 0%, #0d0221 100%);
    border: 6px solid #5c24b8;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
    transition: all 0.2s;
}

.step::before {
    content: 'LEVEL';
    position: absolute;
    top: -18px;
    left: 20px;
    background: #5c24b8;
    color: #000;
    padding: 2px 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5rem;
}

.step:hover {
    transform: translate(-3px, -3px);
}

.step-number {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    min-width: 100px;
    text-align: center;
}

.step-content h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.step-content p {
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.8;
}

.step-check {
    margin-left: auto;
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px currentColor);
}

/* Stats - Arcade Score Display */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.stat {
    background: linear-gradient(135deg, #1a0b3d 0%, #0d0221 100%);
    border: 6px solid #5c24b8;
    padding: 30px;
    text-align: center;
    position: relative;
}

.stat::before {
    content: 'SCORE';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: #5c24b8;
    color: #000;
    padding: 2px 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5rem;
}

.stat:hover {
    transform: translate(-2px, -2px);
}

.stat:nth-child(2) {
    border-color: #ff00ff;
}

.stat:nth-child(2)::before {
    background: #ff00ff;
}

.stat:nth-child(3) {
    border-color: #5c1558;
}

.stat:nth-child(3)::before {
    background: #5c1558;
}

.stat-value {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

.stat-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: #fff;
    text-transform: uppercase;
}

/* Dark Section - Deep Space */
.dark-section {
    background: linear-gradient(180deg, #0d0221 0%, #1a0b3d 50%, #0d0221 100%);
    padding: 40px 20px;
    margin: 125px 80px;
    border-top: 4px solid #5c24b8;
    border-bottom: 4px solid #5c24b8;
    font-size: 1rem;
}

.qna-a {
    margin-bottom: 20px;
    font-size: 1rem;
}

.qna-q {
    font-size: 1rem;
}

/* Footer - Terminal Style */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 6px solid #5c24b8;
    margin-top: 60px;
    background: #000;
    position: relative;
}

footer::before {
    content: '█ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    color: #5c24b8;
    font-size: 0.8rem;
    letter-spacing: 5px;
}

footer p {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: #808080;
}

.footer-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}
.footer-right a {
    color: #808080;
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
}
.footer-right span {
    color: #808080;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-check {
        margin-left: 0;
    }
    
    .btn::before,
    .btn::after {
        display: none;
    }
    
    .card {
        margin-top: 40px !important;
    }
    
    .step-number {
        font-size: 2rem;
    }

    .cta-buttons-container {
        justify-content: center; 
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%; 
        margin-bottom: 0;
    }

    .webapp-promo-container {
        position: static; 
        transform: none;
        margin-top: 40px;
        width: 100%;
    }
    
    .mobile-frame {
        max-width: 250px; 
    }

    .download-text {
        position: static;
        transform: none;
        margin-top: 20px;
    }

    .header-logo-container {
        padding: 15px 20px;
    }
    
    .nav-container {
        flex-direction: column; 
        align-items: flex-start; 
    }

    .logo-header-image {
        width: 50px; 
        margin-right: 0;
        margin-bottom: 5px; 
    }

    .header-title {
        font-size: 1.2rem; 
        white-space: normal;
    }
}

/* ========= Mobile / Small devices improvements (mobile-first enhancements) ========= */
@media (max-width: 1024px) {
    /* Reduce heavy margins to use screen space wisely */
    .container { margin: 40px 28px; max-width: 1180px; }
    .header-logo-container { padding: 10px 20px; }
    .logo-header-image { width: 140px; }
    .header-title { font-size: 1.05rem; left: 5%; }
}

@media (max-width: 768px) {
    .container { margin: 24px 18px; }
    .logo-header-image { width: 110px; }
    .header-title { margin: 18px 0 12px; left: 0; font-size: 0.95rem; }

    /* Hero becomes stacked on mobile */
    .hero-grid { flex-direction: column; align-items: center; gap: 18px; }
    .hero-content { text-align: center; }
    .hero .part1, .hero .part2, .hero .part3 { font-size: clamp(1.6rem, 4vw, 2rem); }

    /* CTA buttons expand full width */
    .cta-buttons-container { flex-direction: column; gap: 12px; align-items: center; }
    .cta-buttons-container .btn, .cta-buttons-container .secondary-btn-app { width: 100%; max-width: 420px; }

    /* Reduce starfield intensity on smaller screens (performance) */
    .star { width: 2px; height: 2px; box-shadow: none; }
    .star:nth-child(5n) { width: 3px; height: 3px; }
}

@media (max-width: 480px) {
    .container { margin: 18px 12px; }
    .logo-header-image { width: 80px; }
    .header-title { margin: 10px 0; font-size: 0.9rem; }

    /* Buttons should be easy to tap */
    .btn, .btn-footer, .final-btn, .overlay-btn { padding: 14px 20px; font-size: 0.7rem; }

    /* Make text inputs comfortably wide */
    .text-input, .text-input-select { padding: 10px 12px; font-size: 0.95rem; }

    /* Hide heavy background decorations to save CPU on tiny devices */
    body::after, body::before { display: none; }
    .starfield { opacity: 0.85; }
}

/* Tweak hero-footer and other large-padding sections on smaller screens */
@media (max-width: 1024px) {
    .hero-footer { padding: 20px 60px; }
}

@media (max-width: 768px) {
    .hero-footer { padding: 18px 30px 36px; }
}

@media (max-width: 480px) {
    .hero-footer { padding: 12px 18px 24px; }
}
