/* ============================================================
   BOTTOM NAV – Premium with SVG icons (reliable, no Font Awesome dependency)
   ============================================================ */

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.chasing-border-nav {
  position: relative;
  border-color: transparent !important;
  background-clip: padding-box;
  overflow: visible;
}
.chasing-border-nav::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--angle), #8deb00, #00e5ff, #a0f520, #8deb00);
  -webkit-mask: linear-gradient(black, black) content-box, linear-gradient(black, black) border-box;
  -webkit-mask-composite: xor;
  mask: linear-gradient(black, black) content-box, linear-gradient(black, black) border-box;
  mask-composite: exclude;
  animation: spinBorder 4s linear infinite;
  pointer-events: none;
  z-index: 0;
}
.chasing-border-nav > * {
  position: relative;
  z-index: 1;
}
@keyframes spinBorder {
  to { --angle: 360deg; }
}

/* ===== Hidden by default – only shown on mobile ===== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.90);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 30px 30px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: none;
  padding: 6px 12px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  gap: 8px;
  min-height: 68px;
}
.bottom-nav.chasing-border-nav::before {
  border-radius: 30px 30px 0 0 !important;
  inset: -1.5px !important;
  padding: 1.5px !important;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #888;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 500;
  gap: 2px;
  padding: 4px 12px;
  min-height: 44px;
  min-width: 52px;
  flex: 0 1 auto;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  border-radius: 20px;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

/* SVG Icon styling */
.bottom-nav a .nav-icon {
  color: inherit;
  opacity: 0.9;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav a span {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  line-height: 1.2;
}

.bottom-nav a:hover {
  color: #8deb00;
  transform: translateY(-2px);
}

.bottom-nav a:hover .nav-icon {
  transform: scale(1.15) rotate(-2deg);
  filter: drop-shadow(0 0 8px rgba(141, 235, 0, 0.3));
}

.bottom-nav a:hover span {
  transform: translateY(-2px);
}

.bottom-nav a.active {
  color: #8deb00;
}

.bottom-nav a.active .nav-icon {
  transform: translateY(-3px) scale(1.1);
  filter: drop-shadow(0 0 12px rgba(141, 235, 0, 0.4));
  animation: iconFloat 2.4s ease-in-out infinite;
}

.bottom-nav a.active span {
  transform: translateY(-3px);
  font-weight: 600;
}

.bottom-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: #8deb00;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(141, 235, 0, 0.3);
  transition: width 0.3s ease;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(-3px) scale(1.1); }
  50% { transform: translateY(-6px) scale(1.12); }
}

/* Badge styling */
.bottom-nav .badge-dot {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 9px;
  height: 9px;
  background: #ff3b3b;
  border-radius: 50%;
  border: 1.5px solid #0A0A0A;
  display: none;
  box-shadow: 0 0 8px rgba(255, 59, 59, 0.5);
  animation: badgePulse 1.5s ease-in-out infinite;
}

.bottom-nav a.show-badge .badge-dot {
  display: block;
}

.bottom-nav a:hover .badge-dot {
  transform: scale(1.2);
  transition: transform 0.2s ease;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }
}

@media (max-width: 480px) {
  .bottom-nav {
    border-radius: 24px 24px 0 0;
    padding: 4px 8px;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
    min-height: 60px;
    gap: 6px;
    justify-content: space-evenly;
  }
  .bottom-nav.chasing-border-nav::before {
    border-radius: 24px 24px 0 0 !important;
  }
  .bottom-nav a {
    padding: 4px 6px;
    min-width: 40px;
    font-size: 10px;
  }
  .bottom-nav a .nav-icon {
    width: 20px;
    height: 20px;
  }
  .bottom-nav .badge-dot {
    width: 7px;
    height: 7px;
    top: 2px;
    right: 2px;
  }
}
