/* Variables de colores pastel y tipografía */
:root {
    --primary-bg: #f8fbf9;
    --sidebar-bg: #e6f2eb;
    --notes-bg: #e6f0fa;
    --accent-color: #5b9279;
    --text-main: #333333;
    --text-light: #555555;
    --border-color: #d1e3d8;
    --footer-text: #000080; /* Azul marino discreto */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Modal Estilos */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.modal-content button, #btn-download {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
}

.hidden {
    display: none !important;
}

/* Layout Principal */
#app-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Navegación Izquierda */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    padding: 20px;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.progress-container {
    margin-bottom: 20px;
}

.progress-bar-bg {
    background-color: #fff;
    border-radius: 10px;
    height: 10px;
    width: 100%;
    margin: 10px 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#progress-bar-fill {
    height: 100%;
    background-color: var(--accent-color);
    width: 0%;
    transition: width 0.3s ease;
}

.nav-list {
    list-style: none;
}

.nav-list li {
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.nav-list input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.nav-list a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-list a.active {
    font-weight: bold;
    color: var(--accent-color);
}

/* Contenido Central (Prioridad) */
.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: #ffffff;
}

.student-info-bar {
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.practice-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.active-section {
    display: block;
}

.practice-section h2 {
    color: var(--accent-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--sidebar-bg);
    padding-bottom: 5px;
}

pre {
    background-color: #f4f6f8;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid #e1e4e8;
    margin: 15px 0;
    font-size: 0.9rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: left;
}

th { background-color: var(--sidebar-bg); }

/* Panel de Notas (Derecha) */
.notes-panel {
    width: 300px;
    background-color: var(--notes-bg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #c9dff2;
}

.notes-panel h3 { margin-bottom: 15px; color: #3b5998; }

#student-notes {
    flex: 1;
    resize: none;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #c9dff2;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: var(--primary-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: bold;
    border-top: 1px solid var(--border-color);
}

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

/* Responsivo para móviles */
@media (max-width: 768px) {
    #app-wrapper {
        flex-direction: column;
        overflow-y: auto;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: 250px;
    }

    .content {
        padding: 20px 15px;
        min-height: 50vh; /* Da prioridad al espacio central */
    }

    .notes-panel {
        width: 100%;
        border-left: none;
        border-top: 1px solid #c9dff2;
        min-height: 300px;
    }
}