:root {
    --azul: #3ca5e7;
    --azul-oscuro: #2c7ab1;
    --gris-fondo: #1a1a1a;
    --gris-tarjeta: #252525;
    --gris-claro: #333;
    --texto-principal: #e0e0e0;
    --texto-secundario: #888;
    --borde: #333;
    --rojo: #e74c3c;
    --verde: #27ae60;
    --azul-info: #3498db;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================ */
/* MODAL DE TUTORIALES */
/* ============================================ */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9998;
    display: none;
}

.tutorial-overlay.show {
    display: block;
}

.tutorial-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 5000px;
    height: 90%;
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #444;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: modalAbrir 0.3s ease;
}

.tutorial-modal.show {
    display: flex;
}

@keyframes modalAbrir {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #252525;
    border-bottom: 1px solid #444;
}

.modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 10px;
    transition: all 0.3s;
}

.modal-close:hover {
    color: var(--rojo);
    transform: scale(1.2);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    color: #e0e0e0;
    max-height: calc(85vh - 70px);
}

body {
    background: var(--gris-fondo);
}

.tutorial-page {
    padding: 20px 25px 30px;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--gris-fondo);
    min-height: 100vh;
    color: var(--texto-principal);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* ===== ENLACE DE RETORNO ===== */
.back-link {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 25px;
    padding: 10px 20px;
    border-radius: 30px;
    background: var(--gris-tarjeta);
    border: 1px solid transparent;
    transition: all 0.3s;
    font-weight: 500;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

.back-link::before {
    content: "←";
    margin-right: 8px;
    font-weight: bold;
}

/* ===== CABECERA ===== */
.tutorial-header {
    margin-bottom: 40px;
    border-bottom: 3px solid var(--azul);
    padding-bottom: 20px;
    position: relative;
}

.tutorial-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: var(--azul);
    box-shadow: 0 0 10px var(--azul);
}

.tutorial-title {
    font-size: 2.8rem;
    color: white;
    margin: 0 0 5px 0;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tutorial-subtitle {
    color: var(--texto-secundario);
    font-size: 1.2rem;
    margin: 0 0 15px 0;
}

.tutorial-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.meta-badge {
    background: var(--gris-tarjeta);
    padding: 6px 15px;
    border-radius: 30px;
    border: 1px solid var(--borde);
    font-size: 0.9rem;
    color: #ccc;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.meta-badge::before {
    content: "•";
    color: var(--azul);
    font-weight: bold;
    margin-right: 5px;
}

/* ===== IMAGEN DESTACADA ===== */
.tutorial-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 16px;
    margin: 30px 0;
    border: 1px solid var(--borde);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s;
}

.tutorial-image:hover {
    transform: scale(1.01);
}

/* ===== SECCIONES ===== */
.tutorial-section {
    background: var(--gris-tarjeta);
    border-radius: 16px;
    padding: 30px;
    margin: 35px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid #2a2a2a;
    transition: all 0.3s;
}

.tutorial-section h2 {
    color: white;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid var(--azul);
    padding-left: 20px;
}

.tutorial-section h2::before {
    font-size: 1.8rem;
}

.tutorial-section h3 {
    color: var(--azul);
    margin: 25px 0 15px;
    font-size: 1.4rem;
    font-weight: 600;
}

.tutorial-section p {
    margin-bottom: 15px;
    color: #ddd;
}

/* ===== LISTA DE PASOS NUMERADOS ===== */
.tutorial-steps {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
}

.tutorial-steps li {
    padding: 15px;
    margin: 10px;
    border-radius: 12px;
    border: 1px solid var(--borde);
    counter-increment: step-counter;
    position: relative;
    transition: all 0.3s;
    background: #1b1a1a;
}

.tutorial-steps li:hover {
    border-color: var(--azul);
}

.tutorial-steps li::before {
    content: "▹";
    color: var(--azul);
    font-size: 1.2rem;
    position: absolute;
    left: 10px;
    top: 20px;
    display: none;
}

.tutorial-steps li strong {
    color: white;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 8px;
}

.tutorial-steps li p {
    margin: 5px 0;
    color: #bbb;
}

/* ===== LISTAS NORMALES ===== */
.tutorial-list {
    list-style: none;
    padding: 0;
}


/* ===== BOTONES DE DESCARGA ===== */
.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 25px 0 15px;
}

