/* Reset e stile generale rinnovato */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #74c7ff;
  --primary-purple: #9b59b6;
  --dark-bg: #0a0b0f;
  --section-bg: #131726;
  --accent-bg: #1a1e2e;
  --border-color: #2a3441;
  --text-primary: #e8f0ff;
  --text-secondary: #a0b8d1;
  --text-muted: #6b7888;
  --glow-blue: rgba(116, 199, 255, 0.3);
  --glow-purple: rgba(155, 89, 182, 0.3);
  --shadow-strong: rgba(0, 0, 0, 0.8);
  --shadow-medium: rgba(0, 0, 0, 0.4);
}

body {
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(116, 199, 255, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(155, 89, 182, 0.08) 0%,
      transparent 50%
    ),
    linear-gradient(135deg, var(--dark-bg) 0%, #0d0e15 50%, var(--dark-bg) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  padding-top: 85px; /* Spazio per la navbar fissa */
}

/* Effetti di particelle fluttuanti */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
      2px 2px at 20px 30px,
      var(--glow-blue),
      transparent
    ),
    radial-gradient(2px 2px at 40px 70px, var(--glow-purple), transparent),
    radial-gradient(1px 1px at 90px 40px, var(--primary-blue), transparent),
    radial-gradient(1px 1px at 130px 80px, var(--primary-purple), transparent);
  background-repeat: repeat;
  background-size: 150px 100px;
  animation: particles-float 20s linear infinite;
  opacity: 0.1;
  pointer-events: none;
  z-index: -1;
}

@keyframes particles-float {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-150px, -100px);
  }
}

/* Scia luminosa del mouse migliorata */
.light-trail {
  position: fixed;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    var(--glow-blue) 0%,
    var(--glow-purple) 40%,
    transparent 70%
  );
  filter: blur(8px);
  mix-blend-mode: screen;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Container principale rinnovato */
.container {
  width: min(95%, 1400px);
  margin: 0 auto;
  padding: 2rem;
  position: relative;
}

.container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--glow-blue) 20%,
    var(--glow-purple) 50%,
    var(--glow-blue) 80%,
    transparent 100%
  );
  filter: blur(1px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
}

/* ===== NUOVA BARRA DI NAVIGAZIONE FISSA ===== */
.top-bar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2.5rem;
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-shadow: 0 0 10px var(--glow-blue);
  cursor: default;
}

/* ===== SEZIONE VIDEO - Stile Minimale ===== */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

/* Rimuove lo stile "card" e applica l'effetto direttamente al contenitore */
.video-item {
  background: none;
  border: none;
  padding: 0;
  border-radius: 12px; /* Angoli arrotondati */
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateY(30px);
  opacity: 0;
  box-shadow: 0 15px 30px var(--shadow-strong);
}

.video-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.video-item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 25px 50px var(--shadow-strong), 0 0 40px var(--glow-blue);
}

/* Il contenitore del video/iframe riempie l'item */
.video-container {
  position: relative;
  padding-top: 56.25%; /* Aspect ratio 16:9 */
  background-color: var(--dark-bg);
  width: 100%;
  height: 100%;
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  transition: transform 0.4s ease;
}

.video-item:hover .video-container iframe,
.video-item:hover .video-container video {
  transform: scale(1.1); /* Leggero zoom all'hover */
}

/* Overlay per migliorare leggibilità di titolo e icona */
.video-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    transparent 40%,
    transparent 60%,
    rgba(0, 0, 0, 0.3) 100%
  );
  opacity: 0.8;
  transition: opacity 0.3s ease;
  pointer-events: none; /* Non interferisce con il click */
}

.video-item:hover::after {
  opacity: 1;
}

/* Titolo posizionato sopra il video */
.video-title {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 5;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 1);
  transition: transform 0.3s ease;
  transform: translateY(20px);
  opacity: 0;
}

.video-item:hover .video-title {
  transform: translateY(0);
  opacity: 1;
}

/* Nasconde le info extra */
.video-info {
  display: none;
}

