.courses-dark-theme .course-level-header.ai-yt-head {
    background: #2f6fed;
    color: #fff;
    cursor: default;
}

.ai-side-tools {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.ai-side-tools button,
.ai-edit-form button,
.ai-row-actions button {
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    font: inherit;
    cursor: pointer;
}

.ai-side-tools button,
.ai-edit-form button {
    background: #2f6fed;
    color: #fff;
}

.ai-edit-panel {
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 12px;
    background: #f4f7fb;
    color: #1c2430;
}

.ai-edit-form label {
    display: block;
    margin: 8px 0 4px;
    font-size: 13px;
    font-weight: 600;
}

.ai-edit-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #c5d0de;
    border-radius: 8px;
    font: inherit;
}

.ai-edit-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    padding: 8px;
    background: #fff;
    border-radius: 8px;
}

.ai-edit-row input {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #c5d0de;
    border-radius: 8px;
    font: inherit;
}

.ai-row-actions {
    display: flex;
    gap: 4px;
}

.ai-row-actions button {
    background: #e8eef6;
    color: #1c2430;
    padding: 6px 8px;
}

.ai-row-actions .ai-del {
    background: #d9534f;
    color: #fff;
}

.ai-side-status {
    min-height: 1.2em;
    margin-top: 8px;
    font-size: 13px;
}

.ai-lesson {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    margin: 8px 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #f2f2f2;
    cursor: pointer;
}

.ai-lesson.locked {
    cursor: pointer;
}

.ai-watch {
    flex: none;
    border-radius: 999px;
    padding: 8px 18px;
    background: #1f8a4c;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
}

.ai-lesson h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.courses-dark-theme .ai-buy, .ai-buy {
    flex: none;
    border: 0;
    border-radius: 999px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #f9a8d4, #db7093) !important;
    color: #fff !important;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
}

.lesson-item-clickable {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #4a90e2;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 0 0 12px;
    cursor: pointer;
}
.lesson-item-clickable:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.lesson-item-clickable.locked {
    border-left-color: #ccc;
    position: relative;
}
.lesson-item-clickable.locked:hover {
    border: 3px solid #4caf50;
    border-left: 6px solid #4caf50;
    background: #f1f8f4;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}
.lesson-item-clickable.locked:hover .buy-label {
    display: block;
}
.lesson-item-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lesson-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lesson-item-clickable .lesson-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.lesson-item-clickable .lesson-status.free {
    width: fit-content;
    padding: 4px 10px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 12px;
}
.lesson-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.btn-watch-lesson,
.btn-spoiler-toggle {
    width: 100%;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}
.btn-watch-lesson {
    border: 0;
    background: #4a90e2;
    color: #fff;
}
.btn-watch-lesson:hover { background: #357abd; }
.btn-spoiler-toggle {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}
.btn-spoiler-toggle:hover { background: #e0e0e0; }
.lesson-spoiler {
    padding: 12px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}
.spoiler-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.spoiler-content strong { color: #333; }
.material-link {
    display: inline-block;
    margin: 6px 8px 0 0;
    padding: 8px 12px;
    background: #fff;
    color: #4a90e2;
    text-decoration: none;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    font-size: 14px;
}
.material-link:hover {
    background: #4a90e2;
    color: #fff;
}
.lesson-item-clickable .buy-label {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #4caf50;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    z-index: 2;
    pointer-events: none;
}
