/* ==========================================================
   SOF Olympiad Platform — Modern Electric Blue & Indigo Theme
   Responsive, Accessible, High Performance Design System
   ========================================================== */

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

:root {
    --brand-primary: #2563eb;       /* Electric Blue */
    --brand-primary-hover: #1d4ed8; /* Deep Blue */
    --brand-secondary: #0f172a;     /* Slate Obsidian */
    --brand-accent: #f59e0b;        /* Amber Gold */
    --brand-purple: #7c3aed;        /* Royal Purple */
    --surface-bg: #f8fafc;
    --surface-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-subtle: #e2e8f0;
}

/* Base resets & typography */
html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--surface-bg);
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Accessible focus ring */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Glassmorphism Navigation */
.glass-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.2s ease-in-out;
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.85);
}

/* Hover effects & Micro-interactions */
.card-hover {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -10px rgba(37, 99, 235, 0.12), 0 10px 15px -3px rgba(15, 23, 42, 0.04);
}

/* Gradient text utility */
.gradient-text-blue {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-amber {
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animated gradient border card */
.glow-card {
    position: relative;
    border-radius: 1.5rem;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.glow-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(124, 58, 237, 0.25));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Nav Dropdown on Hover for desktop */
@media (min-width: 768px) {
    .nav-dropdown {
        display: none;
        animation: dropdownFade 0.2s ease-out forwards;
    }
    .nav-group:hover .nav-dropdown {
        display: block;
    }
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Drawer Animations */
#mob-menu {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease-in-out;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================
   REALISTIC OMR BUBBLE SHEET STYLES
   ========================================================== */
.omr-sheet-container {
    background: #ffffff;
    border: 2px solid #334155;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    font-family: 'JetBrains Mono', 'Plus Jakarta Sans', sans-serif;
    user-select: none;
    overflow: hidden;
}

.omr-header-bar {
    background: #0f172a;
    color: #ffffff;
    border-bottom: 2px solid #0f172a;
}

.omr-row {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-bottom: 1px dashed #e2e8f0;
    transition: background 0.15s ease;
}

.omr-row:hover {
    background-color: #f8fafc;
}

.omr-row.active-question {
    background-color: #eff6ff !important;
    border-left: 4px solid #2563eb;
}

.omr-qnum {
    width: 32px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #475569;
    text-align: right;
    margin-right: 12px;
}

.omr-bubbles-group {
    display: flex;
    gap: 8px;
}

.omr-bubble {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.omr-bubble:hover {
    border-color: #1e293b;
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.omr-bubble.marked {
    background: radial-gradient(circle at 45% 45%, #1e293b 0%, #020617 85%) !important;
    border-color: #020617 !important;
    color: transparent !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.2) !important;
}

.omr-bubble.marked::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #020617;
    filter: blur(1px);
}
