/* 🦞 Unified Navigation Component
 * Consistent across all dashboard pages
 */

.nav-unified {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-primary);
  /* Sticky nav */
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(var(--bg-primary-rgb, 17, 17, 17), 0.9);
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
}

.nav-unified a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 200ms ease;
  white-space: nowrap;
}

.nav-unified a:hover {
  color: var(--text-primary);
}

.nav-unified a.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-xl);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Emoji styling - ensure colorful rendering */
.nav-unified .nav-emoji {
  font-size: 1.1em;
  line-height: 1;
  font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
}

/* Status indicator dot */
.nav-unified .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-success);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Custom face icon in nav */
.nav-face {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 2px;
}

/* Restricted nav items - hidden by default, shown via JS if IP allowed */
.nav-restricted {
  display: none !important;
}

.nav-restricted.nav-visible {
  display: flex !important;
}

/* Visual indicator for restricted items when visible */
.nav-restricted.nav-visible::before {
  content: '🔒';
  font-size: 0.7em;
  opacity: 0.5;
  margin-right: -2px;
}

/* ===== Back to Top Button - Dr. Zoidberg! ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  border: 3px solid #ff8c42;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 300ms ease;
  z-index: 999;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
  overflow: hidden;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  animation: zoidberg-float 3s ease-in-out infinite;
}

.back-to-top:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 25px rgba(255, 140, 66, 0.5);
  border-color: #ff6b35;
}

.back-to-top img {
  width: auto;
  height: 55px;
  object-fit: contain;
  transition: transform 200ms ease;
}

/* Gentle floating animation when visible */
@keyframes zoidberg-float {
  0%, 100% { 
    transform: translateY(0);
  }
  50% { 
    transform: translateY(-5px);
  }
}

/* Excited bounce on hover */
.back-to-top:hover img {
  animation: zoidberg-excited 300ms ease;
}

@keyframes zoidberg-excited {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-5deg); }
  50% { transform: scale(0.95) rotate(0deg); }
  75% { transform: scale(1.05) rotate(5deg); }
}

/* Click effect */
.back-to-top:active {
  transform: scale(0.95);
}

.back-to-top:active img {
  animation: zoidberg-zoom 200ms ease-out;
}

@keyframes zoidberg-zoom {
  0% { transform: scale(1); }
  50% { transform: scale(0.8) translateY(-10px); }
  100% { transform: scale(1) translateY(-20px); opacity: 0.8; }
}
