body {
    background-color: #FFCCD3;
    background-image: url(../immagini/cuori1.gif);
    background-size: 50%;       /* riempie interamente la sezione */
    background-position: center;  /* centra l'immagine */
    background-repeat: repeat-x; /* evita ripetizioni */
}
.left {
    width: 50%;
    height: auto;
    display: flex;
    position: relative;
    float: left;
    flex: 1;
    justify-content: center;
    align-items: center;
}
.right {
    width: 50%;
    height: auto;
    display: flex;
    position: relative;
    float: left;
    flex: 1;
    align-items: center;
    cursor: pointer;
}
.contenitore {
  display: flex;
  height: 100vh;   /* oppure 100% va bene perché html/body sono alti 100% */
}
.anime img {
    width: 300px;
    height: auto;
    margin-left: 40%;
}
@font-face {
    font-family: Pixel;
    src: url(../font/PixelifySans-VariableFont_wght.ttf);
} 
body{
    font-family: Pixel;
    font-size: 22px;
}
.testo {
    margin: 50px;
    padding: 30px;              /* spazio interno */
    background-color: #FFE4E6;     /* colore box */
    border-radius: 20px;        /* angoli arrotondati */
    box-shadow: 0 0 15px rgba(0,0,0,0.2); /* ombra */
    max-height: 70vh;           /* evita che diventi troppo alta */
    overflow-y: auto;           /* scroll se il testo è lungo */
}
.testo::-webkit-scrollbar {
    width: 10px;
}

.testo::-webkit-scrollbar-track {
    background: #ffd6dc;      /* sfondo della barra */
    border-radius: 10px;
}

.testo::-webkit-scrollbar-thumb {
    background: #ff8fa3;      /* colore cursore */
    border-radius: 10px;
}

.testo::-webkit-scrollbar-thumb:hover {
    background: #ff6f91;      /* hover */
}
a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a:hover {
    color: #ff6f91;
    text-decoration: underline;
}
.parole {
    list-style: none;     /* via i pallini */
    padding: 0;
    margin: 0;
    display: flex;        /* tutto in riga */
    flex-wrap: wrap;      /* va a capo se non c'è spazio */
}
.parole li {
    margin-right: 8px;
}

/* separatore | */
.parole li::after {
    content: "|";
    margin-left: 8px;
    color: #ff8fa3;
}

/* rimuove | dall’ultimo */
.parole li:last-child::after {
    content: "";
}
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-content {
    position: relative;
}

.popup-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content img {
    max-width: 80vw;
    max-height: 80vh;
}

#closePopup {
    position: absolute;
    top: -10px;
    right: -10px;
    background: black;
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

#closePopup {
    background-color: hotpink; /* sfondo rosa */
    color: white;              /* X bianca */
    border: none;              /* niente bordo */
    border-radius: 50%;        /* forma tonda */
    width: 40px;               /* larghezza */
    height: 40px;              /* altezza */
    font-size: 20px;           /* dimensione della X */
    cursor: pointer;           /* cursore puntatore */
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    right: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* piccolo ombreggiamento */
    transition: transform 0.2s ease;
}

#closePopup:hover {
    transform: scale(1.2); /* effetto hover leggero */
    background-color: rgb(215, 74, 145);
}
#popupVideo {
    border-radius: 20px;
    overflow: hidden;
}
#popupVideo {
    width: 80vw;      /* larghezza = 80% dello schermo */
    max-width: 1000px;
    height: auto;
}

/*osu mania*/
#maniaGame {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,1);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.lanes {
    display: flex;
    gap: 10px;
    height: 80vh;
}

.lane {
    width: 80px;
    background: #222;
    border-radius: 10px;
    position: relative;
    color: hotpink;
    text-align: center;
    font-size: 24px;
}

.note {
    position: absolute;
    top: -40px;
    left: 10px;
    width: 60px;
    height: 30px;
    background: hotpink;
    border-radius: 6px;
    animation: fall 2s linear forwards;
    
}

@keyframes fall {
    to { top: 90%; }
}

/* modifica */
#maniaGame {
    position: fixed;
    inset: 0;
    background: rgba(255, 192, 203, 0.495);
    display: none;
    justify-content: center;
    align-items: center;
    font-family: Pixel;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

#maniaGame::before {
    content: "";
    position: absolute;
    width: 500px;          /* larghezza box */
    height: 100vh;          /* altezza box */
    background: rgba(255,255,255,0.9);
    z-index: 0;
    box-shadow: rgb(255, 255, 255) 0 0 100px, hotpink 0 0 60px; /* effetto luminoso */
}

.lanes {
    display: flex;
    gap: 15px;
    height: 80vh;
    position: relative;
    z-index: 1;
}

.lane {
    width: 90px;
    background: #111;
    position: relative;
}

.hitline {
    position: absolute;
    bottom: 80px;
    width: 100%;
    height: 4px;
    background: hotpink;
}

.key {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    font-size: 26px;
    color: #ff8fa3;
}

.key.active {
    transform: scale(1.3);
    color: white;
}

.note {
    position: absolute;
    top: -40px;
    left: 10px;
    width: 70px;
    height: 30px;
    background: hotpink;
    border-radius: 6px;
}

/* win */
#winScreen {
    position: fixed;
    inset: 0;
    background: rgba(255, 192, 203, 0.495);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    text-align: center;
}

.winBox {
    background: white;
    padding: 40px 60px;
    border-radius: 20px;
    color: rgb(92, 55, 55);
    animation: pop 0.4s ease;
}
.winBox h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: hotpink;
}

@keyframes pop {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#countdown {
    font-size: 48px;
    margin-top: 20px;
    color: hotpink;
}

#warningScreen {
    position: fixed;
    inset: 0;
    background: rgba(255, 192, 203, 0.495);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10002;
    text-align: center;
    color: rgb(92, 55, 55);
}

.warningBox {
    position: relative;
    padding: 50px 80px;
    animation: pop 0.4s ease;
    z-index: 2;
}

/* 🔥 il riquadro dietro */
.warningBox::before {
    content: "";
    position: absolute;
    inset: 0;
    background: white;
    border-radius: 20px;
    z-index: -1;
}

#warningCountdown {
    font-size: 60px;
    color: rgb(254, 104, 104);
    margin-top: 20px;
}