/**
 * paidar-interactive-module.css
 * Estilos modernos Glassmorphism y 3D para los Módulos Interactivos PAIDAR 2.0
 */

/* ==========================================================================
   Variables y Cascarón del Módulo
   ========================================================================== */
:root {
    --pi-primary: #cba72f;
    --pi-primary-hover: #dfba3c;
    --pi-primary-glow: rgba(203, 167, 47, 0.25);
    --pi-surface-dark: #0f1318;
    --pi-card-bg: rgba(26, 29, 33, 0.85);
    --pi-card-border: rgba(255, 255, 255, 0.08);
    --pi-text-main: #f3f4f6;
    --pi-text-muted: #94a3b8;
}

html:not(.dark) {
    --pi-primary: #863399;
    --pi-primary-hover: #9c41b0;
    --pi-primary-glow: rgba(134, 51, 153, 0.15);
    --pi-surface-dark: #f8fafc;
    --pi-card-bg: rgba(255, 255, 255, 0.95);
    --pi-card-border: rgba(0, 0, 0, 0.08);
    --pi-text-main: #0f172a;
    --pi-text-muted: #64748b;
}

.paidar-interactive-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem 3rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: all 0.3s ease;
}

/* Modo Enfoque / Pantalla Completa */
.paidar-interactive-wrapper.focus-mode {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--pi-surface-dark);
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    padding: 1.5rem 1.5rem 3rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.paidar-interactive-wrapper.focus-mode .paidar-workspace-card {
    flex-shrink: 0;
    min-height: auto;
    height: auto;
    margin-bottom: 2rem;
}

/* ==========================================================================
   Top Header Bar
   ========================================================================== */
.paidar-module-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pi-card-border);
    color: var(--pi-text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    text-decoration: none;
}

.back-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--pi-primary);
    transform: translateX(-2px);
}

.module-title-group {
    display: flex;
    flex-direction: column;
}

.badge-insignia {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--pi-primary);
}

.module-main-title {
    font-family: 'League Spartan', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--pi-text-main);
    line-height: 1.1;
    margin: 0;
}

@media (min-width: 768px) {
    .module-main-title {
        font-size: 2rem;
    }
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-pill-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--pi-card-bg);
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid var(--pi-card-border);
}

.progress-track {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--pi-primary);
    border-radius: 9999px;
    transition: width 0.4s ease;
}

.progress-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--pi-text-muted);
    text-transform: uppercase;
}

.action-circle-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pi-card-bg);
    border: 1px solid var(--pi-card-border);
    color: var(--pi-text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.action-circle-btn:hover {
    color: var(--pi-primary);
    border-color: var(--pi-primary);
    transform: scale(1.05);
}

/* ==========================================================================
   Tabs Nav Bar
   ========================================================================== */
.paidar-tabs-nav {
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
}

.paidar-tabs-nav::-webkit-scrollbar {
    display: none;
}

.tabs-scroll-container {
    display: flex;
    gap: 0.5rem;
    min-width: max-content;
}

.tab-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border-radius: 1rem;
    background: var(--pi-card-bg);
    border: 1px solid var(--pi-card-border);
    color: var(--pi-text-muted);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-tap-highlight-color: transparent;
}

.tab-item:hover {
    color: var(--pi-text-main);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.tab-item.active {
    background: var(--pi-primary);
    border-color: var(--pi-primary);
    color: #0b0e11 !important;
    box-shadow: 0 8px 20px -4px var(--pi-primary-glow);
}

.tab-item.active .tab-icon {
    color: #0b0e11;
}

.tab-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    font-weight: 900;
}

.tab-count {
    font-size: 0.7rem;
    opacity: 0.6;
}

.check-icon {
    font-size: 1rem;
    color: #10b981;
}

/* ==========================================================================
   Bottom Navigation Bar (Estilo App / Instagram / TikTok para Celular y Tablet)
   ========================================================================== */
