/* CyberSec LMS Frontend Styles */

/* Course Grid */
.cybersec-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.cybersec-course-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cybersec-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.course-thumbnail {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-placeholder {
    color: white;
    font-size: 48px;
    opacity: 0.8;
}

.course-content {
    padding: 20px;
}

.course-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.course-title a {
    color: #1a202c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.course-title a:hover {
    color: #667eea;
}

.course-description {
    color: #718096;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.course-meta {
    display: flex;
    gap: 12px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.course-meta span {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f7fafc;
    color: #4a5568;
    font-weight: 500;
}

.course-difficulty.beginner { background: #c6f6d5; color: #22543d; }
.course-difficulty.intermediate { background: #feebc8; color: #c05621; }
.course-difficulty.advanced { background: #feb2b2; color: #c53030; }

.course-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-enroll,
.btn-enroll-large {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-enroll-large {
    padding: 16px 32px;
    font-size: 16px;
    margin: 24px 0;
}

.btn-enroll:hover,
.btn-enroll-large:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-details,
.btn-back-to-course {
    background: transparent;
    color: #667eea;
    border: 1px solid #667eea;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 14px;
    display: inline-block;
}

.btn-details:hover,
.btn-back-to-course:hover {
    background: #667eea;
    color: white;
}

/* Course Detail Page */
.cybersec-course-detail {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

.course-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 48px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
}

.course-header .course-title {
    font-size: 36px;
    margin-bottom: 16px;
    font-weight: 700;
}

.course-header .course-description {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.course-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 32px 0;
}

.course-stats .stat {
    text-align: center;
}

.course-stats .label {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.course-stats .value {
    display: block;
    font-size: 20px;
    font-weight: 600;
}

.course-curriculum {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.course-curriculum h2 {
    margin: 0 0 24px 0;
    font-size: 28px;
    color: #1a202c;
}

.modules-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.module-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    background: #f8fafc;
}

.module-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px 0;
    font-size: 22px;
    color: #2d3748;
}

.module-title i {
    color: #667eea;
}

.module-description {
    color: #718096;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.lessons-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.lesson-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.2s ease;
}

.lesson-item a:hover {
    background: #667eea;
    color: white;
    transform: translateX(4px);
}

.lesson-type-icon {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.lesson-text:before { content: "📄"; }
.lesson-video:before { content: "🎥"; }
.lesson-interactive:before { content: "🎮"; }
.lesson-scenario:before { content: "🎯"; }
.lesson-ai-guided:before { content: "🤖"; }

.lesson-duration {
    margin-left: auto;
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

/* Lesson Viewer */
.cybersec-lesson-viewer {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.lesson-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 32px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.lesson-title {
    font-size: 32px;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.lesson-description {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 20px 0;
}

.lesson-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    align-items: center;
}

.lesson-type,
.lesson-duration {
    padding: 6px 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.lesson-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    line-height: 1.7;
}

.lesson-content h1 { color: #1a202c; margin: 32px 0 16px 0; font-size: 28px; }
.lesson-content h2 { color: #2d3748; margin: 28px 0 14px 0; font-size: 24px; }
.lesson-content h3 { color: #4a5568; margin: 24px 0 12px 0; font-size: 20px; }
.lesson-content p { margin: 16px 0; color: #2d3748; }
.lesson-content ul, .lesson-content ol { margin: 16px 0; padding-left: 24px; }
.lesson-content li { margin: 8px 0; color: #2d3748; }

.lesson-text-content {
    font-size: 16px;
}

.video-player {
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.lesson-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 24px;
}

.btn-complete-lesson {
    background: #48bb78;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.btn-complete-lesson:hover {
    background: #38a169;
    transform: translateY(-1px);
}

/* Dashboard */
.cybersec-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.cybersec-dashboard h1 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 32px;
    color: #1a202c;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.stat-card h3 {
    margin: 0 0 8px 0;
    color: #718096;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.current-courses,
.recent-achievements {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.current-courses h2,
.recent-achievements h2 {
    margin: 0 0 24px 0;
    color: #1a202c;
    font-size: 24px;
}

.course-progress-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.course-progress-card h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
}

.course-progress-card h3 a {
    color: #2d3748;
    text-decoration: none;
}

.course-progress-card h3 a:hover {
    color: #667eea;
}

.progress-bar {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0 8px 0;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.achievement-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.achievement-badge {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.achievement-details h4 {
    margin: 0 0 4px 0;
    color: #2d3748;
    font-size: 16px;
}

.achievement-details p {
    margin: 0 0 8px 0;
    color: #718096;
    font-size: 14px;
}

.achievement-date {
    font-size: 12px;
    color: #a0aec0;
    font-weight: 500;
}

/* Interactive Elements */
.lesson-interactive-content,
.lesson-scenario-content,
.lesson-ai-guided-content {
    border: 2px dashed #e2e8f0;
    padding: 32px;
    text-align: center;
    border-radius: 12px;
    margin: 24px 0;
    background: #f8fafc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cybersec-courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .course-actions {
        flex-direction: column;
    }
    
    .lesson-actions {
        flex-direction: column;
    }
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: #718096;
}

.loading:before {
    content: "";
    width: 24px;
    height: 24px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.success-message {
    background: #c6f6d5;
    color: #22543d;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    border: 1px solid #9ae6b4;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    border: 1px solid #fc8181;
}