/* LMS Courses - Frontend Styles */

:root {
    --lms-primary: #a823b4;
    --lms-secondary: #0097b2;
    --lms-accent: #D4AF37;
    --lms-success: #10b981;
    --lms-error: #ef4444;
    --lms-dark: #1f2937;
    --lms-light: #f9fafb;
    --lms-border: #e5e7eb;
    --lms-text: #374151;
    --lms-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --lms-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Container */
.lms-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.lms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    gap: 8px;
}

.lms-btn-primary {
    background: linear-gradient(135deg, var(--lms-primary), var(--lms-secondary));
    color: white;
}

.lms-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--lms-shadow-lg);
    color: white;
}

.lms-btn-secondary {
    background: white;
    color: var(--lms-primary);
    border: 2px solid var(--lms-primary);
}

.lms-btn-secondary:hover {
    background: var(--lms-primary);
    color: white;
}

.lms-btn-danger {
    background: var(--lms-error);
    color: white;
}

.lms-btn-danger:hover {
    background: #dc2626;
}

.lms-btn-block {
    display: block;
    width: 100%;
}

.lms-btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.lms-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lms-btn-completed {
    background: var(--lms-success);
    color: white;
}

/* Registration Form */
.lms-registration-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(168, 35, 180, 0.1), rgba(0, 151, 178, 0.1));
    padding: 60px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lms-registration-container {
    background: white;
    border-radius: 16px;
    box-shadow: var(--lms-shadow-lg);
    padding: 48px;
    max-width: 700px;
    width: 100%;
}

.lms-registration-header {
    text-align: center;
    margin-bottom: 40px;
}

.lms-registration-header h1 {
    font-size: 32px;
    color: var(--lms-dark);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--lms-primary), var(--lms-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lms-registration-header p {
    color: var(--lms-text);
    font-size: 16px;
}

.lms-form-group {
    margin-bottom: 24px;
}

.lms-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.lms-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--lms-dark);
}

.lms-form-group input,
.lms-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--lms-border);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.lms-form-group input:focus,
.lms-form-group textarea:focus {
    outline: none;
    border-color: var(--lms-primary);
    box-shadow: 0 0 0 3px rgba(168, 35, 180, 0.1);
}

.lms-form-group small {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}

.lms-form-divider {
    height: 1px;
    background: var(--lms-border);
    margin: 32px 0;
}

.lms-form-section-title {
    font-size: 20px;
    color: var(--lms-dark);
    margin-bottom: 20px;
}

.required {
    color: var(--lms-error);
}

.lms-form-message {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.lms-form-message.lms-success {
    background: #d1fae5;
    color: #065f46;
}

.lms-form-message.lms-error {
    background: #fee2e2;
    color: #991b1b;
}

.lms-form-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--lms-text);
}

.lms-form-footer a {
    color: var(--lms-primary);
    font-weight: 600;
    text-decoration: none;
}

/* Dashboard */
.lms-dashboard-wrapper {
    padding: 40px 20px;
    min-height: 100vh;
    background: var(--lms-light);
}

.lms-dashboard-header {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--lms-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.lms-dashboard-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lms-user-avatar img {
    border-radius: 50%;
    border: 4px solid var(--lms-primary);
}

.lms-user-details h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--lms-dark);
}

.lms-user-meta {
    color: var(--lms-text);
    font-size: 16px;
}

.lms-separator {
    margin: 0 8px;
}

.lms-dashboard-actions {
    display: flex;
    gap: 12px;
}

.lms-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.lms-stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--lms-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.lms-stat-card:hover {
    transform: translateY(-4px);
}

.lms-stat-icon {
    font-size: 48px;
    opacity: 0.9;
}

.lms-stat-content h3 {
    font-size: 36px;
    font-weight: 700;
    color: var(--lms-primary);
    margin-bottom: 4px;
}

.lms-stat-content p {
    color: var(--lms-text);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lms-dashboard-section {
    margin-bottom: 40px;
}

.lms-section-title {
    font-size: 24px;
    color: var(--lms-dark);
    margin-bottom: 24px;
}

.lms-empty-state {
    background: white;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--lms-shadow);
}

.lms-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.lms-empty-state h3 {
    font-size: 24px;
    color: var(--lms-dark);
    margin-bottom: 8px;
}

.lms-empty-state p {
    color: var(--lms-text);
    margin-bottom: 24px;
}

.lms-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.lms-course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--lms-shadow);
    transition: all 0.3s ease;
}

.lms-course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--lms-shadow-lg);
}

.lms-course-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.lms-course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lms-course-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--lms-primary), var(--lms-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.lms-course-progress-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
}