@media (max-width: 1024px) {
    .paidar-interactive-wrapper {
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    }

    .paidar-tabs-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        z-index: 999;
        padding: 0.45rem 0.5rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
        background: rgba(14, 17, 22, 0.94);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
        display: flex;
        justify-content: flex-start;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    html:not(.dark) .paidar-tabs-nav {
        background: rgba(255, 255, 255, 0.95) !important;
        border-top: 1px solid rgba(134, 51, 153, 0.18) !important;
        box-shadow: 0 -8px 30px rgba(134, 51, 153, 0.12) !important;
    }

    .tabs-scroll-container {
        display: flex;
        gap: 0.35rem;
        padding: 0 0.5rem;
        margin: 0 auto;
        width: max-content;
    }

    .tab-item {
        flex-direction: column;
        justify-content: center;
        gap: 0.2rem;
        padding: 0.45rem 0.75rem;
        border-radius: 1rem;
        min-width: 4.4rem;
        text-align: center;
        border: 1px solid transparent;
        background: transparent;
        backdrop-filter: none;
    }

    .tab-item .tab-icon {
        font-size: 1.4rem;
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .tab-item .tab-label {
        font-size: 0.625rem;
        font-weight: 700;
        letter-spacing: 0.01em;
        white-space: nowrap;
        text-transform: none;
    }

    .tab-badge,
    .tab-count,
    .check-icon {
        display: none;
    }

    .tab-item.active {
        background: rgba(203, 167, 47, 0.15) !important;
        border-color: rgba(203, 167, 47, 0.35) !important;
        color: var(--pi-primary) !important;
        box-shadow: none;
    }

    .tab-item.active .tab-icon {
        color: var(--pi-primary) !important;
        transform: scale(1.15) translateY(-2px);
    }

    html:not(.dark) .tab-item {
        color: #64748b;
    }

    html:not(.dark) .tab-item.active {
        background: rgba(134, 51, 153, 0.12) !important;
        border-color: rgba(134, 51, 153, 0.3) !important;
        color: #863399 !important;
    }

    html:not(.dark) .tab-item.active .tab-icon {
        color: #863399 !important;
    }
}

/* ==========================================================================
   Main Workspace Card
   ========================================================================== */
.paidar-workspace-card {
    background: var(--pi-card-bg);
    border: 1px solid var(--pi-card-border);
    border-radius: 2rem;
    padding: 1.5rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
    min-height: 540px;
    height: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

@media (min-width: 768px) {
    .paidar-workspace-card {
        padding: 2.5rem;
    }
}

/* ==========================================================================
   1. OVERVIEW & AUDIO PLAYER
   ========================================================================== */
.overview-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .overview-layout {
        grid-template-columns: 1.1fr 1fr;
    }
}

.glass-media-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pi-card-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.audio-hero-card {
    border-left: 4px solid var(--pi-primary);
}

.audio-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.audio-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1.25rem;
    background: var(--pi-primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(203, 167, 47, 0.3);
}

.tag-live {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--pi-primary);
}

.audio-title {
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--pi-text-main);
    margin: 0.2rem 0;
}

.audio-subtitle {
    font-size: 0.75rem;
    color: var(--pi-text-muted);
}

.audio-controls-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.play-btn-circle {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: var(--pi-primary);
    color: #0b0e11;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 6px 15px var(--pi-primary-glow);
    flex-shrink: 0;
}

.play-btn-circle:hover {
    transform: scale(1.08);
    background: var(--pi-primary-hover);
}

.audio-timeline-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.audio-slider {
    flex: 1;
    accent-color: var(--pi-primary);
    cursor: pointer;
}

.audio-time {
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--pi-text-muted);
}

.speed-badge-btn {
    padding: 0.35rem 0.65rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--pi-card-border);
    color: var(--pi-text-main);
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
}

.panel-badge-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.panel-heading {
    font-size: 1.15rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--pi-text-main);
}

.module-intro-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--pi-text-muted);
    margin-bottom: 1.5rem;
}

.subheading-takeaways {
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--pi-primary);
    margin-bottom: 0.75rem;
}

.takeaways-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.takeaway-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--pi-text-main);
    line-height: 1.4;
}

.takeaway-number {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--pi-primary);
    font-weight: 900;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.overview-cta-box {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-primary-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 1.25rem;
    background: var(--pi-primary);
    color: #0b0e11;
    font-weight: 900;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px var(--pi-primary-glow);
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary-action:hover {
    background: var(--pi-primary-hover);
    transform: scale(1.02);
}

.btn-secondary-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pi-card-border);
    color: var(--pi-text-main);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-secondary-action:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   2. SLIDE DECK PRO
   ========================================================================== */
.slides-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
}

