/* Reset base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #0A0A10;
  color: #E0E0E0;
  -webkit-tap-highlight-color: transparent;
}

/* Background/Slides - Animazione migliorata con zoom out e slide uniforme */
.slides-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(8px) brightness(0.95);
  transform: scale(1.15);
  opacity: 0;
  transition: opacity 1s ease-in-out;
  animation: zoomOutSlide 25s linear infinite;
}

.slide.current {
  opacity: 1;
}

@keyframes zoomOutSlide {
  0% {
    transform: scale(1.15) translateX(0);
  }
  50% {
    transform: scale(1) translateX(-2%);
  }
  100% {
    transform: scale(1) translateX(0);
  }
}

.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 16, 0.3);
  z-index: 1;
}

/* Canvas particelle */
#particlesCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
}

/* Contenitore principale */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    padding: 20px;
    max-width: 90vw;
    text-align: center;
}

/* Logo NEON */
.logo-container {
  position: relative;
  width: 250px;
  height: 250px;
  margin-bottom: 30px;
  cursor: pointer;
}

.neon-circle {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  border: 3px solid #0FF;
  box-shadow: 0 0 10px #0FF, 0 0 20px #0FF, inset 0 0 5px #0FF;
  animation: flicker-shadow 1.5s infinite alternate;
  display: flex;
  justify-content: center;
  align-items: center;
}

.neon-text {
  font-family: 'Monoton', cursive;
  font-size: 2.5rem;
  color: #FFF;
  text-shadow: 0 0 5px #FFF, 0 0 10px #0FF;
  text-align: center;
  line-height: 0.9;
}

.neon-text .red {
  color: #FF0077;
  text-shadow: 0 0 5px #FF0077, 0 0 10px #FF0077;
}

/* Secondo logo "MADE WITH LOVE" in alto a sinistra */
.made-with-love-logo {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 5;
  animation: float 3s ease-in-out infinite;
}

.made-with-love-text {
  font-family: 'Monoton', cursive;
  font-size: 1.2rem;
  text-align: center;
  color: #FFF;
  text-shadow: 0 0 5px #FFF;
}

.made-with-love-text .love {
  color: #FF0077;
  text-shadow: 0 0 5px #FF0077, 0 0 10px #FF0077;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Animazioni Neon */
.flicker-fast { animation: flicker-fast 0.1s infinite alternate; }
.flicker-slow { animation: flicker-slow 1s infinite alternate; }

@keyframes flicker-shadow {
  0%, 100% { box-shadow: 0 0 15px #0FF, 0 0 30px #0FF; }
  50% { box-shadow: 0 0 5px #0FF, 0 0 10px #0FF; }
}

@keyframes flicker-fast {
  0% { opacity: 1; }
  50% { opacity: 0.95; }
  100% { opacity: 1; }
}

@keyframes flicker-slow {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow: 0 0 4px #fff, 0 0 11px #fff, 0 0 19px #fff, 0 0 40px #0ff, 0 0 80px #0ff, 0 0 90px #0ff, 0 0 100px #0ff, 0 0 150px #0ff;
  }
  20%, 24%, 55% {
    text-shadow: none;
  }
}

/* Waves */
.waves {
    position: absolute;
    width: 100%;
    height: 100%;
}
.wave {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 255, 0.5);
    animation: wave-pulse 3s infinite;
}
.wave:nth-child(1) { animation-delay: 0s; }
.wave:nth-child(2) { animation-delay: 1s; }
.wave:nth-child(3) { animation-delay: 2s; }
@keyframes wave-pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Player Wrapper */
.player-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2), 0 4px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    max-width: 450px;
    width: 90vw;
}

/* Oscilloscopio/Visualizzatore */
.oscilloscope-container {
    width: 100%;
    height: 70px;
    position: relative;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

#oscilloscope {
    width: 100%;
    height: 100%;
}

/* iOS Visualizer Canvas - Spectrum Bars */
.ios-visualizer-canvas {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

body.ios .ios-visualizer-canvas {
    display: block;
}

body.ios #oscilloscope {
    display: none;
}

/* Controlli */
.controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 15px;
}

.play-btn {
    background-color: #0FF;
    color: #0A0A10;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px #0FF;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px #0FF;
}

.status {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #0FF;
    flex-grow: 1;
    text-align: center;
    margin-top: 15px;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.volume-control {
    display: flex;
    align-items: center;
}

.volume-icon {
    font-size: 1.2rem;
    margin-right: 8px;
    color: #E0E0E0;
    cursor: pointer;
}

/* Stile Range */
input[type=range] {
    -webkit-appearance: none;
    width: 100px;
    height: 4px;
    background: #555;
    border-radius: 2px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #0FF;
    cursor: pointer;
    box-shadow: 0 0 5px #0FF;
}

/* Marquee */
.marquee-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 16, 0.9);
    padding: 5px 0;
    z-index: 4;
    overflow: hidden;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.marquee-text {
    white-space: nowrap;
    animation: marquee 15s linear infinite;
    font-size: 1rem;
    color: #FFF;
}

.marquee-text .highlight {
    color: #0FF;
    font-weight: 700;
    text-shadow: 0 0 3px #0FF;
}

@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Social container - Instagram ingrandito del 20% e posizione fissa */
.social-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 5;
}

.social-container a {
  color: #0FF;
  font-size: 43px; /* Aumentato da 36px a 43px (20% in più) */
  transition: color 0.3s ease, transform 0.3s ease;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-container a:hover {
  color: #FF0077;
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 600px) {
    .logo-container {
        width: 180px;
        height: 180px;
        margin-bottom: 20px;
    }
    .neon-text {
        font-size: 1.8rem;
    }
    .made-with-love-logo {
        top: 10px;
        left: 10px;
    }
    .made-with-love-text {
        font-size: 1rem;
    }
    .controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .status {
        width: 100%;
        margin-top: 10px;
    }
    .volume-control {
        flex-grow: 1;
        justify-content: center;
    }
    input[type=range] {
        width: 120px;
    }
    .marquee-text {
        font-size: 0.8rem;
    }
    /* Rimosso il riposizionamento del social-container su mobile */
    .social-container a {
        font-size: 36px; /* Ridotto proporzionalmente su mobile */
    }
}