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

:root {
    /* Brand Gradient Colors (Fiery Sunset Palette from Login) */
    --primary: #FF512F;
    --primary-hover: #e34323;
    --secondary: #DD2476;
    --secondary-dark: #c01b63;
    --accent-cyan: #06b6d4;
    --accent-sky: #38bdf8;
    --accent-indigo: #6366f1;
    --accent-amber: #f59e0b;
    --accent-emerald: #10b981;
    --accent-purple: #8b5cf6;

    --gradient-primary: linear-gradient(135deg, #FF512F 0%, #DD2476 100%);
    --gradient-primary-soft: linear-gradient(135deg, rgba(255, 81, 47, 0.09) 0%, rgba(221, 36, 118, 0.09) 100%);
    --gradient-blue: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    --gradient-sky: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    --gradient-indigo: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);

    /* Typography & Neutrals */
    --text-main: #0f172a;
    --text-muted: #1e293b;
    --text-light: #f8fafc;
    --bg-main: #f8fafc;

    /* Glassmorphic Surfaces */
    --bg-glass-navbar: rgba(255, 255, 255, 0.88);
    --bg-glass-card: rgba(255, 255, 255, 0.85);
    --bg-glass-card-hover: rgba(255, 255, 255, 0.95);
    --bg-glass-dark: rgba(15, 23, 42, 0.92);
    --bg-glass-input: rgba(255, 255, 255, 0.8);

    /* Borders & Outlines */
    --border-glass: rgba(255, 255, 255, 0.7);
    --border-subtle: rgba(226, 232, 240, 0.85);
    --border-highlight: rgba(14, 165, 233, 0.35);

    /* Shadows & Glows */
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.05);
    --shadow-glass: 0 8px 32px 0 rgba(14, 165, 233, 0.08);
    --shadow-glass-lg: 0 16px 40px -8px rgba(14, 165, 233, 0.14);
    --shadow-glow-primary: 0 8px 24px -4px rgba(14, 165, 233, 0.4);
    --shadow-glow-blue: 0 8px 24px -4px rgba(37, 99, 235, 0.4);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    width: 100%;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ambient Background Blur Blobs (Blueish Glow Theme) */
.ambient-bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.22;
    animation: floatAmbient 12s ease-in-out infinite alternate;
}

.orb-primary {
    width: 480px;
    height: 480px;
    background: #0ea5e9;
    top: -100px;
    right: -50px;
}

.orb-secondary {
    width: 520px;
    height: 520px;
    background: #2563eb;
    bottom: -100px;
    left: -80px;
    animation-delay: -4s;
}

.orb-accent {
    width: 360px;
    height: 360px;
    background: #6366f1;
    top: 40%;
    left: 30%;
    opacity: 0.14;
    animation-delay: -8s;
}

@keyframes floatAmbient {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 60px) scale(1.1); }
}

/* ==========================================================================
   GLOBAL GLASSMORPHIC NAVBAR
   ========================================================================== */
.op-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: var(--bg-glass-navbar);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.nav-container,
.navbar-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* Brand Logo */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.nav-brand img,
.nav-brand-icon,
.brand-badge,
.nav-brand-img {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    border-radius: 10px !important;
    object-fit: cover !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    box-shadow: var(--shadow-glow-primary);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-brand span,
.brand-text span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a,
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a:hover,
.nav-link:hover {
    color: var(--primary);
    background: var(--gradient-primary-soft);
    transform: translateY(-1px);
}

.nav-links a.active,
.nav-link.active {
    color: var(--primary);
    background: var(--gradient-primary-soft);
    font-weight: 700;
}

.nav-links a i,
.nav-link i {
    font-size: 0.95rem;
}

/* Nav Actions & Auth Buttons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Mobile Drawer (Always Hidden on Desktop by Default) */
.mobile-drawer {
    display: none;
}

/* Buttons */
.btn-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--gradient-primary);
    color: white !important;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-glow-primary);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -4px rgba(255, 81, 47, 0.5);
}

.btn-gradient:active {
    transform: translateY(0);
}

.btn-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-glass:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-icon-round {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-icon-round:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.mobile-only-auth {
    display: none;
}
@media (max-width: 960px) {
    .mobile-only-auth {
        display: block;
        width: 100%;
    }
}

/* Mobile Hamburger Toggle */
.mobile-nav-toggle,
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.35rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
}

/* ==========================================================================
   GLASSMORPHIC CARDS & PANELS
   ========================================================================== */
.glass-card {
    background: var(--bg-glass-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    transition: var(--transition);
    position: relative;
}

.glass-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glass-lg);
    border-color: rgba(14, 165, 233, 0.35);
    background: var(--bg-glass-card-hover);
}