.slide-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slide-counter-badge {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--pi-primary);
}

.slide-dots-indicator {
    display: flex;
    gap: 0.4rem;
}

.slide-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.slide-dot.active {
    width: 1.5rem;
    border-radius: 9999px;
    background: var(--pi-primary);
}

.slide-card-container {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--pi-card-border);
    border-radius: 1.75rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slide-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.slide-icon-circle {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1.25rem;
    background: var(--pi-primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(203, 167, 47, 0.3);
}

.slide-title {
    font-family: 'League Spartan', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--pi-text-main);
    margin: 0;
}

.slide-summary-quote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--pi-text-muted);
    border-left: 3px solid var(--pi-primary);
    padding-left: 1.25rem;
    margin-bottom: 2rem;
}

.slide-bullets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .slide-bullets-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.slide-bullet-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem;
    border-radius: 1.25rem;
    border: 1px solid var(--pi-card-border);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--pi-text-main);
}

.slide-bottom-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--pi-card-border);
}

.slide-ctrl-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pi-card-border);
    color: var(--pi-text-main);
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.slide-ctrl-btn.primary {
    background: var(--pi-primary);
    color: #0b0e11;
    border-color: var(--pi-primary);
}

.slide-ctrl-btn.success {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.slide-ctrl-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ==========================================================================
   3. FLASHCARDS 3D ENGINE
   ========================================================================== */
.flashcards-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.flashcards-topbar {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.mastery-info {
    width: 100%;
    max-width: 450px;
    display: flex;
    justify-content: space-between;
}

.flashcard-3d-scene {
    width: 100%;
    max-width: 580px;
    height: 340px;
    perspective: 1200px;
    cursor: pointer;
}

.flashcard-3d-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2rem;
}

.flashcard-3d-card.is-flipped {
    transform: rotateY(180deg);
}

.flashcard-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 2rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1.5px solid var(--pi-card-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.flashcard-front {
    background: linear-gradient(135deg, rgba(30, 34, 42, 0.95), rgba(18, 20, 24, 0.98));
}

.flashcard-back {
    background: linear-gradient(135deg, rgba(20, 35, 30, 0.95), rgba(15, 25, 22, 0.98));
    transform: rotateY(180deg);
    border-color: rgba(16, 185, 129, 0.3);
}

.card-face-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-category-badge {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background: var(--pi-primary-glow);
    color: var(--pi-primary);
    border: 1px solid rgba(203, 167, 47, 0.3);
}

.card-hint {
    font-size: 0.7rem;
    color: var(--pi-text-muted);
}

.card-prompt-text {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--pi-text-main);
    text-align: center;
    line-height: 1.4;
    margin: 1rem 0;
}

.card-answer-text {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #e2e8f0;
    text-align: center;
    margin: 1rem 0;
}

.card-face-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.flashcard-actions-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    box-sizing: border-box;
}

.fc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 1.25rem;
    font-weight: 900;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    flex: 1 1 0px;
    min-width: 130px;
    white-space: nowrap;
    box-sizing: border-box;
}

.card-counter-indicator {
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--pi-text-muted);
    padding: 0 0.25rem;
}

.fc-btn.review {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.fc-btn.known {
    background: #10b981;
    color: white;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
}

.fc-btn:hover {
    transform: scale(1.03);
}

@media (max-width: 640px) {
    .flashcard-3d-scene {
        height: 360px;
        max-width: 100%;
    }
    
    .flashcard-actions-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        width: 100%;
    }
    
    .card-counter-indicator {
        grid-column: span 2;
        text-align: center;
        order: -1;
        margin-bottom: 0.25rem;
    }
    
    .fc-btn {
        width: 100%;
        min-width: unset;
        padding: 0.85rem 0.5rem;
        font-size: 0.78rem;
        justify-content: center;
    }
}

/* ==========================================================================
   4. MIND MAP / MAPA CONCEPTUAL
   ========================================================================== */
.mindmap-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mindmap-canvas-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mindmap-root-node {
    margin: 0 auto 2rem auto;
    padding: 0.85rem 1.5rem;
    border-radius: 1.5rem;
    background: var(--pi-primary-glow);
    border: 2px solid var(--pi-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    max-width: 100%;
    width: auto;
    box-shadow: 0 10px 30px var(--pi-primary-glow);
    box-sizing: border-box;
    word-break: break-word;
    text-align: center;
}

.mindmap-root-node h4 {
    font-family: 'League Spartan', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--pi-text-main);
    margin: 0;
}