.lms-progress-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--lms-primary);
    box-shadow: var(--lms-shadow);
}

.lms-course-content {
    padding: 24px;
}

.lms-course-content h3 {
    font-size: 20px;
    color: var(--lms-dark);
    margin-bottom: 12px;
}

.lms-course-excerpt {
    color: var(--lms-text);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.lms-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--lms-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.lms-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--lms-primary), var(--lms-secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.lms-last-accessed {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.lms-course-actions {
    display: flex;
    gap: 8px;
}

.lms-course-actions .lms-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
}

/* Single Course */
.lms-single-course-wrapper {
    background: var(--lms-light);
}

.lms-course-hero {
    background: linear-gradient(135deg, rgba(168, 35, 180, 0.95), rgba(0, 151, 178, 0.95));
    color: white;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.lms-course-hero-content {
    max-width: 900px;
}

.lms-course-meta {
    margin-bottom: 16px;
}

.lms-category-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
}

.lms-course-title {
    font-size: 42px;
    margin-bottom: 16px;
    line-height: 1.2;
}

.lms-course-excerpt {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 24px;
    opacity: 0.95;
}

.lms-course-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}

.lms-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.lms-info-icon {
    font-size: 20px;
}

.lms-info-highlight {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
}

.lms-course-progress-section {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 12px;
}

.lms-progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 600;
}

.lms-progress-bar-large {
    height: 12px;
}

.lms-course-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 32px;
    padding-bottom: 60px;
}

.lms-course-main {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--lms-shadow);
}

.lms-course-featured-image {
    margin-bottom: 32px;
    border-radius: 8px;
    overflow: hidden;
}

.lms-course-featured-image img {
    width: 100%;
    height: auto;
}

.lms-course-description h2,
.lms-course-curriculum h2 {
    font-size: 28px;
    color: var(--lms-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--lms-primary);
}

.lms-course-description {
    margin-bottom: 48px;
    line-height: 1.8;
    color: var(--lms-text);
}

.lms-curriculum-list {
    margin-top: 24px;
}

.lms-curriculum-section {
    margin-bottom: 24px;
    border: 2px solid var(--lms-border);
    border-radius: 12px;
    overflow: hidden;
}

.lms-section-header {
    background: linear-gradient(135deg, rgba(168, 35, 180, 0.1), rgba(0, 151, 178, 0.1));
    padding: 20px 24px;
}

.lms-section-header h3 {
    font-size: 20px;
    color: var(--lms-dark);
}

.lms-section-number {
    display: inline-block;
    background: var(--lms-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-right: 8px;
}

.lms-chapters-list {
    padding: 16px;
}

.lms-curriculum-chapter {
    margin-bottom: 16px;
    border: 1px solid var(--lms-border);
    border-radius: 8px;
    overflow: hidden;
}

.lms-chapter-header {
    background: #f9fafb;
    padding: 16px 20px;
}

.lms-chapter-header h4 {
    font-size: 18px;
    color: var(--lms-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lms-chapter-icon {
    font-size: 20px;
}

.lms-lesson-count {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.lms-lessons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lms-lesson-item {
    border-top: 1px solid var(--lms-border);
}

.lms-lesson-link,
.lms-lesson-locked {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--lms-text);
    transition: background 0.2s ease;
}

.lms-lesson-link:hover {
    background: #f9fafb;
}

.lms-lesson-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.lms-lesson-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.lms-lesson-title {
    font-weight: 500;
}

.lms-lesson-completed .lms-lesson-link {
    color: var(--lms-success);
}

.lms-course-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.lms-sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--lms-shadow);
    margin-bottom: 20px;
}

.lms-sidebar-widget h3 {
    font-size: 20px;
    color: var(--lms-dark);
    margin-bottom: 16px;
}

.lms-sidebar-widget p {
    color: var(--lms-text);
    line-height: 1.6;
    margin-bottom: 16px;
}

.lms-enrollment-widget .lms-btn {
    margin-bottom: 12px;
}

.lms-enrollment-slots {
    background: var(--lms-light);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--lms-primary);
}

.lms-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lms-tag {
    background: var(--lms-light);
    color: var(--lms-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Lesson Page */
.lms-lesson-wrapper {
    background: var(--lms-light);
    min-height: 100vh;
}

.lms-lesson-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    max-width: 100%;
}

.lms-lesson-sidebar {
    background: white;
    border-right: 1px solid var(--lms-border);
    height: 100vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
}

.lms-lesson-content {
    padding: 40px;
    max-width: 900px;
}

.lms-lesson-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid var(--lms-border);
    text-align: center;
}

