/* ═══════════════════════════════════════════════════════════════════════════
   🌍 PENSAMIENTO SOCIAL — Sistema de Diseño Global
   ═══════════════════════════════════════════════════════════════════════════
   Autor: Plataforma Educativa Pensamiento Social
   Versión: 1.0.0 — Julio 2026
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   🎨 VARIABLES CSS PERSONALIZADAS
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
    /* Colores primarios (Azul Océano Neón) */
    --primary-600: #0ea5e9;
    --primary-700: #0284c7;
    --primary-400: #38bdf8;
    --accent-amber: #f59e0b;
    --accent-rose: #e11d48;

    /* Fondos animados (Océano Profundo) */
    --bg-day: linear-gradient(135deg, #0f172a 0%, #082f49 50%, #172554 100%);
    --bg-night: linear-gradient(135deg, #0f172a 0%, #082f49 50%, #172554 100%);

    /* Texto */
    --text-primary: #e0f2fe;
    --text-secondary: #bae6fd;
    --text-muted: #7dd3fc;

    /* Glass Premium */
    --glass-bg: rgba(15, 23, 42, 0.5);
    --glass-border: rgba(186, 230, 253, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

    /* Tipografía */
    --font-ui: 'Inter', 'Nunito', system-ui, sans-serif;
    --font-heading: 'Outfit', 'Poppins', system-ui, sans-serif;
    --font-accent: 'Playfair Display', Georgia, serif;

    /* Espaciado */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transiciones */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   🌐 RESET Y BASE
   ═══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ui);
    background: var(--bg-day);
    background-size: 300% 300%;
    animation: aurora 20s ease infinite;
    overflow: hidden;
    height: 100vh;
    color: var(--text-primary);
    transition: color 0.5s ease, background 0.5s ease;
    display: flex;
    flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🌈 ANIMACIÓN AURORA DE FONDO
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes aurora {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   🪟 GLASSMORPHISM
   ═══════════════════════════════════════════════════════════════════════════ */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s var(--ease-smooth);
    box-shadow: var(--glass-shadow);
}

.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
/* ═══════════════════════════════════════════════════════════════════════════
   🔘 BOTONES PREMIUM (Estilo EvalLab Pro)
   ═══════════════════════════════════════════════════════════════════════════ */
.clay-btn {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s var(--ease-bounce);
    color: var(--primary-400);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-ui);
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.clay-btn:hover {
    transform: scale(1.05);
    background: rgba(15, 23, 42, 0.9);
    border-color: var(--primary-400);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
    color: var(--primary-400);
}

.clay-btn:active {
    transform: scale(0.96);
}

/* ═══════════════════════════════════════════════════════════════════════════
   🏷️ HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 50;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    min-width: 0;
}

.header-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #050b14;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 15px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
    transition: transform 0.7s var(--ease-smooth), box-shadow 0.3s;
    overflow: hidden;
}

.header-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-logo:hover .header-logo-icon {
    transform: rotate(180deg);
}

.header-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    line-height: 1;
}

.header-title span {
    color: var(--primary-600);
}

body.dark .header-title span {
    color: #fbbf24;
}

.header-subtitle {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-actions .clay-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   📦 CONTENEDOR PRINCIPAL
   ═══════════════════════════════════════════════════════════════════════════ */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════════════════
   📋 SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
    display: flex;
    flex-direction: column;
    width: 300px;
    min-width: 240px;
    max-width: 400px;
    z-index: 40;
    transition: transform 0.3s var(--ease-smooth);
    height: 100%;
    overflow: hidden;
}

.sidebar-search {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    font-family: var(--font-ui);
    outline: none;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}

.sidebar-search input:focus {
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   📂 CATEGORÍAS DEL MENÚ
   ═══════════════════════════════════════════════════════════════════════════ */
.menu-category {
    margin-bottom: 8px;
}

.menu-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    user-select: none;
}

.menu-category-header:hover {
    background: rgba(180, 83, 9, 0.08);
    color: var(--primary-600);
}

.menu-category-header i {
    margin-right: 8px;
    font-size: 12px;
    color: var(--primary-600);
}

body.dark .menu-category-header i {
    color: #fbbf24;
}

.menu-category-count {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
}

.menu-category-items {
    padding-left: 4px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   📄 ITEMS DEL MENÚ
   ═══════════════════════════════════════════════════════════════════════════ */
.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(180, 83, 9, 0.08);
    border-left-color: rgba(180, 83, 9, 0.3);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(180, 83, 9, 0.15) 0%, transparent 100%);
    border-left-color: var(--primary-600);
    color: var(--primary-700);
}

