/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.8;
}

/* Tipografía accesible para adultos mayores */
body {
    font-size: 20px;
}

h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

h2 {
    font-size: 2.2em;
    margin-bottom: 20px;
    color: #2d3748;
}

h3 {
    font-size: 1.6em;
    margin-bottom: 15px;
    color: #4a5568;
}

p, li {
    font-size: 1.2em;
}

/* Header */
header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.subtitle {
    font-size: 1.3em;
    opacity: 0.95;
    margin-top: 10px;
}

/* Navegación */
nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 18px 35px;
    font-size: 1.2em;
    background: white;
    border: 3px solid #667eea;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #667eea;
}

.nav-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.nav-btn:active {
    transform: translateY(0);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Secciones */
.seccion {
    display: none;
}

.seccion.activa {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Lecciones */
.leccion {
    background: #f7fafc;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 15px;
    border-left: 6px solid #667eea;
}

/* Info Boxes */
.info-box {
    background: #e6fffa;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #81e6d9;
    margin-bottom: 20px;
}

.info-box.resumen {
    background: #fef5e7;
    border-color: #f39c12;
}

.info-box ul, .info-box ol {
    margin-left: 30px;
    margin-top: 15px;
}

.info-box li {
    margin-bottom: 12px;
}

/* Palabra objetivo */
.palabra-objetivo {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    text-align: center;
    margin: 20px 0;
    border: 3px dashed #667eea;
    font-family: 'Courier New', monospace;
}

/* Inputs de práctica */
.input-practica {
    width: 100%;
    padding: 20px;
    font-size: 1.4em;
    border: 3px solid #cbd5e0;
    border-radius: 10px;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.input-practica:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

textarea.input-practica {
    resize: vertical;
    min-height: 100px;
}

/* Botones de verificar */
.btn-verificar {
    padding: 18px 40px;
    font-size: 1.3em;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.btn-verificar:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.3);
}

.btn-verificar:active {
    transform: translateY(0);
}

/* Resultados */
.resultado {
    margin-top: 15px;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
    display: none;
}

.resultado.correcto {
    background: #c6f6d5;
    color: #22543d;
    border: 2px solid #48bb78;
    display: block;
}

.resultado.incorrecto {
    background: #fed7d7;
    color: #742a2a;
    border: 2px solid #f56565;
    display: block;
}

/* Hints */
.hint {
    background: #fef5e7;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
    margin-top: 15px;
    font-style: italic;
}

.warning {
    background: #fff5f5;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #fc8181;
    margin-top: 15px;
    font-weight: 600;
}

/* Teclas Demo */
.teclas-demo {
    margin: 20px 0;
}

.tecla-combo {
    background: white;
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    font-size: 1.5em;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.tecla {
    display: inline-block;
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid #cbd5e0;
    box-shadow: 0 4px 0 #a0aec0, 0 6px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #2d3748;
    margin: 0 5px;
}

.simbolo {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.3em;
}

/* Detector de teclas */
.detector {
    background: #edf2f7;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    margin-top: 20px;
    border: 3px dashed #a0aec0;
}

#tecla-detectada {
    margin-top: 20px;
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grid de atajos */
.atajos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.atajo-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.atajo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.atajo-teclas {
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: bold;
}

.atajo-desc {
    color: #4a5568;
    font-size: 1.1em;
}

/* Tabla de atajos */
.tabla-atajos {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 1.1em;
}

.tabla-atajos th {
    background: #667eea;
    color: white;
    padding: 18px;
    text-align: left;
    font-size: 1.2em;
}

.tabla-atajos td {
    padding: 18px;
    border-bottom: 2px solid #e2e8f0;
}

.tabla-atajos tbody tr:hover {
    background: #f7fafc;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    font-size: 1.3em;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 18px;
    }

    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.8em;
    }

    main {
        padding: 25px;
    }

    .leccion {
        padding: 20px;
    }

    .nav-btn {
        padding: 15px 25px;
        font-size: 1em;
    }

    .atajos-grid {
        grid-template-columns: 1fr;
    }

    .tabla-atajos {
        font-size: 0.95em;
    }

    .tabla-atajos th,
    .tabla-atajos td {
        padding: 12px;
    }
}

/* Animación de éxito */
@keyframes success {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.resultado.correcto {
    animation: success 0.5s ease;
}

/* Accesibilidad - Enfoque visible */
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

/* Cursor para elementos interactivos */
button,
.nav-btn {
    cursor: pointer;
}

/* Selección de texto */
::selection {
    background: #667eea;
    color: white;
}
