/* Lesson Header */
.lesson-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 60px 0 40px;
}

.lesson-breadcrumb {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.lesson-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.lesson-breadcrumb a:hover {
    color: var(--white);
}

.lesson-breadcrumb span {
    color: var(--white);
    font-weight: 600;
}

.lesson-title h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.lesson-subtitle {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.lesson-meta {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.lesson-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    font-weight: 600;
}

.lesson-meta .meta-item i {
    font-size: 16px;
}

.progress-indicator {
    background-color: rgba(40, 167, 69, 0.3);
}

/* Lesson Content */
.lesson-content {
    padding: 60px 0;
    background-color: var(--bg-color);
}

.lesson-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

/* Sidebar */
.lesson-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.sidebar-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.lesson-toc {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lesson-toc li {
    margin-bottom: 12px;
}

.lesson-toc a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 8px 0;
    border-left: 3px solid transparent;
}

.lesson-toc a:hover,
.lesson-toc a.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    padding-left: 10px;
}

.course-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-menu li {
    margin-bottom: 8px;
}

.course-menu a {
    display: block;
    padding: 10px 15px;
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    font-size: 15px;
}

.course-menu a:hover {
    background-color: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
}

.course-menu li.active a {
    background-color: rgba(255, 107, 53, 0.2);
    color: var(--primary-color);
    font-weight: 600;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
}

/* Main content */
.lesson-main {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.lesson-section {
    margin-bottom: 50px;
    scroll-margin-top: 100px;
}

.lesson-section h2 {
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
}

.content-block {
    line-height: 1.8;
    color: var(--text-color);
}

.content-block p {
    margin-bottom: 20px;
}

.content-block strong {
    color: var(--secondary-color);
}

.content-block code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Courier New', monospace;
    color: var(--primary-color);
}

/* Example boxes */
.example-box,
.info-box,
.explanation-box,
.tip-box {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 25px 0;
}

.info-box {
    border-left-color: #3498db;
}

.tip-box {
    border-left-color: #27ae60;
}

.explanation-box {
    border-left-color: #9b59b6;
}

.example-box h3,
.info-box h3,
.explanation-box h3,
.tip-box h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.example-box ul {
    margin-left: 25px;
    margin-bottom: 15px;
}

.example-box li {
    margin-bottom: 8px;
}

/* Code examples - ИСПРАВЛЕНО */
.code-example {
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin: 30px 0;
}

.code-header {
    background-color: #1e2d3d;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #3a4a5a;
}

.code-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.code-header .red { background-color: #ff5f56; }
.code-header .yellow { background-color: #ffbd2e; }
.code-header .green { background-color: #27c93f; }

.code-header .file-name {
    color: #a0a0a0;
    font-size: 14px;
    margin-left: 15px;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.code-example pre {
    margin: 0;
    padding: 25px;
    background-color: transparent !important; /* УБРАН фон у текста */
    color: #d4d4d4;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: auto;
}

.code-example code {
    background-color: transparent !important; /* УБРАН фон у кода */
    padding: 0 !important;
}

/* Code comparison */
.comparison-box {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.comparison-box h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.code-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.code-item {
    background-color: var(--secondary-color) !important; /* Тёмный фон блока */
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #3a4a5a;
}

.code-item .code-lang {
    background-color: #1e2d3d !important; /* Ещё темнее для заголовка */
    color: #a0a0a0 !important;
    padding: 10px 15px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid #3a4a5a;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.code-item pre {
    margin: 0;
    padding: 20px;
    background-color: transparent !important; /* УБРАН фон у текста */
    color: #d4d4d4 !important;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
}

.code-item code {
    background-color: transparent !important; /* УБРАН фон у кода */
    padding: 0 !important;
    display: block;
}

/* Подсветка синтаксиса - РАБОТАЕТ */
.code-item .keyword,
.code-example .keyword { color: #569cd6 !important; font-weight: bold; }
.code-item .string,
.code-example .string { color: #ce9178 !important; }
.code-item .number,
.code-example .number { color: #b5cea8 !important; }
.code-item .comment,
.code-example .comment { color: #6a9955 !important; font-style: italic; }
.code-item .function,
.code-example .function { color: #dcdcaa !important; }
.code-item .operator,
.code-example .operator { color: #d4d4d4 !important; }
.code-item .punctuation,
.code-example .punctuation { color: #d4d4d4 !important; }

/* Task solutions - ИСПРАВЛЕНО */
.task-solution pre {
    background-color: #2c3e50 !important;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    overflow-x: auto;
    font-family: 'Fira Code', 'Courier New', monospace;
    line-height: 1.6;
}

.task-solution code {
    background-color: transparent !important; /* УБРАН фон у кода */
    padding: 0 !important;
    color: #d4d4d4;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card-small {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card-small:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-card-small i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-card-small h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.feature-card-small p {
    color: var(--text-light);
    font-size: 15px;
}

/* Code comparison */
.comparison-box {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.comparison-box h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.code-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.code-item {
    background-color: var(--secondary-color) !important;
    color: #d4d4d4 !important;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.code-item .code-lang {
    background-color: #1e2d3d !important;
    color: #a0a0a0 !important;
    padding: 10px 15px;
    font-weight: 600;
    text-align: center;
}

.code-item pre {
    margin: 0;
    padding: 20px;
    background-color: var(--secondary-color) !important;
    color: #d4d4d4 !important;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* Универсальная подсветка синтаксиса */
.code-snippet .keyword,
.code-example .keyword,
.code-item .keyword { color: #569cd6; }
.code-snippet .string,
.code-example .string,
.code-item .string { color: #ce9178; }
.code-snippet .number,
.code-example .number,
.code-item .number { color: #b5cea8; }
.code-snippet .comment,
.code-example .comment,
.code-item .comment { color: #6a9955; }
.code-snippet .function,
.code-example .function,
.code-item .function { color: #dcdcaa; }

/* Interactive Editor */
.interactive-editor {
    margin: 40px 0;
}

.editor-container,
.output-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.editor-header,
.output-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.editor-title,
.output-title {
    font-weight: 600;
    font-size: 16px;
}

.editor-buttons,
.output-buttons {
    display: flex;
    gap: 10px;
}

.editor-textarea,
.output-area,
.task-textarea {
    width: 100%;
    padding: 20px;
    border: none;
    background-color: #f8f9fa;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    min-height: 150px;
    max-height: 400px;
}

.output-area {
    min-height: 100px;
    color: var(--secondary-color);
}

/* Tasks */
.task-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.task-number {
    font-weight: 700;
    font-size: 16px;
    color: var(--secondary-color);
}

.task-difficulty {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.task-difficulty.easy {
    background-color: #d4edda;
    color: #155724;
}

.task-difficulty.medium {
    background-color: #fff3cd;
    color: #856404;
}

.task-difficulty.hard {
    background-color: #f8d7da;
    color: #721c24;
}

.task-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.task-description {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.task-example {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 15px;
}

.task-editor {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.task-textarea {
    flex: 1;
}

.task-result {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.task-result.correct {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

.task-result.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

/* Navigation */
.lesson-navigation {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 40px;
}

.nav-progress {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.nav-progress span {
    color: var(--text-light);
    font-weight: 600;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .lesson-grid {
        grid-template-columns: 1fr;
    }

    .lesson-sidebar {
        position: static;
    }

    .nav-buttons {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .lesson-title h1 {
        font-size: 32px;
    }

    .lesson-main {
        padding: 25px;
    }

    .task-editor {
        flex-direction: column;
    }

    .editor-buttons,
    .output-buttons {
        width: 100%;
    }

    .editor-buttons .btn,
    .output-buttons .btn {
        flex: 1;
    }
}

/* Course Hero Section */
.course-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.course-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    z-index: 0;
}

.course-hero .container {
    position: relative;
    z-index: 1;
}

.course-tag {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.course-hero-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
    line-height: 1.2;
}

.course-subtitle {
    font-size: 24px;
    opacity: 0.9;
    margin-bottom: 40px;
}

.course-meta-large {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.course-meta-large .meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.course-meta-large .meta-item i {
    font-size: 20px;
}

.course-progress-large {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 600;
}

.progress-info span:first-child {
    font-size: 18px;
}

.progress-info span:last-child {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
}

.progress-bar-large {
    width: 100%;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    overflow: hidden;
}

.course-hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Course Overview */
.course-overview {
    padding: 100px 0;
    background-color: var(--white);
}

.overview-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.overview-content h2 {
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.overview-text {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.8;
}

.overview-features {
    display: grid;
    gap: 25px;
}

.overview-feature {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 28px;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.feature-text p {
    color: var(--text-light);
    line-height: 1.6;
}

.overview-image {
    display: flex;
    justify-content: center;
}

.course-stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 400px;
}

.stat-item-large {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 15px;
}

.stat-item-large i {
    font-size: 32px;
    color: var(--white);
}

.stat-number-large {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 5px;
}

.stat-label-large {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Curriculum Section */
.course-curriculum-section {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 20px;
    color: var(--text-light);
}

.curriculum-list-large {
    display: grid;
    gap: 25px;
}

.curriculum-item-large {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.curriculum-item-large.completed {
    border-left-color: #28a745;
    background-color: #f8fdf8;
}

.curriculum-item-large:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-hover);
}

.curriculum-header-large {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.curriculum-icon-large {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 60px;
}

.curriculum-icon-large span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    font-size: 20px;
}

.complete-icon {
    color: #28a745;
    font-size: 24px;
}

.curriculum-info-large h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.curriculum-info-large p {
    color: var(--text-light);
    font-size: 16px;
}

.curriculum-details {
    padding-top: 20px;
    border-top: 2px solid rgba(0, 0, 0, 0.05);
}

.curriculum-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.curriculum-details li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
}

.curriculum-details li i {
    color: var(--primary-color);
    font-size: 12px;
}

/* Course Summary */
.course-summary-large {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 60px;
    text-align: center;
}

.course-summary-large h3 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

.course-summary-large ul {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.course-summary-large li {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 18px;
    color: var(--text-color);
}

.course-summary-large li i {
    color: var(--primary-color);
    font-size: 20px;
}

/* Projects Section */
.projects-section {
    padding: 100px 0;
    background-color: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 40px;
}

.project-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.project-card p {
    opacity: 0.9;
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-difficulty {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 80px 0;
    text-align: center;
    color: var(--white);
}

.cta-content-large h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.cta-content-large p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-subtext {
    margin-top: 20px;
    font-size: 16px;
    opacity: 0.9;
}

.cta-subtext a {
    color: var(--white);
    text-decoration: underline;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .course-hero-content h1 {
        font-size: 36px;
    }

    .course-subtitle {
        font-size: 20px;
    }

    .course-meta-large {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-item-large {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .course-hero {
        padding: 60px 0;
    }

    .course-hero-content h1 {
        font-size: 32px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .curriculum-header-large {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .course-hero-buttons {
        flex-direction: column;
    }

    .curriculum-details ul {
        grid-template-columns: 1fr;
    }

    .course-summary-large ul {
        align-items: flex-start;
    }
}

/* Стили для решений заданий */
.task-solution {
    background-color: #e8f4ff;
    border-left: 4px solid #3498db;
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin-top: 15px;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.task-solution pre {
    background-color: #2c3e50;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    overflow-x: auto;
}

.task-solution code {
    color: #d4d4d4;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

/* Стили для области вывода */
.output-area {
    min-height: 100px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    font-family: 'Fira Code', 'Courier New', monospace;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
}

.output-area::-webkit-scrollbar {
    width: 8px;
}

.output-area::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.output-area::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Стили для редактора */
.editor-textarea {
    width: 100%;
    padding: 20px;
    border: none;
    background-color: #2c3e50;
    color: #d4d4d4;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    min-height: 150px;
    max-height: 400px;
    border-radius: 0 0 8px 8px;
    outline: none;
}

.editor-textarea:focus {
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.3);
}

.editor-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.editor-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-title {
    font-weight: 600;
    font-size: 16px;
}

.editor-buttons {
    display: flex;
    gap: 10px;
}

/* Стили для заданий */
.task-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s;
}

.task-textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.task-editor {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.task-editor .btn {
    align-self: flex-end;
    padding: 10px 20px;
}

@media (max-width: 768px) {
    .task-editor {
        flex-direction: column;
    }
    
    .task-editor .btn {
        align-self: stretch;
    }
}

/* Data types grid */
.data-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.data-type-card {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.data-type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.type-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
    color: var(--white);
}

.int-icon { background: linear-gradient(135deg, #3498db, #2980b9); }
.float-icon { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.str-icon { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.bool-icon { background: linear-gradient(135deg, #2ecc71, #27ae60); }

.data-type-card h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--secondary-color);
}

.data-type-card p {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 15px;
}

.type-example {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    margin-top: 10px;
}

.type-example code {
    color: var(--primary-color);
}

/* Operations table */
.operations-table {
    margin: 30px 0;
    overflow-x: auto;
}

.operations-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.operations-table th {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.operations-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.operations-table tr:last-child td {
    border-bottom: none;
}

.operations-table tr:hover {
    background-color: #f8f9fa;
}

.operations-table code {
    background-color: #2c3e50;
    color: #d4d4d4;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Courier New', monospace;
}

/* Comparison table */
.comparison-table {
    margin: 30px 0;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comparison-table th {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background-color: #f8f9fa;
}

.comparison-table code {
    background-color: #2c3e50;
    color: #d4d4d4;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Courier New', monospace;
}

/* Logical operators grid */
.logical-operators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.operator-card {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.operator-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.operator-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.operator-card h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--secondary-color);
}

.operator-card p {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 15px;
}

.operator-example {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    margin-top: 10px;
}

.operator-example code {
    color: var(--primary-color);
}

/* Mistakes list */
.mistakes-list {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.mistake-item {
    display: flex;
    gap: 20px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

.mistake-icon {
    font-size: 32px;
    min-width: 40px;
}

.mistake-text h4 {
    margin-bottom: 15px;
    color: #856404;
    font-size: 18px;
}

.code-comparison {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.wrong-code,
.correct-code {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
}

.wrong-code {
    background-color: #f8d7da;
    border: 2px solid #f5c6cb;
}

.correct-code {
    background-color: #d4edda;
    border: 2px solid #c3e6cb;
}

.error {
    color: #721c24;
    font-weight: bold;
}

.success {
    color: #155724;
    font-weight: bold;
}

/* Warning box */
.warning-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin: 25px 0;
}

.warning-box h3 {
    margin-bottom: 15px;
    color: #856404;
}

.warning-box p {
    color: #856404;
    line-height: 1.6;
}

.warning-box code {
    background-color: #ffeaa7;
    padding: 2px 6px;
    border-radius: 4px;
    color: #856404;
}

/* Динамический редактор кода */
.editor-textarea,
.task-textarea {
    width: 100%;
    padding: 20px;
    border: none;
    background-color: #2c3e50;
    color: #d4d4d4;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    min-height: 100px;
    max-height: 600px;
    border-radius: 0 0 8px 8px;
    outline: none;
    overflow-y: auto;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.editor-textarea:focus,
.task-textarea:focus {
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.3);
}

/* Автоматическая высота на основе содержимого */
.editor-textarea[data-autoresize],
.task-textarea[data-autoresize] {
    height: auto;
    overflow: hidden;
    resize: none;
}

/* Стили для редактора */
.editor-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.editor-header,
.output-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.editor-title,
.output-title {
    font-weight: 600;
    font-size: 16px;
}

.editor-buttons,
.output-buttons {
    display: flex;
    gap: 10px;
}

/* Стили для области вывода */
.output-area {
    min-height: 60px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 0 0 8px 8px;
    font-family: 'Fira Code', 'Courier New', monospace;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
}

.output-area::-webkit-scrollbar {
    width: 8px;
}

.output-area::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.output-area::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Стили для заданий */
.task-editor {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.task-editor .btn {
    align-self: flex-end;
    padding: 10px 20px;
}

@media (max-width: 768px) {
    .task-editor {
        flex-direction: column;
    }
    
    .task-editor .btn {
        align-self: stretch;
    }
    
    .editor-textarea,
    .task-textarea {
        min-height: 80px;
    }
}

/* Range examples */
.range-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.range-example {
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 2px solid var(--primary-color);
    text-align: center;
    box-shadow: var(--shadow);
}

.range-example h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 16px;
}

.range-example p {
    color: var(--text-light);
    margin-bottom: 10px;
    font-size: 14px;
}

.range-example code {
    display: block;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    margin-top: 10px;
}

/* Operator comparison */
.comparison-box {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.comparison-box h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.operator-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.operator-item {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.operator-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.operator-item p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.operator-item code {
    display: block;
    background-color: #2c3e50;
    color: #d4d4d4;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
}

/* Function syntax */
.function-syntax {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.function-syntax h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.function-syntax ol {
    padding-left: 25px;
    line-height: 1.8;
}

.function-syntax li {
    margin-bottom: 10px;
    color: var(--text-color);
}

/* Parameters grid */
.parameters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.parameter-card {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
}

.param-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    margin-bottom: 15px;
}

.parameter-card h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--secondary-color);
}

.parameter-card p {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 15px;
}

.parameter-card code {
    display: block;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    margin-top: 10px;
}

.parameter .parameter {
    color: #4ec9b0;
    font-weight: bold;
}

.parameter .argument {
    color: #dcdcaa;
    font-weight: bold;
}

/* Scope comparison */
.scope-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.scope-item {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.scope-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.scope-item p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.scope-item code {
    display: block;
    background-color: #2c3e50;
    color: #d4d4d4;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
}

/* Default parameters grid */
.default-params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.param-example {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 2px solid #e9ecef;
}

.param-example h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--secondary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.param-example code {
    display: block;
    background-color: #2c3e50;
    color: #d4d4d4;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    margin: 15px 0;
    overflow-x: auto;
}

.param-example p {
    color: var(--text-light);
    margin: 8px 0;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
}
/* Zen Python */
.zen-python {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.zen-item {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.zen-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.zen-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Checklist */
.checklist {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.checklist li {
    padding: 12px 15px;
    background-color: #f8fdf8;
    border-left: 4px solid #28a745;
    margin-bottom: 10px;
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.checklist li i {
    color: #28a745;
    font-size: 18px;
}

/* Quote box */
.quote-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    position: relative;
}

.quote-box::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 10px;
    font-size: 100px;
    color: rgba(255, 255, 255, 0.2);
    font-family: Georgia, serif;
}

.quote-box p {
    margin: 0;
    font-size: 18px;
    line-height: 1.8;
}

.quote-author {
    margin-top: 15px;
    font-size: 16px;
    opacity: 0.9;
    text-align: right;
    font-style: italic;
}

/* Tips list */
.tips-list {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.tips-list li {
    padding: 12px 15px;
    background-color: #e8f4ff;
    border-left: 4px solid #3498db;
    margin-bottom: 10px;
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tips-list li i {
    color: #3498db;
    font-size: 18px;
}