/* Icona di play centrale e prominente */
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  color: white;
  font-size: 3rem;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  z-index: 10;
  opacity: 0;
  transition: all 0.4s ease;
  pointer-events: none;
}

.video-item:hover .play-icon {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Badge per tipo video (Local/Vimeo) */
.local-badge,
.vimeo-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: bold;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.local-badge {
  background: rgba(76, 175, 80, 0.7); /* Verde */
  color: white;
}

.vimeo-badge {
  background: rgba(26, 183, 234, 0.7); /* Blu Vimeo */
  color: white;
}

/* Animazione di apertura pagina moderna */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 30% 40%,
      rgba(116, 199, 255, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 60%,
      rgba(155, 89, 182, 0.15) 0%,
      transparent 50%
    ),
    linear-gradient(135deg, #0a0b0f 0%, #131726 50%, #0a0b0f 100%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transform-origin: center;
  transition: all 1.5s cubic-bezier(0.7, 0, 0.3, 1);
}

.page-transition.active {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.1);
}

/* Logo animato nell'apertura */
.page-transition::before {
  content: "DONNY DUNK WALL";
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 8px;
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    #ffffff 25%,
    var(--primary-purple) 50%,
    #ffffff 75%,
    var(--primary-blue) 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 3s ease-in-out infinite,
    title-appear 2s ease-out forwards;
  filter: drop-shadow(0 0 30px rgba(116, 199, 255, 0.5));
  text-align: center;
  margin-bottom: 2rem;
}

@keyframes title-appear {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.8);
    filter: blur(20px);
  }
  50% {
    opacity: 0.8;
    transform: translateY(0) scale(1.05);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

/* Linea di caricamento moderna */
.page-transition::after {
  content: "";
  position: absolute;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary-blue) 0%,
    #ffffff 50%,
    var(--primary-purple) 100%
  );
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(116, 199, 255, 0.6),
    0 0 40px rgba(155, 89, 182, 0.4);
  animation: loading-line 2s ease-in-out forwards;
}

@keyframes loading-line {
  0% {
    width: 0;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  60% {
    width: 60%;
    opacity: 1;
  }
  100% {
    width: 80%;
    opacity: 0.9;
  }
}

/* Particelle durante il caricamento */
.loading-particles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  pointer-events: none;
}

.loading-particles::before,
.loading-particles::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-blue);
  border-radius: 50%;
  animation: particles-float 3s ease-in-out infinite;
}

.loading-particles::before {
  top: 0;
  left: 0;
  animation-delay: 0s;
  box-shadow: 20px 30px 0 var(--primary-purple), 40px 10px 0 var(--primary-blue),
    60px 35px 0 var(--primary-purple), 10px 60px 0 var(--primary-blue),
    80px 60px 0 var(--primary-purple);
}

.loading-particles::after {
  top: 20px;
  left: 20px;
  animation-delay: 1s;
  box-shadow: 25px 15px 0 rgba(116, 199, 255, 0.7),
    45px 45px 0 rgba(155, 89, 182, 0.7), 65px 5px 0 rgba(116, 199, 255, 0.7),
    5px 45px 0 rgba(155, 89, 182, 0.7), 75px 40px 0 rgba(116, 199, 255, 0.7);
}

@keyframes particles-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.3;
  }
  33% {
    transform: translateY(-20px) rotate(120deg);
    opacity: 1;
  }
  66% {
    transform: translateY(-10px) rotate(240deg);
    opacity: 0.7;
  }
}

/* Effetto CRT edges moderno */
.crt-edges {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9995;
  background: radial-gradient(
    circle at center,
    transparent 60%,
    rgba(0, 0, 0, 0.1) 100%
  );
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.8),
    inset 0 0 200px rgba(116, 199, 255, 0.05);
}

/* Effetto scanlines sottile */
.retro-screen::before {
  content: "";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.02) 50%);
  background-size: 100% 3px;
  z-index: 9996;
  pointer-events: none;
  opacity: 0.3;
  animation: scanlines 0.1s linear infinite;
}

@keyframes scanlines {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(3px);
  }
}