.lms-lesson-locked {
    background: #fef3c7;
    color: #92400e;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 24px;
    font-weight: 600;
}

/* Quiz Styles */
.lms-quiz-container {
    background: white;
    border: 2px solid var(--lms-primary);
    border-radius: 12px;
    padding: 32px;
    margin-top: 40px;
}

.lms-quiz-title {
    font-size: 24px;
    color: var(--lms-dark);
    margin-bottom: 12px;
}

.lms-quiz-description {
    color: var(--lms-text);
    margin-bottom: 24px;
}

.lms-quiz-passed {
    background: #d1fae5;
    color: #065f46;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.lms-quiz-icon {
    font-size: 24px;
}

.lms-quiz-question {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--lms-light);
    border-radius: 8px;
}

.lms-question-text {
    font-size: 18px;
    color: var(--lms-dark);
    margin-bottom: 16px;
}

.lms-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lms-quiz-option {
    display: flex;
    align-items: center;
    padding: 16px;
    background: white;
    border: 2px solid var(--lms-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lms-quiz-option:hover {
    border-color: var(--lms-primary);
    background: rgba(168, 35, 180, 0.05);
}

.lms-quiz-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.lms-quiz-actions {
    text-align: center;
    margin-top: 24px;
}

.lms-quiz-result {
    margin-top: 24px;
    padding: 20px;
    border-radius: 8px;
    font-weight: 600;
}

.lms-quiz-result.success {
    background: #d1fae5;
    color: #065f46;
}

.lms-quiz-result.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Course Navigation Sidebar */
.lms-course-nav {
    padding: 20px;
}

.lms-nav-header {
    padding-bottom: 16px;
    border-bottom: 2px solid var(--lms-border);
    margin-bottom: 20px;
}

.lms-nav-course-title {
    font-size: 18px;
    color: var(--lms-dark);
    margin-bottom: 8px;
}

.lms-nav-progress {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

.lms-nav-section {
    margin-bottom: 16px;
}

.lms-nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--lms-light);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--lms-dark);
    transition: background 0.2s ease;
}

.lms-nav-section-header:hover {
    background: #e5e7eb;
}

.lms-nav-toggle {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.lms-nav-section.collapsed .lms-nav-toggle {
    transform: rotate(-90deg);
}

.lms-nav-chapter {
    margin: 8px 0 8px 16px;
}

.lms-nav-chapter-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--lms-text);
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 4px;
}

.lms-nav-lessons {
    list-style: none;
    padding: 0;
    margin: 0 0 0 16px;
}

.lms-nav-lesson {
    margin-bottom: 4px;
}

.lms-nav-lesson-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--lms-text);
    font-size: 14px;
    transition: all 0.2s ease;
}

.lms-nav-lesson-link:hover {
    background: var(--lms-light);
}

.lms-nav-lesson-link.active {
    background: var(--lms-primary);
    color: white;
    font-weight: 600;
}

.lms-nav-lesson-link.completed {
    color: var(--lms-success);
}

.lms-nav-lesson-link.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Enrollment Gate */
.lms-enrollment-gate {
    background: white;
    border: 2px solid var(--lms-primary);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    margin: 40px 0;
}

.lms-gate-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.lms-enrollment-gate h2 {
    font-size: 28px;
    color: var(--lms-dark);
    margin-bottom: 12px;
}

.lms-enrollment-gate p {
    color: var(--lms-text);
    font-size: 16px;
    margin-bottom: 24px;
}

/* Messages */
.lms-message {
    padding: 16px 24px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

.lms-message.lms-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--lms-error);
}

.lms-message.lms-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--lms-success);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .lms-course-layout {
        grid-template-columns: 1fr;
    }
    
    .lms-course-sidebar {
        position: relative;
        top: 0;
    }
    
    .lms-lesson-layout {
        grid-template-columns: 1fr;
    }
    
    .lms-lesson-sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--lms-border);
    }
}

@media (max-width: 768px) {
    .lms-course-title {
        font-size: 32px;
    }
    
    .lms-form-row {
        grid-template-columns: 1fr;
    }
    
    .lms-registration-container {
        padding: 32px 24px;
    }
    
    .lms-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lms-dashboard-user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .lms-dashboard-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .lms-course-main {
        padding: 24px;
    }
    
    .lms-lesson-content {
        padding: 24px;
    }
    
    .lms-courses-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .lms-course-title {
        font-size: 24px;
    }
    
    .lms-registration-header h1 {
        font-size: 24px;
    }
    
    .lms-stat-card {
        flex-direction: column;
        text-align: center;
    }
}