/* Custom CSS for LexiBot E-Learning System */

:root {
    --primary-color: #094b77;
    --secondary-color: #46687e;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --border-color: #e5e7eb;
    --text-muted: #6b7280;
    --sidebar-width: 280px;
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #3730a3;
    border-color: #3730a3;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background: linear-gradient(135deg, #200b3f 0%, #200b3f 100%);
}

/* Login Page Styles */
.login-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 100%) !important;
    min-height: 100vh;
}

.login-form-container {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    margin: 1rem;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #200b3f 0%, #200b3f 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
}
.nav-link-secondary {
    color: white;
    /* ffcd7c */
/* 3730a3 */
background-color: #3730a3;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
    margin: 5px;
}
.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.nav-link-secondary:hover,
.nav-link-secondary.active {
    background-color: #ffcd7c!important;
    color: white;
    transform: translateX(5px);
}

.nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    background-color: var(--light-color);
}

.main-content.expanded {
    margin-left: 0;
}

.top-navbar {
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.content-area {
    padding: 2rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem;
}

/* Course Cards */
.course-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.course-image {
    height: 200px;
    object-fit: cover;
    border-radius: 0.75rem 0.75rem 0 0;
}

.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.course-progress {
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.course-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color) 0%, #34d399 100%);
    transition: width 0.3s ease;
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

/* Calendar Styles */
.calendar-container {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
}

.calendar-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--border-color);
}

.calendar-day {
    background: white;
    padding: 1rem;
    min-height: 100px;
    border: none;
    transition: background-color 0.2s ease;
}

.calendar-day:hover {
    background-color: var(--light-color);
}

.calendar-day.today {
    background-color: rgba(79, 70, 229, 0.1);
}

.calendar-day.other-month {
    color: var(--text-muted);
    background-color: #fafafa;
}

/* Form Styles */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.input-group-text {
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Exam and Assignment Styles */
.exam-card {
    border-left: 4px solid var(--warning-color);
}

.assignment-card {
    border-left: 4px solid var(--success-color);
}

.deadline-badge {
    background: linear-gradient(45deg, var(--danger-color), #f87171);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Resource Library */
.resource-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.resource-item:hover {
    border-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.02);
}

.resource-icon {
    width: 48px;
    height: 48px;
    background: var(--light-color);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Grades and Certificates */
.grade-item {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    border-left: 4px solid var(--success-color);
    margin-bottom: 1rem;
}

.certificate-card {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.certificate-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-area {
        padding: 1rem;
    }
}

@media (max-width: 767.98px) {
    .login-form-container {
        margin: 0.5rem;
        padding: 1.5rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .calendar-day {
        padding: 0.5rem;
        min-height: 60px;
        font-size: 0.875rem;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) 1;
}

.shadow-custom {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    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); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

