/* Global Styles from index.html */
@font-face {
    font-family: "Track";
    src: url(Track.ttf) format("truetype");
}

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body,
#app {
    width: 100%;
    /* height: 100%;  Let Blazor scroll naturally */
    min-height: 100vh;
    /* overflow: hidden; Remove valid scrolling lock */
    font-family: 'Track', sans-serif;
    background-color: #121212;
    color: #ffffff;
    display: flex;
    flex-direction: column;
}

:root {
    --gradient-start: #4A6DFF;
    --gradient-end: #A86EDA;
    --accent-glow: rgba(168, 110, 218, 0.5);
    /* Original Grey Theme */
    --bg-nav: #1e1e1e;
    --primary-accent: #ff8f00;
}

/* Custom Layout Utilities (Bootstrap Replacements) */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 1200px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    justify-content: center;
}

.col-lg-8,
.col-lg-4,
.col-md-6 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 992px) {
    .col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.text-center {
    text-align: center !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Global Button Base */
.btn {
    display: inline-block;
    font-weight: 500;
    line-height: 1.5;
    color: #fff;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.2s ease-in-out;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.2rem;
    border-radius: 10px;
}

.btn-orange {
    background-color: #ff6600;
    border-color: #ff6600;
    color: #fff;
}

.btn-orange:hover {
    background-color: #e65c00;
    border-color: #e65c00;
    color: #fff;
}

.btn-outline-light {
    color: #f8f9fa;
    border-color: #f8f9fa;
}

.btn-outline-light:hover {
    color: #212529;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

.w-75 {
    width: 75% !important;
}

/* Typography Utilities */
.display-4 {
    font-size: 3.5rem;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

/* Scoped container fixes to prevent nav/global interference */
#page-container ul,
#page-container li {
    all: revert;
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: 'Track', sans-serif;
}


/* Navbar Layout */
.navbar {
    width: 100%;
    height: 80px;
    background-color: var(--bg-nav);
    padding: 0 2em;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Bottom Line Removed */
.bline {
    display: none;
}

/* Logo stuck to left */
.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    width: 200px;
    /* Allocate space to balance centering if needed */
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
}

/* Nav Links Centered via Absolute Positioning */
.nav-links {
    list-style: none;
    display: flex;
    gap: 1em;
    align-items: center;
    /* Absolute centering to ensure it stays in middle regardless of auth button width */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 20px;
    padding: 0;
    position: relative;
    /* For indicator context if mobile, but on desktop we override */
}

@media (min-width: 1001px) {
    .nav-links {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        background: #252525;
        padding: 5px;
        border-radius: 50px;
        border: 1px solid #333;
    }
}

/* Sliding Indicator */
.nav-indicator {
    position: absolute;
    height: calc(100% - 10px);
    top: 5px;
    left: 0;
    background-color: #333;
    /* Darker/Lighter grey for pill */
    border-radius: 40px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 0;
    opacity: 0;
    pointer-events: none;
}

.nav-item {
    position: relative;
    z-index: 1;
}

/* Individual Links */
.nav-link {
    text-decoration: none;
    color: #aeADC2;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
    padding: 8px 20px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.nav-icon {
    font-size: 14px;
    display: inline-block;
    /* Always in layout but hidden via width */
    max-width: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 0;
    overflow: hidden;
    white-space: nowrap;
}

/* Only show icon when ACTIVE, not on hover */
.nav-link.active .nav-icon {
    max-width: 20px;
    /* Adjust based on icon width + padding if needed */
    opacity: 1;
    transform: translateX(0);
    margin-right: 8px;
    color: #f4590b;
    /* Ignite Orange */
}

.nav-link:hover {
    color: #fff;
}

.nav-link.active {
    color: #fff;
    /* Indicator provides background, so transparent here */
    background: transparent;
}

/* Pricing Button: Special gradient on active */
.pricing-btn-nav.nav-link.active .nav-icon {
    background: -webkit-linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Auth Section */
.auth-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 200px;
    /* Balance logo width */
    margin-left: auto;
    /* Push to right */
}

/* Login Button */
.login-btn-final {
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-btn-final:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Profile Button */
.profile-btn-final {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 15px 5px 5px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.profile-btn-final:hover {
    background: #252525;
    border-color: #333;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
}

.profile-text-mask {
    height: 18px;

    overflow: hidden;
    display: flex;

    justify-content: center;
}

.profile-text-slider {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: flex-start;
    /* Ensure text aligns left */
}

.profile-slide-item {
    height: 18px;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    width: 100%;
    /* Fill line */
    justify-content: flex-start;
    /* Align text left */
}

/* On hover of the parent button, slide up */
.profile-btn-final:hover .profile-text-slider {
    transform: translateY(-18px);
    /* Move up by one line height */
}

.profile-slide-hub {
    color: #f4590b;
    /* Orange for the action text */
    gap: 5px;
}

/* Mobile Menu */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 3px;
}

@media (max-width: 1000px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: #1e1e1e;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 40px;
        gap: 10px;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        border-radius: 0;
        border: none;
        /* Reset centering */
        left: 0;
        transform: translateX(100%);

    }

    .nav-links.active {
        transform: translateX(0);
    }

    .hamburger {
        display: block;
        position: absolute;
        right: 20px;
        top: 25px;
        /* adjust based on navbar height 80px -> center is 40px, minus half height */
    }

    .hamburger.open .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.open .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.open .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .nav-link {
        width: 90%;
        justify-content: flex-start;
        padding: 15px 20px;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        margin-top: 5px;
    }

    .nav-link.active {
        background: #252525;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    /* No sliding indicator on mobile */
    .nav-indicator {
        display: none !important;
    }

    .nav-icon {
        display: inline-block;
        opacity: 1;
        transform: scale(1);
        margin-right: 15px;
        width: 20px;
        text-align: center;
        color: #f4590b;
        /* Force icons to be orange on mobile too if active/default? User said "Icons... should be orange". Let's stick to active rule, but maybe ensure visibility */
    }

    /* Ensure regular links are white/grey, active icon is orange */
    .nav-link.active .nav-icon {
        color: #f4590b;
    }

    .auth-section {
        display: none;
    }

    .mobile-auth-item {
        display: block !important;
        width: 90%;
        margin: 20px auto 0;
        border-top: 1px solid #333;
        padding-top: 20px;
    }

    .login-btn-final {
        width: 100%;
        justify-content: center;
        padding: 15px;
        background: #252525;
    }

    .profile-btn-final {
        width: 100%;
        padding: 10px;
        background: #252525;
        border-radius: 12px;
    }
}

.mobile-auth-item {
    display: none;
}