@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #10B981;
    --background: #F3F4F6;
    --surface: #FFFFFF;
    --surface-glass: rgba(255, 255, 255, 0.7);
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --danger: #EF4444;
    --warning: #F59E0B;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    font-weight: 600;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6366F1);
    color: white;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: #EEF2FF;
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid #D1D5DB;
    background: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

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

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 24px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    margin-bottom: 30px;
    position: sticky;
    top: 10px;
    z-index: 100;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* Grid Layouts */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Exam specific */
.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E5E7EB;
}

.timer-badge {
    background: #FEE2E2;
    color: var(--danger);
    padding: 8px 16px;
    border-radius: 99px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-variant-numeric: tabular-nums;
}

.question-text {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 24px;
    color: #111827;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-card {
    border: 2px solid #E5E7EB;
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-card:hover {
    border-color: #A5B4FC;
    background: #EEF2FF;
}

.option-card.selected {
    border-color: var(--primary);
    background: #EEF2FF;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.1);
}

.option-radio {
    accent-color: var(--primary);
    width: 20px;
    height: 20px;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.palette-btn {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.palette-btn.unvisited {
    background: #F3F4F6;
    color: var(--text-muted);
}

.palette-btn.visited {
    background: #FEE2E2;
    color: var(--danger);
}

.palette-btn.answered {
    background: #D1FAE5;
    color: var(--secondary);
}

.palette-btn.marked {
    background: #FEF3C7;
    color: var(--warning);
}

.palette-btn.active {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
    border: 2px solid var(--primary);
}

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
    animation: slideUp 0.4s ease forwards;
}

/* Loader */
.loader {
    border: 3px solid rgba(0,0,0,0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Responsive */
@media (max-width: 768px) {
    .exam-layout {
        flex-direction: column;
    }
    
    .navbar {
        flex-direction: column;
        gap: 16px;
    }
}

/* Dashboard Redesign Enhancements */
.hero-section {
    background: linear-gradient(135deg, #E0E7FF 0%, #F3E8FF 100%);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 60%;
}

.hero-image {
    position: absolute;
    right: -20px;
    bottom: -20px;
    height: 140%;
    z-index: 1;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.1));
}

@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    .hero-content {
        max-width: 100%;
        margin-bottom: 20px;
    }
    .hero-image {
        position: relative;
        right: 0;
        bottom: 0;
        height: 180px;
        margin-top: -20px;
    }
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.category-pill {
    padding: 10px 20px;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 99px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.category-pill:hover, .category-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
    transform: translateY(-2px);
}

.course-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

