/* ===== Background principale con overlay scuro per contrasto testo ===== */
.md-main {
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
    url("background.png");
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: #e0e0e0;
  transition: color 0.3s ease;
}

.md-main p, .md-main h1, .md-main h2 {
  color: #f0f0f0;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.8);
  transition: color 0.3s ease;
}

/* ===== Header con gradiente futuristico e glow ===== */
.md-header {
  background: linear-gradient(90deg, #3f1e92, #190a3f);
  box-shadow: 0 0 20px #8cff00cc;
  border-bottom: 2px solid #8cff00cc;
  color: #8cff00;
  transition: background 0.4s ease, color 0.4s ease;
}

.md-header a, .md-header nav a {
  color: #8cff00;
  font-weight: 600;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.md-header a:hover, .md-header nav a:hover {
  color: #cfff4d;
  text-shadow: 0 0 8px #8cff00cc;
}

/* ===== Menu sidebar - link attivi e hover ===== */
.md-nav__link--active {
  color: #8cff00 !important;
  text-shadow: 0 0 10px #8cff00cc;
  font-weight: 700;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.md-nav__link:hover:not(.md-nav__link--active) {
  color: #cfff4d;
  text-shadow: 0 0 8px #8cff00cc;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* ===== Sidebar background e titoli ===== */
.md-sidebar {
  background-color: #1f1b38; /* viola scuro più uniforme e meno saturo */
  transition: background-color 0.4s ease;
}

.md-sidebar.md-sidebar--primary {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Titolo menu a sinistra */
.md-sidebar .md-nav__title {
  color: #8cff00 !important;
  text-shadow: 0 0 12px #8cff00cc;
  font-weight: 800;
  background: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.md-sidebar h1, .md-sidebar h2 {
  color: #cfff4d !important;
  text-shadow: 0 0 8px #aaff33cc;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* ===== Campo ricerca ===== */
.md-search input[type="text"] {
  background-color: #3c357e;
  color: #baff33;
  border: 1.5px solid #8cff00cc;
  box-shadow: inset 0 0 12px #8cff00cc;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 600;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.md-search input[type="text"]::placeholder {
  color: #aaff33cc;
  opacity: 1;
  font-style: italic;
  text-shadow: 0 0 6px #8cff00cc;
  transition: color 0.3s ease;
}

.md-search input[type="text"]:focus {
  background-color: #5a4dc0;
  border-color: #baff33;
  box-shadow: inset 0 0 18px #baff33;
  outline: none;
  color: #e6ff6b;
}

/* ===== Link nel contenuto ===== */
.md-content a {
  color: #8cff00;
  text-decoration: none;
  transition: text-shadow 0.3s ease, color 0.3s ease;
}

.md-content a:hover {
  text-decoration: underline;
  text-shadow: 0 0 10px #8cff00cc;
}

/* ===== Back to top ===== */
.md-footer__back-to-top,
a.md-footer__back-to-top,
a.md-footer__back-to-top:hover,
a.back-to-top {
  color: #8cff00 !important;
  text-shadow: 0 0 12px #8cff00cc;
  font-weight: 700;
  cursor: pointer;
  transition: text-shadow 0.3s ease;
}
