/* Shared top navigation (templates/_global_nav.html), Higgsfield-style:
   one row of menus that open feature panels on hover / tap. Linked by
   base.html and karaoke/_layout.html; self-contained (doesn't rely on
   style.css or nav.css). 2026-10-15. */

/* Reset inside the bar with zero specificity (:where), so the rules below win. */
:where(body > nav.vz-nav), :where(body > nav.vz-nav *) { margin: 0; padding: 0; box-sizing: border-box; }
body > nav.vz-nav {
    --vz-bg: rgba(12, 12, 20, 0.92);
    --vz-panel: #15151f;
    --vz-line: rgba(255, 255, 255, 0.07);
    --vz-text: #e8e8f0;
    --vz-dim: #9a9ab5;
    --vz-mute: #6c6c86;
    --vz-accent: #8b5cf6;
    --vz-magenta: #ec4899;
    position: sticky; top: 0; z-index: 999;
    background: var(--vz-bg);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--vz-line);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4; color: var(--vz-text);
}
body > nav.vz-nav .gradient-text {
    background: linear-gradient(135deg, #8b5cf6, #ec4899, #f97316);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.vz-inner { max-width: 1440px; margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 0 24px; height: 60px; }
.vz-logo { font-size: 21px; font-weight: 800; letter-spacing: -0.5px; color: var(--vz-text); text-decoration: none; flex-shrink: 0; }
.vz-burger { display: none; margin-left: auto; background: none; border: 1px solid var(--vz-line); color: var(--vz-text); font-size: 20px; border-radius: 8px; width: 40px; height: 36px; cursor: pointer; }

/* Menu row */
.vz-menu { list-style: none; display: flex; align-items: center; gap: 2px; height: 100%; }
.vz-item { position: relative; height: 100%; display: flex; align-items: center; }
.vz-top {
    display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px;
    background: none; border: none; color: var(--vz-dim); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.vz-top svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vz-brand { white-space: nowrap; }
.vz-item:hover .vz-top, .vz-item.vz-open .vz-top { color: #fff; background: rgba(255, 255, 255, 0.06); }
.vz-item.vz-active .vz-top { color: #fff; }
.vz-top { position: relative; }
.vz-item.vz-active .vz-top::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -6px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--vz-accent), var(--vz-magenta)); }

.vz-tag { font-size: 9.5px; font-weight: 700; letter-spacing: 0.4px; padding: 1px 5px; border-radius: 4px; text-transform: uppercase; line-height: 1.5; }
.vz-tag-new { background: #d4ff3a; color: #111; }
.vz-tag-top { background: linear-gradient(135deg, #ec4899, #8b5cf6); color: #fff; }
.vz-tag-soon { background: rgba(255, 255, 255, 0.1); color: var(--vz-dim); }

/* Feature panel */
.vz-mega {
    display: none; position: absolute; top: 100%; left: 0; margin-top: -2px;
    min-width: 640px; padding: 18px; gap: 18px;
    background: var(--vz-panel); border: 1px solid var(--vz-line); border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.vz-mega-narrow { min-width: 360px; }
/* The Videos panel (3 columns) hangs from the menu row, not from its button,
   so it fits laptop screens. */
.vz-menu { position: relative; }
.vz-item.vz-wide { position: static; }
.vz-wide > .vz-mega { width: min(760px, calc(100vw - 48px)); min-width: 0; }
.vz-mega-cols { flex-direction: column; }
.vz-item:hover > .vz-mega-cols, .vz-item.vz-open > .vz-mega-cols { display: flex; }
.vz-cols { display: flex; gap: 18px; }
.vz-mega-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--vz-line); padding: 12px 8px 0; font-size: 12.5px; color: var(--vz-mute); }
.vz-mega-foot svg { width: 15px; height: 15px; stroke: var(--vz-mute); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vz-mega-foot a { color: var(--vz-dim); text-decoration: none; }
.vz-mega-foot a:hover { color: #fff; }
.vz-item:hover > .vz-mega, .vz-item.vz-open > .vz-mega { display: flex; }
/* invisible bridge so the panel doesn't close while the mouse moves into it */
.vz-item::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.vz-col { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vz-col-title { font-size: 12px; color: var(--vz-mute); padding: 0 8px 8px; }
.vz-feat { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--vz-text); }
.vz-feat:hover { background: rgba(255, 255, 255, 0.05); }
.vz-ico { width: 38px; height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #1f1f2c; border: 1px solid var(--vz-line); }
.vz-ico svg { width: 18px; height: 18px; stroke: #cfcfe0; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vz-feat:hover .vz-ico { border-color: rgba(139, 92, 246, 0.6); }
.vz-feat-txt { display: flex; flex-direction: column; min-width: 0; }
.vz-feat-title { font-size: 14px; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 6px; }
.vz-feat-desc { font-size: 12.5px; color: var(--vz-dim); }

.vz-soon { padding: 14px 10px; text-align: center; width: 100%; }
.vz-soon-ico { font-size: 34px; margin-bottom: 6px; }
.vz-soon-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.vz-soon-desc { font-size: 13px; color: var(--vz-dim); line-height: 1.5; }

/* Right side */
.vz-account { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.vz-link { color: var(--vz-dim); text-decoration: none; font-size: 14px; font-weight: 500; }
.vz-link:hover { color: #fff; }
.vz-account .btn-login { color: var(--vz-text); font-weight: 600; text-decoration: none; font-size: 14px; }
.vz-account .btn-signup { background: linear-gradient(135deg, #8b5cf6, #ec4899); color: #fff; padding: 7px 16px; border-radius: 50px; font-weight: 600; font-size: 14px; text-decoration: none; }
.vz-account .btn-signup:hover { box-shadow: 0 4px 18px rgba(139, 92, 246, 0.4); }

/* Credit balance pill (top right, logged-in users) */
/* Same lime as the NEW tag next to "Videos" (Ricardo, 2026-10-15). */
.vz-credits { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #d4ff3a; border: 1px solid #d4ff3a; color: #111; text-decoration: none; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.vz-credits:hover { background: #e2ff70; border-color: #e2ff70; color: #111; }
.vz-credits-ico { color: #111; }
.vz-credits strong { font-weight: 800; color: #111; }
.vz-credits-lbl { color: #2a3300; }

/* User menu + language (same look as before) */
.vz-nav .user-menu { position: relative; }
.vz-nav .user-menu-btn { display: flex; align-items: center; gap: 8px; background: #1c1c35; border: 1px solid #2a2a4a; border-radius: 10px; padding: 5px 10px; color: var(--vz-text); cursor: pointer; font: inherit; }
.vz-nav .user-menu-btn:hover { border-color: var(--vz-accent); }
.vz-nav .user-avatar { width: 26px; height: 26px; background: var(--vz-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: #fff; }
.vz-nav .user-name { font-size: 0.85rem; font-weight: 500; }
.vz-nav .plan-badge { font-size: 0.62rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px; }
.vz-nav .user-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--vz-panel); border: 1px solid #2a2a4a; border-radius: 12px; padding: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); z-index: 1000; }
.vz-nav .user-dropdown.show { display: block; }
.vz-nav .dropdown-user-info { padding: 8px 10px; display: flex; flex-direction: column; }
.vz-nav .dropdown-user-info span { font-size: 12px; color: var(--vz-dim); }
.vz-nav .dropdown-divider { height: 1px; background: #2a2a4a; margin: 6px 0; }
.vz-nav .dropdown-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--vz-text); text-decoration: none; font-size: 14px; background: none; border: none; cursor: pointer; font-family: inherit; }
.vz-nav .dropdown-item:hover { background: rgba(255, 255, 255, 0.06); }
.vz-nav .dropdown-logout { color: #ff7a8a; }
.vz-nav .lang-selector { position: relative; }
.vz-nav .lang-btn { background: none; border: 1px solid #2a2a4a; color: var(--vz-text); border-radius: 8px; padding: 5px 10px; font-size: 13px; cursor: pointer; font-family: inherit; }
.vz-nav .lang-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: var(--vz-panel); border: 1px solid #2a2a4a; border-radius: 10px; padding: 6px; min-width: 150px; z-index: 1000; }
.vz-nav .lang-dropdown.show { display: block; }
.vz-nav .lang-option { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--vz-text); padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; font-family: inherit; }
.vz-nav .lang-option:hover, .vz-nav .lang-option.active { background: rgba(139, 92, 246, 0.18); }

/* Narrower screens: drop the affiliate link, then switch to the mobile menu */
@media (max-width: 1240px) { .vz-link-aff { display: none; } .vz-top { padding: 0 9px; } }
@media (max-width: 1080px) {
    .vz-inner { flex-wrap: wrap; height: auto; min-height: 56px; padding: 8px 16px; gap: 10px; }
    .vz-burger { display: block; order: 2; }
    .vz-account { order: 1; margin-left: auto; gap: 10px; }
    .vz-account .vz-link { display: none; }
    .vz-menu { order: 3; display: none; width: 100%; flex-direction: column; align-items: stretch; height: auto; padding: 6px 0 10px; }
    .vz-nav.vz-mobile-open .vz-menu { display: flex; }
    .vz-item { flex-direction: column; align-items: stretch; height: auto; }
    .vz-item::after { display: none; }
    .vz-top { width: 100%; height: 44px; justify-content: flex-start; font-size: 15px; }
    .vz-item.vz-active .vz-top::after { display: none; }
    .vz-item:hover > .vz-mega { display: none; }
    .vz-item.vz-open > .vz-mega { display: flex; }
    .vz-mega, .vz-mega-narrow, .vz-wide > .vz-mega { position: static; width: auto; min-width: 0; flex-direction: column; margin: 4px 0 8px; padding: 10px; box-shadow: none; }
    .vz-feat-desc { white-space: normal; }
    .vz-cols { flex-direction: column; gap: 6px; }
}
@media (max-width: 480px) {
    .vz-credits-lbl { display: none; }
    .vz-account .btn-login { display: none; }
    .vz-nav .user-name, .vz-nav .plan-badge { display: none; }
}
