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

:root {
    --primary: #41519C;
    --primary-dark: #2D396E;
    --primary-light: #5A6AB5;
    --primary-soft: #EEF2FF;
    --secondary: #57BA9E;
    --secondary-dark: #43A68A;
    --secondary-light: #E8F8F4;
    --accent: #57BA9E;
    --danger: #EF4444;
    --success: #57BA9E;
    --dark: #1F274B;
    --card-bg: #FFFFFF;
    --bg-main: #F8FAFC;
    --border: #E2E8F0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: #1E293B;
    min-height: 100vh;
}

/* Brand Utility Classes */
.bg-brand-primary { background-color: var(--primary) !important; }
.bg-brand-primary-dark { background-color: var(--primary-dark) !important; }
.bg-brand-primary-soft { background-color: var(--primary-soft) !important; }
.hover\:bg-brand-primary-dark:hover { background-color: var(--primary-dark) !important; }

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

.bg-brand-secondary { background-color: var(--secondary) !important; }
.bg-brand-secondary-dark { background-color: var(--secondary-dark) !important; }
.bg-brand-secondary-soft { background-color: var(--secondary-light) !important; }
.hover\:bg-brand-secondary-dark:hover { background-color: var(--secondary-dark) !important; }

.text-brand-secondary { color: #236E58 !important; }
.border-brand-secondary { border-color: var(--secondary) !important; }

/* Header Brand Logo */
.header-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Glassmorphism & Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04);
}

.student-id-card {
    background: linear-gradient(135deg, #41519C 0%, #1F274B 100%);
    color: #FFFFFF;
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px -5px rgba(65, 81, 156, 0.35);
}

.student-id-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(87, 186, 158, 0.28) 0%, transparent 70%);
    border-radius: 50%;
}

/* Lecture Card States */
.lecture-card {
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #FFFFFF;
    padding: 18px;
    transition: all 0.2s ease;
}

.lecture-card.unlocked {
    border-color: #BBE7DC;
    box-shadow: 0 4px 12px rgba(87, 186, 158, 0.1);
}

.lecture-card.locked {
    background: #F1F5F9;
    border-color: #CBD5E1;
    opacity: 0.75;
}

.lecture-card.live-now {
    border: 2px solid #57BA9E;
    background: #E8F8F4;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(87, 186, 158, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(87, 186, 158, 0); }
    100% { box-shadow: 0 0 0 0 rgba(87, 186, 158, 0); }
}

/* Badges */
.badge-status {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-live { background: #E8F8F4; color: #206E58; }
.badge-completed { background: #EEF2FF; color: #41519C; }
.badge-postponed { background: #FEF3C7; color: #B45309; }
.badge-locked { background: #E2E8F0; color: #475569; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 16px;
}

/* Mobile Responsiveness & Viewport Protection */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

@media (max-width: 640px) {
    .max-w-6xl {
        width: 100% !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

