/* DOCKER TRAINER — Clean Brutalist */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; border-radius: 0; }

body {
    font-family: 'JetBrains Mono', 'Monaco', 'Consolas', monospace;
    background: #FAF8F5;
    color: #2D2D2D;
    line-height: 1.6;
    overflow: hidden;
    font-size: 13px;
}

.app { display: flex; flex-direction: column; height: 100vh; }

/* HEADER */
.header {
    background: #2D2D2D; color: #FAF8F5;
    border-bottom: 3px solid #2D2D2D;
    padding: 0 24px; height: 48px;
    display: flex; align-items: center;
}
.header-content { display: flex; align-items: center; width: 100%; justify-content: space-between; }
.logo { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 700; color: #FAF8F5; }
.progress-container { display: flex; align-items: center; gap: 12px; }
.progress-bar { width: 200px; height: 4px; background: #555; }
.progress-fill { height: 100%; background: #7CB342; transition: width 0.3s; }
.progress-text { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #AAA; }

/* MAIN */
.main { display: flex; flex: 1; overflow: hidden; }

/* LEFT PANEL */
.left-panel {
    flex: 1; display: flex; flex-direction: column;
    border-right: 2px solid #E0DCD7; overflow: hidden;
}
.lesson-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px; border-bottom: 2px solid #E0DCD7; background: #F3F0EC;
}
.lesson-title { font-weight: 600; font-size: 14px; color: #2D2D2D; }
.nav-btn {
    font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600;
    padding: 6px 16px; border: 2px solid #2D2D2D;
    background: transparent; color: #2D2D2D; cursor: pointer; transition: all 0.15s;
}
.nav-btn:hover:not(:disabled) { background: #2D2D2D; color: #FAF8F5; }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.next-btn { background: #7CB342; color: #fff; border-color: #7CB342; }
.next-btn:hover:not(:disabled) { background: #689F38; border-color: #689F38; }

.theory-content { flex: 1; overflow-y: auto; padding: 32px; }
.loading { color: #999; font-style: italic; }

/* Theory typography */
.theory-content h1 { font-size: 28px; font-weight: 700; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 3px solid #2D2D2D; color: #1A1A1A; }
.theory-content h2 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; padding-left: 12px; border-left: 4px solid #7CB342; color: #1A1A1A; }
.theory-content h3 { font-size: 17px; font-weight: 600; margin: 20px 0 8px; color: #444; }
.theory-content h4 { font-size: 15px; font-weight: 600; margin: 16px 0 6px; color: #555; }
.theory-content p { margin-bottom: 12px; }
.theory-content ul, .theory-content ol { margin: 8px 0 16px 24px; }
.theory-content li { margin-bottom: 4px; }
.theory-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; border: 2px solid #2D2D2D; }
.theory-content th { background: #2D2D2D; color: #FAF8F5; padding: 10px 14px; text-align: left; font-weight: 600; border: 1px solid #444; }
.theory-content td { padding: 8px 14px; border: 1px solid #E0DCD7; }
.theory-content tr:nth-child(even) td { background: #F3F0EC; }
.theory-content strong { font-weight: 700; color: #1A1A1A; }
.theory-content code { font-family: 'JetBrains Mono', monospace; font-size: 13px; background: #EDEAE6; padding: 2px 6px; border: 1px solid #DDD; color: #C7254E; }
.theory-content pre { margin: 16px 0; background: #2D2D2D; border: 2px solid #2D2D2D; overflow-x: auto; }
.theory-content pre code { display: block; padding: 16px; background: #2D2D2D; color: #E8E8E8; border: none; font-size: 13px; line-height: 1.5; }

/* RIGHT PANEL */
.right-panel { flex: 1; display: flex; flex-direction: column; background: #1E1E1E; }
.editor-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; background: #2D2D2D; border-bottom: 2px solid #444; }
.file-tabs { display: flex; }
.file-tab { display: flex; align-items: center; gap: 6px; padding: 4px 12px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #CCC; background: #3A3A3A; border: 1px solid #555; }
.tab-icon { font-size: 14px; }
.tab-name { color: #E8E8E8; }
.check-btn { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; padding: 6px 16px; background: #7CB342; color: #fff; border: 2px solid #7CB342; cursor: pointer; transition: all 0.15s; }
.check-btn:hover { background: #689F38; border-color: #689F38; }
.editor-container { flex: 1; overflow: hidden; }
#editor { width: 100%; height: 100%; }

/* Validation */
.validation-panel { border-top: 2px solid #444; background: #252525; padding: 12px 16px; max-height: 200px; overflow-y: auto; color: #CCC; font-size: 13px; }
.validation-placeholder { color: #777; font-style: italic; font-size: 13px; }
.success-message { color: #7CB342; font-weight: 600; }
.validation-panel h4 { margin: 8px 0 4px; font-size: 13px; }
.validation-panel ul { margin: 4px 0 8px 20px; font-size: 13px; }

/* Hints */
.hints-panel { border-top: 2px solid #444; background: #2A2A2A; padding: 8px 16px; color: #CCC; }
.hints-header { display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: 13px; font-weight: 600; }
.hints-content { display: none; padding-top: 8px; font-size: 13px; }
.hints-content ul { margin-left: 20px; }
.hints-content li { margin-bottom: 4px; }

/* SIDEBAR */
.sidebar { position: fixed; top: 0; left: -320px; width: 320px; height: 100vh; background: #FAF8F5; border-right: 3px solid #2D2D2D; z-index: 100; transition: left 0.2s; display: flex; flex-direction: column; }
.sidebar.open { left: 0; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 2px solid #E0DCD7; font-weight: 700; font-size: 16px; }
.sidebar-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #2D2D2D; }
.lessons-list { flex: 1; overflow-y: auto; }
.lesson-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #E0DCD7; cursor: pointer; transition: background 0.15s; }
.lesson-item:hover { background: #EDEAE6; }
.lesson-item.active { background: #EDEAE6; border-left: 4px solid #7CB342; }
.lesson-number { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; border: 2px solid #2D2D2D; flex-shrink: 0; }
.lesson-info { flex: 1; min-width: 0; }
.lesson-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-type { font-size: 11px; font-family: 'JetBrains Mono', monospace; color: #888; }
.lesson-type.practice { color: #7CB342; }

/* Sidebar toggle */
.sidebar-toggle { position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px; background: #2D2D2D; color: #FAF8F5; border: none; font-size: 20px; cursor: pointer; z-index: 50; display: flex; align-items: center; justify-content: center; }
.sidebar-toggle:hover { background: #444; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .main { flex-direction: column; }
    .left-panel { border-right: none; border-bottom: 2px solid #E0DCD7; max-height: 50vh; }
    .right-panel { max-height: 50vh; }
    .theory-content { padding: 20px; }
    .progress-bar { width: 100px; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CCC; }
.right-panel ::-webkit-scrollbar-thumb { background: #555; }
