:root {
  --bg-dark: #0a0f1e;
  --bg-ui: #1e293b;
  --text-main: #f1f5f9;
  --accent: #2dd4bf;
  --accent-soft: #10b981;
  --font-tech: 'Orbitron', sans-serif;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark); 
}

::-webkit-scrollbar-thumb {
  background: var(--accent); 
  border-radius: 10px;
  border: 2px solid var(--bg-dark); 
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-soft); 
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-tech);
  overflow-x: hidden;
  scroll-behavior: smooth;
}


/* === Sections === */
.section {
  padding: 6rem 2rem;
}
.section.dark {
  background: var(--bg-ui);
}
.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}


/* === Form === */
form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
}
form input, form textarea {
  margin-bottom: 1rem;
  padding: 0.8rem;
  background-color: #1e293b;
  border: none;
  border-radius: 8px;
  color: var(--text-main);
}
form button {
  background: var(--accent);
  border: none;
  padding: 0.8rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
}
form button:hover {
  background: var(--accent-soft);
}


/* LOADING */
.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.transition-overlay::before {
  content: "LOADING NEXT STEP...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Orbitron', monospace;
  font-size: 1.5rem;
  color: var(--accent);
  text-shadow: 0 0 5px var(--accent);
}


/* =====  PIXEL ICON  =====*/
.pixel-character {
  width: 84px;
  height: 84px;
  background-image: url('../Images/avatar64.gif');
  background-size: cover;
  position: fixed; /* Cambiato da absolute a fixed */
  bottom: 0;
  right: 0;
  animation: walk-across 15s linear infinite;
  pointer-events: none; /* Opzionale: evita che il personaggio interferisca con clic */
  z-index: 9999; /* Opzionale: assicura che sia in primo piano */
}

@keyframes walk-across {
  0% { right: -64px; } /* Inizia appena fuori dallo schermo */
  100% { right: 100vw; } /* Cammina verso sinistra completamente */
}





