:root {
    --primary-color: #4154f1;
    --secondary-color: #717ff5;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.2rem;
}

.main-container {
    margin-top: 100px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.role-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    padding: 30px;
    text-align: center;
    margin: 10px;
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.role-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lesson-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 25px;
    overflow: hidden;
    cursor: pointer;
}

.lesson-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.lesson-thumbnail {
    height: 200px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    min-height: calc(100vh - 120px);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.sidebar-item {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sidebar-item:hover,
.sidebar-item.active {
    background-color: var(--primary-color);
    color: white;
}

.content-area {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    min-height: calc(100vh - 120px);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.question-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.question-item:hover,
.question-item.active {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.answer-option {
    background: rgba(65, 84, 241, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.answer-option:hover {
    background: var(--primary-color);
    color: white;
}

.answer-option.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.answer-option.correct {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.answer-option.incorrect {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.stats-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 20px;
    text-align: center;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.btn-custom {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(65, 84, 241, 0.3);
    color: white;
}

.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-image {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    margin-top: 10px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {

    .main-container {
        margin-top: 80px;
        padding: 10px;
    }

    .sidebar,
    .content-area {
        min-height: auto;
        margin-bottom: 20px;
    }

    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        border-radius: 20px 20px 0 0;
        padding: 10px;
        z-index: 1000;
        display: none!important;
        /* Changed from d-flex */
    }

    .mobile-nav.show {
        display: flex!important;
        /* Use flex to show it */
    }

    .mobile-nav-item {
        flex: 1;
        text-align: center;
        padding: 10px 5px;
        border-radius: 10px;
        transition: all 0.3s ease;
        cursor: pointer;
        color: #6c757d;
    }

    .mobile-nav-item.active {
        background: var(--primary-color);
        color: white;
    }

    .mobile-nav-item i {
        display: block;
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .mobile-nav-item span {
        font-size: 0.75rem;
    }

    .mobile-content-padding {
        padding-bottom: 80px;
    }
}

/* Loading spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}
.in-iframe .navbar {
    display: none !important;
}
.in-iframe .main-container {
    margin-top: 20px !important;
}
.lesson-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}