/*---------------------------------------------------------
  styles.css : basic responsive layout and styling
---------------------------------------------------------*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@600&display=swap');


.SNGtitle{
    margin-bottom: 2rem;
    font-size: 3rem;
    font-family: 'Chakra Petch', sans-serif;
    letter-spacing: 1px;
    color: var(--accent);
}

/* PAGE WRAP dynamic rounding and center zoom */
/* PAGE WRAP: mantenuto arrotondamento, nessuno zoom per evitare conflitti */
#page-wrap {
    border-radius: 24px;
    overflow: hidden;
}

:root {
    --bg: #ffffff;
    --fg: #000000;
    --accent: #1535e7; /* Spotify green as accent */
    --card-bg: #c4ffc7;
    --gap: 1.5rem;
    --prox-duration: 1200ms; /* durata transizione animazione di prossimità */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--fg);
    padding: 2rem;
}
.page-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}
.track {
    display: flex;
    gap: var(--gap);
    background: var(--card-bg);
    border-radius: 12px;
    padding: var(--gap);
    margin-bottom: var(--gap);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.trackF {
  display: flex;
    gap: var(--gap);
    background: var(--card-bg);
    border-radius: 12px;
    padding: var(--gap);
    margin-bottom: var(--gap);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  animation: pulseFlash 1s infinite alternate ease-in-out;
}

@keyframes pulseFlash {
  from {
    background-color: #ffffff;
  }
  to {
    background-color: #00974b;
  }
}

.cover {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

.coverU {
    width: 500px;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
}

.miniCover
{
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.duration {
    font-size: 0.9rem;
    color: #525252;
    margin-bottom: 1rem;
}
.description {
    margin-bottom: 1rem;
}
.links {
    display: flex;
    gap: 0.5rem;
}
.linksN {
    color: #1f1f1f;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}
.btn {
    text-decoration: none;
    background: var(--fg);
    color: var(--bg);
    padding: 0.8rem 1.6rem;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}
.btn:hover { background: var(--accent); color: var(--fg); }

/* Icon–specific tweaks */
.btn.spotify:hover   { background: #1db954; }
.btn.soundcloud:hover{ background: #ff7700; }
.btn.youtube:hover   { background: #ff0000; }
.btn.youtubeClip:hover   { background: #1900ff; }

/* Responsive */
@media (max-width: 600px) {
    .track { flex-direction: column; align-items: center; }
    .cover { width: 100%; height: auto; }
    .meta { align-items: center; text-align: center; }
}

/* HEADER personalizzato */
.track.header {
    margin-bottom: 3rem;
    align-items: center;
}
.track.header .cover {
    width: 120px;
    height: 120px;
}

/* FOOTER */
.footer {
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
    border-top: 1px solid #333;
    margin-top: 4rem;
    padding-top: 1.5rem;
}

/* COUNTDOWN */
#countdown {
    font-size: 2.5rem;      /* Grandezza numeri */
    font-weight: 600;
    letter-spacing: 2px;
    margin-top: 1rem;
}

#countdown-container {
    animation: pulseFlash 1s infinite alternate ease-in-out;
    padding: 1rem;
    border-radius: 10px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 1080px;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    /* allinea a sinistra quando contenuto a larghezza fissa */
    margin-left: 0;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.extras-gallery {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:15px;
}

.extra-image {
    width:180px;
    border-radius:10px;
    cursor:pointer;
    transition:0.25s;
}

.extra-image:hover {
    transform:scale(1.05);
}


.video-wrapper {
    width: 100%;
    max-width: 720px;
    margin: 15px 0; /* allineamento a sinistra */
}

.video-wrapper:not(.short) iframe {
    width: 100%;
    height: 405px; /* 16:9 classico */
    border-radius: 12px;
}

/* SHORTS */
.video-wrapper.short {
    max-width: 240px; /* più piccolo per gli shorts */
    margin-left: 0; /* assicurati che siano allineati a sinistra */
    aspect-ratio: 9/16;
    overflow: hidden;
}

.video-wrapper.short iframe {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* Ensure short wrapper enforces vertical aspect ratio */
.video-wrapper.short {
    aspect-ratio: 9 / 16;
    height: auto;
}

/* SHORTS ROW - stile orizzontale */
.shorts-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
}

/* Extras gallery in riga su desktop, scroll orizzontale su mobile */
.extras-gallery {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min-content;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 0;
}

@media (min-width: 900px) {
    .extras-gallery { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); overflow: visible; }
    .shorts-row { overflow: visible; }
}

/* Transizioni per animazioni basate sulla scroll proximity */
.video-wrapper,
.track:not(.header) {
    transition: transform var(--prox-duration) cubic-bezier(.2,.8,.2,1), box-shadow var(--prox-duration) ease;
    will-change: transform;
}
