:root {
    --bg-pri: #0a0a0f; --bg-sec: #12121a; --bg-card: #1a1a24; --bg-hover: #222230;
    --text-pri: #f0f0f5; --text-sec: #8888a0; --text-muted: #555566;
    --border: #2a2a3a; --green: #00d4aa; --blue: #4488ff; --purple: #aa66ff;
    --yellow: #ffcc00; --red: #ff4466; --cyan: #00ccff;
    --header-h: 56px; --sidebar-w: 260px; --chat-w: 300px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg-pri); color: var(--text-pri); line-height: 1.6; overflow: hidden; }

.dito-tutor { display: flex; flex-direction: column; height: 100vh; }
.dt-header { height: var(--header-h); background: var(--bg-sec); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1rem; }
.dt-header-left, .dt-header-right { display: flex; align-items: center; gap: 1rem; }
.dt-header-center { flex: 1; text-align: center; }
.dt-logo { font-family: 'Space Mono', monospace; font-weight: 700; }
.dt-logo-icon { width: 32px; height: 32px; display: inline-flex; align-items: center; vertical-align: middle; }

.dt-main { display: flex; flex: 1; overflow: hidden; }
.dt-sidebar { width: var(--sidebar-w); background: var(--bg-sec); border-right: 1px solid var(--border); display: flex; flex-direction: column; transition: width .3s; }
.dt-sidebar.dt-collapsed { width: 0; overflow: hidden; }
.dt-sidebar-header { padding: 1rem; border-bottom: 1px solid var(--border); }
.dt-sidebar-footer { padding: 1rem; border-top: 1px solid var(--border); margin-top: auto; }

.dt-content { flex: 1; overflow-y: auto; padding: 2rem; }
.dt-content-inner { max-width: 800px; margin: 0 auto; }

