/* Плеер, видео, лекции, ДЗ, плейлист */
body.player-mode .sidebar {
    display: none;
}

body.player-mode .main {
    padding: 0;
    overflow: hidden;
}

#view-player.active {
    display: flex;
    flex-direction: column;
    height: 100vh;
    animation: fadeIn 0.3s ease;
}

.player-header {
    background: var(--primary);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

    .player-header .logo {
        border: none;
        padding: 0;
        font-weight: bold;
        font-size: 20px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

.back-btn {
    color: #a0aec0;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

    .back-btn:hover {
        color: white;
    }

.player-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.player-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Video */
.video-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    color: rgba(255,255,255,0.95);
    transition: opacity 0.2s;
    pointer-events: none;
    text-align: center;
    padding: 0 20px;
}

    .video-overlay.hidden {
        opacity: 0;
    }

    .video-overlay i {
        font-size: 64px;
    }

    .video-overlay .overlay-text {
        font-size: 14px;
        margin-top: 10px;
        font-weight: 500;
    }

.video-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e5e9f0;
}

.ctrl-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    transition: 0.2s;
    flex-shrink: 0;
    padding: 0 12px;
}

    .ctrl-btn:hover {
        background: var(--accent);
    }

.progress-track {
    flex: 1;
    height: 6px;
    background: #dfe5ef;
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--yellow);
    transition: width 0.3s linear;
}

.time-display {
    font-size: 13px;
    color: #555;
    font-variant-numeric: tabular-nums;
    min-width: 92px;
    text-align: right;
    flex-shrink: 0;
}

.video-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-top: 10px;
}

/* ==================== Alpha 0.8: Native player ==================== */
#video-native-container {
    aspect-ratio: 16/9;
    width: 100%;
    background: #000;
}

    #video-native-container iframe,
    #video-native-container video {
        width: 100% !important;
        height: 100% !important;
        border: 0;
        display: block;
    }

.lesson-info {
    margin-top: 25px;
}

    .lesson-info h1 {
        font-size: 28px;
        color: var(--primary);
        margin: 0 0 15px 0;
    }

    .lesson-info .meta {
        display: flex;
        gap: 20px;
        color: #666;
        font-size: 14px;
        margin-bottom: 20px;
        border-bottom: 1px solid #ddd;
        padding-bottom: 20px;
        flex-wrap: wrap;
    }

        .lesson-info .meta i {
            color: var(--accent);
            margin-right: 5px;
        }

    .lesson-info p {
        line-height: 1.6;
        color: #444;
    }

/* Text lecture */
.text-lecture-card {
    background: white;
    border-radius: 12px;
    padding: 26px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-left: 4px solid var(--accent);
    animation: fadeIn 0.3s ease;
}

    .text-lecture-card h3 {
        margin: 0 0 14px 0;
        font-size: 18px;
        color: var(--primary);
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .text-lecture-card h3 i {
            color: var(--accent);
        }

.lecture-content {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    max-height: 500px;
    overflow-y: auto;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e9f0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.lecture-read-btn {
    margin-top: 16px;
    background: var(--green);
    color: white;
    border: none;
    padding: 11px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

    .lecture-read-btn:hover:not(:disabled) {
        background: #059669;
    }

    .lecture-read-btn:disabled {
        background: #e8f5e9;
        color: var(--green);
        cursor: default;
    }

.lecture-supplement {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-left: 4px solid #64748b;
}

    .lecture-supplement h4 {
        margin: 0 0 10px;
        font-size: 15px;
        color: #475569;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .lecture-supplement .lecture-content {
        max-height: 350px;
    }

/* Homework */
.homework-card {
    background: white;
    border-radius: 12px;
    padding: 22px;
    margin-top: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--yellow);
    animation: fadeIn 0.3s ease;
}

    .homework-card h3 {
        margin: 0 0 12px 0;
        font-size: 17px;
        color: var(--primary);
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .homework-card h3 i {
            color: #b8860b;
        }

.hw-task {
    margin: 0 0 14px;
    line-height: 1.55;
    color: #444;
}

.hw-done-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

    .hw-done-btn:hover {
        background: var(--primary);
    }

    .hw-done-btn.secondary {
        background: #f8fafc;
        color: var(--primary);
        border: 1px solid #d5dbe3;
    }

        .hw-done-btn.secondary:hover {
            background: #eef2ff;
        }

.hw-done {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--green);
    font-weight: 600;
}

.hw-upload-block {
    margin-top: 14px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

    .hw-upload-block > p {
        margin: 0 0 10px;
        font-size: 13px;
        color: #555;
    }

.hw-attachments {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #e5e9f0;
}

    .hw-attachments > b {
        font-size: 13px;
        color: #555;
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 8px;
    }

.att-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.att-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: #f8fafc;
    border: 1px solid #e5e9f0;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: 0.15s;
}

    .att-item:hover {
        background: #eef2ff;
        border-color: var(--accent);
    }

    .att-item i {
        color: var(--accent);
        font-size: 16px;
    }

.att-size {
    color: #999;
    font-size: 12px;
    margin-left: auto;
}

.hw-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

    .hw-type-badge.file {
        background: #eef2ff;
        color: var(--accent);
    }

    .hw-type-badge.test {
        background: #f0fdf4;
        color: var(--green);
    }

/* Статусы файлового ДЗ */
.hw-pending {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b8860b;
    font-weight: 600;
}

    .hw-pending i {
        color: var(--yellow);
        font-size: 18px;
    }

.hw-rejected {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--red);
    font-weight: 600;
}

    .hw-rejected i {
        color: var(--red);
        font-size: 18px;
    }

.hw-comment-box {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    border-left: 4px solid;
}

    .hw-comment-box.approved {
        background: #f0fdf4;
        border-color: var(--green);
        color: #166534;
    }

    .hw-comment-box.rejected {
        background: #fef2f2;
        border-color: var(--red);
        color: #7f1d1d;
    }

#next-area {
    margin-top: 20px;
}

