@font-face {
  font-family: 'VPA Mono';
  src: local('SF Pro Display'), local('Inter'), local('Montserrat');
  font-display: swap;
}

:root {
  --vpa-green: #22c55e;
  --vpa-green-soft: #4ade80;
  --vpa-graphite: rgba(7, 9, 14, 0.72);
  --vpa-graphite-solid: rgba(7, 9, 14, 0.94);
  --vpa-white: #f8fafc;
  --vpa-muted: #9ca9c4;
  --vpa-border: rgba(255, 255, 255, 0.2);
  --vpa-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  --vpa-nav-height: 86px;
}

.vpa-liquid-nav {
  position: fixed;
  inset: auto 0 clamp(12px, env(safe-area-inset-bottom, 0px) + 12px, 30px);
  display: flex;
  justify-content: center;
  z-index: 1400;
  pointer-events: none;
  font-family: 'VPA Mono', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.vpa-liquid-shell {
  position: relative;
  display: flex;
  width: min(680px, calc(100% - 20px));
  min-height: var(--vpa-nav-height);
  border-radius: 32px;
  padding: 0.85rem 0.95rem 0.65rem;
  background: linear-gradient(145deg, rgba(15, 19, 28, 0.78), rgba(7, 10, 17, 0.9));
  box-shadow: var(--vpa-shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  overflow: hidden;
  isolation: isolate;
  pointer-events: auto;
  --create-anchor-left: 50%;
}

.vpa-liquid-shell::before,
.vpa-liquid-shell::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.vpa-liquid-shell::before {
  background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.4), transparent 45%),
              radial-gradient(circle at 80% 0%, rgba(34, 197, 94, 0.28), transparent 60%),
              linear-gradient(130deg, rgba(255, 255, 255, 0.05), transparent 45%);
  mix-blend-mode: screen;
  opacity: 0.8;
}

.vpa-liquid-shell::after {
  inset: 1px;
  border-radius: calc(32px - 1px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"><g fill="none" stroke="rgba(255,255,255,0.04)" stroke-width="0.4"><path d="M0 60H120M60 0V120"/></g></svg>')
    center/240px 240px repeat;
  mix-blend-mode: soft-light;
  opacity: 0.85;
}

.vpa-liquid-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: stretch;
  padding: 0 0.35rem;
}

.vpa-liquid-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.55rem 0.25rem 0.45rem;
  min-height: 70px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--vpa-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.25s ease, transform 0.2s ease;
}

.vpa-liquid-link::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  opacity: 0;
  transition: opacity 0.22s ease;
}

.vpa-liquid-link:hover,
.vpa-liquid-link:focus-visible {
  color: var(--vpa-white);
}

.vpa-liquid-link:hover::before,
.vpa-liquid-link:focus-visible::before,
.vpa-liquid-link.is-active::before {
  opacity: 1;
}

.vpa-liquid-link.is-active {
  color: var(--vpa-white);
}

.vpa-liquid-link .vpa-liquid-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.08rem;
  color: inherit;
}

.vpa-liquid-link svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.6;
}

.vpa-liquid-link.is-active svg {
  filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.35));
}

.vpa-liquid-text {
  text-transform: none;
  font-size: 0.64rem;
}

.vpa-liquid-indicator {
  position: absolute;
  top: 8px;
  height: calc(100% - 16px);
  width: var(--indicator-width, 0px);
  transform: translateX(var(--indicator-left, 0px));
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(34, 197, 94, 0.06));
  box-shadow: 0 12px 25px rgba(2, 6, 12, 0.35);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.vpa-liquid-indicator::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vpa-liquid-indicator.is-visible {
  opacity: 1;
}

.vpa-liquid-badge {
  position: absolute;
  top: 6px;
  right: 14px;
  min-width: 20px;
  padding: 0 6px;
  font-size: 0.65rem;
  line-height: 1.4;
  border-radius: 999px;
  color: #02140c;
  background: linear-gradient(135deg, #bef264, #a3e635);
  box-shadow: 0 4px 10px rgba(190, 242, 100, 0.45);
}

.vpa-liquid-dot {
  position: absolute;
  top: 10px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.6);
}

.vpa-liquid-link::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  transform: translate(calc(var(--press-x, 50%) - 50%), calc(var(--press-y, 50%) - 50%));
}

.vpa-liquid-link.is-pressing::after {
  animation: vpa-press 520ms ease-out;
}

@keyframes vpa-press {
  0% {
    opacity: 0.45;
    transform: translate(calc(var(--press-x, 50%) - 50%), calc(var(--press-y, 50%) - 50%)) scale(0.25);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--press-x, 50%) - 50%), calc(var(--press-y, 50%) - 50%)) scale(2.2);
  }
}

