/* EarnPaste global nav — matches startpaste.html nav chrome */

@media (min-width: 768px) {
  #mobileBottomNav {
    display: none !important;
  }
  .nav-link.text-green-400 {
    color: rgb(74 222 128) !important;
  }
}

html.ep-globalnav-active,
html.ep-globalnav-active body {
  box-sizing: border-box;
}

html.ep-globalnav-active:not(.ep-nav-min-320):not(.ep-nav-min-580),
html.ep-globalnav-active:not(.ep-nav-min-320):not(.ep-nav-min-580) body {
  width: 100%;
  max-width: 100%;
}

body.ep-globalnav-active {
  display: block !important;
  margin: 0;
  position: relative;
}

/* Preserve page min-width + horizontal scroll (startpaste, index, payoutrates). */
html.ep-globalnav-active.ep-nav-min-320,
html.ep-globalnav-active.ep-nav-min-320 body {
  min-width: 370px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html.ep-globalnav-active.ep-nav-min-580,
html.ep-globalnav-active.ep-nav-min-580 body {
  min-width: 580px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Fixed nav must span at least the same min-width as the page. */
html.ep-globalnav-active.ep-nav-min-320 #startpaste-site-chrome,
html.ep-globalnav-active.ep-nav-min-320 #startpaste-site-nav,
html.ep-globalnav-active.ep-nav-min-320 #mobileBottomNav {
  min-width: 370px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

html.ep-globalnav-active.ep-nav-min-580 #startpaste-site-chrome,
html.ep-globalnav-active.ep-nav-min-580 #startpaste-site-nav,
html.ep-globalnav-active.ep-nav-min-580 #mobileBottomNav {
  min-width: 580px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

html.ep-globalnav-active.ep-nav-min-320 #startpaste-site-nav,
html.ep-globalnav-active.ep-nav-min-580 #startpaste-site-nav {
  right: 0;
}

html.ep-globalnav-active.ep-nav-min-320 #mobileBottomNav,
html.ep-globalnav-active.ep-nav-min-580 #mobileBottomNav {
  right: 0;
}

@media (max-width: 767px) {
  body.ep-globalnav-active:not(.ep-no-mobile-nav-pad) {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (min-width: 768px) {
  body.ep-globalnav-active:not(.ep-no-desktop-nav-pad) {
    padding-top: 4rem !important;
  }
  body.ep-globalnav-active:not(.ep-no-mobile-nav-pad) {
    padding-bottom: 0 !important;
  }
}

#startpaste-site-chrome {
  position: relative;
  z-index: 11000;
}

#startpaste-site-nav,
#mobileBottomNav {
  z-index: 11000 !important;
}

#userDropdown,
#mobileUserDropdown {
  z-index: 11001 !important;
}

.nav-translucent {
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, rgba(2, 2, 2, 0.5) 0%, rgba(6, 6, 8, 0.45) 50%, rgba(3, 3, 5, 0.5) 100%);
}

.nav-enhanced-desktop,
.startpaste-site-nav {
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 40px -10px rgba(74, 222, 128, 0.15);
  border-bottom: 1px solid rgba(75, 85, 99, 0.3);
  z-index: 11000 !important;
}

.nav-enhanced-desktop::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(74, 222, 128, 0.4) 50%, transparent 100%);
  opacity: 0.8;
}

.mobile-nav-glass {
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, rgba(2, 2, 2, 0.45) 0%, rgba(6, 6, 8, 0.4) 50%, rgba(3, 3, 5, 0.45) 100%) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow:
    0 -4px 30px rgba(0, 0, 0, 0.4),
    0 -1px 0 rgba(255, 255, 255, 0.06),
    0 0 40px -10px rgba(74, 222, 128, 0.12) !important;
  height: 4rem;
  overflow: hidden;
}

.mobile-nav-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(74, 222, 128, 0.35) 50%, transparent 100%);
  opacity: 0.9;
  pointer-events: none;
}

