:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent: rgb(160, 20, 80
    ); 
    --font-main: 'Space Grotesk', sans-serif;
}

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

html {
    /* Dimensione font fluida tra mobile e desktop */
    font-size: clamp(16px, 2vw, 18px);
}



body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    
    /* FIX CRITICO: Impedisce lo scroll orizzontale indesiderato */
    overflow-x: hidden; 
    width: 100%;
}

/* --- BACKGROUND --- */
.bg-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    z-index: -1;
}

.bg-img {
    position: absolute;
    top: 0; left: -10%; width: 120%; height: 120%;
    object-fit: cover;
    opacity: 0.8;
}

.bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.8));
    pointer-events: none;
}

/* Gestione Immagini */
.desktop-bg { display: none; }
.mobile-bg { display: block; }
@media(min-width: 768px) {
    .desktop-bg { display: block; }
    .mobile-bg { display: none; }
}

/* --- PRELOADER --- */
#loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100dvh;
    background: #000;
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
}
.loader-emblem { 
    width: 150px; 
    animation: pulse 2s infinite; 
}
@media(min-width: 768px) { .loader-emblem { width: 200px; } }

/* --- STRUTTURA GENERALE --- */
main {
    /* FIX: Assicura che tutto il contenuto sia centrato e non sbordi */
    width: 100%;
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

section {
    width: 100%;
    max-width: 1200px; /* Non far allargare troppo su desktop */
    padding: 4rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    font-weight: 700;
}

/* --- HERO --- */

/* --- SOCIAL HERO (Versione Centrata Perfetta) --- */
.social-hero {
    margin-top: 2rem;
    
    /* Configurazione Flexbox Completa */
    display: flex;
    justify-content: center; /* Centra il gruppo orizzontalmente nella pagina */
    align-items: center;     /* Centra le icone verticalmente una rispetto all'altra */
    
    gap: 2.5rem; /* Aumentato leggermente per eleganza */
    width: 100%; /* Assicura che prenda tutta la larghezza per potersi centrare */
    z-index: 2;
}

.social-icon {
    width: 48px;
    height: 48px;
    display: flex; /* Rende il link un contenitore flessibile */
    justify-content: center; /* Centra l'SVG dentro il link */
    align-items: center;     /* Centra l'SVG dentro il link */
    
    color: #fff;
    transition: all 0.3s ease;
}

/* --- FIX YOUTUBE (Ottico) --- */
.yt-fix {
    /* YouTube è rettangolare, quindi deve essere più largo degli altri 
       per sembrare otticamente della stessa grandezza. */
    width: 64px; 
    height: 64px;
    
    /* IMPORTANTE: Rimuoviamo il margin-top manuale di prima.
       Ora ci pensa "align-items: center" del contenitore padre a metterlo giusto. */
    margin-top: 0; 
}

/* Il resto rimane uguale */
.social-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.social-icon:hover {
    color: var(--accent);
    filter: drop-shadow(0 0 15px var(--accent)); /* Aumentato leggermente il glow */
    transform: scale(1.15); /* Leggermente più zoom */
}


/* --- ALBUM SHOWCASE --- */
.album-showcase {
    /* Rimosso il padding bottom enorme di prima */
    padding-bottom: 2rem; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

.album-cover {
    width: 100%;
    max-width: 350px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    /* Spazio tra cover e visualizer */
    margin-bottom: 1.5rem; 
}

/* --- AUDIO VISUALIZER CSS (Versione Onda) --- */
.visualizer-container {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 40px;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.visualizer-container.active {
    opacity: 1;
}

.viz-bar {
    width: 6px;
    height: 100%;
    background: var(--accent);
    border-radius: 50px;
    /* Base: altezza al 20% */
    transform: scaleY(0.2);
    transform-origin: bottom;
    /* Animazione lineare e infinita */
    animation: waveform 1.2s infinite linear;
    /* Mettiamo in pausa se non è attivo */
    animation-play-state: paused;
}

/* Quando attivo, l'animazione parte */
.visualizer-container.active .viz-bar {
    animation-play-state: running;
}

/* --- ANIMAZIONE "WAVEFORM" (Onda morbida) --- */
@keyframes waveform {
    0% { transform: scaleY(0.2); }  /* Basso */
    50% { transform: scaleY(1); }   /* Alto */
    100% { transform: scaleY(0.2); } /* Basso */
}

/* --- RITARDI SEQUENZIALI PER EFFETTO ONDA --- */
/* Usiamo ritardi negativi per farle partire già "in movimento" */
.viz-bar:nth-child(1) { animation-delay: -1.2s; }
.viz-bar:nth-child(2) { animation-delay: -1.05s; }
.viz-bar:nth-child(3) { animation-delay: -0.9s; }
.viz-bar:nth-child(4) { animation-delay: -0.75s; }
.viz-bar:nth-child(5) { animation-delay: -0.6s; }
.viz-bar:nth-child(6) { animation-delay: -0.45s; }
.viz-bar:nth-child(7) { animation-delay: -0.3s; }
.viz-bar:nth-child(8) { animation-delay: -0.15s; }


/* --- BOTTONE LISTEN --- */
.btn-listen {
    background: transparent;
    cursor: pointer;
    color: #fff; border: 1px solid #fff; padding: 10px 35px; 
    border-radius: 50px; text-transform: uppercase;
    font-family: var(--font-main); font-size: 0.9rem; font-weight: 500; letter-spacing: 1px;
    transition: 0.3s;
    margin-top: 0; 
}

.btn-listen:hover, .btn-listen.playing {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 15px var(--accent);
}

/* --- SPOTIFY SECTION SPACING --- */
.spotify-section {
    padding: 0 1rem;
    max-width: 600px;
    /* AGGIUNTO SPAZIO EXTRA PRIMA DI SPOTIFY */
    margin-top: 5rem; 
}


.hero { min-height: 90dvh; justify-content: center; }
.hero-logo { width: 85%; max-width: 500px; margin-bottom: 1rem; }
.subtitle { text-transform:uppercase; letter-spacing: 3px; font-size: 0.8rem; z-index: 2; }

/* --- MARQUEE (Striscia scorrevole) --- */
.marquee-wrapper {
    width: 100%;
    overflow: hidden; /* Fondamentale per non rompere il layout mobile */
    transform: rotate(-2deg);
    margin: 2rem 0;
}
.marquee-container {
    background: var(--accent);
    color: #000;
    padding: 0.8rem 0;
    white-space: nowrap;
}
.marquee-text {
    display: inline-block;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    animation: scrollText 15s linear infinite;
}

/* --- ALBUM & SPOTIFY --- */
.album-showcase { padding-bottom: 2rem; }
.album-cover { width: 100%; max-width: 350px; box-shadow: 0 20px 50px rgba(0,0,0,0.6); margin-bottom: 2rem;}
.album-title { font-size: 3.5rem; line-height: 0.9; margin-bottom: 1.5rem; }
.btn-listen {
    color: #fff; border: 1px solid #fff; padding: 12px 40px; 
    text-decoration: none; border-radius: 50px; text-transform: uppercase;
    transition: 0.3s;
}
.btn-listen:hover { background: #fff; color: #000; }

.spotify-section {
    padding: 0 1rem; /* Margine laterale su mobile */
    max-width: 600px; /* Non troppo largo su desktop */
}

/* --- VIDEO SCROLLER (NUOVO) --- */
.video-section {
    width: 100%; /* Occupa tutta la larghezza */
    padding-left: 0; padding-right: 0; /* Togliamo padding per far toccare i bordi */
}

.video-scroller {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto; /* Abilita scroll orizzontale */
    width: 100%;
    padding: 0 1.5rem 2rem 1.5rem; /* Padding laterale per l'inizio e fine scroll */
    
    /* Snap per fermarsi esattamente sul video */
    scroll-snap-type: x mandatory; 
    
    /* Nascondi barra scorrimento (estetico) */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.video-scroller::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.video-card {
    flex: 0 0 85vw; /* Su mobile occupa 85% della larghezza */
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: center; /* Il video si ferma al centro */
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

@media(min-width: 768px) {
    .video-card { flex: 0 0 450px; } /* Su desktop dimensione fissa */
}

#bio {
    min-height: auto;
    padding-bottom: 4rem;
}

/* --- CONTACT & FOOTER --- */
footer {
    width: 100%;
    padding: 1rem 1.5rem 8rem 1.5rem; /* Spazio extra in basso per la dock */
    text-align: center;
    background: linear-gradient(to top, #000 0%, transparent 100%);
}

.contact-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.email-link {
    display: inline-block;
    font-size: clamp(1.5rem, 5vw, 3rem); /* Gigante ma reattivo */
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    word-break: break-all; /* Se la mail è lunghissima va a capo */
}

.email-link:hover {
    color: var(--accent); /* Si illumina del colore accent */
    text-shadow: 0 0 20px rgb(160, 20, 80);
    transform: scale(1.05);
}

.copyright {
    margin-top: 4rem;
    font-size: 0.7rem;
    opacity: 0.4;
    letter-spacing: 1px;
}

/* --- NAVBAR DOCK --- */
.dock-nav {
    position: fixed;
    bottom: 2rem; left: 50%; transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; gap: 1.5rem;
    z-index: 100;
}
.dock-link { color: #fff; text-decoration: none; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }

/* ANIMAZIONI */
@keyframes scrollText { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }



/* --- MODIFICHE MOBILE (ICONE SOCIAL) --- */
@media (max-width: 768px) {
    /* Rimpiccioliamo le icone quando lo schermo è stretto */
    .social-icon {
        width: 32px;  /* Era 48px */
        height: 32px;
    }

    /* Rimpiccioliamo proporzionalmente YouTube */
    .yt-fix {
        width: 42px; /* Era 64px */
        height: 42px;
        /* Rimuoviamo margini manuali per affidarci al flexbox */
        margin-top: 0; 
    }
    
    /* Riduciamo lo spazio tra le icone */
    .social-hero {
        gap: 1.5rem; 
    }
}

/* --- BIO SECTION (GLASSMORPHISM) --- */
.glass-card {
    background: rgba(255, 255, 255, 0.05); /* Vetro scuro */
    backdrop-filter: blur(12px);           /* Sfocatura sfondo */
    -webkit-backdrop-filter: blur(12px);   /* Per Safari */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Bordo sottile */
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-width: 800px;
    width: 90%;
    margin-top: 1rem;
    text-align: left;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.bio-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.bio-text strong {
    color: var(--accent);
    font-weight: 700;
}

.bio-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    opacity: 0.6;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Adattamento Bio su Mobile */
@media (max-width: 768px) {
    .glass-card {
        text-align: center; /* Su mobile il testo centrato è più elegante */
        padding: 2rem 1.5rem;
    }
    .bio-footer {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
}