:root {
  --accent: #008080;
}

.nav-wrapper {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

.nav-menu.open {
  display: flex;
  opacity: 1;
  transform: translateX(0);
  border: 1px solid rgba(0, 128, 128, 0.6);
  pointer-events: auto;
}

/* Toggle Button */
.nav-toggle {
  width: 48px;
  height: 48px;
  background: #141722;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  transition: background 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 10px rgba(0, 128, 128, 0.3);
}

.nav-toggle svg {
  color: #ffffff;
  transition: color 0.3s;
}

.nav-toggle.open svg {
  color: var(--accent);
  transition: color 0.3s;
}

.nav-toggle:hover {
  box-shadow: 0 0 18px rgba(0, 128, 128, 0.65);
}

.nav-toggle.open {
  background: #2a2f45;
  box-shadow: 0 0 24px rgba(0, 128, 128, 0.95);
}

/* Menü Container */
.nav-menu {
  /* Hidden by default so it does not appear permanently expanded on mobile */
  display: none;

  position: absolute;
  top: 58px; /* 48px toggle + ~10px gap */
  left: 0;

  background: #1a1d29;
  border-radius: 14px;
  padding: 10px 0 12px;
  flex-direction: column;
  min-width: 190px;
  box-shadow: 0 0 26px rgba(0, 128, 128, 0.35);
  border: 1px solid rgba(0, 128, 128, 0.6);

  /* Animation State */
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (max-width: 480px) {
  .nav-wrapper {
    top: 14px;
    left: 14px;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .nav-menu {
    min-width: min(86vw, 320px);
  }
}

/* Links */
.nav-menu a {
  color: #cfeeee;
  text-decoration: none;
  padding: 10px 16px;
  margin: 6px 12px;
  border-radius: 10px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 128, 128, 0.25);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s, border 0.25s,
    transform 0.2s;
}

.nav-menu a:hover {
  background: rgba(0, 128, 128, 0.18);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 128, 128, 0.6);
  border-color: rgba(0, 128, 128, 0.7);
  transform: translateX(4px) scale(1.02);
}

.nav-menu a.active {
  background: rgba(0, 128, 128, 0.25);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 128, 128, 0.9),
    inset 0 0 8px rgba(0, 128, 128, 0.6);
  border: 1px solid var(--accent);
}

.nav-title {
  padding: 6px 18px 8px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(0, 128, 128, 0.9);
  font-weight: 600;
}

.nav-divider {
  height: 1px;
  margin: 4px 14px 8px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(0, 128, 128, 0.6),
    transparent
  );
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 16px 10px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 128, 128, 0.25);
  font-size: 13px;
  color: #cfeeee;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: gray;
  box-shadow: 0 0 6px rgba(128, 128, 128, 0.6);
}

/* Online */
.status-dot.online {
  background: #00ffaa;
  box-shadow: 0 0 10px rgba(0, 255, 170, 0.9);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 6px rgba(0, 255, 170, 0.6);
  }
  50% {
    box-shadow: 0 0 14px rgba(0, 255, 170, 1);
  }
  100% {
    box-shadow: 0 0 6px rgba(0, 255, 170, 0.6);
  }
}

/* Offline */
.status-dot.offline {
  background: #ff4d4d;
  box-shadow: 0 0 10px rgba(255, 77, 77, 0.9);
  animation: pulse2 1.5s infinite;
}

@keyframes pulse2 {
  0% {
    box-shadow: 0 0 6px rgba(255, 77, 77, 0.6);
  }
  50% {
    box-shadow: 0 0 14px rgba(255, 77, 77, 1);
  }
  100% {
    box-shadow: 0 0 6px rgba(255, 77, 77, 0.6);
  }
}

.toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #1a1d29;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 128, 128, 0.4);
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.online {
  border-color: rgba(0, 255, 170, 0.8);
  box-shadow: 0 0 16px rgba(0, 255, 170, 0.8);
}

.toast.offline {
  border-color: rgba(255, 77, 77, 0.8);
  box-shadow: 0 0 16px rgba(255, 77, 77, 0.8);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
