﻿/* Shared navbar styles (synced with index.html) */
:root{
  --nav-height: 66px;
  --nav-control-height: 36px;
  --nav-control-height-mobile: 40px;
}
body{
  padding-top: var(--nav-height);
}
.nav{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  backdrop-filter: blur(12px);
  background: var(--navBg, rgba(234, 242, 251, 0.70));
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}
.nav .wrap{
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.nav .navInner{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 0;
  gap: 14px;
  flex-wrap: nowrap;
  position: relative;
  height: 66px;
  box-sizing: border-box;
}
.nav .brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}
.nav .brandText{
  display: flex;
  flex-direction: column;
  line-height: 1;
  padding-top: 4px;
  white-space: nowrap;
}
.nav.navCompactBrand .brandText{
  display: none;
}
.nav .brandMain{
  display: inline-flex;
  gap: 0;
  align-items: baseline;
  white-space: nowrap;
}
.nav .brandSub{
  margin-top: 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.nav .grad{
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  -webkit-background-clip: text;
  color: transparent;
}
.nav .logo{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: none;
  background-image: url("../assets/ViralAILogo.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: hue-rotate(var(--logoHue, 0deg)) saturate(var(--logoSaturate, 1));
}
.nav .navRight{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
  position: absolute;
  inset: 0;
  padding: 14px 0;
  height: 100%;
  transform: none;
  margin-left: 0;
  z-index: 2;
  pointer-events: none;
}
.nav .navRight > *{
  pointer-events: auto;
}
.nav .navCluster{
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav .profileWrap{
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav .profileBtn{
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 0;
  cursor: pointer;
  box-shadow: none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.nav .profileBtn:hover{
  transform: translateY(0);
  box-shadow: none;
  border-color: transparent;
}
.nav .avatar{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.nav .profileMenu{
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(10, 20, 40, 0.12);
  padding: 10px;
  display: grid;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity .18s ease,
    transform .18s ease,
    visibility 0s linear .18s;
  z-index: 80;
}
.nav .profileMenuOpen{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition:
    opacity .18s ease,
    transform .18s ease,
    visibility 0s linear 0s;
}
.nav .profileName{
  padding: 8px 10px;
  font-weight: 900;
  color: var(--text, #0b1220);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.nav .profileItem{
  width: 100%;
  display: block;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--card);
  font-weight: 800;
  font-size: 14px;
  line-height: 1.1;
  color: var(--text, #0b1220);
  cursor: pointer;
  transition: border-color .12s ease, transform .12s ease, box-shadow .12s ease;
}
.nav .profileItemContent{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav .profileItemIcon{
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  opacity: 0.9;
  flex: 0 0 auto;
}
.nav .profileItemIcon svg{
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav .profileItem:hover{
  border-color: color-mix(in srgb, var(--brand1) 45%, transparent);
  box-shadow: 0 10px 20px rgba(10, 20, 40, 0.08);
  transform: translateY(-1px);
}
.nav .profileItemDanger{
  color: #ff5f7f;
  background: color-mix(in srgb, #ff3355 18%, var(--card) 82%);
}
.nav .profileItemDanger:hover{
  border-color: color-mix(in srgb, #ff3355 55%, transparent);
}
.nav .pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  height: var(--nav-control-height);
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 8px 20px rgba(10, 20, 40, 0.05);
  font-size: 13px;
  color: var(--muted);
  font-weight: 900;
}
.nav .creditsSparkleIcon{
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  opacity: 0.95;
  flex: 0 0 auto;
}
.nav .creditsSparkleIcon svg{
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav .pill::after{
  content: none;
}
.nav .btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: var(--nav-control-height);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 0 14px;
  border-radius: 14px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, opacity .12s ease;
  box-shadow: 0 10px 22px rgba(10, 20, 40, 0.06);
}
.nav .btn::after{
  content: none;
}
.nav .btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(10, 20, 40, 0.10);
  border-color: color-mix(in srgb, var(--brand1) 45%, transparent);
}
.nav .btn:active{ transform: translateY(0px) scale(0.99); }
.nav .navAuthBtn{
  border: 2px solid rgba(255,255,255,0.55);
  background: transparent;
  color: #f2f7ff;
  position: relative;
  transition: transform .12s ease, border-color .25s ease, color .25s ease;
}
.nav .navAuthBtn::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 2px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.nav .navAuthBtn:hover{
  border-color: transparent;
  color: var(--brand1);
  box-shadow: 0 14px 30px rgba(10, 20, 40, 0.10);
}
.nav .navAuthBtn:hover::before{
  opacity: 1;
}
:root[data-theme-mode="light"] .nav .navAuthBtn{
  border: 2px solid rgba(11,18,32,0.40);
  color: #0b1220;
}
:root[data-theme-mode="light"] .nav .navAuthBtn:hover{
  border-color: transparent;
  color: var(--brand1);
}

.nav .btnPrimary{
  border: 1px solid rgba(255,255,255,0.35);
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  color: white;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--brand1) 45%, transparent);
}
.nav .btnPrimary:hover{
  box-shadow: 0 24px 54px color-mix(in srgb, var(--brand1) 55%, transparent);
}
@media (max-width: 760px){
  .nav .btn,
  .nav .pill{
    height: var(--nav-control-height-mobile);
  }
  .nav .btn{
    padding: 0 18px;
  }
  .nav .pill{
    padding: 0 14px;
  }
}
@media (hover: none) and (pointer: coarse){
  .nav .btnPrimary{
    box-shadow: none;
  }
  .nav .btnPrimary:hover{
    box-shadow: none;
  }
}
