/* ─── 1. STRUTTURA SIDEBAR (DESKTOP) ─── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-body); 
  border-right: 1px solid var(--border-sep);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-gold) transparent;
  z-index: 100;
}

/* ─── 2. HEADER E TITOLI ─── */
.sidebar-title {
  padding: 1.5rem 1rem 1rem;
  border-bottom: 1px solid var(--border-sep);
  text-align: center;
}

.sidebar-title .label {
  display: block;
  font-family: var(--font-mono);
  color: var(--accent-gold);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.4rem;
}

.sidebar-title .name {
  font-family: var(--font-title);
  color: var(--accent-gold);
  font-size: 1.2rem;
  text-transform: uppercase;
}

/* ─── 3. NAVIGAZIONE E LINK (ROSSO FANTASY) ─── */
.nav-section {
  padding: 0.75rem 0;
}

.nav-section-label {
  font-family: var(--font-mono);
  color: var(--accent-gold);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.1rem 1rem 0.4rem;
  display: block;
  opacity: 0.8;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  display: block;
  padding: 0.45rem 1rem 0.45rem 1.2rem;
  font-family: var(--font-body);
  /* Forza il Rosso Fantasy come colore base per tutti i link */
  color: var(--accent-red) !important; 
  text-decoration: none;
  font-size: 1.05rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-gold) !important; /* Diventa Oro su hover/active */
  border-left-color: var(--accent-gold);
  background: rgba(200, 146, 42, 0.05);
  font-weight: bold;
}

/* ─── 4. THEME SWITCHER ─── */
.theme-switch-container {
  padding: 1rem;
  display: flex;
  justify-content: center;
}

#theme-toggle {
  background: none;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

#theme-toggle:hover {
  background: rgba(200, 146, 42, 0.1);
  box-shadow: 0 0 8px var(--accent-gold);
}

/* ─── 5. MOBILE HEADER (BARRA IN ALTO) ─── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-body);
  border-bottom: 1px solid var(--accent-gold);
  z-index: 200;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

html.dark-mode .mobile-header {
  background: var(--color-obsidian);
}

.mobile-header-title {
  font-family: var(--font-title);
  color: var(--accent-red) !important;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: 0.1em;
}

html.dark-mode .mobile-header-title {
  color: var(--accent-gold) !important;
}

/* Icona Hamburger */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--accent-gold) !important;
  transition: all 0.3s ease;
}

/* Animazione Hamburger */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── 6. RESPONSIVE (SIDEBAR A DESTRA) ─── */
@media (max-width: 768px) {
  .mobile-header { 
    display: flex; 
  }

  .sidebar {
    position