body.dark .menu-item.active {
    color: #fbbf24;
}

.menu-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.menu-item-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Etiquetas de tipo */
.type-tag {
    font-size: 7px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.type-interactive { background: #dcfce7; color: #166534; }
.type-taller      { background: #dbeafe; color: #1e40af; }
.type-juego       { background: #fce7f3; color: #9d174d; }
.type-video       { background: #fee2e2; color: #991b1b; }
.type-pdf         { background: #ffedd5; color: #9a3412; }
.type-ext         { background: #f3e8ff; color: #6b21a8; }

body.dark .type-interactive { background: rgba(22, 101, 52, 0.3); color: #86efac; }
body.dark .type-taller      { background: rgba(30, 64, 175, 0.3); color: #93c5fd; }
body.dark .type-juego       { background: rgba(157, 23, 77, 0.3); color: #f9a8d4; }

/* ═══════════════════════════════════════════════════════════════════════════
   🏠 ÁREA DE CONTENIDO PRINCIPAL
   ═══════════════════════════════════════════════════════════════════════════ */
.content-area {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🏠 DASHBOARD DE BIENVENIDA
   ═══════════════════════════════════════════════════════════════════════════ */
.welcome-dashboard {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Frase célebre */
.quote-card {
    padding: 32px;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.quote-card::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 120px;
    font-family: Georgia, serif;
    color: rgba(180, 83, 9, 0.08);
    line-height: 1;
}

body.dark .quote-card::before {
    color: rgba(251, 191, 36, 0.08);
}

.quote-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary-600);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

body.dark .quote-label {
    color: #fbbf24;
}

.quote-text {
    font-family: var(--font-accent);
    font-size: 1.3rem;
    font-weight: 600;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.quote-author {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.quote-new-btn {
    position: absolute;
    bottom: 16px;
    right: 20px;
    font-size: 11px;
    color: var(--primary-600);
    cursor: pointer;
    font-weight: 700;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.quote-new-btn:hover { opacity: 1; }

body.dark .quote-new-btn { color: #fbbf24; }

/* Centro de referencias */
.references-card {
    padding: 24px;
    border-radius: var(--radius-xl);
}

.references-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.references-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.references-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ref-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    text-decoration: none;
}

.ref-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ref-chip i {
    font-size: 11px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   📺 VISOR DE CONTENIDO (iframe)
   ═══════════════════════════════════════════════════════════════════════════ */
.content-viewer {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.content-viewer.active {
    display: flex;
}

.content-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.3);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

body.dark .content-toolbar {
    border-bottom-color: rgba(100, 116, 139, 0.3);
}

.content-toolbar-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-toolbar-title i {
    color: var(--primary-600);
}

body.dark .content-toolbar-title i {
    color: #fbbf24;
}

.content-toolbar .clay-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 12px;
}

.content-iframe-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.content-iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

body.dark .content-iframe-wrapper iframe {
    background: #0f172a;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🦶 FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.footer {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-muted);
    flex-shrink: 0;
    padding: 0 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

body.dark .footer {
    border-top-color: rgba(255,255,255,0.05);
}

.footer a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 700;
}

body.dark .footer a {
    color: #fbbf24;
}

/* ═══════════════════════════════════════════════════════════════════════════
   📜 SCROLLBAR PERSONALIZADO
   ═══════════════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(180, 83, 9, 0.25);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(180, 83, 9, 0.5);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(180, 83, 9, 0.25) transparent;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ✨ ANIMACIONES
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes bounceIn {
    0%   { transform: scale(0.8); opacity: 0; }
    50%  { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(180, 83, 9, 0.4); }
    50%      { box-shadow: 0 0 0 8px rgba(180, 83, 9, 0); }
}

.animate-bounce-in { animation: bounceIn 0.5s ease-out; }
.animate-fade-in-up { animation: fadeInUp 0.4s ease-out; }
.animate-slide-in { animation: slideInRight 0.4s ease-out; }

/* ═══════════════════════════════════════════════════════════════════════════
   🖥️ OVERLAY MÓVIL
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 35;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ⌨️ ACCESIBILIDAD
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    body {
        animation: none;
    }
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--primary-400);
    outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   📱 RESPONSIVE — MOBILE FIRST
   ═══════════════════════════════════════════════════════════════════════════ */

/* Móviles (max 768px) */
@media (max-width: 768px) {
    .header {
        padding: 0 8px;
    }

    .header-logo-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .header-title {
        font-size: 1rem;
    }

    .header-subtitle {
        font-size: 8px;
    }

    .main-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 64px;
        left: 0;
        height: calc(100vh - 64px - 32px);
        z-index: 40;
        transform: translateX(-100%);
        width: 85%;
        max-width: 320px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content-area {
        width: 100%;
    }

    .welcome-dashboard {
        padding: 12px;
        gap: 16px;
    }

    .quote-card {
        padding: 20px;
    }

    .quote-text {
        font-size: 1.05rem;
    }

    .hide-mobile {
        display: none !important;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .header-logo {
        gap: 8px;
    }

    .header-actions {
        gap: 4px;
    }

    .header-actions .clay-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .references-chips {
        gap: 6px;
    }

    .ref-chip {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 260px;
        min-width: 220px;
    }

    .welcome-dashboard {
        padding: 16px;
    }
}

/* Desktop grande */
@media (min-width: 1200px) {
    .sidebar {
        width: 320px;
    }

    .welcome-dashboard {
        padding: 32px;
    }

    .quote-text {
        font-size: 1.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   🔍 MODAL DE BÚSQUEDA GLOBAL
   ═══════════════════════════════════════════════════════════════════════════ */
.search-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    animation: fadeInOverlay 0.2s ease-out;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-modal {
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideDownModal 0.3s var(--ease-bounce);
}

@keyframes slideDownModal {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-modal-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
    gap: 16px;
    background: rgba(255, 255, 255, 0.1);
}

.search-modal-icon {
    font-size: 20px;
    color: var(--primary-600);
}

body.dark .search-modal-icon {
    color: #fbbf24;
}

.search-modal-input {
    flex: 1;
    background: transparent;
    border: none;
    font-family: var(--font-ui);
    font-size: 1.25rem;
    color: var(--text-primary);
    outline: none;
}

.search-modal-input::placeholder {
    color: var(--text-muted);
}

.search-modal-close {
    background: rgba(0,0,0,0.05);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.search-modal-close:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.search-modal-results {
    max-height: 50vh;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    border: 1px solid transparent;
}

.search-result-item:hover, .search-result-item.selected {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--glass-border);
}

body.dark .search-result-item:hover, body.dark .search-result-item.selected {
    background: rgba(0, 0, 0, 0.2);
}

.search-result-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-modal-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.02);
}

.search-modal-footer kbd {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-weight: 600;
}

body.dark .search-modal-footer kbd {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   📂 MENU FOLDERS (ACORDEÓN)
   ═══════════════════════════════════════════════════════════════════════════ */
.menu-folder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}
.menu-folder-header:hover {
    background: rgba(0, 0, 0, 0.05);
}
body.dark .menu-folder-header:hover {
    background: rgba(255, 255, 255, 0.05);
}
.menu-folder-items {
    overflow: hidden;
    animation: slideDownModal 0.2s ease-out;
}

/* ═══════════════════════════════════════════════════════════════════
   🔍 FLOATING TOOLBAR / ZOOM
   ═══════════════════════════════════════════════════════════════════ */
.floating-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255,255,255,0.4);
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

body.dark .floating-toolbar {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(100, 116, 139, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.floating-toolbar.minimized {
    transform: translateX(-50%) translateY(120%);
    opacity: 0;
    pointer-events: none;
}

.toolbar-drag-handle {
    cursor: grab;
    color: var(--text-muted);
    padding: 4px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-drag-handle:active {
    cursor: grabbing;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: rgba(180, 83, 9, 0.1);
    color: var(--primary-600);
}

body.dark .toolbar-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    color: var(--accent-gold);
}

/* Specific icons with background (like the green keyboard in screenshot) */
.toolbar-btn:nth-child(2) {
    background: #10b981;
    color: white;
}
.toolbar-btn:nth-child(2):hover {
    background: #059669;
}

.toolbar-btn.zoom-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-400);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(0,0,0,0.1);
    margin: 0 4px;
}
body.dark .toolbar-divider {
    background: rgba(255,255,255,0.1);
}

.zoom-slider {
    -webkit-appearance: none;
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-400);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.zoom-level-text {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: 12px;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    min-width: 45px;
    text-align: center;
}

.toolbar-restore-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-600);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: none;
    z-index: 9998;
    transition: all 0.3s;
    opacity: 0;
    pointer-events: none;
}
.toolbar-restore-btn.visible {
    opacity: 1;
    pointer-events: auto;
}
body.dark .toolbar-restore-btn {
    background: #fbbf24;
    color: #0f172a;
}

/* ═══════════════════════════════════════════════════════════════════
   🎓 EDUCATIONAL CONSOLE TOOLBAR (PIZARRA INTERACTIVA)
   ═══════════════════════════════════════════════════════════════════ */
.edu-console {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 100px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.edu-console.minimized {
    transform: translateX(-50%) translateY(100px) scale(0.8);
    opacity: 0.5;
}

.console-drag-handle {
    color: var(--text-tertiary);
    cursor: grab;
    padding: 0 5px;
    font-size: 1.2rem;
    transition: color 0.2s;
}
.console-drag-handle:active {
    cursor: grabbing;
}
.console-drag-handle:hover {
    color: var(--primary-500);
}

.console-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.console-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-600);
    transform: translateY(-2px);
}

.console-btn.active {
    background: var(--primary-600);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.console-divider {
    width: 2px;
    height: 30px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.console-tools {
    display: flex;
    align-items: center;
    gap: 5px;
}

.console-btn.zoom-btn {
    color: #f59e0b;
}

.console-btn.zoom-btn:hover {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 50%, #c2410c 100%);
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.4);
}

.console-zoom {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-picker-wrapper {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}
.color-picker-wrapper:hover {
    transform: scale(1.1);
}
.console-color-picker {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 60px;
    height: 60px;
    border: none;
    padding: 0;
    cursor: pointer;
}

.teacher-lock-btn {
    color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════════
   🎖️ CRÉDITOS Y CONTADOR
   ═══════════════════════════════════════════════════════════════════ */
.credits-footer {
    margin-top: 40px;
    text-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--glass-shadow);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.credits-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.credits-text strong {
    color: var(--primary-600);
    font-weight: 700;
}

.credits-sub {
    font-size: 12px;
    color: var(--text-tertiary);
    font-style: italic;
    display: block;
    margin-top: 5px;
}

.visit-counter {
    display: inline-block;
    transition: transform 0.3s ease;
}

.visit-counter:hover {
    transform: scale(1.05);
}

.visit-counter img {
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════
   ⭐ STICKER POPUP
   ═══════════════════════════════════════════════════════════════════ */
.sticker-popup {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    z-index: 1001;
    min-width: 180px;
}
.sticker-option {
    font-size: 24px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s;
    user-select: none;
}
.sticker-option:hover {
    transform: scale(1.3);
}
.sticker-option.selected {
    transform: scale(1.3);
    background: rgba(255,255,255,0.3);
    border-radius: 8px;
}


