/* Kurs Sayfaları */

.main-kurs {
    max-width: 1400px;
}

.kurs-layout {
    display: grid;
    grid-template-columns: 220px 1fr 400px;
    gap: 1.5rem;
    padding: 1rem;
}

.kurs-layout.no-code-editor {
    grid-template-columns: 220px 1fr;
}

.kurs-layout.no-code-editor .kurs-code-panel {
    display: none;
}

@media (max-width: 1200px) {
    .kurs-layout {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "sidebar content" "code code";
    }
    .kurs-sidebar { grid-area: sidebar; }
    .kurs-content { grid-area: content; }
    .kurs-code-panel { grid-area: code; }
}

@media (max-width: 700px) {
    .kurs-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "sidebar" "content" "code";
    }
}

.kurs-sidebar {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 1.25rem;
    max-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 1rem;
}

.kurs-sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

.lesson-list::-webkit-scrollbar {
    width: 6px;
}

.lesson-list::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 3px;
}

.lesson-list::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 3px;
}

.lesson-item {
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.lesson-item:hover {
    background: #eef2ff;
}

.lesson-item.active {
    background: var(--primary);
    color: white;
}

.kurs-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.lesson-content {
    animation: fadeIn 0.3s ease;
}

.lesson-content.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lesson-content h2 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.lesson-content h3 {
    font-size: 1.2rem;
    margin: 1.25rem 0 0.5rem;
}

.lesson-content p {
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.lesson-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1rem 0;
}

.lesson-content code {
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
}

.lesson-content p code {
    background: #e2e8f0;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.lesson-content ul, .lesson-content ol {
    margin: 0.5rem 0 1rem 1.5rem;
}

.lesson-content a {
    color: var(--primary);
    font-weight: 600;
}

.btn-complete {
    font-family: 'Nunito', sans-serif;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.btn-complete:hover:not(:disabled) {
    background: #059669;
}

.btn-complete:disabled {
    background: #9ca3af;
    cursor: default;
}

.lesson-check {
    color: var(--success);
    margin-right: 0.25rem;
}

/* Kod Editörü Paneli */
.kurs-code-panel {
    background: #1e293b;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    position: sticky;
    top: 1rem;
}

.kurs-code-panel.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border-radius: 0;
    min-height: 100vh;
}

.code-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #0f172a;
    color: #e2e8f0;
    font-weight: 600;
}

.btn-fullscreen {
    padding: 0.4rem 0.75rem;
    background: #334155;
    color: #e2e8f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.btn-fullscreen:hover {
    background: #475569;
}

.btn-fullscreen.active {
    background: var(--primary);
}

.btn-run {
    padding: 0.5rem 1rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-run:hover {
    background: #059669;
}

.code-editor {
    flex: 1;
    min-height: 220px;
    padding: 1rem;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.5;
    background: #1e293b;
    color: #e2e8f0;
    border: none;
    resize: vertical;
    outline: none;
}

.code-editor::placeholder {
    color: #64748b;
}

.code-output-header {
    padding: 0.5rem 1rem;
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.9rem;
}

.code-output {
    flex: 1;
    min-height: 200px;
    background: white;
    border: none;
    border-top: 1px solid #334155;
}