.next-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}

    .next-btn:hover {
        background: var(--primary);
    }

/* Test */
.test-section {
    margin-top: 25px;
    padding: 22px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--green);
    animation: fadeIn 0.3s ease;
}

.test-btn {
    background: var(--green);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    margin-top: 10px;
}

    .test-btn:hover {
        background: #059669;
    }

/* Playlist */
.playlist {
    width: 350px;
    background: white;
    border-left: 1px solid #eee;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.playlist-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

    .playlist-header h2 {
        margin: 0;
        font-size: 18px;
        color: var(--primary);
    }

    .playlist-header p {
        margin: 5px 0 0 0;
        color: #777;
        font-size: 13px;
    }

.playlist-items {
    overflow-y: auto;
    flex: 1;
}

.playlist-item {
    padding: 15px 20px;
    display: flex;
    gap: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: 0.2s;
}

    .playlist-item:hover {
        background: #f8f9fa;
    }

    .playlist-item.active {
        background: #eef2ff;
        border-left: 4px solid var(--accent);
        padding-left: 16px;
    }

    .playlist-item.locked {
        opacity: 0.55;
        cursor: not-allowed;
    }

        .playlist-item.locked:hover {
            background: transparent;
        }

.status-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

    .status-icon.play {
        border: 2px solid var(--accent);
        color: var(--accent);
    }

    .status-icon.check {
        background: var(--green);
        color: white;
    }

    .status-icon.hw {
        background: #fff7e0;
        border: 2px solid var(--yellow);
        color: #b8860b;
    }

    .status-icon.locked {
        border: 2px solid #ccc;
        color: #bbb;
    }

    .status-icon.scheduled {
        background: #fff7e0;
        border: 2px solid #b8860b;
        color: #b8860b;
    }

.item-text {
    flex: 1;
}

    .item-text h4 {
        margin: 0 0 5px 0;
        font-size: 14px;
        color: #333;
        font-weight: 600;
    }

.playlist-item.active .item-text h4 {
    color: var(--accent);
}

.item-text span {
    font-size: 12px;
    color: #888;
}

.item-badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    background: #eef2ff;
    color: var(--accent);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

    .item-badge.text {
        background: #f0fdf4;
        color: var(--green);
    }

/* ==================== Alpha 0.8.2: баннеры-подсказки ==================== */
.next-action-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 16px;
    border-left: 4px solid;
    line-height: 1.5;
}

    .next-action-banner i {
        font-size: 20px;
        flex-shrink: 0;
        margin-top: 2px;
    }

    .next-action-banner.info {
        background: #eef2ff;
        border-color: var(--accent);
        color: var(--primary);
    }

    .next-action-banner.pending {
        background: #fff7e0;
        border-color: var(--yellow);
        color: #92400e;
    }

    .next-action-banner.error {
        background: #fef2f2;
        border-color: var(--red);
        color: #7f1d1d;
    }

    .next-action-banner.success {
        background: #f0fdf4;
        border-color: var(--green);
        color: #166534;
    }
/* Alpha 0.8.3: overlay «Видео просмотрено» поверх iframe */
.video-ended-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: fadeIn 0.3s ease;
}

.video-ended-content {
    text-align: center;
    color: white;
    padding: 30px;
    max-width: 400px;
}

    .video-ended-content i {
        font-size: 60px;
        color: var(--green);
        margin-bottom: 12px;
        display: block;
    }

    .video-ended-content p {
        font-size: 18px;
        margin: 0 0 20px 0;
        font-weight: 600;
    }

    .video-ended-content .hw-done-btn {
        padding: 12px 24px;
        font-size: 15px;
    }
/* ==================== Alpha 0.8.4: файл лекции ==================== */
.lecture-file-block {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    margin-top: 16px;
}

.lecture-file-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--accent);
    border-radius: 10px;
    font-size: 22px;
    flex-shrink: 0;
}

.lecture-file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

    .lecture-file-info b {
        font-size: 14px;
        color: #333;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .lecture-file-info span {
        font-size: 12px;
        color: #777;
    }