.mobile-nav-scrolled {
  background: linear-gradient(180deg, rgba(2, 2, 2, 0.6) 0%, rgba(6, 6, 8, 0.55) 50%, rgba(3, 3, 5, 0.6) 100%) !important;
  backdrop-filter: blur(35px) !important;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(156, 163, 175, 0.8);
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 12px;
  min-width: 54px;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:active,
.mobile-nav-item:hover {
  color: rgba(74, 222, 128, 0.9);
  background: rgba(74, 222, 128, 0.1);
  transform: translateY(-2px);
}

.mobile-nav-item.active {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
}

.mobile-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

.mobile-nav-item:active .mobile-nav-icon,
.mobile-nav-item:hover .mobile-nav-icon {
  transform: scale(1.1);
}

.mobile-nav-label {
  font-size: 9px;
  text-align: center;
  line-height: 1;
  letter-spacing: 0.025em;
}

.mobile-nav-center {
  position: relative;
}

.mobile-nav-icon-center {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

.mobile-nav-center:active .mobile-nav-icon-center,
.mobile-nav-center:hover .mobile-nav-icon-center {
  transform: scale(1.1);
}

#mobileUserPhoto,
#mobileUserPhotoDropdown {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
}

.mobile-nav-center.premium-user {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0, transparent 70%);
}

.mobile-nav-center.premium-user .mobile-nav-icon-center {
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.3));
}

#mobilePremiumIndicator {
  top: -0.125rem;
  right: -0.25rem;
  animation: ep-nav-premium-pulse 2s ease-in-out infinite;
}

@keyframes ep-nav-premium-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.mobile-nav-center:active,
.mobile-nav-center:hover {
  color: rgba(74, 222, 128, 0.9);
  background: rgba(74, 222, 128, 0.1);
  transform: translateY(-2px);
  border-radius: 12px;
}

.mobile-auth-prominent {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-auth-prominent:active,
.mobile-auth-prominent:hover {
  color: rgba(74, 222, 128, 0.9);
  background: rgba(74, 222, 128, 0.1);
  transform: translateY(-2px);
  border-radius: 12px;
}

.mobile-auth-icon {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 60%;
  color: #4ade80 !important;
  position: relative;
}

.mobile-auth-icon::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 60%;
  animation: ep-nav-auth-pulse 2s ease-in-out infinite;
}

.mobile-auth-label {
  color: #4ade80 !important;
  font-weight: 500;
  font-size: 10px !important;
}

@keyframes ep-nav-auth-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

#mobileUserDropdown {
  transform: translateY(10px) scale(0.95);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

#mobileUserDropdown:not(.hidden) {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.nav-link {
  color: rgb(209 213 219);
  transition: color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
}

.nav-link:hover {
  color: rgb(134 239 172);
  transform: translateY(-1px);
}

.nav-link::selection,
.nav-link span::selection,
.mobile-nav-label::selection {
  background: rgba(16, 185, 129, 0.45);
  color: #fff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

#userDropdown {
  transform: translateY(-10px) scale(0.95);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

#userDropdown:not(.hidden) {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .nav-link span {
    display: none;
  }
  .nav-link svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.mobile-nav-item[href='/premium.html'] svg,
.nav-link[href='/premium.html'] svg {
  filter: drop-shadow(0 0 8px #fbbf24) drop-shadow(0 0 16px #f59e0b);
  color: #fbbf24;
  transition: all 0.3s ease;
}

.mobile-nav-item[href='/premium.html']:hover svg,
.nav-link[href='/premium.html']:hover svg {
  filter: drop-shadow(0 0 12px #fbbf24) drop-shadow(0 0 24px #f59e0b);
  transform: scale(1.1);
}

.mobile-nav-item[href='/premium.html'] .mobile-nav-label,
.nav-link[href='/premium.html'] span {
  color: #fbbf24;
  font-weight: 600;
}

.tile-premium-border {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}