.download-btn {
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    color: white;
    padding: 10px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 20px;
    font-size: 1rem;
    border: 1px solid var(--borde);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.download-btn:hover {
    background: linear-gradient(145deg, #333, #252525);
    border-color: var(--azul);
    transform: translateY(-1px);
    box-shadow: 0 8px 15px rgba(60, 165, 231, 0.3);
}

.download-btn.secondary {
    background: #1e2a36;
    border-color: #2c3e50;
}

.download-btn.secondary:hover {
    background: #233240;
    border-color: var(--azul);
}

/* ===== NOTAS, ADVERTENCIAS Y TIPS ===== */
.tutorial-note,
.tutorial-warning,
.tutorial-tip {
    padding: 18px 22px;
    border-radius: 12px;
    margin: 25px 0;
    position: relative;
    padding-left: 55px;
    border: none;
}

.tutorial-note::before,
.tutorial-warning::before,
.tutorial-tip::before {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

.tutorial-note {
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--azul-info);
    color: #cce5ff;
}

.tutorial-note::before {
    content: "📌";
}

.tutorial-warning {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--rojo);
    color: #ffb8b8;
}

.tutorial-warning::before {
    content: "⚠️";
}

.tutorial-tip {
    background: rgba(39, 174, 96, 0.1);
    border-left: 4px solid var(--verde);
    color: #b8ffb8;
}

.tutorial-tip::before {
    content: "💡";
}

/* ===== CÓDIGO ===== */
.tutorial-code {
    background: #ff0000;
    padding: 18px;
    border-radius: 12px;
    font-family: 'Fira Code', 'Courier New', monospace;
    color: var(--azul);
    border: 1px solid var(--borde);
    overflow-x: auto;
    margin: 20px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* ===== TABLA DE REQUISITOS ===== */
.requirements-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
}

.requirements-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--borde);
}

.requirements-table tr:last-child td {
    border-bottom: none;
}

.requirements-table td:first-child {
    font-weight: 600;
    color: var(--azul);
    width: 180px;
    background: #1a1a1a;
}

.requirements-table td:last-child {
    color: #ddd;
}

/* ===== ESTILOS PARA CHEATS ===== */
.cheat-category {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 12px;
    margin: 25px 0;
    border-left: 4px solid var(--azul);
    border-top: 1px solid var(--borde);
    border-right: 1px solid var(--borde);
    border-bottom: 1px solid var(--borde);
}

