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

:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-light: #f8fafc;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #ff7a00;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: #cbd5e1;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-light);
    font-weight: 600;
}

/* Glassmorphic Navbar - Styled to match Logo (Royal Blue & Orange Accent) */
.navbar-custom {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 2px solid var(--secondary);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
    padding: 0.8rem 1.5rem;
}

.navbar-custom .navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.navbar-custom .navbar-brand span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Brand Logo Styles (No Animation) */
.brand-logo {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: inline-block;
}

.navbar-custom .nav-link {
    color: #94a3b8 !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-custom .nav-link:hover, 
.navbar-custom .nav-link.active {
    color: var(--text-light) !important;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Gradients and Accent Backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
}

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

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border: none;
    color: var(--text-light);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #7c3aed) 100%;
}

.btn-secondary-custom {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #cbd5e1;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* Premium Cards */
.card-custom {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.card-custom-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

/* Forms */
.form-control-custom {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-light) !important;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control-custom:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* Progress bar customization */
.progress-custom {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-custom {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
}

/* Sidebar for Student / Admin */
.sidebar-wrapper {
    min-height: 100vh;
    border-right: 1px solid var(--border-color);
    background: #0b0f19;
}

.sidebar-heading {
    padding: 1.5rem 1.25rem;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.25rem;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

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

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
    background: rgba(99, 102, 241, 0.05);
    color: var(--text-light);
    border-left-color: var(--primary);
}

/* Footer Section */
footer {
    background: #090d16;
    border-top: 1px solid var(--border-color);
    color: #64748b;
    padding: 2rem 0;
    margin-top: auto;
}

/* Video Player container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Leaderboard custom stylings */
.leaderboard-row {
    transition: all 0.3s ease;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
}

.rank-1 {
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    color: #000;
}
.rank-2 {
    background: linear-gradient(135deg, #e2e8f0, #94a3b8);
    color: #000;
}
.rank-3 {
    background: linear-gradient(135deg, #fdba74, #ea580c);
    color: #000;
}

/* Exam Timer Dashboard */
.timer-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Interactive Question selections */
.question-option {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.question-option:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
}

.question-option input[type="radio"] {
    display: none;
}

.question-option.selected {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: var(--primary) !important;
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--text-light);
}

.question-option.selected .option-letter {
    background: var(--primary);
}

/* Micro animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Responsive adjusters */
@media (max-width: 768px) {
    .sidebar-wrapper {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

/* Light Theme Variables & Class Overrides */
body.light-theme {
    background: var(--bg-light) !important;
    color: #334155 !important;
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6,
body.light-theme .text-light,
body.light-theme .navbar-custom .nav-link {
    color: #0f172a !important;
}

body.light-theme .navbar-custom .navbar-brand span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

body.light-theme .card-custom {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .card-custom:hover {
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.08) !important;
}

body.light-theme .navbar-custom {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0%, rgba(255, 255, 255, 0.95) 100%) !important;
    border-bottom: 2px solid var(--secondary) !important;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08) !important;
}

body.light-theme .navbar-custom .nav-link {
    color: #475569 !important;
}

body.light-theme .navbar-custom .nav-link:hover,
body.light-theme .navbar-custom .nav-link.active {
    color: var(--primary) !important;
    text-shadow: none !important;
}

body.light-theme .form-control-custom {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-theme .form-control-custom:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

body.light-theme .bg-dark,
body.light-theme .accordion-item {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

body.light-theme .accordion-button {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

body.light-theme .sidebar-wrapper {
    background: #f1f5f9 !important;
    border-right-color: #cbd5e1 !important;
}

body.light-theme .sidebar-nav-link {
    color: #475569 !important;
}

body.light-theme .sidebar-nav-link:hover,
body.light-theme .sidebar-nav-link.active {
    background: rgba(99, 102, 241, 0.08) !important;
    color: var(--primary) !important;
}

body.light-theme footer {
    background: #f1f5f9 !important;
    border-top-color: #e2e8f0 !important;
    color: #64748b !important;
}

body.light-theme .question-option {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.light-theme .question-option:hover {
    background: rgba(99, 102, 241, 0.05) !important;
}

body.light-theme .option-letter {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

body.light-theme .question-option.selected {
    background: rgba(99, 102, 241, 0.08) !important;
}

body.light-theme .question-option.selected .option-letter {
    color: #ffffff !important;
}

/* Hero Floating Animation and Banner Cards */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

.hero-banner-animated {
    animation: float 6s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hero-banner-animated:hover {
    transform: translateY(-4px) scale(1.015) !important;
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.25) !important;
}

.hero-banner-card {
    height: 380px;
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    color: #ffffff;
    transition: all 0.3s ease;
}

.hero-banner-card h3 {
    color: #ffffff !important;
}

.hero-banner-card p {
    color: #cbd5e1 !important;
}

/* Light Theme Overrides */
body.light-theme .hero-banner-card {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe) !important;
    color: #0f172a !important;
}

body.light-theme .hero-banner-card h3 {
    color: #0f172a !important;
}

body.light-theme .hero-banner-card p {
    color: #475569 !important;
}

body.light-theme .text-secondary {
    color: #475569 !important;
}

body.light-theme .btn-secondary-custom {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
}

body.light-theme .btn-secondary-custom:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #000000 !important;
}

/* Offcanvas Left-Side Drawer (Android App Drawer Style) */
.offcanvas {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    color: #ffffff !important;
}

.offcanvas-start {
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: #0f172a !important;
}

.offcanvas-header,
.offcanvas-header * {
    color: #ffffff !important;
}

.offcanvas .list-group-item,
.offcanvas .list-group-item-action {
    transition: all 0.2s ease;
    border: none !important;
    font-weight: 500;
    color: #ffffff !important;
}

.offcanvas .list-group-item:hover,
.offcanvas .list-group-item-action:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: var(--secondary) !important;
    padding-left: 1.75rem !important; /* Premium slide hover micro-animation */
}

.active-drawer-item {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.12) 0%, rgba(255, 122, 0, 0.08) 100%) !important;
    border-left: 4px solid var(--secondary) !important;
    color: var(--secondary) !important;
    font-weight: 600 !important;
}



@media (max-width: 768px) {
    /* Main typography scaling */
    h1, .display-3 {
        font-size: 2.2rem !important;
    }
    h2, .display-5 {
        font-size: 1.7rem !important;
    }
    h3, .display-6 {
        font-size: 1.45rem !important;
    }
    .lead {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    /* Banner/Cards responsive sizing */
    .hero-banner-card {
        height: auto !important;
        padding: 2.5rem 1rem !important;
    }
    .hero-banner-card i {
        font-size: 4.5rem !important;
    }
    
    /* Spacing fixes for mobile screen overlap */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
}
