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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at 30% 30%, #07020f, #000000, #000919, #000611, #000000);
    overflow-x: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding:5vw;
    flex-wrap: wrap;
}

.left-container {
    color: white;
    width: 30%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* cambiato da center a flex-start */
    padding-top: 80px;           /* aggiunto spazio dall'alto */
    height: auto;                /* rimosso vincolo di altezza fissa */
}


.left-container h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: bold;
}

.left-container p {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: gray;
}

.login-box {
    margin-top: 30px;
    padding: 30px 0;
    text-align: center;
}
.right-container{
    background:linear-gradient(180deg, #0c0c0c59 -270%, rgba(10, 10, 10, 0.61) 150%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0px 0px 20px 20px #000000dc;
}
.btn-primary {
    background-color: #5948B3;
    border: none;
    padding: 12px;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.btn-primary:hover {
    background-color: #5948B3;
}
.carousel-inner {
    padding: 100px 20px 20px;
}


.carousel-inner img {
    max-width: 400px;
    height: auto;
    margin: auto;
    display: block;
    border-radius: 20px;
    object-fit: contain;
}

.mb-5 {
    color: gray;
}

.bottom-image-container {
    background: linear-gradient(180deg, #0f0f0fa2 -270%, rgba(10, 10, 10, 0.719) 150%);
    padding: 20px; /* TOP, SIDES, BOTTOM */
    text-align: center;
    border-radius: 20px;
}


.bottom-image-container img {
    max-width: 1000px;
    width: 100%;
    height: auto;
}

.custom-footer {
    background-color: #00000000;
    border-top: 1px solid #222;
    padding: 4px 4px;
}

.custom-footer a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.custom-footer a:hover {
    color: #6a5acd;
}

.bottom-text-container {
    text-align: center;
    margin-top: 120px; /* aumentato gap */
}

.move-up {
    margin-top:100px;
}

body {
    background-color: #0c0b1c;
    color: white;
    font-family: 'Poppins', sans-serif;
    padding: 30px;
}

.player-container {
    border: 2px solid #fff;
    border-radius: 15px;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto 40px;
    background-color: #11002725;
    justify-content: right !important;
}



.btn-rectangle.active {
    background-color: #383581;
    color: white;
    border: 2px solid #a19efd ;
}


.btn-rectangle {
    min-width: 180px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.audio-buttons img {
    display: block;
    margin: 0 auto 8px;
    width: 60px;
    height: 50px;
    object-fit: contain;
}

.btn-rectangle img {
    width: 32px;
    height: 32px;
    margin: 0;
}

#lyrics-viewer {
    background-color: #131313;
    padding: 20px;
    border-radius: 15px;
    max-width: 800px;
    margin: 0 auto;
    border: 2px #c8c4cf solid !important;
    font-size: 20px;
    text-align: left !important;
}

.lyric-word {
    margin: 0 4px;
    display: inline-block;
    color: #797979;
    font-size: 20px !important;
}

.lyric-word.active-word {
    color: #ffffff;
    font-weight: bold;
}

.player-container {
    min-height: 80px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.square-btn{
    background-color: #26245c; /*tasto dell'upload che sarebbe un quadrato inizialmente*/
    border: 2px #fff solid;
    border-radius: 50%;
}

.square-btn:hover {
    background-color: #383581;
    border: 2px #a19efd solid;
}

.square-btn.active {
    background-color: #383581 !important;
    border: 2px #fff solid;
}
.btn-square {
    width: 160px;
    height: 160px;
    border-radius: 10px;
    font-size: 1rem;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    aspect-ratio: 1 / 1;
    margin: auto;
    background-color: #26245c;
    color: white;
    font-weight: 600;
}

.btn-square:active {
    background-color: #383581 !important;
    transform: scale(0.92);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-square:hover {
    transform: scale(1.05);
    background-color: #383581;
    border-color: white;
    width: 100%;
    max-width: 160px;
    margin: auto;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 20px;
    color: white;
    font-weight: 600;
}

.navbar-glass {
    background-color: rgba(0, 0, 0, 0.116); /* nero semitrasparente */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); /* per Safari */
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.192);
    z-index: 999;
}

.btn-rectangle {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: transparent;
    border: 2px solid #eeeeee;
    color: #eeeeee;
    font-weight: 600;
    border-radius: 15px;
}
.btn-rectangle:hover{
    background-color:#383581 !important;
    border: 2px solid #a19efd;
}
#progressContainer {
    background-color: #0d0c1b; /* Colore sfondo barra (parte vuota) */
    border-radius: 10px;
    height: 14px;
}

#progressBar {
    background: linear-gradient(90deg, #2689bd, #6A5ACD, #4682B4) !important;
    background-size: 300% 100%;
    width: 0;
    height: 100%;
    transition: width 0.25s;
    animation: progressAnimation 5s infinite linear;
    border-radius: 10px;
}

@keyframes progressAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}


#chords-viewer .chord {
    transition: all 0.4s ease;
    color: #ffffff;
    background-color: #131313;
    padding: 8px 0;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 500;
}

