/* ==========================================
   Watch Lesson Page Styles
   ========================================== */

:root {
    --primary-blue: #0284c7;
    --accent-cyan: #38bdf8;
    --success-green: #16a34a;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --border-color: rgba(56, 189, 248, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    padding: 20px 12px;
}

.watch-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

/* ==========================================
   Left Column: Video Player & Details
   ========================================== */
.main-player-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    width: 100%;
    background: #000000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.video-wrapper video {
    width: 100%;
    max-height: 520px;
    display: block;
    outline: none;
}

/* Lesson Info Card */
.lesson-details-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1.5px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.lesson-main-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.course-breadcrumb {
    font-size: 13px;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.course-breadcrumb a {
    color: var(--primary-blue);
    text-decoration: none;
}

.course-breadcrumb a:hover {
    text-decoration: underline;
}

.lesson-desc {
    font-size: 14px;
    color: var(--text-muted);
    white-space: pre-line;
    line-height: 1.6;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

/* Access Denied Warning Box */
.no-access-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    border: 1px solid #fecaca;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.08);
}

.no-access-card i {
    font-size: 50px;
    color: #ef4444;
    margin-bottom: 16px;
}

.no-access-card h2 {
    font-size: 20px;
    color: #991b1b;
    margin-bottom: 8px;
}

.no-access-card p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
}

.btn-buy-now {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #fff !important;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

/* ==========================================
   Right Column: Playlist / Sidebar
   ========================================== */
.playlist-sidebar {
    background: var(--card-bg);
    border-radius: 16px;
    border: 1.5px solid var(--border-color);
    padding: 20px;
    height: fit-content;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

.playlist-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 4px;
}

.playlist-items::-webkit-scrollbar {
    width: 4px;
}

.playlist-items::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Sidebar Lesson Item */
.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.playlist-item.active {
    background: #e0f2fe;
    border-color: #38bdf8;
}

.playlist-item.unlocked:not(.active):hover {
    background: #f8fafc;
    border-color: #93c5fd;
}

.playlist-item.locked {
    opacity: 0.7;
    cursor: not-allowed;
    background: #f8fafc;
}

/* Thumb & Overlay */
.item-thumb-box {
    position: relative;
    width: 64px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #cbd5e1;
}

.item-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
}

.playlist-item.active .item-overlay {
    background: rgba(2, 132, 199, 0.6);
}

.playlist-item.unlocked:not(.active) .item-overlay {
    background: rgba(22, 163, 74, 0.4);
}

.playlist-item.locked .item-overlay {
    background: rgba(15, 23, 42, 0.6);
}

.item-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 900px) {
    .watch-container {
        grid-template-columns: 1fr;
    }

    .video-wrapper video {
        max-height: 300px;
    }
}