/* Modern Navigation Bar Styles */
.main-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #171a21, #0f131b);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(66, 192, 244, 0.1);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar-container {
  max-width: none;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 70px;
  width: 100%;
}

/* Left Side - Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: flex-start;
  margin-left: 0;
}

.nav-link {
  position: relative;
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #66c0f4, #4a90e2);
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-link:hover {
  color: #66c0f4;
}

.nav-link:hover::before {
  width: 100%;
}

.nav-link.active {
  color: #66c0f4;
}

.nav-link.active::before {
  width: 100%;
}

/* Right Side - User Features */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-right: 0;
}

/* Search Bar */
.nav-search {
  position: relative;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(66, 192, 244, 0.2);
  border-radius: 25px;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  color: #e2e8f0;
  font-size: 0.9rem;
  width: 250px;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.search-input:focus {
  outline: none;
  border-color: #66c0f4;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(66, 192, 244, 0.1);
}

.search-input::placeholder {
  color: #a0aec0;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: #a0aec0;
  font-size: 0.9rem;
  z-index: 2;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(26, 32, 44, 0.95);
  border: 1px solid rgba(66, 192, 244, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 1001;
}

/* Social Icons */
.nav-hub, .nav-social {
  display: flex !important;
  align-items: center;
  gap: 1rem;
  visibility: visible !important;
}

.nav-icon-container {
  position: relative;
  display: block !important;
  visibility: visible !important;
}

/* Add invisible hover bridge between icon and dropdown */
.nav-icon-container::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
  z-index: 999;
}

.nav-icon {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(66, 192, 244, 0.2);
  border-radius: 50%;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-icon:hover {
  background: rgba(66, 192, 244, 0.1);
  border-color: #66c0f4;
  color: #66c0f4;
  transform: translateY(-2px);
}

.nav-icon-container.profile-container {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  transform: none !important;
}

.nav-icon-container.profile-container:hover {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.nav-icon-container.profile-container::after {
  display: none !important;
  content: none !important;
}

.nav-icon i {
  font-size: 1.1rem;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #ff6b6b, #e74c3c);
  color: white;
  border-radius: 12px;
  min-width: 20px;
  height: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
  border: 2px solid #1a1a2e;
}

/* Profile Trigger */
.profile-container {
  position: relative;
  margin-left: 0.5rem;
  display: block !important;
  visibility: visible !important;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.profile-trigger:hover {
  background: rgba(66, 192, 244, 0.1);
  border-color: transparent;
  transform: translateY(-1px);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(66, 192, 244, 0.3);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.9rem;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-arrow {
  color: #a0aec0;
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.profile-container.active .profile-arrow {
  transform: rotate(180deg);
}

/* Dropdown Styles */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: rgba(26, 32, 44, 0.95);
  border: 1px solid rgba(66, 192, 244, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(15px);
  min-width: 280px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
  display: none; /* Changed from opacity/visibility to display:none for compatibility with navbar-fix.js */
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.nav-dropdown.show {
  display: block;
  transform: translateY(0);
}

/* We're now using click behavior via JS, so removing hover effect */
/* Kept for reference:
.nav-icon-container:hover .nav-dropdown,
.profile-container:hover .nav-dropdown {
  display: block;
  transform: translateY(0);
}
*/

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: rgba(26, 32, 44, 0.95);
  border: 1px solid rgba(66, 192, 244, 0.2);
  border-bottom: none;
  border-right: none;
  transform: rotate(45deg);
}

.dropdown-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(66, 192, 244, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-header h4 {
  color: #e2e8f0;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.view-all {
  color: #66c0f4;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.3s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.view-all:hover {
  color: #4a90e2;
}

.dropdown-content {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 0 0 12px 12px;
}

/* Profile Dropdown Specific - Modern Redesign */
.nav-dropdown.profile-dropdown {
  min-width: 340px !important;
  max-width: 340px !important;
  width: 340px !important;
  max-height: calc(100vh - 80px) !important;
  overflow-y: auto;
  padding: 0 !important;
}

/* Override any conflicting styles */
.profile-container .nav-dropdown.profile-dropdown {
  min-width: 340px !important;
  max-width: 340px !important;
  width: 340px !important;
}

/* Profile Dropdown Header */
.profile-dropdown-header {
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(102, 192, 244, 0.1) 0%, rgba(102, 192, 244, 0.05) 100%);
  border-bottom: 1px solid rgba(102, 192, 244, 0.15);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-dropdown-avatar-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  flex-shrink: 0;
}

.profile-dropdown-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #66c0f4;
  box-shadow: 0 4px 12px rgba(102, 192, 244, 0.3);
  z-index: 2;
}

.profile-dropdown-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Orbiting Cubes for Profile Dropdown - Now Floating Like Flames */
.profile-orbit-cubes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.profile-orbit-cube {
  position: absolute;
  bottom: 0;
  width: 24px;
  height: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(26, 31, 46, 0.95);
  border: 1.5px solid;
  border-radius: 4px;
  font-size: 0.55rem;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  animation: floatUpFade 4s ease-in-out infinite;
}

.stat-cube {
  position: absolute;
  width: 42px;
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
}

.stat-cube .cube-icon {
  font-size: 1.1rem;
  margin-bottom: 3px;
  line-height: 1;
}

.stat-cube .cube-value {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}

.stat-cube .cube-label {
  font-size: 0.55rem;
  font-weight: 600;
  line-height: 1;
  opacity: 0.9;
}

.profile-orbit-cube .stat-icon {
  font-size: 0.7rem;
  margin-bottom: 1px;
  line-height: 1;
}

.profile-orbit-cube .stat-value {
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1px;
}

.profile-orbit-cube .stat-label {
  font-size: 0.4rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
}

/* Different starting positions and delays for each flame */
.profile-orbit-cube.flame-1 {
  left: 10%;
  animation-delay: 0s;
}
.profile-orbit-cube.flame-2 {
  left: 30%;
  animation-delay: 0.8s;
}
.profile-orbit-cube.flame-3 {
  left: 50%;
  animation-delay: 1.6s;
}
.profile-orbit-cube.flame-4 {
  left: 70%;
  animation-delay: 2.4s;
}
.profile-orbit-cube.flame-5 {
  left: 90%;
  animation-delay: 3.2s;
}

/* Float up and fade animation - like flames */
@keyframes floatUpFade {
  0% {
    bottom: 0;
    opacity: 0;
    transform: translateY(0) translateX(0);
  }
  10% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
    transform: translateY(-60px) translateX(5px);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    bottom: 120px;
    opacity: 0;
    transform: translateY(-120px) translateX(-5px);
  }
}

@keyframes bubbleFloat {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  50% {
    transform: translateY(-200px) translateX(calc(-20px + (var(--random) * 40px))) scale(1.1);
    opacity: 1;
  }
  90% {
    transform: translateY(-350px) translateX(calc(-30px + (var(--random) * 60px))) scale(1.05);
    opacity: 0.6;
  }
  95% {
    transform: translateY(-380px) scale(1.3);
    opacity: 0.3;
  }
  100% {
    transform: translateY(-400px) scale(0);
    opacity: 0;
  }
}

@keyframes floatUpFade1 {
  0% {
    bottom: 0;
    opacity: 0;
    transform: translateY(0) translateX(0);
  }
  10% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
    transform: translateY(-60px) translateX(3px);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    bottom: 120px;
    opacity: 0;
    transform: translateY(-120px) translateX(-3px);
  }
}

@keyframes floatUpFade2 {
  0% {
    bottom: 0;
    opacity: 0;
    transform: translateY(0) translateX(0);
  }
  10% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
    transform: translateY(-70px) translateX(-4px);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    bottom: 120px;
    opacity: 0;
    transform: translateY(-130px) translateX(4px);
  }
}

@keyframes floatUpFade3 {
  0% {
    bottom: 0;
    opacity: 0;
    transform: translateY(0) translateX(0);
  }
  10% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
    transform: translateY(-65px) translateX(6px);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    bottom: 120px;
    opacity: 0;
    transform: translateY(-125px) translateX(-6px);
  }
}

@keyframes floatUpFade4 {
  0% {
    bottom: 0;
    opacity: 0;
    transform: translateY(0) translateX(0);
  }
  10% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
    transform: translateY(-55px) translateX(-5px);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    bottom: 120px;
    opacity: 0;
    transform: translateY(-115px) translateX(5px);
  }
}

