/**
 * Satyam Education - Computer LMS Master Stylesheet
 */

:root {
    --primary: #041979;
    --primary-dark: #020f4c;
    --primary-light: #1e3c72;
    --secondary: #2a5298;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0284c7;
    --dark: #0f172a;
    --light: #f8fafc;
    --border: #e2e8f0;
    --text-muted: #64748b;
    --card-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 25px rgba(4, 25, 121, 0.12);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.main-content {
    flex: 1;
}

/* Navbar */
.lms-navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    padding: 10px 0;
}
.lms-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 10px;
}
.lms-navbar .navbar-brand img {
    height: 42px;
    background: white;
    border-radius: 5px;
    padding: 2px 6px;
}
.lms-navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 14px !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.lms-navbar .nav-link:hover,
.lms-navbar .nav-link.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15);
}
.lms-navbar .btn-nav-action {
    background: var(--accent);
    color: #ffffff !important;
    font-weight: 600;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}
.lms-navbar .btn-nav-action:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Hero Section */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--secondary) 100%);
    color: #ffffff;
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
}
.hero-banner::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.15) 0%, transparent 60%);
    pointer-events: none;
}
.hero-title {
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.2;
    margin-bottom: 15px;
}
.hero-highlight {
    color: var(--accent);
}
.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    max-width: 650px;
}
.hero-stats-badge {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    color: white;
}

/* Cards */
.course-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(4, 25, 121, 0.3);
}
.course-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 20px 18px;
    color: white;
    position: relative;
}
.course-card-icon {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 10px;
}
.course-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
}
.course-card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.course-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.course-card-desc {
    font-size: 0.92rem;
    color: #475569;
    margin-bottom: 18px;
}

/* Chapter Learning Interface */
.chapter-nav-sidebar {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 15px;
    box-shadow: var(--card-shadow);
}
.chapter-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 6px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.chapter-nav-item:hover {
    background: #f8fafc;
    color: var(--primary);
}
.chapter-nav-item.active {
    background: #eff6ff;
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 700;
}
.chapter-nav-item.completed .badge-status {
    background: #dcfce7;
    color: #15803d;
}

/* Chapter Tab Navigation */
.chapter-tabs .nav-link {
    font-weight: 600;
    color: #475569;
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}
.chapter-tabs .nav-link:hover {
    color: var(--primary);
    background: rgba(4, 25, 121, 0.04);
}
.chapter-tabs .nav-link.active {
    color: var(--primary);
    background: #ffffff;
    border-bottom-color: var(--primary);
}
.chapter-content-box {
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--border);
    border-top: none;
    padding: 25px 30px;
    box-shadow: var(--card-shadow);
}
@media (max-width: 768px) {
    .chapter-content-box {
        padding: 18px 14px;
    }
}

/* Exam & Proctoring Styles */
.exam-header {
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.exam-timer {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.25);
    padding: 5px 14px;
    border-radius: 8px;
}
.question-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}
.question-text {
    font-size: 1.12rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.5;
    margin-bottom: 20px;
}
.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.option-label:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.option-label.selected {
    background: #eff6ff;
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}
.option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}
.option-label.selected .option-letter {
    background: var(--primary);
    color: white;
}

/* Question Palette */
.palette-btn {
    width: 38px;
    height: 38px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}
.palette-btn:hover {
    transform: scale(1.08);
}
.palette-btn.current {
    box-shadow: 0 0 0 3px var(--accent);
}
.palette-btn.answered {
    background: #10b981;
    color: white;
    border-color: #10b981;
}
.palette-btn.unanswered {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}
.palette-btn.review {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}

/* Floating Webcam Box */
.proctoring-box {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 170px;
    height: 125px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    border: 2px solid var(--accent);
    z-index: 1050;
}
.proctoring-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror */
}
.proctoring-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}
.proctoring-pulse {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* Progress Ring & Bars */
.progress-thin {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
}

/* Footer */
.lms-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 40px 0 20px;
    margin-top: 50px;
}
.lms-footer h5 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 18px;
}
.lms-footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
.lms-footer a:hover {
    color: #ffffff;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    display: none;
}
@media (max-width: 768px) {
    body {
        padding-bottom: 65px;
    }
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        z-index: 1040;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.06);
        align-items: center;
        justify-content: space-around;
    }
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        flex: 1;
        height: 100%;
        transition: color 0.15s;
    }
    .mobile-nav-item i {
        font-size: 18px;
        margin-bottom: 2px;
    }
    .mobile-nav-item.active, .mobile-nav-item:hover {
        color: #041979;
    }
}