.chord.active {
    background-color: #6A5ACD !important;
    color: white;
    animation: pulseChord 2.2s infinite ease-in-out;
    border-radius: 8px;

}

@keyframes pulseChord {
    0% { transform: scale(1); }
    50% { transform: scale(1.02);}
    100% { transform: scale(1);  }
}

.metronome-grid {
    display: grid;
    grid-template-columns: repeat(8, 40px) !important;
    grid-gap: 10px !important;
    justify-content: center;
    padding: 20px !important;
    background-color:#060607;
    border-radius: 12px;
    margin-top: 20px !important;
    border: 2px solid #c8c4cf;
}

.beat-box {
    width: 40px;
    height: 40px;
    background-color: #1f1f1f;
    border-radius: 6px;
    transition: background-color 0.1s;
    margin-left: 6px;
    margin: 0 8px !important;
}



.beat-box.active {
    background: linear-gradient(135deg,rgb(0, 255, 55) 0%, rgb(18, 153, 0) 100%) !important;
    box-shadow: 0 0 10px limegreen;
    scale: 1.20;
}

@keyframes breathe {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1);  }
}

/* Quando il metronomo è in pausa e il beat è attivo */
.beat-box.breathe {
    animation: breathe 1s ease-in-out infinite;
}




@keyframes progressAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@media (max-width: 576px) {
    #trackRow .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .metronome-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


@media (max-width: 1120px) {
    .left-container,
    .right-container {
        width: 100%;
        max-width: 100%;
        text-align: center;
        align-items: center;
        justify-content: center;
        display: flex;
        flex-direction: column;
    }

    .player-container {
        justify-content: center !important;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 20px;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

    .player-container .flex-grow-1 {
        width: 100%;
        max-width: 500px;
    }

    #progressContainer {
        width: 100%;
        max-width: 500px;
    }

    .btn-square,
    .btn-rectangle {
        margin: 0 auto;
    }

    .audio-buttons .row {
        justify-content: center !important;
    }

    .left-container p {
        text-align: center;
    }

    #lyrics-container {
        display: flex;
        justify-content: center;
        background-color: #000 !important;
    }

    #lyrics-viewer {
        width: 100%;
        max-width: 500px;
        text-align: left;
    }
}



@media (max-width: 991.98px) {
    .player-container {
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
        gap: 1rem;
    }

    .player-container .flex-grow-1 {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 991.98px) {
    .player-container {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: nowrap;
        gap: 1rem;
        width: 100%;
    }

    .player-container .flex-grow-1 {
        width: 100%;
        max-width: 500px; /* oppure 100% se preferisci */
    }

    #progressContainer {
        width: 100%;
    }


}

/* Stile base desktop */
.metronome-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr); /* 8 colonne su desktop */
    gap: 10px;
    justify-content: center;
    padding: 1rem;
}

/* Stile mobile: max 450px */
@media (max-width: 450px) {
    .metronome-grid {
        grid-template-columns: repeat(4, 1fr) !important; /* 4 colonne */
        gap: 8px !important;
        padding: 15px !important;
        border: 1px solid #fff;
    }

    .beat-box {
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }

    #bpm-display {
        text-align: center;
        margin-bottom: 10px;
        font-size: 14px;
    }
    .audio-buttons .row {
        flex-direction: column ;
        align-items: center ;
    }

    .audio-buttons .col {
        width: 100% ;
        display: flex;
        justify-content: center;
    }
    .btn-square {
        width: 90% !important;
        padding: 1rem;
        border-radius: 1.2rem;
    }

    .btn-square img {
        margin-bottom: 0.5rem;
    }


}

.custom-lang-menu {
    margin-top: 6px;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    min-width: 100%;
    left: 0;

    /* Sfondo vetroso opaco */
    background: radial-gradient(circle at 30% 30%,  #000714, #000611);

    /* BORDO GRADIENTE */
    border: 2px solid transparent;
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    background-image:
            radial-gradient(circle at 30% 30%,  #000714, #000611),
            linear-gradient(135deg, #4373c1, #6A5ACD);  /* bordo gradiente */

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.custom-lang-menu .dropdown-item {
    color: white;
    padding: 10px 16px;
    font-weight: 500;
    transition: background 0.2s ease;
    background: transparent;
}

.custom-lang-menu .dropdown-item:hover {
    background:linear-gradient(135deg, #4373c1, #6A5ACD);
}

.dropdown-toggle {
    position: relative;
    z-index: 1;

    background-color: transparent;
    color: #fff;
    border-radius: 20px;
    padding: 6px 14px;

    border: 2px solid transparent;
    background-image: linear-gradient(#0b0c1b, #0b0c1b), linear-gradient(135deg, #dbdbdb, #929292);
    background-origin: border-box;
    background-clip: padding-box, border-box;

    font-weight: 500;
    transition: all 0.3s ease;
}


.dropdown-toggle:hover,
.dropdown-toggle:active,
.dropdown-toggle:focus {
    background-image: linear-gradient(#0b0c1b, #0b0c1b), linear-gradient(135deg,  #4373c1, #6A5ACD);
    border: 2px solid transparent;
}