/* ============================================================
   ROADMAP · ESTILOS PRINCIPAIS
   ============================================================ */

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

body {
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    background: #f0f4f9;
    color: #1e293b;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
}

.container {
    max-width: 960px;
    width: 100%;
}

/* ---- Cabeçalho ---- */
.header {
    background: linear-gradient(145deg, #0d1117, #161b22);
    color: #f0f6fc;
    padding: 2rem 2rem 1.8rem;
    border-radius: 20px;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid #30363d;
}

.header h1 {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}

.header h1 span {
    color: #f0883e;
}

.header p {
    font-size: 1.1rem;
    color: #8b949e;
    max-width: 600px;
    margin: 0 auto;
    border-top: 1px solid #30363d;
    padding-top: 0.8rem;
}

.header p strong {
    color: #f0f6fc;
    font-weight: 500;
}

/* ---- Cartões ---- */
.section-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.6rem 1.8rem;
    margin-bottom: 1.6rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9edf2;
    transition: box-shadow 0.2s ease;
}

.section-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0d1117;
    padding-bottom: 0.7rem;
    margin-bottom: 1.2rem;
    border-bottom: 3px solid #e9edf2;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.section-title .badge {
    background: #0969da;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.8rem;
    border-radius: 20px;
    letter-spacing: 0.3px;
    margin-left: auto;
}

/* Cores das bordas esquerdas (ciclo) */
.section-card.s1 {
    border-left: 5px solid #d73a49;
}

.section-card.s2 {
    border-left: 5px solid #1f883d;
}

.section-card.s3 {
    border-left: 5px solid #9e6a03;
}

.section-card.s4 {
    border-left: 5px solid #8250df;
}

.section-card.s5 {
    border-left: 5px solid #0969da;
}

.section-card.s6 {
    border-left: 5px solid #cf222e;
}

.section-card.s7 {
    border-left: 5px solid #6e40c9;
}

.section-card.s8 {
    border-left: 5px solid #d73a49;
}

.section-card.s9 {
    border-left: 5px solid #1f883d;
}

.section-card.s10 {
    border-left: 5px solid #9e6a03;
}

.section-card.s11 {
    border-left: 5px solid #8250df;
}

.section-card.s12 {
    border-left: 5px solid #0969da;
}

.section-card.s13 {
    border-left: 5px solid #cf222e;
}

.section-card.s14 {
    border-left: 5px solid #6e40c9;
}

.section-card.s15 {
    border-left: 5px solid #d73a49;
}

.section-card.s16 {
    border-left: 5px solid #1f883d;
}

.section-card.s17 {
    border-left: 5px solid #9e6a03;
}

.section-card.s18 {
    border-left: 5px solid #8250df;
}

.section-card.s19 {
    border-left: 5px solid #0969da;
}

.section-card.s20 {
    border-left: 5px solid #cf222e;
}

.section-card.s21 {
    border-left: 5px solid #6e40c9;
}

.section-card.s22 {
    border-left: 5px solid #d73a49;
}

.section-card.s23 {
    border-left: 5px solid #1f883d;
}

.section-card.s24 {
    border-left: 5px solid #9e6a03;
}

.section-card.s25 {
    border-left: 5px solid #8250df;
}

.section-card.s26 {
    border-left: 5px solid #0969da;
}

.section-card.s27 {
    border-left: 5px solid #cf222e;
}

/* ---- Checklist ---- */
.checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.98rem;
    line-height: 1.5;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    transition: background 0.15s;
}

.checklist li:hover {
    background: #f6f8fa;
}

.checklist li input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: #1f883d;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid #d0d7de;
    transition: 0.1s;
}

.checklist li input[type="checkbox"]:checked {
    accent-color: #1f883d;
}

.topic-name {
    cursor: pointer;
    color: #1e293b;
    border-radius: 4px;
    padding: 0.1rem 0.3rem;
    transition: all 0.15s;
    flex: 1;
}

.topic-name:hover {
    color: #0969da;
    background: #e6edf6;
    text-decoration: underline;
}

.topic-name code {
    background: #f1f3f5;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #d73a49;
    border: 1px solid #e1e4e8;
    font-weight: 500;
}

/* ---- Indentação dos níveis ---- */
.level-2 {
    padding-left: 24px !important;
}

.level-3 {
    padding-left: 48px !important;
}

.level-4 {
    padding-left: 72px !important;
}

.level-2 .topic-name {
    font-weight: 500;
}

.level-3 .topic-name {
    color: #334155;
}

.level-4 .topic-name {
    color: #64748b;
    font-size: 0.92rem;
}

/* ---- Rodapé ---- */
.footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #6e7781;
    background: #fff;
    padding: 1rem;
    border-radius: 40px;
    border: 1px solid #e9edf2;
}

.footer a {
    color: #0969da;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

/* ============================================================
   MODAL (sobreposição)
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

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

.modal-box {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 16px;
    max-width: 680px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem 2rem 1.8rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    animation: fadeSlide 0.25s ease;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-box h2 {
    font-size: 1.6rem;
    color: #f0f6fc;
    margin-bottom: 0.3rem;
    border-bottom: 2px solid #30363d;
    padding-bottom: 0.6rem;
}

.modal-box .topic-path {
    font-size: 0.8rem;
    color: #8b949e;
    margin-bottom: 1.2rem;
}

.modal-box .explanation-text {
    font-size: 1.05rem;
    color: #c9d1d9;
    background: #0d1117;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    border-left: 4px solid #1f6feb;
    margin-bottom: 1.8rem;
    line-height: 1.7;
}

.modal-box .explanation-text code {
    background: #1c2333;
    color: #f0883e;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.modal-box .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    padding: 0.5rem 1.4rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-box .btn-back:hover {
    background: #30363d;
    color: #f0f6fc;
    border-color: #58a6ff;
}

.detalhe-btn {
    display: inline-block;
    background: #1f6feb;
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.detalhe-btn:hover {
    background: #388bfd;
    color: #fff;
}

/* Ícone de toggle */
.toggle-icon {
    display: inline-block;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 6px;
    color: #555;
    user-select: none;
    transition: transform 0.2s;
    width: 1.2rem;
    text-align: center;
}

.toggle-icon:hover {
    color: #0066cc;
}

/* Lista de subtópicos (aninhada) */
.subtopic-list {
    padding-left: 1.8rem;
    margin-top: 4px;
    list-style: none;
    transition: all 0.3s ease;
}

/* Ajuste para os níveis de indentação (se quiser) */
.checklist li.level-3 .topic-name {
    font-size: 0.95rem;
}

.checklist li.level-4 .topic-name {
    font-size: 0.9rem;
    color: #444;
}

/* ---- Responsivo ---- */
@media (max-width: 600px) {
    body {
        padding: 1rem 0.6rem;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .section-card {
        padding: 1.2rem;
    }

    .checklist li {
        font-size: 0.92rem;
    }

    .level-2 {
        padding-left: 12px !important;
    }

    .level-3 {
        padding-left: 24px !important;
    }

    .level-4 {
        padding-left: 36px !important;
    }

    .modal-box {
        padding: 1.5rem;
    }
}