.vpa-nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.4px solid rgba(255, 255, 255, 0.35);
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.08);
}

.vpa-link-create {
  color: var(--vpa-white);
  font-weight: 700;
}

.vpa-link-create svg {
  width: 26px;
  height: 26px;
  stroke-width: 2;
}

.vpa-create-wave {
  position: absolute;
  left: var(--create-anchor-left, 50%);
  bottom: calc(100% - 12px);
  transform: translate(-50%, 40%);
  width: 90px;
  height: 90px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.18) 0%, transparent 65%);
  border: 1px solid rgba(34, 197, 94, 0.25);
  filter: blur(6px);
  opacity: 0.75;
  animation: vpa-create-wave 5.5s ease-in-out infinite;
  z-index: 0;
}

.vpa-create-popover {
  position: absolute;
  left: var(--create-anchor-left, 50%);
  bottom: calc(100% + 16px);
  transform: translate(-50%, 10px) scale(0.94);
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  background: radial-gradient(circle at 10% 0%, rgba(140, 247, 185, 0.2), rgba(5, 7, 12, 0.95));
  border: 1px solid rgba(140, 247, 185, 0.3);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.6);
  width: min(260px, 74vw);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 5;
}

.vpa-create-popover.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.vpa-create-popover::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%) rotate(45deg);
  width: 18px;
  height: 18px;
  background: rgba(6, 9, 15, 0.95);
  border-right: 1px solid rgba(140, 247, 185, 0.25);
  border-bottom: 1px solid rgba(140, 247, 185, 0.25);
}

.vpa-create-popover-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: rgba(226, 232, 240, 0.65);
  margin-bottom: 0.55rem;
}

.vpa-create-popover-options {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.vpa-create-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.52rem 0.65rem;
  border-radius: 14px;
  text-decoration: none;
  color: #e2e8f0;
  background: rgba(2, 5, 11, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.vpa-create-option:hover {
  transform: translateY(-2px);
  border-color: rgba(140, 247, 185, 0.6);
  background: radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.25), rgba(4, 7, 13, 0.95));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.5);
}

.vpa-create-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: radial-gradient(circle at 20% 20%, rgba(140, 247, 185, 0.2), rgba(15, 23, 32, 0.95));
  border: 1px solid rgba(140, 247, 185, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 18px rgba(34, 197, 94, 0.18);
  animation: vpa-create-glow 4s ease-in-out infinite;
}

.vpa-create-option-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  display: block;
}

.vpa-create-option-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.vpa-create-option-label {
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: 0.03em;
}

.vpa-create-option-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f8fafc;
}

@keyframes vpa-create-wave {
  0% {
    transform: translate(-50%, 35%) scale(0.85);
    opacity: 0.55;
  }
  50% {
    transform: translate(-50%, 40%) scale(1);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, 45%) scale(0.85);
    opacity: 0.55;
  }
}

@keyframes vpa-create-glow {
  0% {
    box-shadow: inset 0 0 12px rgba(34, 197, 94, 0.15);
  }
  50% {
    box-shadow: inset 0 0 22px rgba(34, 197, 94, 0.35);
  }
  100% {
    box-shadow: inset 0 0 12px rgba(34, 197, 94, 0.15);
  }
}

.vpa-create-option-icon {
  animation: vpa-create-glow 4s ease-in-out infinite;
}

.premium-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1600;
}

.premium-overlay .overlay-content {
  background: rgba(7, 11, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 2rem;
  width: min(90vw, 360px);
  text-align: center;
  color: var(--vpa-white);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}

.overlay-pill {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.overlay-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-upgrade,
.btn-close-overlay {
  border-radius: 18px;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn-upgrade {
  background: linear-gradient(135deg, var(--vpa-green), var(--vpa-green-soft));
  color: #03130b;
  text-decoration: none;
}

.btn-close-overlay {
  background: transparent;
  color: var(--vpa-white);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

@media (max-width: 560px) {
  .vpa-liquid-shell {
    width: min(96%, 460px);
    padding: 0.42rem 0.55rem;
  }

  .vpa-liquid-inner {
    gap: 0.18rem;
  }

  .vpa-liquid-link {
    font-size: 0.62rem;
    min-height: 64px;
  }

  .vpa-liquid-link .vpa-liquid-icon {
    margin-bottom: 0.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vpa-liquid-indicator,
  .vpa-liquid-link,
  .vpa-create-wave {
    transition: none !important;
    animation: none !important;
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .vpa-liquid-shell {
    background: var(--vpa-graphite-solid);
  }
}