.glass-card-dark {
    background: var(--bg-glass-dark);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    color: white;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   FOOTER STYLING
   ========================================================================== */
.op-footer {
    margin-top: auto;
    background: #0f172a;
    color: #cbd5e1;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4rem 1.5rem 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.footer-container {
    max-width: 1240px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 380px;
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-primary);
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: 0.5px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.92rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
    padding-left: 4px;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Mobile Toggle Default Hidden on Desktop */
.mobile-nav-toggle,
.mobile-toggle {
    display: none;
}

/* ==========================================================================
   RESPONSIVE DRAWER & BREAKPOINTS
   ========================================================================== */
@media (max-width: 960px) {
    .nav-actions {
        display: none !important;
    }
    .op-navbar {
        position: sticky;
        top: 0;
        z-index: 10000;
    }

    .nav-container,
    .navbar-container {
        position: relative;
        padding: 0.65rem 1rem;
        gap: 0.75rem;
    }

    .nav-brand span {
        font-size: 1.15rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 99999;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem 1rem;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
        border-bottom: 1px solid var(--border-subtle);
        gap: 0.4rem;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links li {
        width: 100%;
        list-style: none;
    }

    .nav-links a,
    .nav-link {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.75rem 1rem;
        border-radius: var(--radius-md);
    }

    .mobile-nav-toggle,
    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        font-size: 1.35rem;
        color: var(--text-main);
        cursor: pointer;
        padding: 0.4rem;
        margin-left: 0.25rem;
    }

    .mobile-drawer {
        display: none;
        flex-direction: column;
        gap: 0.75rem;
        padding: 1.5rem;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-subtle);
    }

    .mobile-drawer.active {
        display: flex !important;
    }

    .mobile-drawer a {
        text-decoration: none;
        color: var(--text-main);
        font-weight: 600;
        font-size: 1rem;
        padding: 0.5rem 0;
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }

    .mobile-drawer a.active {
        color: var(--primary);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .nav-container,
    .navbar-container {
        padding: 0.55rem 0.75rem;
    }

    .nav-brand span {
        font-size: 1rem;
    }

    .nav-brand-icon,
    .nav-brand img {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }

    .nav-actions {
        display: none !important;
    }

    .btn-gradient,
    .btn-glass {
        padding: 0.45rem 0.85rem;
        font-size: 0.82rem;
    }
}

/* PWA Install Banner */
.pwa-card {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.35);
}

.pwa-card h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.pwa-card p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.15rem;
    line-height: 1.4;
}

/* Unread Message Bubble */
.unread-bubble {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #ef4444; /* Red */
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
    box-shadow: 0 0 5px rgba(239, 68, 68, 0.6);
}

/* Ensure HTML5 validation scrolls don't get hidden behind sticky navbar */
.form-control, input, select, textarea {
    scroll-margin-top: 120px;
}

/* ==========================================================================
   🌙 GLOBAL DARK MODE / NIGHT MODE THEME OVERRIDES
   ========================================================================== */
html.dark-mode,
body.dark-mode {
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --bg-main: #020617;

    --bg-glass-navbar: rgba(15, 23, 42, 0.92);
    --bg-glass-card: rgba(15, 23, 42, 0.85);
    --bg-glass-card-hover: rgba(30, 41, 59, 0.9);
    --bg-glass-input: rgba(30, 41, 59, 0.8);

    --border-subtle: rgba(255, 255, 255, 0.12);
    --border-glass: rgba(255, 255, 255, 0.15);
}

html.dark-mode body,
body.dark-mode {
    background-color: #020617 !important;
    background-image: radial-gradient(at 40% 20%, hsla(242, 100%, 15%, 1) 0px, transparent 50%), radial-gradient(at 80% 0%, hsla(189, 100%, 12%, 1) 0px, transparent 50%) !important;
    color: #f8fafc !important;
}

html.dark-mode .op-navbar,
html.dark-mode .nav-links,
html.dark-mode .mobile-drawer,
html.dark-mode .glass-card,
html.dark-mode .stat-card,
html.dark-mode .dash-content-card,
html.dark-mode .latest-jobs,
html.dark-mode .route-card,
html.dark-mode .launch-card,
html.dark-mode .post-card,
html.dark-mode .inbox-container,
html.dark-mode .thread-card,
html.dark-mode .admin-header-card,
html.dark-mode .auth-card {
    background: rgba(15, 23, 42, 0.88) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

html.dark-mode h1, html.dark-mode h2, html.dark-mode h3, 
html.dark-mode h4, html.dark-mode h5, html.dark-mode h6,
html.dark-mode .section-title, html.dark-mode .nav-brand span {
    color: #f8fafc !important;
}

html.dark-mode p, html.dark-mode span, html.dark-mode td, html.dark-mode label {
    color: #cbd5e1;
}

html.dark-mode input, html.dark-mode select, html.dark-mode textarea {
    background: rgba(30, 41, 59, 0.9) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

html.dark-mode .btn-glass {
    background: rgba(30, 41, 59, 0.8) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

html.dark-mode .btn-glass:hover {
    background: rgba(51, 65, 85, 0.9) !important;
    color: #38bdf8 !important;
}

html.dark-mode .leaderboard-table th {
    background: #0f172a !important;
    color: #cbd5e1 !important;
}

html.dark-mode .leaderboard-table td {
    border-color: rgba(255, 255, 255, 0.08) !important;
}