@keyframes floatUpFade5 {
  0% {
    bottom: 0;
    opacity: 0;
    transform: translateY(0) translateX(0);
  }
  10% {
    opacity: 0.9;
  }
  50% {
    opacity: 1;
    transform: translateY(-68px) translateX(4px);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    bottom: 120px;
    opacity: 0;
    transform: translateY(-128px) translateX(-4px);
  }
}

.status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #1a1f2e;
  z-index: 3;
}

.status-indicator.online {
  background: #48bb78;
}

.status-indicator.offline {
  background: #718096;
}

.profile-dropdown-info {
  flex: 1;
  min-width: 0;
}

.profile-dropdown-info h4 {
  color: #fff;
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-stats-mini {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}

.stat-mini {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #a0aec0;
}

.stat-mini i {
  color: #66c0f4;
  font-size: 0.75rem;
}

/* Quick Actions Row */
.profile-quick-actions {
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  border-bottom: 1px solid rgba(102, 192, 244, 0.1);
}

.quick-action-btn {
  background: rgba(102, 192, 244, 0.1);
  border: 1px solid rgba(102, 192, 244, 0.2);
  border-radius: 12px;
  padding: 0.85rem 0.5rem;
  color: #66c0f4;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.quick-action-btn:hover {
  background: rgba(102, 192, 244, 0.2);
  border-color: #66c0f4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 192, 244, 0.2);
}

.quick-action-btn i {
  transition: transform 0.3s ease;
}

.quick-action-btn:hover i {
  transform: scale(1.1);
}

/* Profile Menu Links */
.profile-menu-items {
  padding: 0.5rem 0;
}

.profile-menu-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.25rem;
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  position: relative;
}