.dt-chat { width: var(--chat-w); background: var(--bg-sec); border-left: 1px solid var(--border); display: flex; flex-direction: column; transition: width .3s; }
.dt-chat.dt-collapsed { width: 0; overflow: hidden; }
.dt-chat-header { padding: 1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; }
.dt-chat-msgs { flex: 1; overflow-y: auto; padding: 1rem; }
.dt-chat-hints { padding: .5rem 1rem; }
.dt-chat-input { display: flex; gap: .5rem; padding: 1rem; border-top: 1px solid var(--border); }
.dt-chat-input input { flex: 1; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: .75rem; color: var(--text-pri); }
.dt-chat-input button { background: var(--blue); border: none; color: #fff; padding: .75rem 1rem; border-radius: 8px; cursor: pointer; }

.dt-btn-icon { background: transparent; border: none; color: var(--text-sec); cursor: pointer; padding: .5rem; font-size: 1.2rem; }
.dt-btn-icon:hover { color: var(--text-pri); }
.dt-btn-text { background: none; border: none; color: var(--text-sec); cursor: pointer; font-size: .85rem; }
.dt-btn-pri { background: var(--blue); color: #fff; border: none; padding: .75rem 1.5rem; border-radius: 8px; cursor: pointer; font-weight: 500; }
.dt-btn-pri:hover { background: #5599ff; }
.dt-btn-sec { background: var(--bg-card); color: var(--text-pri); border: 1px solid var(--border); padding: .75rem 1.5rem; border-radius: 8px; cursor: pointer; }
.dt-btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }

.dt-course-select { width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: .75rem; color: var(--text-pri); }
.dt-breadcrumb { font-size: .85rem; color: var(--text-sec); }
.dt-breadcrumb span { margin: 0 .25rem; }

.dt-progress-mini { display: flex; align-items: center; gap: .5rem; }
.dt-progress-text { font-family: 'Space Mono', monospace; font-size: .8rem; color: var(--green); }
.dt-progress-bar { width: 60px; height: 4px; background: var(--bg-card); border-radius: 2px; overflow: hidden; }
.dt-progress-fill { height: 100%; background: var(--green); transition: width .3s; }

/* Navigation */
.dt-nav { flex: 1; overflow-y: auto; padding: .5rem; }
.dt-nav-mod { margin-bottom: .5rem; }
.dt-nav-mod-hdr { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-radius: 8px; cursor: pointer; }
.dt-nav-mod-hdr:hover { background: var(--bg-hover); }
.dt-nav-mod-hdr span:nth-child(2) { flex: 1; font-weight: 500; font-size: .9rem; }
.dt-nav-mod-hdr span:last-child { font-family: 'Space Mono', monospace; font-size: .75rem; color: var(--text-sec); }
.dt-nav-lessons { display: none; padding-left: 1rem; }
.dt-nav-mod.dt-expanded .dt-nav-lessons { display: block; }
.dt-nav-lesson { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; border-radius: 6px; font-size: .85rem; cursor: pointer; }
.dt-nav-lesson:hover { background: var(--bg-hover); }
.dt-nav-lesson span:first-child { width: 1.25rem; text-align: center; }
.dt-nav-lesson span:nth-child(2) { font-family: 'Space Mono', monospace; color: var(--text-muted); font-size: .75rem; }
.dt-nav-lesson span:last-child { flex: 1; color: var(--text-sec); }
.dt-st-completed span:first-child { color: var(--green); }
.dt-st-completed span:last-child { color: var(--text-pri); }
.dt-st-in_progress span:first-child { color: var(--yellow); }
.dt-st-locked { opacity: .5; cursor: not-allowed !important; }

/* Dito avatars */
.dt-dito-avatar, .dt-dito-mini { display: flex; align-items: center; justify-content: center; border-radius: 12px; font-weight: bold; }
.dt-dito-avatar { width: 48px; height: 48px; font-size: 1.5rem; }
.dt-dito-mini { width: 28px; height: 28px; font-size: .9rem; }
.dt-dito-avatar.dt-big { width: 80px; height: 80px; font-size: 2.5rem; margin: 0 auto 1.5rem; }
.dt-dito-idle { background: linear-gradient(135deg, #8B5CF6, #6d28d9); color: #fff; }
.dt-dito-tutor { background: linear-gradient(135deg, #10B981, #059669); color: #fff; }
.dt-dito-guide { background: linear-gradient(135deg, #3B82F6, #2563eb); color: #fff; }
.dt-dito-celebrating { background: linear-gradient(135deg, #10B981, #34d399); color: #fff; }
.dt-dito-processing { background: linear-gradient(135deg, #8B5CF6, #7c3aed); color: #fff; }
.dt-state { font-family: 'Space Mono', monospace; font-size: .7rem; color: var(--text-muted); text-transform: uppercase; margin-left: auto; }

/* Chat messages */
.dt-msg { display: flex; gap: .75rem; margin-bottom: 1rem; }
.dt-msg-dito { align-items: flex-start; }
.dt-msg-user { flex-direction: row-reverse; }
.dt-msg-avatar { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0; }
.dt-msg-bubble { background: var(--bg-card); padding: .75rem 1rem; border-radius: 12px; font-size: .9rem; max-width: 85%; }
.dt-msg-user .dt-msg-bubble { background: var(--blue); color: #fff; }
.dt-typing { display: flex; gap: 4px; padding: .75rem 1rem; }
.dt-typing span { width: 8px; height: 8px; background: var(--text-muted); border-radius: 50%; animation: typing 1.4s infinite; }
.dt-typing span:nth-child(2) { animation-delay: .2s; }
.dt-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%, 80%, 100% { transform: scale(.8); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
.dt-hint { display: block; width: 100%; text-align: left; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .75rem; margin-bottom: .5rem; color: var(--text-sec); font-size: .8rem; cursor: pointer; }
.dt-hint:hover { border-color: var(--yellow); }

/* Phases */
.dt-phase { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.dt-badge { display: inline-block; font-family: 'Space Mono', monospace; font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; padding: .25rem .75rem; border-radius: 20px; background: var(--blue); color: #fff; margin-bottom: .75rem; }
.dt-badge-yellow { background: var(--yellow); color: #000; }
.dt-badge-green { background: var(--green); color: #000; }
.dt-badge-purple { background: var(--purple); }
.dt-badge-blue { background: var(--blue); }
.dt-badge-gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #000; }
.dt-phase h1 { font-size: 2rem; margin-bottom: .5rem; }
.dt-phase h2 { font-size: 1.5rem; margin-bottom: .5rem; }
.dt-sub { color: var(--text-sec); font-size: 1.1rem; margin-bottom: 1rem; }
.dt-actions { margin-top: 2rem; display: flex; gap: 1rem; justify-content: flex-end; }

.dt-dito-box { display: flex; gap: 1rem; background: var(--bg-card); border-radius: 16px; padding: 1.5rem; margin: 1.5rem 0; }
.dt-msgs p { margin-bottom: .75rem; color: var(--text-sec); }

.dt-analogy { display: flex; gap: 1rem; background: linear-gradient(135deg, #2a2a1a, var(--bg-card)); border-left: 4px solid var(--yellow); border-radius: 12px; padding: 1.5rem; margin: 1.5rem 0; }
.dt-icon { font-size: 2rem; }
.dt-analogy p { font-size: 1.15rem; font-style: italic; }
.dt-mapping { background: var(--bg-card); border-radius: 12px; padding: 1rem; margin: 1.5rem 0; }
.dt-map-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; padding: .75rem .5rem; border-bottom: 1px solid var(--border); }
.dt-map-row:last-child { border-bottom: none; }
.dt-map-row span:first-child { color: var(--green); font-weight: 500; }
.dt-map-row span:nth-child(2) { color: var(--text-muted); }

.dt-experiment { display: flex; gap: 1rem; background: var(--bg-card); border-left: 4px solid var(--green); border-radius: 12px; padding: 1.5rem; margin: 1.5rem 0; }
.dt-experiment ol { padding-left: 1.25rem; color: var(--text-sec); }
.dt-experiment li { margin-bottom: .5rem; }

.dt-concept-main { background: var(--bg-card); border-radius: 12px; padding: 1.5rem; margin: 1.5rem 0; }
.dt-concept-main p { font-size: 1.1rem; }
.dt-section { margin: 1.5rem 0; }
.dt-section h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--cyan); margin-bottom: .75rem; }
.dt-section ul { padding-left: 1.25rem; color: var(--text-sec); }
.dt-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; }
.dt-table th { text-align: left; padding: .75rem; background: var(--bg-pri); color: var(--text-muted); font-family: 'Space Mono', monospace; font-size: .75rem; text-transform: uppercase; border-bottom: 2px solid var(--border); }
.dt-table td { padding: .75rem; border-bottom: 1px solid var(--border); }
.dt-connection { display: flex; gap: .75rem; background: rgba(68, 136, 255, 0.1); border: 1px solid var(--blue); border-radius: 12px; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.dt-connection span { color: var(--blue); font-size: 1.25rem; }
.dt-connection p { color: var(--text-sec); }

.dt-question { background: var(--bg-card); border-radius: 16px; padding: 2rem; margin: 1.5rem 0; }
.dt-question > p { font-size: 1.15rem; margin-bottom: 1.5rem; }
.dt-options { display: flex; flex-direction: column; gap: .75rem; }
.dt-opt { display: flex; align-items: center; gap: 1rem; background: var(--bg-pri); border: 2px solid var(--border); border-radius: 12px; padding: 1rem 1.25rem; cursor: pointer; text-align: left; transition: all .2s; color: #ffffff; }
.dt-opt:hover:not(:disabled) { border-color: var(--blue); background: var(--bg-hover); }
.dt-opt:disabled { cursor: not-allowed; }
.dt-opt-letter { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-card); display: flex; align-items: center; justify-content: center; font-family: 'Space Mono', monospace; font-weight: 700; }
.dt-opt.dt-correct { border-color: var(--green); background: rgba(0, 212, 170, 0.1); }
.dt-opt.dt-correct .dt-opt-letter { background: var(--green); color: #000; }
.dt-opt.dt-wrong { border-color: var(--red); background: rgba(255, 68, 102, 0.1); }
.dt-opt.dt-wrong .dt-opt-letter { background: var(--red); color: #fff; }
.dt-feedback { padding: 1.25rem; border-radius: 12px; margin: 1.5rem 0; }
.dt-fb-ok { background: rgba(0, 212, 170, 0.1); border: 1px solid var(--green); }
.dt-fb-err { background: rgba(255, 68, 102, 0.1); border: 1px solid var(--red); }

.dt-closure { text-align: center; }
.dt-celebrate { display: flex; gap: 1.5rem; background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), var(--bg-card)); border-radius: 16px; padding: 2rem; margin: 1.5rem 0; text-align: left; }
.dt-celebrate p { margin-bottom: .75rem; font-size: 1.1rem; }
.dt-summary { background: var(--bg-card); border-radius: 12px; padding: 1.5rem; margin: 1.5rem auto; max-width: 500px; text-align: left; }
.dt-summary h4 { font-size: .85rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1rem; }
.dt-summary ul { list-style: none; }
.dt-summary li { padding: .5rem 0; border-bottom: 1px solid var(--border); color: var(--text-sec); }
.dt-keyterm { display: flex; gap: .75rem; align-items: center; justify-content: center; background: var(--bg-card); border-radius: 8px; padding: 1rem 1.25rem; margin: 1rem auto; max-width: 400px; }
.dt-keyterm span { color: var(--text-muted); }
.dt-keyterm strong { color: var(--cyan); font-family: 'Space Mono', monospace; }
.dt-xp { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 1rem; background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1)); border-radius: 12px; margin: 1.5rem auto; max-width: 200px; font-size: 1.25rem; font-weight: 600; color: var(--yellow); }

.dt-intro, .dt-welcome, .dt-loading, .dt-error, .dt-complete { text-align: center; padding: 4rem 2rem; }
.dt-intro h1, .dt-welcome h1, .dt-complete h1 { font-size: 2.5rem; margin-bottom: .5rem; }
.dt-meta { display: flex; justify-content: center; gap: 3rem; margin: 2rem 0; }
.dt-meta > div { text-align: center; }
.dt-val { display: block; font-size: 2rem; font-weight: 700; color: var(--green); font-family: 'Space Mono', monospace; }
.dt-meta span:last-child { font-size: .85rem; color: var(--text-muted); text-transform: uppercase; }
.dt-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--blue); border-radius: 50%; margin: 0 auto; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1024px) {
    .dt-sidebar, .dt-chat { position: fixed; top: var(--header-h); bottom: 0; z-index: 100; }
    .dt-sidebar { left: 0; }
    .dt-sidebar.dt-collapsed { transform: translateX(-100%); }
    .dt-chat { right: 0; }
    .dt-chat.dt-collapsed { transform: translateX(100%); }
}
@media (max-width: 768px) {
    :root { --sidebar-w: 100%; --chat-w: 100%; }
    .dt-content { padding: 1rem; }
    .dt-phase h1 { font-size: 1.5rem; }
}

/* FIX: Aumentar tamaño base */
html { font-size: 18px; }
.dt-content { padding: 3rem; }
.dt-content-inner { max-width: 900px; }
.dt-phase h1 { font-size: 2.5rem; }
.dt-phase h2 { font-size: 2rem; }
.dt-analogy p { font-size: 1.3rem; }
.dt-concept-main p { font-size: 1.2rem; }
.dt-table { font-size: 1rem; }
.dt-question > p { font-size: 1.3rem; }
.dt-opt { font-size: 1.1rem; padding: 1.25rem 1.5rem; }
.dt-sidebar { width: 300px; }
.dt-nav-mod-hdr span:nth-child(2) { font-size: 1rem; }
.dt-nav-lesson { font-size: 1rem; padding: .75rem 1rem; }

/* Fix: texto de opciones de verificación */
.dt-opt-text {
    color: #ffffff;
}
.dt-opt.dt-correct .dt-opt-text,
.dt-opt.dt-wrong .dt-opt-text {
    color: #ffffff;
}

/* Fix urgente: texto opciones verificación */
.dt-opt-text {
    color: #ffffff !important;
}
.dt-options .dt-opt {
    color: #ffffff !important;
}

/* Chat panel resize */
.dt-chat {
    position: relative;
    min-width: 250px;
    max-width: 600px;
}
.dt-chat-resize {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: ew-resize;
    background: transparent;
    transition: background 0.2s;
    z-index: 10;
}
.dt-chat-resize:hover,
.dt-chat-resize.dragging {
    background: var(--blue);
}

/* Dito Hero - pantalla de inicio */
.dt-dito-avatar.dt-hero {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}
.dt-dito-avatar.dt-hero svg {
    width: 100%;
    height: 100%;
}

/* SVG dentro del logo header */
.dt-logo-icon svg {
    width: 100%;
    height: 100%;
}
/**
 * Synclair Academy - CSS Additions v2.1
 * Agregar al final de tutor.css o como archivo separado
 */

/* ============================
   NAVEGACIÓN BIDIRECCIONAL
   ============================ */

.dt-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.dt-phase-indicator {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary, #888);
    padding: 0.25rem 0.75rem;
    background: var(--bg-card, #1a1a24);
    border-radius: 12px;
    margin: 0 auto;
}

/* Botón Anterior */
#btnPrev {
    background: transparent;
    border: 1px solid var(--border, #2a2a3a);
    color: var(--text-secondary, #888);
}

#btnPrev:hover {
    background: var(--bg-card, #1a1a24);
    color: var(--text-primary, #f0f0f5);
    border-color: var(--accent-blue, #4488ff);
}

/* Navegación en verificación */
.dt-nav-verification {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #2a2a3a);
}

/* ============================
   SYNCXP BADGE (antes DXP)
   ============================ */

.syncxp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    animation: syncxp-pop 0.5s ease-out;
}

.syncxp-icon {
    font-size: 1.3rem;
}

.syncxp-amount {
    font-family: 'Space Mono', monospace;
}

@keyframes syncxp-pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Compatibilidad con clase antigua (por si quedó en algún lado) */
.dxp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
}

/* ============================
   CURSO COMPLETADO
   ============================ */

.dt-complete {
    text-align: center;
    padding: 3rem;
}

.dt-complete h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.dt-complete-xp {
    font-size: 1.5rem;
    color: var(--accent-green, #10B981);
    margin: 1rem 0;
}

.dt-complete-xp strong {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
}

.dt-complete-cert {
    color: var(--text-secondary, #888);
    margin: 1rem 0;
}

.dt-complete-next {
    color: var(--accent-blue, #4488ff);
    font-size: 0.9rem;
    margin-top: 1.5rem;
}

/* ============================
   NOTAS Y WARNINGS (Di Santo)
   ============================ */

.dt-warning {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #F59E0B;
    border-radius: 8px;
    margin: 1rem 0;
}

.dt-warning span {
    font-size: 1.2rem;
}

.dt-warning p {
    color: var(--text-primary, #f0f0f5);
    margin: 0;
}

.dt-note {
    padding: 1rem 1.5rem;
    background: rgba(139, 92, 246, 0.1);
    border-left: 4px solid #8B5CF6;
    border-radius: 8px;
    margin: 1rem 0;
}

.dt-note h4 {
    color: #8B5CF6;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.dt-note p {
    color: var(--text-secondary, #888);
    margin: 0;
    font-size: 0.95rem;
}