/* Sezioni ridisegnate */
section {
  margin-bottom: 4rem;
  background: linear-gradient(
    135deg,
    rgba(19, 23, 38, 0.95) 0%,
    rgba(26, 30, 46, 0.9) 100%
  );
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 40px var(--shadow-strong),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  position: relative;
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--glow-blue),
    var(--glow-purple),
    var(--glow-blue),
    transparent
  );
  filter: blur(1px);
}

section h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid transparent;
  background: linear-gradient(
    135deg,
    var(--primary-blue),
    var(--primary-purple)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40%;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--primary-blue),
    var(--primary-purple)
  );
  border-radius: 2px;
}

/* Slider rinnovato */
.slider-container {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-bg), var(--section-bg));
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6),
    0 10px 30px var(--shadow-medium);
}

.slider {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide {
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.slide img {
  max-width: 100%;
  max-height: 350px;
  border-radius: 12px;
  box-shadow: 0 20px 40px var(--shadow-strong), 0 0 20px var(--glow-blue);
  border: 1px solid var(--border-color);
  transition: all 0.5s ease;
}

.slide img:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 50px var(--shadow-strong), 0 0 30px var(--glow-purple);
}

.slider-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.slider-controls button {
  background: linear-gradient(135deg, var(--section-bg), var(--accent-bg));
  color: var(--primary-blue);
  border: 2px solid var(--border-color);
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.slider-controls button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, var(--glow-blue), transparent 70%);
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  border-radius: 50%;
}

.slider-controls button:hover {
  color: var(--text-primary);
  border-color: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--shadow-medium);
}

.slider-controls button:hover::before {
  width: 100px;
  height: 100px;
}

.slider-indicator {
  text-align: center;
  margin-top: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Modal ridisegnata e corretta */
.modal {
  display: none;
  position: fixed;
  z-index: 2000; /* Z-index più alto */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex !important;
  opacity: 1 !important;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 16px;
  box-shadow: 0 30px 60px var(--shadow-strong), 0 0 40px var(--glow-blue);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  z-index: 2001;
}

.video-modal-content {
  width: 90%;
  max-width: 1200px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px var(--shadow-strong), 0 0 40px var(--glow-blue);
  border: 1px solid var(--border-color);
  position: relative;
  z-index: 2001;
  background: var(--dark-bg);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: var(--dark-bg);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--text-primary);
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 2002;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  font-weight: normal;
  line-height: 1;
}

.modal-close:hover {
  background: var(--primary-blue);
  color: var(--dark-bg);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px var(--glow-blue);
  border-color: var(--primary-blue);
}

/* Loader ridisegnato */
.loader {
  display: none;
  justify-content: center;
  align-items: center;
  margin: 2rem 0 0; /* Rimosso margine inferiore per evitare spazi extra */
  gap: 0.5rem;
}

.loader div {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  animation: loader-bounce 1.4s ease-in-out infinite both;
}

.loader div:nth-child(1) {
  background: var(--primary-blue);
  animation-delay: -0.32s;
}

.loader div:nth-child(2) {
  background: var(--primary-purple);
  animation-delay: -0.16s;
}

.loader div:nth-child(3) {
  background: var(--primary-blue);
}

@keyframes loader-bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Footer ridisegnato */
footer {
  text-align: center;
  padding: 3rem 0;
  margin-top: 4rem;
  background: linear-gradient(135deg, var(--accent-bg), var(--section-bg));
  border-top: 1px solid var(--border-color);
  border-radius: 20px 20px 0 0;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--glow-blue),
    var(--glow-purple),
    var(--glow-blue),
    transparent
  );
}

footer p {
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* Scrollbar personalizzata */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    var(--primary-blue),
    var(--primary-purple)
  );
  border-radius: 6px;
  border: 2px solid var(--dark-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #85d1ff, #b76fc4);
}