.profile-menu-link:hover {
  background: rgba(102, 192, 244, 0.08);
  padding-left: 1.5rem;
}

.profile-menu-link i:first-child {
  width: 20px;
  color: #66c0f4;
  font-size: 1rem;
}

.profile-menu-link i:last-child {
  margin-left: auto;
  color: #4a5568;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.profile-menu-link:hover i:last-child {
  opacity: 1;
}

.notification-badge-mini {
  margin-left: auto;
  background: #ff6b6b;
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Profile Dropdown Footer */
.profile-dropdown-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(102, 192, 244, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.profile-logout-btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #ff6b6b;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.profile-logout-btn:hover {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%);
  border-color: #ff6b6b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.profile-logout-btn i {
  font-size: 1rem;
}

/* OLD STYLES - Keep for backwards compatibility */
.profile-info {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(66, 192, 244, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Old profile styles - kept for backwards compatibility but not used in new dropdown */
.profile-details h4 {
  color: #e2e8f0;
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.profile-details p {
  color: #a0aec0;
  margin: 0;
  font-size: 0.85rem;
}

.profile-menu {
  padding: 0.5rem 0;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
}

.profile-menu-item:hover {
  background: rgba(66, 192, 244, 0.1);
  color: #66c0f4;
}

.profile-menu-item i {
  width: 18px;
  color: #a0aec0;
  transition: color 0.3s ease;
}

.profile-menu-item:hover i {
  color: #66c0f4;
}

.profile-menu-divider {
  height: 1px;
  background: rgba(66, 192, 244, 0.1);
  margin: 0.5rem 0;
}

.logout-btn {
  color: #ff6b6b !important;
}

.logout-btn:hover {
  background: rgba(255, 107, 107, 0.1) !important;
  color: #ff6b6b !important;
}

.logout-btn i {
  color: #ff6b6b !important;
}

/* Login Button */
.login-btn {
  background: linear-gradient(135deg, #66c0f4, #4a90e2);
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(66, 192, 244, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 192, 244, 0.4);
}

/* Beautify Toggle Button */
.beautify-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #42c0f4;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.beautify-toggle:hover {
  color: #66c0f4;
  transform: scale(1.1);
}

.beautify-toggle.active {
  color: #000;
  background: #ffd700;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.mobile-nav-toggle span {
  width: 24px;
  height: 2px;
  background: #e2e8f0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Body Padding for Fixed Nav */
body {
  padding-top: 70px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .navbar-container {
    padding: 0 1.5rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .search-input {
    width: 200px;
  }
}

@media (max-width: 992px) {
  .nav-links {
    gap: 1rem;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .search-input {
    width: 180px;
  }

  .profile-name {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-navbar {
    padding: 0 0.75rem;
    height: 60px;
    width: 100vw;
    box-sizing: border-box;
  }

  .navbar-container {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 0 1rem;
  }

  .nav-links {
    display: none !important;
  }

  .beautify-toggle {
    display: flex !important;
    order: -3;
    margin: 0;
    padding: 0.75rem;
    flex-shrink: 0;
    font-size: 1.3rem;
  }

  .mobile-nav-toggle {
    display: flex !important;
    order: -2;
    margin: 0;
    padding: 0.75rem;
    flex-shrink: 0;
    font-size: 1.3rem;
  }

  .search-input {
    width: 150px;
    font-size: 0.8rem;
  }

  /* Hide all social/hub items on mobile - only show hamburger */
  .nav-hub {
    display: none !important;
  }

  .nav-social {
    display: none !important;
  }

  .nav-search {
    display: none !important;
  }

  /* Make nav-right flex properly on mobile */
  .nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex: 1;
    margin-left: auto;
  }

  /* Profile container on mobile */
  #profile-container {
    display: flex !important;
    align-items: center;
    flex-shrink: 0;
  }

  .profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
  }

  .profile-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
  }

  .profile-name {
    display: none;
  }

  .profile-arrow {
    display: none;
  }

  /* Mobile home icon */
  .mobile-home-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 1.5rem;
    padding: 0.5rem;
    flex: 1;
    order: -1;
  }

  .mobile-home-icon:hover {
    color: #66c0f4;
  }
}

/* Dropdown Content Items */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(66, 192, 244, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background: rgba(66, 192, 244, 0.1);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item.unread {
  background: rgba(66, 192, 244, 0.08);
  border-left: 3px solid #66c0f4;
}

.dropdown-item.unread:hover {
  background: rgba(66, 192, 244, 0.15);
}

.item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(66, 192, 244, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #66c0f4;
  flex-shrink: 0;
}

.item-content {
  flex: 1;
  min-width: 0;
  position: relative;
}

.unread-indicator {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background: #66c0f4;
  border-radius: 50%;
  border: 2px solid #171a21;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.item-name {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.9rem;
}

.item-time {
  font-size: 0.75rem;
  color: #a0aec0;
  flex-shrink: 0;
}

.item-message {
  font-size: 0.85rem;
  color: #a0aec0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.item-status.online {
  background: #48bb78;
}

.item-status.offline {
  background: #a0aec0;
}

/* Search Results */
.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(66, 192, 244, 0.05);
}

.search-result-item:hover {
  background: rgba(66, 192, 244, 0.1);
}

.search-result-item:last-child {
  border-bottom: none;
}

.result-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.result-info {
  flex: 1;
}

.result-name {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.9rem;
  margin-bottom: 0.125rem;
}

.result-level {
  font-size: 0.75rem;
  color: #a0aec0;
}

/* Custom Scrollbar for Dropdowns */
.nav-dropdown::-webkit-scrollbar,
.dropdown-content::-webkit-scrollbar {
  width: 4px;
}

.nav-dropdown::-webkit-scrollbar-track,
.dropdown-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.nav-dropdown::-webkit-scrollbar-thumb,
.dropdown-content::-webkit-scrollbar-thumb {
  background: rgba(66, 192, 244, 0.3);
  border-radius: 2px;
}

.nav-dropdown::-webkit-scrollbar-thumb:hover,
.dropdown-content::-webkit-scrollbar-thumb:hover {
  background: rgba(66, 192, 244, 0.5);
}

/* Friends dropdown specific styles */
.dropdown-section-header {
  padding: 0.75rem 1.25rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #66c0f4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(66, 192, 244, 0.1);
  background: rgba(23, 26, 33, 0.8);
}

.dropdown-divider {
  height: 1px;
  background: rgba(66, 192, 244, 0.1);
  margin: 0.5rem 0;
}

.friend-request-item {
  background: rgba(102, 192, 244, 0.05);
}

.friend-request-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-accept, .btn-decline {
  padding: 0.25rem 0.75rem;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-accept {
  background: #48bb78;
  color: white;
}

.btn-accept:hover {
  background: #38a169;
}

.btn-decline {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.btn-decline:hover {
  background: rgba(255, 255, 255, 0.2);
}

.status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #171a21;
}

.status-indicator.online {
  background: #48bb78;
}

.status-indicator.away {
  background: #ed8936;
}

.status-indicator.offline {
  background: #a0aec0;
}

.item-status {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.item-status.online {
  color: #48bb78;
}

.item-status.away {
  color: #ed8936;
}

.item-status.offline {
  color: #a0aec0;
}

/* Currency Display in Navbar */
.user-currencies {
  display: none; /* Hidden by default, shown when logged in */
  align-items: center;
  gap: 12px;
  margin-right: 15px;
  padding-right: 15px;
  border-right: 1px solid rgba(102, 192, 244, 0.2);
}

.currency-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
  padding: 6px 12px;
  background: rgba(26, 32, 44, 0.6);
  border-radius: 20px;
  border: 1px solid rgba(102, 192, 244, 0.2);
  transition: all 0.3s ease;
  cursor: default;
}

.currency-item:hover {
  background: rgba(26, 32, 44, 0.9);
  border-color: rgba(102, 192, 244, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 192, 244, 0.2);
}

.currency-item::before {
  font-size: 1rem;
}

.user-points::before {
  content: '⚡';
}

.user-echoes::before {
  content: '🔮';
}

.user-shards::before {
  content: '💎';
}

.user-keys::before {
  content: '🔑';
}

.user-flux::before {
  content: '⚡';
}

/* Mobile: Stack currencies vertically */
@media (max-width: 768px) {
  .user-currencies {
    display: none !important;
  }

  .currency-item {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
  }
}

/* Bubble effect animations */
@keyframes fusionPulse {
  0%, 100% { transform: scale(1); filter: brightness(1.2); }
  50% { transform: scale(1.1); filter: brightness(1.5); }
}

@keyframes cardSpin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

@keyframes glitchEffect {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* Electric bolt animation - strikes from top to bottom */
@keyframes electricBolt {
  0% {
    top: -50px;
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  50% {
    opacity: 1;
    transform: translateY(250px) rotate(15deg);
  }
  100% {
    top: 250px;
    opacity: 0;
    transform: translateY(250px) rotate(30deg);
  }
}

/* Steam rising animation - rises from bottom with expansion */
@keyframes steamRise {
  0% {
    bottom: -50px;
    opacity: 0;
    transform: scale(0.5) translateY(0);
  }
  20% {
    opacity: 0.7;
  }
  80% {
    opacity: 0.4;
  }
  100% {
    bottom: 200px;
    opacity: 0;
    transform: scale(2) translateY(-200px);
  }
}

/* Spin animation for avatar frames */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Mobile nav slide-in panel */
.mobile-nav {
  position: fixed;
  top: 60px; /* height of navbar on mobile */
  left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
  z-index: 999;
}
.mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-content {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 85%; max-width: 360px;
  background: rgba(23,26,33,0.98);
  border-left: 1px solid rgba(66,192,244,0.15);
  transform: translateX(100%);
  transition: transform 250ms ease;
  box-shadow: -10px 0 30px rgba(0,0,0,0.4);
  overflow-y: auto; /* ensure mobile panel scrolls if content exceeds viewport */
}
.mobile-nav.open .mobile-nav-content { transform: translateX(0); }
@media (min-width: 769px) {
  .mobile-nav { display: none !important; }
}

/* ========== COMPREHENSIVE MOBILE IMPROVEMENTS ========== */

/* Extra small devices (320px - 480px) */
@media (max-width: 480px) {
  .main-navbar {
    height: 60px;
  }

  .navbar-container {
    height: 60px;
    padding: 0 0.75rem;
  }

  .nav-brand {
    font-size: 1rem;
    margin-right: 0.5rem;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .search-input {
    width: 100px !important;
    font-size: 0.85rem;
  }

  .search-input:focus {
    width: 120px !important;
  }

  .user-currencies {
    gap: 0.3rem;
    font-size: 0.75rem;
  }

  .currency-item {
    padding: 0.3rem 0.6rem;
  }

  .nav-icons {
    gap: 0.5rem;
    margin-right: 0.5rem;
  }

  .nav-icon {
    font-size: 1rem;
    padding: 0.3rem;
  }

  .mobile-nav-content {
    width: 90%;
    max-width: 280px;
  }

  .nav-dropdown {
    max-width: 90vw !important;
    width: 90vw !important;
    left: 5vw !important;
  }

  .profile-dropdown {
    min-width: 280px !important;
    max-width: 280px !important;
    width: 280px !important;
  }
}

/* Small devices (481px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
  .main-navbar {
    height: 65px;
  }

  .navbar-container {
    height: 65px;
    padding: 0 1rem;
  }

  .search-input {
    width: 120px !important;
  }

  .search-input:focus {
    width: 150px !important;
  }

  .nav-dropdown {
    max-width: 95vw !important;
    width: 95vw !important;
    left: 2.5vw !important;
  }

  .profile-dropdown {
    min-width: 320px !important;
    max-width: 320px !important;
    width: 320px !important;
  }
}

/* Ensure dropdowns don't overflow on mobile */
@media (max-width: 768px) {
  .nav-dropdown {
    position: fixed !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    z-index: 10001 !important;
  }

  .profile-dropdown {
    max-height: calc(100vh - 80px) !important;
  }

  /* Prevent horizontal scroll on mobile */
  body {
    overflow-x: hidden;
  }

  .main-navbar {
    overflow: hidden;
  }

  /* Ensure clean mobile nav display */
  .nav-hub,
  .nav-social,
  .nav-search {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: flex !important;
  }
}
