/* ================================================
   NAVBAR – StrydeClient
   Dynamic Island · Reactive Glass
   ================================================ */

.navbar {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 400px;
    max-width: 700px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ersetze den kompletten .nav-container Block */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
    height: 52px;
    padding: 0 0.75rem 0 1.125rem;

    background: rgba(15, 12, 28, 0.45);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);

    border: 1px solid rgba(136, 120, 204, 0.18);
    border-radius: 999px;

    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.25),
        0 1px 0 rgba(255, 255, 255, 0.05) inset;

    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled .nav-container {
    background: rgba(10, 8, 20, 0.82);    /* kein reines Schwarz, bleibt purple-tinted */
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border-color: rgba(136, 120, 204, 0.28);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

/* ── Brand / Logo ── */
.nav-brand .brand-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    cursor: pointer;
}

.logo-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-svg {
    display: block;
    flex-shrink: 0;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

/* ── Nav Menu ── */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    position: relative;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    display: inline-block;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: var(--primary-light);
    background: rgba(136, 120, 204, 0.12);
}

/* Glow dot under active link */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

/* ── Nav Actions ── */
.nav-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ── Hamburger ── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: rgba(136, 120, 204, 0.08);
    border: 1px solid rgba(136, 120, 204, 0.15);
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    padding: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.nav-toggle:hover {
    background: rgba(136, 120, 204, 0.16);
    border-color: rgba(136, 120, 204, 0.35);
}

.nav-toggle .bar {
    display: block;
    width: 16px;
    height: 1.5px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .navbar {
        top: 0.75rem;
        left: 1rem;
        right: 1rem;
        width: auto;
        min-width: unset;
        max-width: unset;
        transform: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: calc(0.75rem + 52px + 0.5rem);
        left: 1rem;
        right: 1rem;
        background: rgba(136, 120, 204, 0.08);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border: 1px solid rgba(136, 120, 204, 0.15);
        border-radius: 20px;
        flex-direction: column;
        align-items: stretch;
        padding: 0.625rem;
        gap: 0.125rem;
        box-shadow:
            0 0 0 1px rgba(136, 120, 204, 0.1),
            0 12px 40px rgba(0, 0, 0, 0.3);
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-menu.active {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: all;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 12px;
        font-size: 0.9375rem;
    }

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

@media (max-width: 480px) {
    .brand-text {
        display: none;
    }
}

/* Status link live indicator */
.nav-link-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.status-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

/* ── Download Button in Navbar ── */
.nav-actions .btn-primary {
    font-family: 'Manrope', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    background: var(--grad);
    border: none;
    padding: 7px 18px;
    border-radius: 999px;          /* pill shape, passend zur Navbar */
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-actions .btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb, 155, 92, 246), 0.35);
}