/* Course Page Layout */
.course-layout {
display: grid;
grid-template-columns: 250px 1fr 250px;
gap: 0;
min-height: calc(100vh - 60px);
}

/* Left Sidebar */
.left-sidebar {
background: var(--bg-light);
border-right: 1px solid var(--border);
overflow-y: auto;
position: sticky;
top: 60px;
height: calc(100vh - 60px);
}

.sidebar-header {
padding: 20px;
background: var(--secondary);
color: white;
}

.sidebar-header h2 {
font-size: 1.2rem;
margin-bottom: 5px;
}

.sidebar-header p {
font-size: 0.9rem;
opacity: 0.8;
}

.sidebar-menu {
list-style: none;
}

.sidebar-menu li a {
display: block;
padding: 12px 20px;
color: var(--text);
text-decoration: none;
border-left: 3px solid transparent;
transition: all 0.2s;
}

.sidebar-menu li a:hover {
background: white;
border-left-color: var(--primary);
}

.sidebar-menu li a.active {
background: white;
border-left-color: var(--primary);
color: var(--primary);
font-weight: 600;
}

.sidebar-menu li a i {
width: 20px;
margin-right: 10px;
}

/* Main Content */
.main-content {
padding: 40px;
max-width: 900px;
}

.breadcrumb {
margin-bottom: 30px;
color: #666;
}

.breadcrumb a {
color: var(--primary);
text-decoration: none;
}

.content-header {
margin-bottom: 30px;
}

.content-header h1 {
font-size: 2.5rem;
color: var(--secondary);
margin-bottom: 10px;
}

.content-meta {
display: flex;
gap: 20px;
color: #666;
font-size: 0.9rem;
}

.content-body h2 {
color: var(--secondary);
margin: 30px 0 15px;
font-size: 1.8rem;
}

.content-body h3 {
color: var(--secondary);
margin: 25px 0 12px;
font-size: 1.3rem;
}

.content-body p {
margin-bottom: 15px;
line-height: 1.8;
}

.content-body ul, .content-body ol {
margin: 15px 0 15px 30px;
line-height: 1.8;
}

/* Code Examples */
.example-box {
background: #f1f1f1;
border-left: 4px solid var(--primary);
margin: 20px 0;
border-radius: 4px;
overflow: hidden;
}

.example-header {
background: var(--secondary);
color: white;
padding: 10px 20px;
display: flex;
justify-content: space-between;
align-items: center;
}

.example-header h4 {
font-size: 0.9rem;
font-weight: 600;
}

.btn-try {
background: var(--primary);
color: white;
border: none;
padding: 6px 15px;
border-radius: 4px;
cursor: pointer;
font-size: 0.85rem;
}

.btn-try:hover {
background: #059862;
}

.code-block {
background: #282A35;
color: #f1f1f1;
padding: 20px;
overflow-x: auto;
font-family: 'Consolas', 'Monaco', monospace;
font-size: 0.95rem;
line-height: 1.6;
}

.code-block .keyword { color: #ff79c6; }
.code-block .string { color: #f1fa8c; }
.code-block .comment { color: #6272a4; }
.code-block .function { color: #50fa7b; }

.output-box {
background: white;
border: 1px solid var(--border);
padding: 20px;
}

.output-header {
background: #e7e9eb;
padding: 10px 20px;
font-weight: 600;
}

/* Note Boxes */
.note-box {
padding: 20px;
margin: 20px 0;
border-radius: 4px;
border-left: 4px solid;
}

.note-box.info {
background: #e7f3ff;
border-color: #2196F3;
}

.note-box.warning {
background: #fff3cd;
border-color: #ffc107;
}

.note-box.success {
background: #d4edda;
border-color: #28a745;
}

.note-box.tip {
background: #f0f9ff;
border-color: var(--primary);
}

.note-box strong {
display: block;
margin-bottom: 8px;
}

/* Try It Editor */
.try-editor {
margin: 30px 0;
border: 1px solid var(--border);
border-radius: 4px;
overflow: hidden;
}

.editor-tabs {
display: flex;
background: #e7e9eb;
border-bottom: 1px solid var(--border);
}

.editor-tab {
padding: 10px 20px;
background: transparent;
border: none;
cursor: pointer;
font-weight: 600;
}

.editor-tab.active {
background: white;
}

.editor-content textarea {
width: 100%;
min-height: 200px;
padding: 15px;
border: none;
font-family: 'Consolas', monospace;
font-size: 0.95rem;
resize: vertical;
}

.editor-actions {
padding: 10px 20px;
background: #f1f1f1;
display: flex;
gap: 10px;
}

.btn-run {
background: var(--primary);
color: white;
border: none;
padding: 8px 20px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
}

.btn-run:hover {
background: #059862;
}

.btn-reset {
background: #6c757d;
color: white;
border: none;
padding: 8px 20px;
border-radius: 4px;
cursor: pointer;
}

/* Quiz Section */
.quiz-box {
background: white;
border: 1px solid var(--border);
padding: 30px;
margin: 30px 0;
border-radius: 8px;
}

.quiz-question {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 20px;
}

.quiz-options label {
display: block;
padding: 12px;
margin: 10px 0;
background: #f1f1f1;
border-radius: 4px;
cursor: pointer;
transition: background 0.2s;
}

.quiz-options label:hover {
background: #e7e9eb;
}

.quiz-options input {
margin-right: 10px;
}

.btn-submit-quiz {
background: var(--primary);
color: white;
border: none;
padding: 10px 25px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
margin-top: 15px;
}

.quiz-feedback {
margin-top: 15px;
padding: 15px;
border-radius: 4px;
font-weight: 600;
}

.quiz-feedback.correct {
background: #d4edda;
color: #155724;
}

.quiz-feedback.incorrect {
background: #f8d7da;
color: #721c24;
}

/* Navigation Buttons */
.lesson-navigation {
display: flex;
justify-content: space-between;
margin: 50px 0 30px;
padding-top: 30px;
border-top: 2px solid var(--border);
}

.nav-btn {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 12px 25px;
background: var(--primary);
color: white;
text-decoration: none;
border-radius: 4px;
font-weight: 600;
transition: background 0.3s;
}

.nav-btn:hover {
background: #059862;
}

.nav-btn.prev {
background: #6c757d;
}

.nav-btn.prev:hover {
background: #5a6268;
}

/* Right Sidebar */
.right-sidebar {
background: var(--bg-light);
border-left: 1px solid var(--border);
padding: 20px;
overflow-y: auto;
position: sticky;
top: 60px;
height: calc(100vh - 60px);
}

.sidebar-section {
margin-bottom: 30px;
}

.sidebar-section h3 {
font-size: 1rem;
margin-bottom: 15px;
color: var(--secondary);
}

.related-links a {
display: block;
padding: 8px 0;
color: var(--text);
text-decoration: none;
}

.related-links a:hover {
color: var(--primary);
}

.ad-placeholder {
background: #e7e9eb;
padding: 20px;
text-align: center;
border-radius: 4px;
color: #666;
}

/* Responsive */
@media (max-width: 1200px) {
.course-layout {
grid-template-columns: 250px 1fr;
}
.right-sidebar {
display: none;
}
}

@media (max-width: 768px) {
.course-layout {
grid-template-columns: 1fr;
}
.left-sidebar {
position: static;
height: auto;
}
.main-content {
padding: 20px;
}
}
