/* LiveMentor LMS Styles */

:root {
    --primary-color: #667eea;
    --primary-hover: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--light-bg);
}

/* Menu */
.lms-menu-avatar { border-radius: 50%; vertical-align: middle; margin-right: 4px; width: 20px; height: 20px; }
.lms-menu-arrow { font-size: 10px; margin-left: 2px; }
.lms-menu-link { display: flex !important; align-items: center; gap: 4px; }
.lms-menu-user { position: relative; }
.lms-menu-user > .lms-menu-user-link { font-weight: 600; cursor: default !important; }
.lms-menu-sub { display: none; position: absolute; top: 100%; right: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); min-width: 180px; z-index: 999; padding: 4px 0; list-style: none; }
.lms-menu-user:hover .lms-menu-sub { display: block; }
.lms-menu-sub li { margin: 0; }
.lms-menu-sub a { padding: 8px 16px !important; display: block; font-size: 13px; color: #334155 !important; text-decoration: none; white-space: nowrap; }
.lms-menu-sub a:hover { background: #f1f5f9; }
.lms-menu-teacher a { color: #059669 !important; font-weight: 600; }
.lms-menu-student a { color: #6366f1 !important; font-weight: 600; }
.lms-menu-login a { font-weight: 600; }
.lms-menu-register a { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff !important; padding: 6px 14px !important; border-radius: 6px; margin: 6px 0; }
.lms-menu-register a:hover { opacity: 0.9; }

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    margin-bottom: 15px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.alert-success {
    background: #dcfce7;
    border-left: 4px solid var(--success-color);
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    border-left: 4px solid var(--danger-color);
    color: #7f1d1d;
}

.alert-warning {
    background: #fef3c7;
    border-left: 4px solid var(--warning-color);
    color: #92400e;
}

/* Course Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.course-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.course-image {
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.course-info {
    padding: 20px;
}

.course-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.course-meta {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.rating {
    color: #fbbf24;
    font-size: 14px;
}

/* Lesson Page */
.lms-lesson-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.lesson-header {
    margin-bottom: 30px;
}

.lesson-header h1 {
    font-size: 32px;
    margin: 20px 0;
    color: var(--text-primary);
}

.lesson-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.lesson-content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.lesson-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.lesson-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lesson-progress,
.lesson-resources {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Assignments */
.assignment-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.assignment-header h4 {
    font-size: 18px;
    color: var(--text-primary);
}

.due-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.submission-status {
    padding: 12px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
}

.submission-status.pending {
    background: #fef3c7;
    border-left: 4px solid var(--warning-color);
}

.submission-status.completed {
    background: #dcfce7;
    border-left: 4px solid var(--success-color);
}

.submission-status.flagged-warning {
    background: #fee2e2;
    border-left: 4px solid var(--danger-color);
    color: var(--danger-color);
}

.assignment-submit-form textarea {
    width: 100%;
    min-height: 250px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    resize: vertical;
}

/* Responsive */
@media (max-width: 768px) {
    .lesson-content-wrapper {
        grid-template-columns: 1fr;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .assignment-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .lesson-header h1 {
        font-size: 24px;
    }

    .lesson-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* Video Player */
video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.flex {
    display: flex;
}

.gap-10 {
    gap: 10px;
}
