:root {
  --overlay-color: rgba(0, 0, 0, 0);   /* overlay più chiaro per visibilità video */
  --fallback-opacity: 0.45;
  --video-opacity: 1;
}
body.light-mode {
  --overlay-color: rgba(255, 255, 255, 0.12);
  --video-opacity: 1;
}

/* Video Background (caricato dopo gli altri CSS) */
.video-background { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.video-carousel { position: absolute; inset: 0; display: flex; transition: opacity .6s ease-in-out; }
.video-carousel video {
  min-width: 100%; min-height: 100%; width: auto; height: auto; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%); object-fit: cover;
  opacity: var(--video-opacity) !important;
  will-change: opacity, transform;
}
.overlay { position: absolute; inset: 0; background: var(--overlay-color, var(--overlay, rgba(0,0,0,.28))) !important; z-index: 1; }
/* Fallback */
.fallback-background {
  position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=2072&q=80');
  background-size: cover; background-position: center; opacity: var(--fallback-opacity); z-index: 0;
}
/* Static Background */
.static-background {
  position: fixed; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=2072&q=80');
  background-size: cover; background-position: center; opacity: 0; z-index: -1; transition: opacity .6s ease-in-out;
}
.static-background.active { opacity: .65; }

/* Debug */
.debug-info {
  position: fixed; bottom: 10px; left: 10px; background-color: rgba(0,0,0,.6); color: #fff;
  padding: 8px 10px; border-radius: 6px; font-size: .8rem; z-index: 1000; max-width: 300px;
}
