/**
 * LANDSCAPE PERFORMANCE LABORATORY
 * Estilos para Sistema de Tutoriales
 * Estética: Pixel Art Black & White
 * Tipografía: JetBrains Mono
 */

/* ===== BOTÓN DE TUTORIAL ===== */
.tutorial-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #000;
    color: #fff;
    border: 3px solid #000;
    padding: 12px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.tutorial-btn:hover {
    background: #fff;
    color: #000;
    box-shadow: 6px 6px 0 #000;
    transform: translate(-2px, -2px);
}

.tutorial-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

/* Ícono del botón (emoji de libro) */
.tutorial-btn::before {
    content: '📖';
    font-size: 16px;
}

/* ===== OVERLAY DEL MODAL ===== */
.tutorial-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.tutorial-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== MODAL DE TUTORIAL ===== */
.tutorial-modal {
    background: #fff;
    border: 4px solid #000;
    box-shadow: 12px 12px 0 #000;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.4s ease;
    position: relative;
}

/* Header del Modal */
.tutorial-header {
    background: #000;
    color: #fff;
    padding: 20px 25px;
    border-bottom: 4px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tutorial-header h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: bold;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tutorial-header h2::before {
    content: '📚';
    font-size: 24px;
}

/* Botón de cerrar */
.tutorial-close {
    background: #fff;
    color: #000;
    border: 3px solid #fff;
    width: 40px;
    height: 40px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.tutorial-close:hover {
    background: #000;
    color: #fff;
    border-color: #fff;
    transform: rotate(90deg);
}

/* Contenido del Modal */
.tutorial-content {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.8;
}

/* Estilos para el contenido */
.tutorial-content h3 {
    font-size: 18px;
    font-weight: bold;
    margin: 25px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tutorial-content h3::before {
    content: '▶';
    font-size: 14px;
}

.tutorial-content p {
    margin: 15px 0;
    color: #333;
    font-size: 14px;
}

.tutorial-content p strong {
    color: #000;
    font-weight: bold;
}

/* Lista de pasos */
.tutorial-steps {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.tutorial-step {
    background: #f5f5f5;
    border: 3px solid #000;
    padding: 15px 20px;
    margin: 15px 0;
    position: relative;
    padding-left: 60px;
}

.tutorial-step::before {
    content: attr(data-step);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #000;
    color: #fff;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid #000;
}

.tutorial-step-title {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 8px;
    color: #000;
}

.tutorial-step-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

/* Nota importante */
.tutorial-note {
    background: #fff3cd;
    border: 3px solid #000;
    border-left: 8px solid #000;
    padding: 15px 20px;
    margin: 20px 0;
}

.tutorial-note::before {
    content: '💡 ';
    font-size: 18px;
}

.tutorial-note strong {
    font-weight: bold;
}

/* Tips y consejos */
.tutorial-tip {
    background: #d4edda;
    border: 3px solid #000;
    border-left: 8px solid #000;
    padding: 15px 20px;
    margin: 20px 0;
}

.tutorial-tip::before {
    content: '✨ ';
    font-size: 18px;
}

/* Advertencia */
.tutorial-warning {
    background: #f8d7da;
    border: 3px solid #000;
    border-left: 8px solid #000;
    padding: 15px 20px;
    margin: 20px 0;
}

.tutorial-warning::before {
    content: '⚠️ ';
    font-size: 18px;
}

/* Lista con viñetas pixel-art */
.tutorial-content ul {
    list-style: none;
    padding-left: 0;
    margin: 15px 0;
}

.tutorial-content ul li {
    padding-left: 30px;
    position: relative;
    margin: 10px 0;
    font-size: 14px;
    color: #333;
}

.tutorial-content ul li::before {
    content: '▪';
    position: absolute;
    left: 10px;
    color: #000;
    font-size: 16px;
}

/* Código o ejemplo */
.tutorial-code {
    background: #000;
    color: #0f0;
    border: 3px solid #000;
    padding: 15px;
    margin: 15px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    overflow-x: auto;
}

/* Footer del Modal */
.tutorial-footer {
    background: #f5f5f5;
    border-top: 3px solid #000;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.tutorial-footer-text {
    font-size: 12px;
    color: #666;
    font-family: 'JetBrains Mono', monospace;
}

.tutorial-action-btn {
    background: #000;
    color: #fff;
    border: 3px solid #000;
    padding: 12px 25px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tutorial-action-btn:hover {
    background: #fff;
    color: #000;
    box-shadow: 4px 4px 0 #000;
    transform: translate(-2px, -2px);
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .tutorial-btn {
        top: 10px;
        right: 10px;
        padding: 10px 15px;
        font-size: 12px;
    }

    .tutorial-modal {
        width: 95%;
        max-height: 90vh;
    }

    .tutorial-header {
        padding: 15px 20px;
    }

    .tutorial-header h2 {
        font-size: 18px;
    }

    .tutorial-close {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .tutorial-content {
        padding: 20px;
    }

    .tutorial-content h3 {
        font-size: 16px;
    }

    .tutorial-step {
        padding-left: 50px;
    }

    .tutorial-step::before {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .tutorial-footer {
        flex-direction: column;
        gap: 10px;
    }

    .tutorial-action-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tutorial-btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    .tutorial-btn::before {
        font-size: 14px;
    }

    .tutorial-header h2 {
        font-size: 16px;
    }

    .tutorial-header h2::before {
        font-size: 20px;
    }

    .tutorial-content {
        padding: 15px;
    }

    .tutorial-content h3 {
        font-size: 15px;
    }

    .tutorial-content p,
    .tutorial-content ul li {
        font-size: 13px;
    }
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
.tutorial-content::-webkit-scrollbar {
    width: 12px;
}

.tutorial-content::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-left: 3px solid #000;
}

.tutorial-content::-webkit-scrollbar-thumb {
    background: #000;
    border: 2px solid #f5f5f5;
}

.tutorial-content::-webkit-scrollbar-thumb:hover {
    background: #333;
}

/* ===== BADGE DE VERSIÓN ===== */
.tutorial-version {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #fff;
    color: #000;
    border: 2px solid #000;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
}

/* ===== INDICADOR DE PROGRESO ===== */
.tutorial-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: #000;
    transition: width 0.3s ease;
}
