@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/* ================== LOADER STYLE ================== */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a; /* Colore sfondo coerente col tuo sito */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Sopra ogni cosa */
  transition: opacity 0.8s ease, visibility 0.8s;
}

.loader-content {
  text-align: center;
  color: white;
  font-family: 'Inter', sans-serif;
  letter-spacing: 3px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid #fff;
  border-radius: 50%;
  margin: 0 auto 15px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Classe per nascondere il loader */
.loader-hidden {
  opacity: 0;
  visibility: hidden;
}


/* RESET BASE */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

/* ================== VIDEO SFONDO ================== */
#bg-video {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 */
  min-height: 100vh;
  min-width: 177.77vh;
  transform: translate(-50%, -50%) scale(1);
  z-index: -2;
  pointer-events: none;
  background: black; /* Evita il flash bianco al caricamento */
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: -1;
}

iframe {
  display: block !important;
}

/* ================== ITEMS (CARTELLE) ================== */
.item {
  width: 120px;
  position: absolute;
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  visibility: visible; /* erano invisibili prima */
}

.icon-wrapper {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  color: #fff;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.icon-wrapper svg {
  width: 55px;
  height: 55px;
  fill: currentColor;
}

.item:hover .icon-wrapper {
  transform: translateY(-10px) scale(1.15);
}

.item p {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ================== POST-IT ================== */
#post-it-container {
  position: absolute;
  top: 20px;
  right: 20px;
  left: auto !important;
  bottom: auto !important;
  transform: rotate(2deg) !important; /* Mantiene la sua rotazione */
  z-index: 100;
  cursor: grab;
  display: blo;
  visibility: visible !important;
}

.post-it-note {
  background: #fffa82;
  width: 180px;
  height: 180px;
  padding: 15px;
  color: #333;
  transform: rotate(2deg);
  font-family: 'Comic Sans MS';
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 8px 8px 15px rgba(0,0,0,0.3);
  flex-direction: column;
  display: flex;
  justify-content: center;   /* Centra verticalmente */
  align-items: center;       /* Centra orizzontalmente */
  text-align: center;
  box-sizing: border-box; /* Evita che il contenuto tagli la nota */
}

/* Se nel post-it usi i trattini o punti elenco, rimuovi i margini della lista */
.post-it-note ul, .post-it-note li {
  list-style: none; /* Rimuove i pallini che spostano il testo a sinistra */
  padding: 0;
  margin: 0;
}

/* ================== TRASH ================== */
#trash-bin {
  position: absolute;
  bottom: 85px;
  right: 30px;
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 20;
  color: #fff;
}

#trash-bin svg {
  width: 50px;
  height: 50px;
  fill: currentColor;
  opacity: 0.8;
  transition: 0.3s;
}
#trash-bin:hover svg {
  transform: scale(1.15);
  color: #ff6b6b;
}
#trash-bin p {
  font-size: 11px;
  font-weight: 700;
  margin-top: 5px;
  text-transform: uppercase;
}

#trash-speech {
  position: absolute;
  bottom: 160px;
  right: 30px;
  background: white;
  color: black;
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  display: none;
  z-index: 100;
  white-space: nowrap;
}
#trash-speech::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 35px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

#trash-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 80vw;
  max-width: 550px;
  height: 400px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  display: none;
  flex-direction: column;
  z-index: 2500;
  color: #000;
}

.window-header {
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  font-weight: 700;
  font-size: 12px;
}

.close-btn {
  cursor: pointer;
  font-size: 20px;
  color: #999;
}

.window-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 15px;
}

.trash-item {
  aspect-ratio: 1/1;
  background: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #ddd;
}

.trash-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(0.8);
}

/* ================== TOOLTIP ================== */
.tooltip {
  position: absolute;
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  white-space: nowrap;
  z-index: 2000;
}

/* ================== TASKBAR ================== */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 65px;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  box-shadow: 0 -2px 15px rgba(0,0,0,0.5);
  z-index: 1500;
  box-sizing: border-box;
}

.taskbar-left, .taskbar-right { flex: 1; }
.taskbar-center { display: flex; gap: 20px; align-items: center; justify-content: center; }

.home, .taskbar-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: transform 0.3s, color 0.3s;
}

.home svg, .taskbar-icon svg { width: 28px; height: 28px; fill: currentColor; }
.home:hover, .taskbar-icon:hover { transform: scale(1.2); }