.mindmap-branches-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .mindmap-branches-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.mindmap-branch-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--pi-card-border);
    border-top: 4px solid var(--pi-primary);
    border-radius: 1.5rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}

.branch-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.branch-header h5 {
    font-size: 0.95rem;
    font-weight: 900;
    text-transform: uppercase;
    margin: 0;
}

.branch-nodes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.concept-node-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pi-card-border);
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}

.concept-node-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.node-bullet {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-top: 0.4rem;
    flex-shrink: 0;
}

.node-info {
    flex: 1;
    min-width: 0;
}

.node-info h6 {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--pi-text-main);
    margin: 0 0 0.2rem 0;
    word-break: break-word;
}

.node-info p {
    font-size: 0.75rem;
    color: var(--pi-text-muted);
    margin: 0;
    line-height: 1.3;
    word-break: break-word;
}

/* ==========================================================================
   5. SIMULADOR / DATA TABLES
   ========================================================================== */
.simulator-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.module-section-title,
.simulator-intro h3,
.mindmap-header h3,
.reading-bottom-cta h4,
.cert-title {
    color: #ffffff !important;
}

.module-section-subtitle {
    color: #f3f4f6 !important;
}

.simulator-intro {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.simulator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .simulator-grid {
        grid-template-columns: 1fr 1.2fr;
    }
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--pi-text-muted);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.input-with-icon {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pi-card-border);
    border-radius: 1rem;
    padding: 0.65rem 1rem;
    gap: 0.5rem;
}

.input-with-icon input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--pi-text-main);
    font-size: 1rem;
    font-weight: 700;
    width: 100%;
}

.kpi-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pi-card-border);
    border-radius: 1.25rem;
    padding: 1.25rem;
}

.kpi-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--pi-text-muted);
}

.kpi-value {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--pi-text-main);
    margin: 0.35rem 0;
}

.kpi-box.positive .kpi-value {
    color: #10b981;
}

.kpi-box.negative .kpi-value {
    color: #f43f5e;
}

.kpi-sub {
    font-size: 0.7rem;
    color: var(--pi-text-muted);
    margin: 0;
}

.simulator-feedback-banner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.15rem 1.35rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(134, 51, 153, 0.15), rgba(99, 102, 241, 0.1));
    border: 1.5px solid rgba(134, 51, 153, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.simulator-feedback-text {
    font-size: 0.825rem;
    line-height: 1.5;
    font-weight: 600;
    color: #e9d5ff;
    margin: 0;
}

/* ==========================================================================
   6. QUIZ CON RETROALIMENTACIÓN
   ========================================================================== */
.quiz-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quiz-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--pi-card-border);
}

.quiz-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quiz-score-badge {
    padding: 0.75rem 1.5rem;
    border-radius: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quiz-score-badge.passed {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.quiz-score-badge.failed {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fb7185;
}

.score-number {
    font-size: 1.75rem;
    font-weight: 900;
}

.score-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.quiz-questions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quiz-question-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px solid var(--pi-card-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

.quiz-question-card.correct-border {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.03);
}

.quiz-question-card.wrong-border {
    border-color: rgba(244, 63, 94, 0.5);
    background: rgba(244, 63, 94, 0.03);
}

.q-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.q-number-pill {
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--pi-primary);
}

.q-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--pi-text-main);
    line-height: 1.4;
    margin-bottom: 1.25rem;
}

.q-options-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.q-option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pi-card-border);
    cursor: pointer;
    transition: all 0.2s;
}

.q-option-label:hover {
    background: rgba(255, 255, 255, 0.08);
}

.q-option-label.is-selected {
    border-color: var(--pi-primary);
    background: var(--pi-primary-glow);
}

.q-option-label.is-correct-answer {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981;
}

.q-option-label.is-wrong-answer {
    border-color: #f43f5e !important;
    background: rgba(244, 63, 94, 0.15) !important;
    color: #fb7185;
}

.opt-indicator {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.q-explanation-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--pi-text-muted);
    line-height: 1.4;
}

/* ==========================================================================
   7. CERTIFICADO / REPORTE
   ========================================================================== */
