.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background-color: transparent;
  z-index: 10000;
}

/* Hamburger a sinistra */
.hamburger {
  position: relative;
  flex-direction: column;
  justify-content: space-between;
  width: 56px;
  height: 56px;
  cursor: pointer;
  background-color: transparent;
  padding: 15px;
  border-radius: 50%;
  z-index: 1001;
}

.hamburger span {
  display: block;
  height: 4px;
  background-color: var(--text-primary);
  border-radius: 4px;
  position: absolute;
  left: 10px;
  right: 10px;
  width: calc(100% - 20px);
  box-shadow: 0 0 2px rgba(157, 68, 255, 0.3);
  transition: all 0.3s ease;
}

.hamburger span:nth-child(1) {
  top: 15px;
}

.hamburger span:nth-child(2) {
  top: 26px;
}

.hamburger span:nth-child(3) {
  top: 37px;
}

.hamburger.active span {
  background-color: var(--accent-color);
  width: calc(100% - 18px);
  left: 9px;
  right: 9px;
}

.hamburger.active span:nth-child(1) {
  top: 26px;
  transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  top: 26px;
  transform: rotate(-45deg);
}

/* Navigation menu */
.nav-links {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100vh;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 20px 0;
  transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
  border-right: 1px solid rgba(157, 68, 255, 0.15);
  z-index: 999;
}

.nav-links.active {
  left: 0;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 24px;
  transition: all 0.3s ease;
  width: 75%;
  text-align: center;
  margin: 2px 0;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.nav-links a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(157, 68, 255, 0.15),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.nav-links a:hover::before {
  transform: translateX(100%);
}

.nav-links a:hover {
  color: var(--text-primary);
  background-color: rgba(157, 68, 255, 0.15);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.nav-links a.active {
  color: var(--accent-color);
  background-color: rgba(157, 68, 255, 0.15);
  border: 1px solid rgba(157, 68, 255, 0.3);
  font-weight: 600;
  box-shadow: 0 0 4px rgba(157, 68, 255, 0.15);
}

/* Logo */
.persistent-logo {
  position: relative;
  top: 0;
  padding: 10px;
  border-radius: 10px;
  background-color:transparent;
  display: flex;
  align-items: center;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: all 0.3s ease-in-out;
}
.persistent-logo img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
  transform: scale(1);
  transform-origin: center;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.3));
}

/* ====== Profile Dropdown ====== */
/* Profilo */
.profile-dropdown {
  position: relative;
  z-index: 1002;
  user-select: none;
  display: flex;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 40px;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px 8px 22px;
  background-color: rgba(0, 0, 0, 0.05);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 5px rgba(157, 68, 255, 0.05);
}

.profile-icon {
  width: 30px;
  height: 30px;
  border: none;
  background-color: white;
  border-radius: 50%;
  padding: 2px;
  box-sizing: content-box;
}

.profile-btn:hover,
.profile-btn:focus {
  background-color: rgba(157, 68, 255, 0.08);
  transform: scale(1.05);
}

.persistent-logo:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px var(--text-primary);
  background-color: rgba(157, 68, 255, 0.08);
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 110%;
  background: #1b1b1f;
  border: 1px solid rgba(157, 68, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 8px 0;
  z-index: 100;
  font-family: var(--font-body);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.35s ease-in-out;
}

.dropdown-menu.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.profile-dropdown.hover-preview .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-menu-element {
  padding: 12px 16px;
  margin: 2px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
}

.dropdown-menu-element:hover,
.dropdown-menu-element:focus {
  background: rgba(157, 68, 255, 0.12);
  color: var(--text-primary);
  transform: translateX(2px);
  outline: none;
}

/* Copy toast */
.copy-toast {
  position: fixed;
  top: 10px;
  right: 15%;
  transform: translateX(-50%);
  background-color: var(--accent-color);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10000;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.copy-toast.hidden {
  display: none;
}

/* Modal Settings styles */
#settingsLink {
  display: none;
}


.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: #1b1b1f;
  color: #f0f0f0;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.modal-content h2 {
  margin-top: 0;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-content .setting-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-content .checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  display: flex;
}

.modal-content label {
  color: #ccc;
  font-size: 0.95rem;
  font-weight: 500;
}

.modal-content input[type="email"],
.modal-content input[type="password"] {
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #444;
  border-radius: 6px;
  background-color: #2a2a2e;
  color: #f0f0f0;
}

.modal-content input::placeholder {
  color: #aaa;
}

.modal-content input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #9d44ff;
  cursor: pointer;
}

.modal-content button {
  padding: 0.75rem;
  font-size: 1rem;
  background-color: var(--primary-color, #9d44ff);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 1rem;
}

.modal-content button:hover {
  background-color: #7a2de0;
}


@media (max-width: 768px) {
  .site-header {
    height: 60px;
    padding: 0 12px;
  }

  .hamburger {
    width: 44px;
    height: 44px;
    padding: 10px;
  }

  .hamburger span {
    height: 3px;
    left: 8px;
    right: 8px;
    width: calc(100% - 16px);
  }

  .hamburger span:nth-child(1) { top: 11px; }
  .hamburger span:nth-child(2) { top: 20px; }
  .hamburger span:nth-child(3) { top: 29px; }

  .persistent-logo {
    font-size: 1.4rem;
    padding: 6px;
    letter-spacing: 0.5px;
  }

  .header-right {
    gap: 20px;
  }

  .profile-btn {
    font-size: 0.9rem;
    padding: 6px 10px;
    gap: 8px;
  }

  .profile-icon {
    width: 24px;
    height: 24px;
  }

  .nav-links {
    width: 240px;
    padding-top: 40px;
    gap: 14px;
  }

  .nav-links a {
    font-size: 1rem;
    padding: 8px 14px;
    width: 80%;
  }

  .dropdown-menu {
    min-width: 160px;
    font-size: 0.95rem;
  }

  .dropdown-menu-element {
    padding: 10px 14px;
  }
}

@media (max-width: 576px) {
  .persistent-logo {
    font-size: 1.2rem;
  }

  .profile-btn {
    font-size: 0.85rem;
    padding: 5px 8px;
  }

  .nav-links {
    width: 200px;
    gap: 12px;
  }

  .nav-links a {
    font-size: 0.95rem;
  }

  .dropdown-menu {
    min-width: 140px;
    font-size: 0.9rem;
  }

  .dropdown-menu-element {
    padding: 8px 12px;
  }

  .copy-toast {
    font-size: 0.85rem;
    padding: 10px 16px;
    right: 10%;
  }
}
