/**
 * Nbulai homepage — top nav (individual floating buttons, no shared panel)
 */

:root {
  --nav-pill-h: 44px;
  --nav-pill-w: clamp(7.25rem, 8.4vw, 8.75rem);
}

#topRightButtons {
  position: fixed;
  top: clamp(10px, 1.4vw, 22px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  z-index: 99990;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: none;
}

#topRightButtons .nav-buttons {
  pointer-events: auto;
}

.nav-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: clamp(6px, 0.8vw, 12px);
  max-width: calc(100vw - 24px);
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible;
}

.nav-button {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--nav-pill-w);
  width: var(--nav-pill-w);
  min-width: var(--nav-pill-w);
  max-width: var(--nav-pill-w);
  height: var(--nav-pill-h);
  min-height: var(--nav-pill-h);
  max-height: var(--nav-pill-h);
  padding: 0;
  border-radius: 999px;
  border: none;
  background: rgba(5, 10, 28, 0.06);
  color: rgba(245, 250, 255, 0.9);
  text-decoration: none;
  font-family: inherit;
  font-size: clamp(0.88rem, 0.95vw, 1.02rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  box-shadow: none;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
  touch-action: manipulation;
}

.nav-button i {
  display: none !important;
}

.nav-button__content {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 100%;
  padding: 0 10px;
  box-sizing: border-box;
}

.nav-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-button:hover {
  transform: translateY(-2px);
  color: #ffffff;
  background: rgba(5, 10, 28, 0.14);
  box-shadow: 0 0 14px rgba(94, 238, 255, 0.12);
}

.nav-button:active {
  transform: translateY(0) scale(0.98);
}

.nav-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(94, 238, 255, 0.22);
}

.nav-button:hover::after,
.nav-button::after {
  content: none !important;
  display: none !important;
}

/* Cooking — subtle neat shimmer + soft stars */
#cooking-hub {
  background: rgba(5, 10, 28, 0.05);
}

#cooking-hub::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    ellipse 80% 60% at 50% 50%,
    rgba(255, 180, 100, 0.1),
    transparent 70%
  );
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
  animation: cookingNebulaPulse 10s ease-in-out infinite alternate;
}

#cooking-hub .cosmic-starfield {
  z-index: 1;
  opacity: 0.85;
}

.cooking-glitter {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    100deg,
    transparent 42%,
    rgba(255, 255, 255, 0.06) 48%,
    rgba(255, 210, 140, 0.14) 50%,
    transparent 58%
  );
  background-size: 180% 100%;
  opacity: 0.35;
  animation: cookingGlitterSweep 5.5s ease-in-out infinite;
}

#cooking-hub:hover .cooking-glitter {
  opacity: 0.5;
  animation-duration: 4s;
}

@keyframes cookingNebulaPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.55; }
}

@keyframes cookingGlitterSweep {
  0%, 100% { background-position: 120% 0; opacity: 0.2; }
  50% { background-position: -20% 0; opacity: 0.45; }
}

/* Egghead / Aeternis / Advisory — live chrono border IS the button edge */
.chrono-pill {
  position: relative;
  border: none !important;
  overflow: visible !important;
  isolation: isolate;
  padding: 0;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.chrono-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(5, 10, 28, 0.08);
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  overflow: hidden;
}

.chrono-pill .chrono-label {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 10px;
  box-sizing: border-box;
  text-align: center;
  pointer-events: none;
}

.chrono-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.chrono-border path {
  fill: none;
}

/* Advisory / Egghead / Aeternis — ghost-white chrono; tint on hover only */
.chrono-advisory,
.chrono-egghead,
.chrono-aeternis {
  --chrono-neutral: 235, 245, 255;
  --chrono-primary: 235, 245, 255;
  --chrono-secondary: 235, 245, 255;
  --chrono-hover: 235, 245, 255;
}

.chrono-advisory {
  --chrono-hover: 94, 238, 255;
}

.chrono-egghead {
  --chrono-hover: 255, 190, 90;
}

.chrono-aeternis {
  --chrono-hover: 150, 120, 255;
}

.chrono-track {
  stroke: rgba(235, 245, 255, 0.14);
  stroke-width: 0.9;
}

.chrono-progress {
  stroke: rgba(235, 245, 255, 0.72);
  stroke-width: 1.35;
  stroke-linecap: butt;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(235, 245, 255, 0.32));
  transition: stroke-dasharray 0.25s linear, stroke 0.2s ease, filter 0.2s ease;
}

.chrono-progress-hours {
  stroke: rgba(235, 245, 255, 0.52);
  stroke-width: 0.95;
}

.chrono-pill:hover .chrono-shell {
  background: rgba(5, 10, 28, 0.12);
  box-shadow: 0 0 10px rgba(235, 245, 255, 0.1);
}

.chrono-pill:hover .chrono-progress {
  stroke: rgba(var(--chrono-hover), 0.88);
  stroke-width: 1.45;
  filter: drop-shadow(0 0 7px rgba(var(--chrono-hover), 0.45));
}

.chrono-pill:hover .chrono-progress-hours {
  stroke: rgba(var(--chrono-hover), 0.58);
  stroke-width: 1.05;
}

.chrono-rings,
.chrono-clock-frame,
.live-cook-timer,
.timer-orbit,
.soon-timer {
  display: none !important;
}

@media (max-width: 760px) {
  #topRightButtons {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    transform: none;
  }

  .nav-buttons {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0;
    max-width: 100%;
  }

  .nav-buttons::-webkit-scrollbar {
    display: none;
  }

  :root {
    --nav-pill-h: 40px;
    --nav-pill-w: 6.85rem;
  }

  .nav-button {
    font-size: 0.82rem;
  }

}

@media (max-width: 480px) {
  :root {
    --nav-pill-w: 5.85rem;
  }

  .nav-label {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chrono-progress {
    transition: none;
  }

  #cooking-hub::before,
  .cooking-glitter {
    animation: none;
  }

  .cooking-glitter {
    opacity: 0.25;
    background-position: 50% 0;
  }

  .nav-button {
    transition: color 0.15s ease, background 0.15s ease;
  }

  .nav-button:hover {
    transform: none;
  }
}