.report-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.certificate-card {
    width: 100%;
    max-width: 750px;
    background: linear-gradient(135deg, rgba(25, 28, 35, 0.95), rgba(12, 14, 18, 0.98));
    border: 2px solid var(--pi-primary);
    border-radius: 2rem;
    padding: 3rem 2.5rem;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5), 0 0 40px var(--pi-primary-glow);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.cert-watermark {
    position: absolute;
    right: -2rem;
    bottom: -2rem;
    opacity: 0.05;
    font-size: 15rem;
    pointer-events: none;
}

.cert-lead {
    font-size: 0.95rem;
    color: var(--pi-text-muted);
    margin: 1.5rem 0;
}

.cert-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.cert-stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pi-card-border);
    border-radius: 1.25rem;
    padding: 1.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-name {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--pi-text-muted);
}

.cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--pi-card-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.cert-insignia-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--pi-text-main);
}

/* ==========================================================================
   8. LECTURA PROFUNDA (PAIDAR PROSE RICH)
   ========================================================================== */
.reading-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reading-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--pi-card-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.reading-meta-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reading-time-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: var(--pi-primary-glow);
    color: var(--pi-primary);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(203, 167, 47, 0.3);
}

.reading-actions {
    display: flex;
    gap: 0.5rem;
}

.reading-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pi-card-border);
    color: var(--pi-text-main);
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.reading-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--pi-primary);
}

.reading-article-wrapper {
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
}

.paidar-prose-rich {
    color: var(--pi-text-muted);
    font-size: 1rem;
    line-height: 1.85;
    transition: font-size 0.2s ease;
}

.paidar-prose-rich.font-large {
    font-size: 1.15rem;
    line-height: 1.9;
}

.paidar-prose-rich.font-xlarge {
    font-size: 1.25rem;
    line-height: 2;
}

.paidar-prose-rich h1 {
    font-family: 'League Spartan', sans-serif;
    font-size: 2.25rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--pi-text-main);
    margin-top: 2rem;
    margin-bottom: 1.25rem;
    line-height: 1.15;
}

.paidar-prose-rich h2 {
    font-family: 'League Spartan', sans-serif;
    font-size: 1.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--pi-text-main);
    margin-top: 3rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--pi-card-border);
    padding-bottom: 0.5rem;
}

.paidar-prose-rich h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--pi-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.paidar-prose-rich p {
    margin-bottom: 1.5rem;
    color: inherit;
}

.paidar-prose-rich strong {
    color: var(--pi-text-main);
    font-weight: 800;
}

.paidar-prose-rich ul, .paidar-prose-rich ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.paidar-prose-rich li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.paidar-prose-rich blockquote {
    border-left: 4px solid var(--pi-primary);
    background: var(--pi-primary-glow);
    padding: 1.5rem 1.75rem;
    border-radius: 0 1.5rem 1.5rem 0;
    font-style: italic;
    color: var(--pi-text-main);
    margin: 2rem 0;
}

.paidar-prose-rich table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--pi-card-border);
}

.paidar-prose-rich th {
    background: rgba(255, 255, 255, 0.06);
    color: var(--pi-text-main);
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--pi-card-border);
}

.paidar-prose-rich td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--pi-card-border);
    color: var(--pi-text-muted);
}

.paidar-prose-rich details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pi-card-border);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    cursor: pointer;
}

.paidar-prose-rich summary {
    font-weight: 800;
    color: var(--pi-text-main);
    outline: none;
}

.paidar-prose-rich .content-box {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--pi-card-border);
    color: var(--pi-text-muted);
    font-size: 0.9rem;
}

.reading-bottom-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--pi-card-border);
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* ==========================================================================
   9. OVERRIDES DE TEMA CLARO (LIGHT MODE OPTIMIZATIONS)
   ========================================================================== */
