:root {
    --accent: #c06fc1;
    --dark-accent: #b05fb1;
    --text: #fafafa;
    --text-secondary: #f8f8f8;
    --very-transparent: #00000020;
    --small-blur: 4px;
    --medium-blur: 16px;
    --large-blur: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Monda", system-ui, 'Inter', -apple-system, sans-serif;
}

body {
    min-height: 100vh;
    background: #0b0d10;
    color: var(--text);
}

.global-sticky-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1600;
    background: linear-gradient(90deg, #1f2738, #243248);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.global-sticky-banner-urgent {
    background: linear-gradient(90deg, #632232, #7f293d);
}

.global-sticky-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 46px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.global-sticky-content {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.84rem;
}

.global-sticky-actions {
    display: flex;
    gap: 8px;
}

.global-sticky-cta {
    text-decoration: none;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    padding: 6px 10px;
}

.global-sticky-dismiss {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
}

.has-global-banner .navbar {
    top: 46px;
}

.has-global-banner .navbar-mobile-drawer {
    top: 46px;
    height: calc(100vh - 46px);
}

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: rgba(15, 17, 21, 0.85);
    backdrop-filter: blur(var(--medium-blur));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
}

.navbar-logo {
    font-weight: 700;
    color: #fff;
    font-size: 16pt;
    text-decoration: none;
    flex-shrink: 0;
    height: 60%;
    display: flex;
    align-items: center;
}

.navbar-logo img {
    max-height: 100%;
}

/* Center group: links */
.navbar-links {
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
}

.navbar-links a {
    text-decoration: none;
    color: #9a9a9a;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    transition: color 0.2s;
    position: relative;
}

/* Underline slide animation (from login/styles.css) */
.navbar-links a::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
    border-radius: 2px;
}

.navbar-links a:hover {
    color: #fff;
}

.navbar-links a:hover::after {
    transform: scaleX(1);
}

.navbar-links a.active {
    color: var(--accent);
}

.navbar-links a.active::after {
    transform: scaleX(1);
}

/* Right group: auth slot */
#nav-auth-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.navbar-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: #e5e8ed;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.navbar-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1400;
}

.navbar-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(80vw, 420px);
    height: 100vh;
    transform: translateX(100%);
    transition: transform 0.24s ease;
    background: #0f1218;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1500;
}

.nav-mobile-open .navbar-mobile-overlay {
    opacity: 1;
    pointer-events: auto;
}

.nav-mobile-open .navbar-mobile-drawer {
    transform: translateX(0);
}

.navbar-mobile-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.navbar-mobile-links a,
.navbar-mobile-auth a,
.navbar-mobile-auth button:not(#nav-mobile-logout-btn) {
    text-decoration: none;
    color: #c6ccd5;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    width: 100%;
}

.navbar-mobile-links a.active {
    color: var(--accent);
    border-color: rgba(192, 111, 193, 0.35);
}

.navbar-mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-mobile-user {
    color: #8f9aa7;
    font-size: 0.78rem;
    padding: 0 4px 8px;
}

/* Logged-out buttons */
.nav-auth-btn {
    font-family: "Monda", system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 7px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-auth-ghost {
    color: #9a9a9a;
    border: 1px solid rgba(255,255,255,0.12);
}
.nav-auth-ghost:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}

.nav-auth-filled {
    background: var(--accent);
    color: #0b0d10;
    border: 1px solid transparent;
}
.nav-auth-filled:hover {
    background: var(--dark-accent);
}

/* ── Account chip ───────────────────────────────────────── */
.nav-account-wrap {
    position: relative;
}

.nav-account-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 5px 10px 5px 5px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    color: #e0e0e0;
    font-family: "Monda", system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
}
.nav-account-chip:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(192,111,193,0.3);
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(192,111,193,0.2);
    border: 1px solid rgba(192,111,193,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

.nav-account-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-chevron {
    opacity: 0.5;
    transition: transform 0.2s;
}
.nav-account-chip[aria-expanded="true"] .nav-chevron {
    transform: rotate(180deg);
}

.navbar-logo {
    height: 60%;
}
.navbar-logo img {
    height: 100%;
}

/* ── Dropdown ───────────────────────────────────────────── */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    background: #13161b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 2000;
}
.nav-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.nav-dropdown-header {
    padding: 10px 12px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 4px;
}
.nav-dropdown-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e8e8e8;
    margin-bottom: 2px;
}
.nav-dropdown-email {
    font-size: 0.75rem;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 0.825rem;
    font-weight: 600;
    color: #999;
    text-decoration: none;
    border-radius: 7px;
    transition: background 0.15s, color 0.15s;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: "Monda", system-ui, sans-serif;
}
.nav-dropdown-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.nav-dropdown-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 4px 0;
}

.nav-dropdown-logout {
    background-color: rgba(192,111,193,0.1);
    text-decoration: none;
    color: #c06fc1;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    width: 100%;
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
    width: 100%;
    padding: 32px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(15, 17, 21, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

.footer-inner a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-inner a:hover { color: #fff; }

.footer-separator { color: #444; }

@media (max-width: 900px) {
    .global-sticky-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .has-global-banner .navbar {
        top: 72px;
    }

    .has-global-banner .navbar-mobile-drawer {
        top: 72px;
        height: calc(100vh - 72px);
    }

    .navbar-links {
        display: none;
    }

    #nav-auth-slot {
        justify-self: center;
    }

    #nav-auth-slot .nav-auth-btn {
        display: none;
    }

    .navbar-menu-toggle {
        display: inline-flex;
        justify-self: end;
    }
}
