/* Global Theme Styles (Immersive 3D & Glassmorphism) */
:root {
    --bg-deep: #000000;
    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --navbar-height: 70px;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    margin: 0;
    min-height: 100vh;
}

/* 3D Canvas Container */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

/* App Wrapper (Global Content Container) */
.app-wrapper,
.immersive-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar Overrides */
.navbar {
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    height: var(--navbar-height);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.8) !important;
    height: 60px;
}

.navbar-brand {
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.brand-icon {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover {
    color: white !important;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* User Profile Nav */
.user-profile-nav {
    transition: all 0.3s ease;
    cursor: default;
}

.user-profile-nav:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Navbar Toggler Custom */
.toggler-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.toggler-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggler[aria-expanded="true"] .toggler-icon span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .toggler-icon span:nth-child(2) {
    opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .toggler-icon span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Glass Cards (Global) */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--glass-bg-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Typography Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-stroke {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    color: transparent;
}

/* Responsive Typography */
.display-1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.display-4 {
    font-size: clamp(1.75rem, 5vw, 3.5rem);
}

h1 {
    font-size: clamp(2rem, 6vw, 3rem);
}

h2 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 4vw, 2rem);
}

.tracking-tight {
    letter-spacing: -0.03em;
}

/* Buttons */
.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    min-height: 44px;
    /* Touch target */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-glass:hover {
    background: white;
    color: black;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background: var(--accent-primary);
    border: none;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    min-height: 44px;
}

.btn-primary:hover {
    background: #4f46e5;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.6);
}

/* Form Controls (Glass) */
.form-control,
.form-select {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--glass-border);
    color: white !important;
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Landing Page Specifics (Ported) */
.immersive-hero {
    min-height: 100vh;
    padding-top: 4rem;
    position: relative;
}

.hero-badge {
    display: inline-block;
}

.badge-glass {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    backdrop-filter: blur(10px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0.5;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid white;
    border-radius: 20px;
    margin: 0 auto 10px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
    0% {
        top: 6px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    animation-delay: 0.1s;
    transition-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
    transition-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
    transition-delay: 0.3s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Overrides */
@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .navbar-collapse {
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        margin: 0.5rem -1rem 0;
        padding: 1.5rem;
        border-radius: 1.5rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }

    .nav-link {
        padding: 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: center;
    }

    .nav-link::after {
        display: none;
    }

    .user-profile-nav {
        justify-content: center;
        margin: 1rem 0;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .immersive-hero {
        padding-top: 5rem;
        text-align: center;
    }

    .btn-glass,
    .btn-primary {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .ms-2,
    .ms-lg-3 {
        margin-left: 0 !important;
    }
}