/* Responsività migliorata */
@media (max-width: 768px) {
  .top-bar-container {
    flex-direction: column;
    padding: 0.75rem 1rem;
    align-items: center;
  }
  .logo {
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
  }
  body {
    padding-top: 120px; /* Aumenta il padding per la navbar più alta in mobile */
  }
  .container {
    padding: 1rem;
  }

  section {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .slider-controls {
    flex-direction: column;
    gap: 0.5rem;
  }

  .slider-controls button {
    width: 100%;
  }
}

.tutorial-content-inline {
  width: 100%;
  text-align: center;
  overflow: auto;
  position: relative;
  max-height: 60vh;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.tutorial-content-inline img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 40px var(--shadow-strong);
  transition: transform 0.3s ease;
  transform-origin: center;
}

.tutorial-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.tutorial-controls button {
  background: linear-gradient(135deg, var(--section-bg), var(--accent-bg));
  color: var(--primary-blue);
  border: 2px solid var(--border-color);
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 120px;
}

.tutorial-controls button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, var(--glow-blue), transparent 70%);
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  border-radius: 50%;
}

.tutorial-controls button:hover {
  color: var(--text-primary);
  border-color: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--shadow-medium);
}

.tutorial-controls button:hover::before {
  width: 100px;
  height: 100px;
}

.tutorial-controls button:active {
  transform: translateY(0);
}

/* Scrollbar per il tutorial */
.tutorial-content-inline::-webkit-scrollbar {
  width: 8px;
}

.tutorial-content-inline::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.tutorial-content-inline::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    var(--primary-blue),
    var(--primary-purple)
  );
  border-radius: 4px;
}

.tutorial-content-inline::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #85d1ff, #b76fc4);
}

/* Responsività per il tutorial */
@media (max-width: 768px) {
  .tutorial-content-inline {
    max-height: 50vh;
  }

  .tutorial-controls {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tutorial-controls button {
    width: 100%;
    min-width: auto;
  }
}

/* ===== SEZIONE PSD ===== */
.psd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.psd-item {
  background: linear-gradient(135deg, var(--accent-bg), var(--section-bg));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
  transform: translateY(30px);
  box-shadow: 0 10px 30px var(--shadow-medium),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.psd-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.psd-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px var(--shadow-strong), 0 0 40px var(--glow-purple),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.psd-item:hover::before {
  opacity: 0.7;
}

/* Contenitore anteprima PSD */
.psd-preview-container {
  position: relative;
  height: 250px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background: var(--dark-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.psd-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s ease;
  opacity: 0;
  transform: scale(1.1);
}

.psd-preview-image.loaded {
  opacity: 1;
  transform: scale(1);
}

.psd-item:hover .psd-preview-image {
  transform: scale(1.05);
  filter: brightness(1.1) saturate(1.2);
}

/* Fallback per PSD senza anteprima */
.psd-fallback-preview {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(116, 199, 255, 0.1),
    rgba(155, 89, 182, 0.1)
  );
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem;
}

.psd-fallback-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  opacity: 0.8;
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--primary-blue)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.psd-fallback-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.psd-fallback-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 0 10px var(--glow-purple);
}

.psd-fallback-type {
  font-size: 1rem;
  color: var(--primary-purple);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Overlay informazioni PSD */
.psd-info-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 5;
  opacity: 0.9;
  transition: all 0.3s ease;
}

.psd-item:hover .psd-info-overlay {
  opacity: 1;
  transform: translateY(-2px);
}

.psd-file-type {
  background: linear-gradient(135deg, var(--primary-purple), #8e44ad);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.psd-file-size {
  background: rgba(0, 0, 0, 0.8);
  color: var(--primary-blue);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(116, 199, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Icona download principale */
.psd-download-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3.5rem;
  color: rgba(255, 255, 255, 0.95);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(15px);
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.psd-item:hover .psd-download-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
  color: var(--primary-purple);
  border-color: var(--primary-purple);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 30px var(--glow-purple);
  animation: download-pulse 2s ease-in-out infinite;
}

@keyframes download-pulse {
  0%,
  100% {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 30px var(--glow-purple);
  }
  50% {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 40px var(--glow-purple),
      0 0 60px rgba(155, 89, 182, 0.3);
  }
}

/* Titolo PSD */
.psd-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  padding: 1.5rem 1.5rem 0.5rem;
  color: var(--text-primary);
  text-align: center;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.psd-item:hover .psd-title {
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--primary-blue)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px var(--glow-purple);
  transform: translateY(-2px);
}

/* Dettagli PSD */
.psd-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 1.5rem 1.5rem;
  padding: 1.2rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.psd-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding: 0.3rem 0;
}