.taskbar-icon[data-brand="instagram"]:hover { color: #E1306C; }
.taskbar-icon[data-brand="youtube"]:hover { color: #FF0000; }
.taskbar-icon[data-brand="linkedin"]:hover { color: #0077B5; }
.taskbar-icon[data-brand="mail"]:hover { color: #4aa3ff; }

/* ================== MOBILE ================== */
@media (max-width: 768px) {
  html, body {
    width: 100%;
    height: 100%;
    /* Impedisce lo scroll della pagina e il rimbalzo tipico di iPhone/Android */
    overflow: hidden !important; 
    position: fixed; 
  }

  #bg-video { 
    width: auto; 
    height: 100vh; 
    min-width: 100vw; 
    object-fit: cover;
  }

.item { 
    position: absolute !important; /* Fondamentale per muoverle */
    display: flex !important; 
    flex-direction: column; 
    align-items: center; 
    width: 90px; 
    margin: 0 !important; 
    touch-action: none; /* Blocca lo scroll del browser così puoi trascinare */
    user-select: none;
    -webkit-user-select: none;
    z-index: 10;
  }
  
  .item p { 
    pointer-events: none; /* Impedisce al testo di bloccare il tocco */
    text-align: center !important;
    font-size: 12px;
    margin-top: 5px;
  }
}

/* ================== MOBILE DRAWER ================== */
#mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 250px;
  height: 100%;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  z-index: 3000;
  transition: right 0.4s ease;
  padding: 40px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#mobile-drawer.open { right: 0; }
.drawer-link { color: white; text-decoration: none; font-size: 18px; padding: 10px 0; border-bottom: 1px solid rgba(95,95,95,32%); font-weight: 700; }
#menu-toggle { display: none; cursor: pointer; color: #fff; }
#menu-toggle svg { width: 32px; height: 32px; fill: white; }

/* ================== HAMBURGER & MOBILE DRAWER ================== */
#menu-toggle {
    display: none;
    cursor: pointer;
    color: #rgba (0, 0, 0, 0.508);
    z-index: 4000;
}
#menu-toggle svg { width: 32px; height: 32px; fill: white; }

body {
  background: #0a0a0a;
  color: #fff;
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 80px 5vw 150px 5vw;
  overflow-x: hidden;
}

h1 {
  position: fixed;
  top: 30px;
  left: 5vw;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-weight: 300;
  opacity: 0.5;
  margin: 0;
  z-index: 100;
}

/* ===== CARTELLE ===== */
.list { max-width: 600px; }
.folder-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 5px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: .3s;
}
.folder-row:hover { background: rgba(255,255,255,0.04); }
.folder-row svg { width: 24px; height: 24px; fill: #fff; }
.folder-row span { font-size: 14px; letter-spacing: 1px; }

/* ===== GALLERIA ===== */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px; /* distanza tra le immagini */
  padding: 10px 10px; /* margini laterali */
  max-width: 1200px; /* larghezza massima della griglia */
  margin: 0 auto; /* centra la griglia nella pagina */
  padding-bottom: 100px; /* spazio sotto per taskbar */
  box-sizing: border-box;
}

.gallery-item {
  aspect-ratio: 1/1;
  background: #151515;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 110%;
  object-fit: cover;
  transform: scale(1.5);
  filter: grayscale(0);
  transition: all 0.6s cubic-bezier(.19,1,.22,1);
  opacity: 0;
}

.gallery-item img.loaded {
  opacity: 1;
}

.gallery-item:hover img {
  filter: grayscale(0);
  transform: scale(1.05);
}


/* LIGHTBOX */
#lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.97);
  display: none; justify-content: center; align-items: center; z-index: 3000;
}
#lightbox img { max-width: 90%; max-height: 85%; }
.arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 30px; cursor: pointer; padding: 15px; color: #fff; z-index: 3001; }
.arrow.left { left: 20px; }
.arrow.right { right: 20px; }

/* ===== TASKBAR (IDENTICA A INDEX) ===== */
#taskbar {
  position: fixed; bottom: 0; left: 0; width: 100%; height: 65px;
  background: rgba(15, 15, 15, 0.85); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 25px; box-shadow: 0 -2px 15px rgba(0,0,0,0.5); z-index: 1500; box-sizing: border-box;
}
.taskbar-left, .taskbar-right { flex: 1; display: flex; align-items: center; }
.taskbar-right { justify-content: flex-end; }
.taskbar-center { display: flex; gap: 20px; align-items: center; justify-content: center; }

.home-btn, .taskbar-icon {
  width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; transition: transform 0.3s, color 0.3s;
}
.home-btn svg, .taskbar-icon svg { width: 28px; height: 28px; fill: currentColor; }
.home-btn:hover { transform: scale(1.2); }
.taskbar-icon:hover { transform: scale(1.2); }

/* COLORI SOCIAL AL PASSAGGIO */
.taskbar-icon[data-brand="instagram"]:hover { color: #E1306C; }
.taskbar-icon[data-brand="youtube"]:hover { color: #FF0000; }
.taskbar-icon[data-brand="linkedin"]:hover { color: #0077B5; }
.taskbar-icon[data-brand="mail"]:hover { color: #4aa3ff; }

/* Hamburger Menu Icon */
#menu-toggle { display: none; cursor: pointer; color: #fff; }
#menu-toggle svg { width: 32px; height: 32px; fill: white; }

/* ===== SIDEBAR MOBILE ===== */
#mobile-drawer {
  position: fixed; top: 0; right: -100%; width: 250px; height: 100%;
  background: rgba(10, 10, 10, 0.98); backdrop-filter: blur(20px);
  z-index: 4000; transition: right 0.4s ease;
  padding: 40px 20px; box-sizing: border-box; display: flex; flex-direction: column; gap: 20px;
}
#mobile-drawer.open { right: 0; }
.drawer-link { color: white; text-decoration: none; font-size: 18px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-weight: 400; }

@media (max-width: 768px) {
  .taskbar-center { display: none !important; }
  #menu-toggle { display: flex; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  h1 { font-size: 10px; letter-spacing: 3px; }
}

/* Animazione per le righe delle cartelle */
.folder-row {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Effetto al passaggio del mouse (Hover) */
.folder-row:hover {
  background: rgba(255, 255, 255, 0.07);
  padding-left: 25px; /* Sposta leggermente il contenuto a destra */
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

/* Animazione dell'icona SVG */
.folder-row svg {
  transition: all 0.4s ease;
  transform-origin: left;
}

.folder-row:hover svg {
  opacity: 1;
  fill: #ffffff; /* Colore dell'icona quando attiva (opzionale) */
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* Animazione del testo */
.folder-row span {
  transition: all 0.4s ease;
}

.folder-row:hover span {
  letter-spacing: 2px; /* Espande leggermente il testo */
  color: #fff;
  font-weight: 400;
}

/* Linea di progresso sottile che appare al passaggio */
.folder-row::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #ffffff, transparent);
  transition: width 0.4s ease;
}

.folder-row:hover::after {
  width: 100%;
}


