/**
 * Tamkeen Course Viewer Styles - Modern & Clean
 * Dynamic lesson player for courses
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary-color: #0ea5e9;
    --primary-hover: #0284c7;
    --success-color: #10b981;
    --success-hover: #059669;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --border-color: #e2e8f0;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ========================================
   Course Header
   ======================================== */
.tamkeen-course-header {
    background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 50%, #06b6d4 100%);
    color: #ffffff;
    padding: 60px 0;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.tamkeen-course-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0 Q300,60 600,30 T1200,60 L1200,0 Z" fill="rgba(255,255,255,0.05)"/></svg>') repeat-x;
    opacity: 0.1;
}

.tamkeen-course-wrapper .tamkeen-course-header .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Two-Column Grid Layout */
.tamkeen-course-header .header-content-grid {
    display: grid !important;
    grid-template-columns: 1fr 400px !important;
    gap: 40px !important;
    align-items: center !important;
}

/* Left Column: Course Information */
.course-info-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.course-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #ffffff !important;
}

.course-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.meta-pill {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.meta-pill:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.meta-icon {
    font-size: 1.1rem;
}

.course-instructor-info {
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.instructor-icon {
    font-size: 1.2rem;
}

.instructor-label {
    opacity: 0.9;
}

.instructor-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.instructor-link:hover {
    border-bottom-color: #ffffff;
}

/* Right Column: CTA Card */
.course-cta-column {
    display: flex;
    justify-content: flex-end;
}

.cta-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.price-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.price-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0c4a6e;
}

/* Sale Price Styling */
.price-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.price-regular {
    font-size: 1.25rem;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: line-through;
}

.price-sale {
    color: #dc2626 !important;
}

.cta-button-section {
    display: flex;
    flex-direction: column;
}

.free-course-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Responsive Design */

/* Large Desktop (1024px - 1440px) */
@media (max-width: 1024px) {
    .tamkeen-course-header .header-content-grid {
        grid-template-columns: 1fr 360px !important;
        gap: 30px !important;
    }

    .course-title {
        font-size: 2.2rem;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 768px) {
    .tamkeen-course-header {
        padding: 40px 0;
    }

    .tamkeen-course-header .header-content-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .course-cta-column {
        justify-content: stretch;
    }

    .cta-card {
        max-width: 100%;
    }

    .course-title {
        font-size: 2rem;
    }

    .meta-pill {
        font-size: 0.9rem;
        padding: 8px 14px;
    }
}

/* Mobile (up to 767px) */
@media (max-width: 480px) {
    .tamkeen-course-header {
        padding: 30px 0;
    }

    .course-title {
        font-size: 1.75rem;
    }

    .course-meta-row {
        gap: 8px;
    }

    .meta-pill {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .course-instructor-info {
        font-size: 0.95rem;
    }

    .cta-card {
        padding: 24px;
    }

    .price-amount {
        font-size: 2rem;
    }
}

/* ========================================
   Main Layout Grid
   ======================================== */
.tamkeen-course-content {
    padding: 0 0 48px 0;
    overflow-x: hidden;
}

.tamkeen-course-wrapper .tamkeen-course-content .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    overflow-x: hidden;
}

.tamkeen-course-content .course-grid {
    display: grid !important;
    grid-template-columns: 320px 1fr !important;
    gap: 24px !important;
    align-items: start !important;
    max-width: 100%;
}

/* ========================================
   Sidebar: Curriculum
   ======================================== */
.course-sidebar {
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for sidebar */
.course-sidebar::-webkit-scrollbar {
    width: 6px;
}

.course-sidebar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.course-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.course-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

.enrollment-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

/* Reduce padding when only showing enrollment status badge */
.enrollment-card:has(.enrollment-status) {
    padding: 12px;
}

.enrollment-message {
    text-align: center;
}

.enrollment-message p {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.enrollment-message a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.enrollment-message a:hover {
    text-decoration: underline;
}

.enrollment-status .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8125rem;
    background: var(--success-color);
    color: #fff;
    margin-bottom: 16px;
}

.enrollment-status .status-badge::before {
    content: "✓";
    font-size: 0.75rem;
    font-weight: 700;
}

.progress-summary {
    margin-top: 0;
}

.progress-summary > p:first-child {
    margin: 0 0 8px 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color) 0%, var(--success-hover) 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-summary p {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-align: left;
}

.curriculum-sidebar {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.curriculum-sidebar h3 {
    margin: 0 0 16px 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.module-item {
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.module-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin: -8px -8px 12px -8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.module-header:hover {
    background: var(--bg-secondary);
}

.module-header h4 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.module-header .lesson-count {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-right: 8px;
}

.module-toggle-icon {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    transition: transform 0.2s;
}

.module-item.collapsed .module-toggle-icon {
    transform: rotate(-90deg);
}

.module-item.collapsed .lessons-list {
    display: none;
}

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

.curriculum-sidebar .lesson-item {
    display: grid !important;
    grid-template-columns: 28px 1fr auto !important;
    align-items: center !important;
    gap: 8px;
    padding: 8px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.lesson-item[data-clickable="true"]:hover {
    background: var(--bg-secondary);
}

.lesson-item.active {
    background: #e0f2fe;
    border-left: 3px solid var(--primary-color);
    padding-left: 5px;
}

.lesson-item.completed .lesson-icon {
    background: var(--success-color);
    color: #fff;
}

.lesson-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.lesson-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.lesson-title {
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
    text-align: left;
}

.lesson-item.active .lesson-title {
    color: var(--text-primary);
    font-weight: 600;
}

.lesson-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.lesson-duration {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.preview-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.lock-icon {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* ========================================
   Main: Lesson Player
   ======================================== */
.course-main {
    min-height: 500px;
    max-width: 100%;
    overflow-x: hidden;
}

.lesson-player {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0;
    box-shadow: var(--shadow-sm);
    min-height: 400px;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

/* Welcome Screen */
.welcome-screen {
    padding: 48px 32px;
    text-align: center;
}

.welcome-screen .course-thumbnail {
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-screen .course-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.welcome-screen h2 {
    font-size: 1.75rem;
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-weight: 700;
}

.welcome-screen .course-description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 24px auto;
    line-height: 1.6;
}

.welcome-screen .start-prompt,
.welcome-screen .enroll-prompt {
    font-size: 0.9375rem;
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

/* Lesson Content */
.lesson-content {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.lesson-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lesson-header h2 {
    margin: 0;
    font-size: 1.375rem;
    color: var(--text-primary);
    font-weight: 700;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.lesson-actions {
    display: flex;
    gap: 8px;
}

.btn-mark-complete {
    background: var(--success-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-mark-complete:hover {
    background: var(--success-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-mark-complete.completed {
    background: var(--text-tertiary);
    cursor: default;
}

.btn-mark-complete.completed:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive Video Container */
.lesson-video-player {
    padding: 0;
    background: #000;
    width: 100%;
    position: relative;
    aspect-ratio: 16 / 9;
}

.lesson-video-player > div {
    width: 100%;
    height: 100%;
}

.lesson-video-player iframe {
    display: block;
    border: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.lesson-text-content {
    padding: 32px;
    line-height: 1.7;
    color: var(--text-secondary);
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
}

.lesson-text-content h1,
.lesson-text-content h2,
.lesson-text-content h3 {
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 700;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.lesson-text-content h1 {
    font-size: 1.875rem;
}

.lesson-text-content h2 {
    font-size: 1.5rem;
}

.lesson-text-content h3 {
    font-size: 1.25rem;
}

.lesson-text-content p {
    margin: 16px 0;
}

.lesson-text-content ul,
.lesson-text-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.lesson-text-content li {
    margin: 8px 0;
}

.lesson-text-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 24px 0;
    box-shadow: var(--shadow-sm);
}

.lesson-text-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.lesson-text-content a:hover {
    text-decoration: underline;
}

.lesson-text-content code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875em;
}

.lesson-text-content pre {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 16px 0;
}

.lesson-navigation {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: var(--bg-secondary);
}

.btn-nav {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    white-space: normal;
    line-height: 1.4;
    text-align: left;
    min-width: 120px;
    max-width: 48%;
}

.btn-nav:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-nav:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-nav:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-nav.prev {
    margin-right: auto;
    text-align: left;
}

.btn-nav.next {
    margin-left: auto;
    text-align: right;
}

/* Loading Spinner */
.lesson-loading {
    padding: 80px 32px;
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 16px auto;
}

.lesson-loading p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Responsive Design
   ======================================== */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .tamkeen-course-content .course-grid {
        display: grid !important;
        grid-template-columns: 280px 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .course-sidebar {
        width: 280px !important;
        max-width: 280px !important;
    }

    .course-main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .tamkeen-course-header .course-title {
        font-size: 1.875rem;
    }

    .lesson-header h2 {
        font-size: 1.25rem;
    }
}

/* Medium tablets */
@media (max-width: 900px) {
    .tamkeen-course-content .course-grid {
        display: grid !important;
        grid-template-columns: 260px 1fr !important;
        gap: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .course-sidebar {
        width: 260px !important;
        max-width: 260px !important;
    }

    .course-main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .lesson-text-content {
        padding: 24px;
    }

    .btn-nav {
        max-width: 48%;
        font-size: 0.8125rem;
        padding: 10px 16px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .tamkeen-course-content .course-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .course-sidebar {
        position: static !important;
        max-height: none !important;
        margin-bottom: 20px;
        order: 2;
        width: 100% !important;
        max-width: 100% !important;
    }

    .course-main {
        order: 1;
        width: 100% !important;
        max-width: 100% !important;
    }

    .tamkeen-course-header {
        padding: 24px 0;
    }

    .tamkeen-course-header .container {
        padding: 0 16px;
    }

    .tamkeen-course-header .course-title {
        font-size: 1.5rem;
    }

    .tamkeen-course-header .meta-item {
        font-size: 0.8125rem;
        padding: 5px 10px;
    }

    .tamkeen-course-content .container {
        padding: 0 16px;
    }

    .lesson-header {
        padding: 16px;
    }

    .lesson-header h2 {
        font-size: 1.125rem;
    }

    .lesson-text-content {
        padding: 20px 16px;
    }

    .welcome-screen {
        padding: 32px 20px;
    }

    .welcome-screen h2 {
        font-size: 1.5rem;
    }

    .curriculum-sidebar {
        padding: 16px;
    }

    .enrollment-card {
        padding: 16px;
    }

    .enrollment-card:has(.enrollment-status) {
        padding: 12px;
    }

    .lesson-navigation {
        padding: 16px;
    }

    .btn-nav {
        max-width: none;
    }
}

/* Mobile devices */
@media (max-width: 640px) {
    .tamkeen-course-header {
        padding: 20px 0;
    }

    .tamkeen-course-header .course-title {
        font-size: 1.375rem;
        margin-bottom: 10px;
    }

    .tamkeen-course-header .course-meta {
        gap: 8px;
    }

    .tamkeen-course-header .meta-item {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .course-badge {
        font-size: 0.6875rem;
        padding: 6px 12px;
    }

    .lesson-header {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .lesson-header h2 {
        font-size: 1rem;
    }

    .lesson-actions {
        width: 100%;
    }

    .btn-mark-complete {
        width: 100%;
    }

    .lesson-text-content {
        padding: 20px 16px;
    }

    .lesson-text-content h1 {
        font-size: 1.5rem;
    }

    .lesson-text-content h2 {
        font-size: 1.25rem;
    }

    .lesson-text-content h3 {
        font-size: 1.125rem;
    }

    .lesson-navigation {
        padding: 16px;
        flex-direction: column;
        gap: 8px;
    }

    .btn-nav {
        width: 100%;
        text-align: center;
    }

    .btn-nav.prev,
    .btn-nav.next {
        margin: 0;
    }

    .welcome-screen {
        padding: 24px 16px;
    }

    .welcome-screen h2 {
        font-size: 1.25rem;
    }

    .welcome-screen .course-description {
        font-size: 0.9375rem;
    }

    .curriculum-sidebar h3 {
        font-size: 1rem;
    }

    .module-header h4 {
        font-size: 0.875rem;
    }

    .lesson-item {
        grid-template-columns: 24px 1fr auto;
        padding: 6px;
        font-size: 0.8125rem;
    }

    .lesson-icon {
        width: 24px;
        height: 24px;
        font-size: 0.6875rem;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    .tamkeen-course-header .course-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .course-main {
        min-height: 300px;
    }

    .lesson-player {
        min-height: 250px;
    }
}

/* Print styles */
@media print {
    .course-sidebar,
    .lesson-navigation,
    .btn-mark-complete {
        display: none;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .tamkeen-course-header {
        background: none;
        color: #000;
        box-shadow: none;
    }

    .lesson-video-player {
        display: none;
    }
}

/* ========================================
   Tab Navigation
   ======================================== */
.course-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.course-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.course-tab:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.course-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.course-tab .tab-icon {
    font-size: 1.1rem;
}

.course-tab .review-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 11px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ========================================
   Reviews Section
   ======================================== */
.reviews-section {
    max-width: 900px;
}

.reviews-summary {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.rating-overview {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-big {
    text-align: center;
}

.rating-big .rating-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.rating-big .rating-stars {
    margin-bottom: 8px;
}

.rating-big .rating-count {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* Star Rating Display */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating .star {
    font-size: 1.25rem;
    color: #fbbf24;
}

.star-rating .star.empty {
    color: #d1d5db;
}

.star-rating .star.half {
    position: relative;
}

.rating-big .star-rating .star {
    font-size: 1.75rem;
}

/* Review Form Section */
.review-form-section {
    margin-bottom: 32px;
}

.review-notice {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}

.review-notice p {
    margin: 0;
    color: var(--text-secondary);
}

.review-notice a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.review-notice a:hover {
    text-decoration: underline;
}

.review-notice.your-review {
    text-align: left;
}

.review-notice.your-review h4 {
    margin: 0 0 16px 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.user-review-card {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.user-review-card .review-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.pending-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-review-card h5 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.user-review-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Review Form */
.review-form-container {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.review-form-container h3 {
    margin: 0 0 24px 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

#course-review-form .form-group {
    margin-bottom: 20px;
}

#course-review-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

#course-review-form label .required {
    color: var(--danger-color);
}

#course-review-form input[type="text"],
#course-review-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

#course-review-form input[type="text"]:focus,
#course-review-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

#course-review-form textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: 6px;
}

/* Star Rating Input */
.star-rating-input .stars-selector {
    display: inline-flex;
    gap: 4px;
}

.star-rating-input .stars-selector .star {
    font-size: 2rem;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
}

.star-rating-input .stars-selector .star:hover {
    transform: scale(1.1);
}

.star-rating-input .stars-selector .star.active {
    color: #fbbf24;
}

.star-rating-input .stars-selector .star.hover {
    color: #fcd34d;
}

.star-rating-input .rating-text {
    display: inline-block;
    margin-left: 12px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

.btn-submit-review {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit-review:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-submit-review:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Reviews List */
.reviews-list {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.reviews-list h3 {
    margin: 0 0 24px 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.review-card {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}

.review-card:first-of-type {
    padding-top: 0;
}

.review-card:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.review-header {
    margin-bottom: 12px;
}

.review-header .review-rating {
    margin-bottom: 8px;
}

.review-header .review-title {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--text-primary);
    font-weight: 600;
}

.review-content {
    margin-bottom: 12px;
}

.review-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.review-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.review-author {
    font-weight: 600;
    color: var(--text-secondary);
}

.review-footer::before {
    content: none;
}

.review-date::before {
    content: "•";
    margin-right: 8px;
}

.no-reviews {
    text-align: center;
    padding: 32px 0;
}

.no-reviews p {
    margin: 0;
    color: var(--text-secondary);
}

/* Reviews Responsive */
@media (max-width: 768px) {
    .course-tabs {
        gap: 4px;
    }

    .course-tab {
        padding: 12px 16px;
        font-size: 0.9375rem;
    }

    .course-tab .tab-icon {
        font-size: 1rem;
    }

    .reviews-summary {
        padding: 24px;
    }

    .rating-big .rating-number {
        font-size: 2.5rem;
    }

    .rating-big .star-rating .star {
        font-size: 1.5rem;
    }

    .review-form-container,
    .reviews-list {
        padding: 24px;
    }

    .star-rating-input .stars-selector .star {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .course-tab {
        padding: 10px 12px;
        font-size: 0.875rem;
    }

    .course-tab .tab-label {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .reviews-summary,
    .review-form-container,
    .reviews-list {
        padding: 20px 16px;
    }

    .rating-big .rating-number {
        font-size: 2rem;
    }

    .star-rating-input .stars-selector .star {
        font-size: 1.5rem;
    }

    .btn-submit-review {
        width: 100%;
    }
}
