/* === 1. ПАЛИТРА INDUSTRIAL DEEP === */
:root {
    --bg-page: #0b0c0e;
    --bg-sidebar: #111214;
    --bg-card: #18191d;
    --border-color: #2a2b30;
    
    --text-main: #e0e0e0;
    --text-muted: #858b98;
    
    --accent-blue: #0A56FD;   /* МКЭ / Теория */
    --accent-orange: #f97316; /* Медицина / Практика */
    
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    margin: 0;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* === КНОПКА НАЗАД (Стильная) === */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px; /* Расстояние между иконкой и текстом */
    
    padding: 12px 24px; /* Внутренние отступы (делаем кнопку толще) */
    background-color: rgba(255, 255, 255, 0.03); /* Полупрозрачный фон */
    border: 1px solid var(--border-color); /* Тонкая рамка */
    border-radius: 100px; /* Полное скругление (Pill shape) */
    
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    
    transition: all 0.3s ease; /* Плавность для всего */
    cursor: pointer;
}

/* Эффект при наведении */
.back-btn:hover {
    background-color: rgba(10, 86, 253, 0.1); /* Легкая синяя подсветка */
    border-color: var(--accent-blue); /* Рамка становится синей */
    color: #fff; /* Текст белеет */
    box-shadow: 0 0 20px rgba(10, 86, 253, 0.2); /* Неоновое свечение */
    transform: translateX(-5px); /* Кнопка чуть отъезжает влево */
}

/* Анимация стрелочки внутри */
.back-btn i {
    transition: transform 0.3s ease;
}

.back-btn:hover i {
    transform: translateX(-3px); /* Стрелка двигается отдельно, создавая динамику */
}

/* === 2. ТОНКИЙ СКРОЛЛБАР === */
.custom-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent-orange); }
.custom-scroll { scrollbar-width: thin; scrollbar-color: #333 transparent; }

/* === 3. САЙДБАР === */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header { padding: 24px; border-bottom: 1px solid var(--border-color); }
.logo { font-weight: 900; font-size: 20px; color: #fff; text-decoration: none; text-transform: uppercase; }
.logo span { color: var(--accent-orange); }

.nav-tree { flex-grow: 1; overflow-y: auto; padding: 20px; }
.nav-section { margin-bottom: 30px; }
.nav-title { font-size: 11px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 10px; padding-left: 10px; }

.nav-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; color: var(--text-muted); text-decoration: none;
    font-size: 14px; border-radius: var(--radius); transition: all 0.2s; margin-bottom: 4px;
}

.nav-link:hover { color: #fff; background: #25262b; }
.nav-link.active { background: rgba(10, 86, 253, 0.1); color: var(--accent-blue); font-weight: 600; border-left: 3px solid var(--accent-blue); }
.nav-link.locked { opacity: 0.5; cursor: not-allowed; }
.nav-link.locked:hover { background: transparent; color: var(--text-muted); }

/* СТИЛЬ ДЛЯ ЗОНЫ СКАЧИВАНИЯ */
.download-zone {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 40px; /* Отступ до первой карточки */
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.download-zone:hover {
    background: rgba(10, 86, 253, 0.05); /* Легкая синяя заливка */
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.cloud-icon-box {
    width: 48px;
    height: 48px;
    background: #25262b;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-blue);
    border: 1px solid var(--border-color);
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.dl-title {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.dl-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    font-family: monospace;
}

.dl-action {
    color: var(--text-muted);
    font-size: 18px;
    transition: color 0.2s;
}

.download-zone:hover .dl-action {
    color: var(--accent-blue);
    animation: bounce 1s infinite;
}

/* Анимация стрелочки */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* === 4. ОБЛАСТЬ КОНТЕНТА === */
.main-content { flex-grow: 1; overflow-y: auto; padding: 40px 80px; }

/* Элементы контента */
h1 { font-size: 36px; font-weight: 800; margin-bottom: 10px; color: #fff; line-height: 1.1; }
h2 { font-size: 20px; font-weight: 700; margin-top: 40px; margin-bottom: 20px; color: #fff; display: flex; align-items: center; gap: 10px; }
.subtitle { color: var(--text-muted); font-size: 18px; margin-bottom: 40px; line-height: 1.5; max-width: 800px; }

/* Карточки занятий (Уроки) */
.lesson-block {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 30px; margin-bottom: 30px; transition: transform 0.2s;
}
.lesson-block:hover { transform: translateY(-2px); border-color: #444; }
.style-fem { border-top: 4px solid var(--accent-blue); }
.style-med { border-top: 4px solid var(--accent-orange); }

.lesson-header { display: flex; justify-content: space-between; margin-bottom: 15px; }
.lesson-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; background: #25262b; color: var(--text-muted); }
h3 { font-size: 22px; font-weight: 700; margin: 0; color: #fff; }
p { line-height: 1.6; margin-bottom: 20px; color: #ccc; }

/* Ссылки на ресурсы */
.resources-list { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); }
.resource-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-muted); font-size: 14px; padding: 8px 0; transition: color 0.2s; }
.resource-link:hover { color: #fff; }
.resource-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(255,255,255,0.05); color: #fff; font-size: 12px; }
.style-fem .resource-icon { color: var(--accent-blue); background: rgba(10, 86, 253, 0.1); }
.style-med .resource-icon { color: var(--accent-orange); background: rgba(249, 115, 22, 0.1); }

/* === 5. СТИЛИ ДЛЯ DASHBOARD (ГЛАВНОЙ) === */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-top: 30px; }
.week-card {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 24px;
    text-decoration: none; display: flex; flex-direction: column; height: 100%; transition: 0.2s;
}
.week-card:hover { border-color: var(--accent-blue); transform: translateY(-3px); }
.week-card.locked { opacity: 0.5; pointer-events: none; border-style: dashed; }

.week-number { font-size: 12px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 10px; }
.week-title { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.week-desc { font-size: 14px; color: var(--text-muted); line-height: 1.4; }
.week-icon { margin-top: auto; padding-top: 20px; color: var(--accent-blue); text-align: right; }
.week-card.locked .week-icon { color: var(--text-muted); }