.cheat-title {
    color: var(--azul);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cheat-title::before {
    content: "⚡";
    font-size: 1.3rem;
}

.cheat-code {
    background: #0a0a0a;
    padding: 18px;
    border-radius: 8px;
    font-family: 'Fira Code', 'Courier New', monospace;
    color: #8affb0;
    border: 1px solid var(--borde);
    overflow-x: auto;
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* ===== TABLETS (hasta 1024px) ===== */
@media screen and (max-width: 1024px) {
    .tutorial-page {
        max-width: 95%;
        padding: 15px 18px;
    }
}

/* ===== MÓVILES GRANDES (hasta 768px) ===== */
@media screen and (max-width: 768px) {
    .tutorial-page {
        padding: 12px 15px;
    }

    /* HEADER - más compacto */
    .tutorial-title {
        font-size: 1.8rem;
        /* Reducido de 2rem */
        margin-bottom: 5px;
    }

    .tutorial-subtitle {
        font-size: 0.95rem;
        /* Reducido de 1rem */
        margin-bottom: 10px;
    }

    .tutorial-meta {
        gap: 8px;
        margin-top: 10px;
    }

    .meta-badge {
        padding: 4px 10px;
        font-size: 0.75rem;
        /* Reducido de 0.8rem */
    }

    /* SECCIONES - menos padding */
    .tutorial-section {
        padding: 18px;
        margin: 20px 0;
    }

    .tutorial-section h2 {
        font-size: 1.4rem;
        /* Reducido de 1.6rem */
        padding-left: 12px;
        margin-bottom: 15px;
        gap: 8px;
    }

    .tutorial-section h2::before {
        font-size: 1.4rem;
    }

    .tutorial-section h3 {
        font-size: 1.2rem;
        /* Reducido de 1.3rem */
        margin: 15px 0 8px;
    }

    .tutorial-section p {
        font-size: 0.9rem;
        margin-bottom: 10px;
        line-height: 1.5;
    }

    /* PASOS NUMERADOS - más compactos */
    .tutorial-steps li {
        padding: 16px 16px 16px 50px;
        margin: 12px 0;
    }

    .tutorial-steps li::before {
        width: 28px;
        height: 28px;
        left: 12px;
        top: 16px;
        font-size: 0.9rem;
    }

    .tutorial-steps li strong {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .tutorial-steps li p {
        font-size: 0.85rem;
        margin: 3px 0;
    }

    /* LISTAS NORMALES */
    .tutorial-list li {
        padding: 5px 0 5px 22px;
        font-size: 0.85rem;
    }

    .tutorial-list li::before {
        left: 5px;
        font-size: 0.9rem;
    }

    /* BOTONES */
    .download-buttons {
        gap: 10px;
    }

    .download-btn {
        font-size: 0.9rem;
    }

    /* NOTAS, WARNINGS Y TIPS */
    .tutorial-note,
    .tutorial-warning,
    .tutorial-tip {
        padding: 14px 14px 14px 45px;
        margin: 15px 0;
        font-size: 0.85rem;
    }

    .tutorial-note::before,
    .tutorial-warning::before,
    .tutorial-tip::before {
        left: 15px;
        font-size: 1.2rem;
    }

    /* CÓDIGO */
    .tutorial-code {
        padding: 12px;
        font-size: 0.8rem;
        margin: 12px 0;
    }

    /* TABLA DE REQUISITOS */
    .requirements-table {
        margin: 15px 0;
        background: transparent;
        font-size: 0.85rem;
    }

    .requirements-table td {
        padding: 10px 12px;
    }

    .requirements-table td:first-child {
        width: 100px;
    }

    /* CHEATS */
    .cheat-category {
        padding: 15px;
        margin: 15px 0;
    }

    .cheat-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .cheat-code {
        padding: 12px;
        font-size: 0.75rem;
    }

    /* MODAL (por si está dentro de tutorial-page) */
    .modal-body {
        padding: 15px;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    /* PÓSTERS (si están en la misma página) */
    .posters-title {
        font-size: 1.6rem;
    }

    .poster {
        height: 200px;
    }

    .poster-title {
        font-size: 1.3rem;
    }
}

/* ===== MÓVILES MEDIANOS (hasta 480px) ===== */
@media screen and (max-width: 480px) {
    .tutorial-page {
        padding: 10px 12px;
    }

    .tutorial-title {
        font-size: 1.5rem;
        /* Reducido de 1.6rem */
    }

    .tutorial-subtitle {
        font-size: 0.85rem;
    }

    .meta-badge {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .tutorial-section {
        padding: 15px;
        margin: 15px 0;
    }

    .tutorial-section h2 {
        font-size: 1.2rem;
        padding-left: 10px;
        margin-bottom: 25px;
    }

    .tutorial-section h3 {
        font-size: 1.2rem;
        margin: 12px 0 6px;
    }

    .tutorial-section p {
        font-size: 0.8rem;
    }

    .tutorial-steps li {
        padding: 10px;
    }

    .tutorial-steps li::before {
        display: none;
    }

    .tutorial-steps li strong {
        font-size: 0.9rem;
    }

    .tutorial-steps li {
        background: linear-gradient(to right, rgba(60, 165, 231, 0.05), #1e1e1e);
    }

    /* LISTAS */
    .tutorial-list li {
        font-size: 0.8rem;
        padding: 4px 0 4px 20px;
    }

    /* BOTONES - más grandes para mejor tacto */
    .download-btn {
        font-size: 0.85rem;
    }

    /* NOTAS */
    .tutorial-note,
    .tutorial-warning,
    .tutorial-tip {
        padding: 12px 12px 12px 40px;
        font-size: 0.8rem;
    }

    .tutorial-note::before,
    .tutorial-warning::before,
    .tutorial-tip::before {
        left: 12px;
        font-size: 1rem;
    }

    /* CÓDIGO */
    .tutorial-code {
        padding: 10px;
        font-size: 0.7rem;
    }

    /* TABLA - convertir a vertical */
    .requirements-table,
    .requirements-table tbody,
    .requirements-table tr,
    .requirements-table td {
        display: block;
    }

    .requirements-table tr {
        margin-bottom: 12px;
        border: 1px solid var(--borde);
        border-radius: 8px;
        overflow: hidden;
    }

    .requirements-table td {
        width: 100% !important;
        display: block;
        text-align: left;
        padding: 8px 12px;
        border: none;
        border-bottom: 1px solid var(--borde);
        font-size: 0.8rem;
    }

    .requirements-table td:last-child {
        border-bottom: none;
    }

    .requirements-table td:first-child {
        background: #1e1e1e;
        font-weight: bold;
        width: auto !important;
    }

    /* CHEATS */
    .cheat-code {
        font-size: 0.65rem;
        padding: 8px;
    }

    .cheat-title {
        font-size: 0.9rem;
    }
}

/* ===== MÓVILES MUY PEQUEÑOS (hasta 360px) ===== */
@media screen and (max-width: 360px) {
    .tutorial-page {
        padding: 8px 10px;
    }

    .tutorial-title {
        font-size: 1.3rem;
    }

    .tutorial-subtitle {
        font-size: 0.8rem;
    }

    .meta-badge {
        padding: 2px 6px;
        font-size: 0.65rem;
    }

    .tutorial-section {
        padding: 12px;
    }

    .tutorial-section h2 {
        font-size: 1.1rem;
    }

    .tutorial-section h3 {
        font-size: 1rem;
    }

    .tutorial-section p {
        font-size: 0.75rem;
    }

    .tutorial-steps li {
        padding: 10px 10px 10px 38px;
    }

    .tutorial-steps li::before {
        width: 22px;
        height: 22px;
        left: 8px;
        top: 10px;
        font-size: 0.7rem;
    }

    .download-btn {
        font-size: 0.8rem;
    }

    .requirements-table td {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}