.psd-detail-label {
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.psd-detail-value {
  color: var(--primary-blue);
  font-weight: 700;
  text-shadow: 0 0 10px var(--glow-blue);
}

.psd-item:hover .psd-detail-value {
  color: var(--primary-purple);
  text-shadow: 0 0 15px var(--glow-purple);
}

/* Pulsante download PSD - SUPER COOL */
.psd-download-btn {
  width: calc(100% - 3rem);
  margin: 0 1.5rem 1.5rem;
  background: linear-gradient(
    135deg,
    var(--primary-purple) 0%,
    #8e44ad 25%,
    #9b59b6 50%,
    #8e44ad 75%,
    var(--primary-purple) 100%
  );
  background-size: 300% 300%;
  color: white;
  border: none;
  padding: 1.2rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  box-shadow: 0 8px 25px rgba(155, 89, 182, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.psd-download-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: translateY(-50%);
  transition: left 0.8s ease;
}

.psd-download-btn:hover {
  transform: translateY(-3px);
  background-position: 100% 0;
  box-shadow: 0 15px 40px rgba(155, 89, 182, 0.6), 0 0 30px var(--glow-purple),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: download-glow 1.5s ease-in-out infinite alternate;
}

.psd-download-btn:hover::after {
  left: 100%;
}

@keyframes download-glow {
  0% {
    box-shadow: 0 15px 40px rgba(155, 89, 182, 0.6), 0 0 30px var(--glow-purple),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  100% {
    box-shadow: 0 20px 50px rgba(155, 89, 182, 0.8), 0 0 50px var(--glow-purple),
      0 0 80px rgba(155, 89, 182, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
}

.download-icon {
  font-size: 1.4rem;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.psd-download-btn:hover .download-icon {
  transform: translateY(-3px) scale(1.2);
  animation: download-bounce 0.8s ease infinite alternate;
}

@keyframes download-bounce {
  0% {
    transform: translateY(-3px) scale(1.2);
  }
  100% {
    transform: translateY(-6px) scale(1.3);
  }
}

.download-text {
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.psd-download-btn:active {
  transform: translateY(-1px) scale(0.98);
  transition: all 0.1s ease;
}

/* Sezione PSD vuota */
.psd-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(
    135deg,
    rgba(155, 89, 182, 0.1),
    rgba(116, 199, 255, 0.1)
  );
  border-radius: 16px;
  border: 2px dashed var(--border-color);
}

.psd-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.psd-empty h3 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.psd-empty p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Responsività PSD */
@media (max-width: 768px) {
  .psd-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .psd-item {
    padding: 1rem;
  }

  .psd-preview-container {
    height: 180px;
    margin-bottom: 1rem;
  }

  .psd-title {
    font-size: 1.1rem;
  }

  .psd-details {
    padding: 0.8rem;
    margin-bottom: 1rem;
  }

  .psd-download-btn {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }

  .psd-fallback-icon {
    font-size: 3rem;
  }

  .psd-empty {
    padding: 3rem 1.5rem;
  }
}

/* Animazioni PSD */
@keyframes psd-item-appear {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.psd-item.visible {
  animation: psd-item-appear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Effetti speciali per PSD */
.psd-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(155, 89, 182, 0.1),
    transparent
  );
  transition: left 0.8s ease;
  pointer-events: none;
}

.psd-item:hover::after {
  left: 100%;
}

/* Badge PSD speciale */
.psd-special-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  z-index: 6;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* Overlay per migliorare la leggibilità del download icon sui PSD */
.psd-item:hover .psd-preview-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
  pointer-events: none;
}

/* Download icon sempre sopra l'overlay */
.psd-download-icon {
  z-index: 15 !important;
}