html:not(.dark) .flashcard-face {
    box-shadow: 0 20px 40px -10px rgba(134, 51, 153, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
}

html:not(.dark) .flashcard-front {
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 60%, #f3e8ff 100%) !important;
    border: 2px solid rgba(134, 51, 153, 0.25) !important;
}

html:not(.dark) .flashcard-front .card-prompt-text {
    color: #1e1b4b !important; /* Deep indigo text */
}

html:not(.dark) .flashcard-front .card-hint,
html:not(.dark) .flashcard-front .card-face-footer span {
    color: #6b7280 !important;
}

html:not(.dark) .flashcard-back {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 60%, #dcfce7 100%) !important;
    border: 2px solid rgba(16, 185, 129, 0.4) !important;
}

html:not(.dark) .flashcard-back .card-answer-text {
    color: #064e3b !important; /* Deep forest green */
}

html:not(.dark) .flashcard-back .card-hint,
html:not(.dark) .flashcard-back .card-face-footer span {
    color: #4b5563 !important;
}

html:not(.dark) .card-counter-indicator {
    color: #1e293b !important;
    font-weight: 900;
}

html:not(.dark) .mastery-info span {
    color: #1e293b;
}

/* Light Mode: Slide Deck */
html:not(.dark) .slide-card-container {
    background: #ffffff !important;
    border: 1.5px solid rgba(134, 51, 153, 0.12) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

html:not(.dark) .slide-title {
    color: #0f172a !important;
}

html:not(.dark) .slide-summary-quote {
    color: #475569 !important;
}

html:not(.dark) .slide-bullet-item {
    background: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1e293b !important;
}

html:not(.dark) .slide-dot {
    background: rgba(0, 0, 0, 0.15);
}

html:not(.dark) .slide-ctrl-btn {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

/* Light Mode: Mind Map */
html:not(.dark) .mindmap-root-node {
    background: #ffffff !important;
    border: 2px solid #863399 !important;
    box-shadow: 0 10px 30px rgba(134, 51, 153, 0.15);
}

html:not(.dark) .mindmap-root-node h4 {
    color: #863399 !important;
}

html:not(.dark) .mindmap-branch-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

html:not(.dark) .concept-node-item {
    background: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

html:not(.dark) .concept-node-item:hover {
    background: #f1f5f9 !important;
}

html:not(.dark) .node-info h6 {
    color: #0f172a !important;
}

html:not(.dark) .node-info p {
    color: #475569 !important;
}

/* Light Mode: Simulator */
html:not(.dark) .simulator-inputs-panel,
html:not(.dark) .simulator-results-panel {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

html:not(.dark) .input-with-icon {
    background: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

html:not(.dark) .input-with-icon input {
    color: #0f172a !important;
}

html:not(.dark) .kpi-box {
    background: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

html:not(.dark) .kpi-value {
    color: #0f172a !important;
}

html:not(.dark) .simulator-feedback-banner {
    background: linear-gradient(135deg, #fdf4ff 0%, #faf5ff 50%, #f3e8ff 100%) !important;
    border: 1.5px solid rgba(134, 51, 153, 0.35) !important;
    box-shadow: 0 4px 20px rgba(134, 51, 153, 0.08) !important;
}

html:not(.dark) .simulator-feedback-banner .simulator-feedback-text,
html:not(.dark) .simulator-feedback-banner p {
    color: #3b0764 !important; /* High-contrast deep purple */
    font-weight: 700 !important;
}

html:not(.dark) .simulator-feedback-banner .material-symbols-outlined {
    color: #863399 !important;
}

/* Light Mode: Quiz */
html:not(.dark) .quiz-question-card {
    background: #ffffff !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

html:not(.dark) .q-text {
    color: #0f172a !important;
}

html:not(.dark) .q-number-pill {
    color: #863399 !important;
}

html:not(.dark) .q-option-label {
    background: #f8fafc !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    color: #1e293b !important;
}

html:not(.dark) .q-option-label:hover {
    background: #f1f5f9 !important;
    border-color: rgba(134, 51, 153, 0.3) !important;
}

html:not(.dark) .q-option-label.is-selected {
    border-color: #863399 !important;
    background: #faf5ff !important;
    color: #3b0764 !important;
    font-weight: 700;
}

html:not(.dark) .q-option-label.is-selected .opt-indicator {
    background: #863399 !important;
    color: #ffffff !important;
}

html:not(.dark) .q-option-label.is-correct-answer {
    background: #ecfdf5 !important;
    border-color: #10b981 !important;
    color: #047857 !important;
}

html:not(.dark) .q-option-label.is-correct-answer .opt-indicator {
    background: #10b981 !important;
    color: #ffffff !important;
}

html:not(.dark) .q-option-label.is-wrong-answer {
    background: #fff1f2 !important;
    border-color: #f43f5e !important;
    color: #be123c !important;
}

html:not(.dark) .q-option-label.is-wrong-answer .opt-indicator {
    background: #f43f5e !important;
    color: #ffffff !important;
}

html:not(.dark) .opt-indicator {
    background: #e2e8f0 !important;
    color: #334155 !important;
}

html:not(.dark) .q-explanation-box {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #334155 !important;
}

html:not(.dark) .q-explanation-box p {
    color: #334155 !important;
}

html:not(.dark) .quiz-score-badge.passed {
    background: #ecfdf5 !important;
    border: 1.5px solid #10b981 !important;
    color: #047857 !important;
}

html:not(.dark) .quiz-score-badge.failed {
    background: #fff1f2 !important;
    border: 1.5px solid #f43f5e !important;
    color: #be123c !important;
}

/* Light Mode: Certificate */
html:not(.dark) .certificate-card {
    background: linear-gradient(135deg, #ffffff 0%, #faf5ff 50%, #ffffff 100%) !important;
    border-color: #863399 !important;
    box-shadow: 0 25px 50px rgba(134, 51, 153, 0.12) !important;
}

html:not(.dark) .certificate-card h2 {
    color: #0f172a !important;
}

html:not(.dark) .cert-stat-box {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* Light Mode: Reading & Deep Prose */
html:not(.dark) .paidar-prose-rich {
    color: #334155 !important;
}

html:not(.dark) .paidar-prose-rich h1,
html:not(.dark) .paidar-prose-rich h2 {
    color: #0f172a !important;
}

html:not(.dark) .paidar-prose-rich h3 {
    color: #863399 !important;
}

html:not(.dark) .paidar-prose-rich strong {
    color: #0f172a !important;
}

html:not(.dark) .paidar-prose-rich blockquote {
    background: #faf5ff !important;
    border-left-color: #863399 !important;
    color: #3b0764 !important;
}

html:not(.dark) .paidar-prose-rich table {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) .paidar-prose-rich th {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) .paidar-prose-rich td {
    color: #334155 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

html:not(.dark) .paidar-prose-rich details {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) .paidar-prose-rich summary {
    color: #0f172a !important;
}

html:not(.dark) .reading-action-btn {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) .reading-action-btn:hover {
    background: #e2e8f0 !important;
    color: #863399 !important;
}

/* Light Mode: Simulator & Mindmap Headers */
html:not(.dark) .module-section-title,
html:not(.dark) .simulator-intro h3,
html:not(.dark) .mindmap-header h3,
html:not(.dark) .reading-bottom-cta h4,
html:not(.dark) .panel-heading,
html:not(.dark) .slide-title,
html:not(.dark) .cert-title {
    color: #0f172a !important;
}

html:not(.dark) .module-section-subtitle {
    color: #1e293b !important;
}

html:not(.dark) .simulator-inputs-panel {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

html:not(.dark) .simulator-inputs-panel h4 {
    color: #863399 !important;
}

html:not(.dark) .input-group label {
    color: #475569 !important;
}

html:not(.dark) .input-with-icon {
    background: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

html:not(.dark) .input-with-icon:focus-within {
    border-color: #863399 !important;
    box-shadow: 0 0 0 3px rgba(134, 51, 153, 0.15) !important;
}

html:not(.dark) .input-with-icon input {
    color: #0f172a !important;
}

html:not(.dark) .kpi-box {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

html:not(.dark) .kpi-label {
    color: #64748b !important;
}

html:not(.dark) .kpi-value {
    color: #0f172a !important;
}

html:not(.dark) .kpi-sub {
    color: #64748b !important;
}

html:not(.dark) .mindmap-branch-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

html:not(.dark) .concept-node-item {
    background: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

html:not(.dark) .concept-node-item:hover {
    background: #f1f5f9 !important;
    border-color: rgba(134, 51, 153, 0.3) !important;
}

html:not(.dark) .node-info h6 {
    color: #0f172a !important;
}

html:not(.dark) .node-info p {
    color: #64748b !important;
}

html:not(.dark) .mindmap-root-node {
    background: #faf5ff !important;
    border-color: #863399 !important;
}

html:not(.dark) .mindmap-root-node h4 {
    color: #3b0764 !important;
}

/* ==========================================================================
   Animaciones Utilitarias
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

