@import url("style-notedisplay.css");
@import url("style-device.css");
@import url("style-modal.css");

@font-face {
  font-family: 'PixelFont';
  src: url('./fonts/Minecraft.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  /*colori palette*/
  --darkblue: #131138;
  --lime: #84EB16; /*baff24;*/
  --pink: #ff498f;
  --yellow: #f5ff33;
  --violet: #a100d1;
  --font-family: 'PixelFont', Arial, sans-serif;
  --sfondo: var(--darkblue);
  font: var(--font-family);
}

body {
  display: flex;
  background: var(--sfondo);
  color: white;
  line-height: 1.6;
  text-align: center;
  align-items: center;
  justify-content: center;
  text-align: center;
  font: var(--font-family);
  flex-direction: column;
  height: 100dvh; 
  width: 100dvw;
  overflow: hidden;
}
.pagina-verde {
  --sfondo: var(--lime);
}
.pagina-rosa {
  --sfondo: var(--pink);
}
.pagina-gialla {
  --sfondo: var(--yellow);
}
.pagina-viola {
  --sfondo: var(--violet);
}

.main-title {
  font-family: var(--font-family);
  font-size: 7dvh;
  margin-top: 10dvh;
  font-weight: 700;
}

.subtitle {
  font-family: var(--font-family);
  font-size: 4dvh;
  margin-bottom: 5dvh;
  font-weight: 300;
  opacity: 0.8;
}

.button-container {
  display: flex;
  flex-direction: column;
  gap: 2dvh; /* Spazio tra i bottoni */
  width: 80%;
  max-width: 400px;
  text-align: center;
  margin-bottom: 5dvh;
  }

/* PULSANTI GENERICI TUTTI*/
.pulsante {
  --color: var(--pink);
  --colorhover: var(--violet);
  display: inline-block; /* Rende il link un blocco per l'applicazione di padding/margini */
  padding: 2.5dvh 2.5dvh;
  background-color: var(--color);
  color: white; 
  text-decoration: none; /* Rimuove la sottolineatura tipica dei link */
  border-radius: 4dvh; /* Bordi arrotondati */
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 3dvh;
}
.pulsante:hover {
  background-color: var(--colorhover); 
  transform: scale(1.1);
}
.pulsante:disabled {
  background: var(--yellow);
  cursor: default;
}

.pulsante--verde {
  --color: var(--lime);
  --colorhover: var(--yellow);
}
.pulsante--giallo {
  --color: var(--yellow);
  --colorhover: var(--pink);
}
.pulsante--viola {
  --color: var(--violet);
  --colorhover: var(--lime);
}
.pulsante--back {
  --color: var(--darkblue);
  color: white;
}
.pulsante--back:hover {
  background: var(--lime);
  color: var(--darkblue);
}

/* Pulsanti livelli in home*/
.gigacontainer {
  display: flex;
  flex-direction: row; /* Di base sono affiancati (PC) */
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.gigapulsante {
  --color: var(--lime);
  display: inline-block; /* Rende il link un blocco per l'applicazione di padding/margini */
  padding: 1rem 1.5rem;
  background-color: white;
  color: var(--color); 
  text-decoration: none; /* Rimuove la sottolineatura tipica dei link */
  border-radius: 0.5rem; 
  border: 0.3rem solid var(--color);
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 4dvh;
  width: 25dvh;
  height: 30dvh;
  margin-left: 3rem;
  margin-right: 3rem;
}

.gigapulsante:hover {
  background-color: var(--color); 
  border: 0.3rem solid white;
  color: white;
  transform: scale(1.1);
}
.gigapulsante--rosa {
  --color: var(--pink);
}
.gigapulsante--viola {
  --color: var(--violet);
}

.gigapulsante img {
    max-height: 80%; /* L'immagine occupa al massimo del pulsante */
    width: auto;
}


/* Animazione di battito per il titolo */
@keyframes pulse {
  0% {
    transform: scale(1);
  } /* Stato iniziale */
  40% {
    transform: scale(1);
  } /* Inizio espansione */
  70% {
    transform: scale(1.05);
  } /* Stato di massima espansione/battito */
  100% {
    transform: scale(1);
  } /* Ritorno allo stato iniziale */
}

.pulsating-text {
  font-family: var(--font-family);
  font-size: 8dvh;
  font-weight: bold;
  color: white; 
  text-align: center;
  /*margin-top: 5rem;*/
  /* Applica l'animazione:
    - 'pulse' è il nome definito sopra
    - '1s' è la durata
    - 'ease-in-out' è la curva di velocità
    - 'infinite' per ripeterla all'infinito */
  animation: pulse 1.5s ease-in-out infinite;
}


/*Toolbar settings etc*/
/* Contenitore in alto a destra */
.top-right-toolbar {
    position: fixed;
    top: 2dvh;
    right: 2vw;
    display: flex;
    gap: 10px; /* Spazio tra i bottoni */
    z-index: 1000; /* Sempre sopra tutto */
}

/* Contenitore in alto a sinistra */
.top-left-toolbar {
    position: fixed;
    top: 2dvh;
    left: 2vw;
    display: flex;
    gap: 10px; /* Spazio tra i bottoni */
    z-index: 1000; /* Sempre sopra tutto */
}

/* Stile base per i mini pulsanti */
.mini-btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0.01rem solid white;
    border-radius: 8px;
    background-color: var(--darkblue);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mini-btn:hover {
    background-color: var(--pink);
    transform: scale(1.1);
}

/* GAME PART */ 
.game-frame {
  width: 50dvw;
  height: 80dvh;
  background: white;
  border: 0.3rem solid var(--darkblue);
  border-radius: 1rem;
  padding: 1.5rem;
}

.game-title {
  font-family: var(--font-family);
  text-align: center;
  font-size: 4dvh;
  color: var(--darkblue);
  margin-bottom: 0.5rem;
}
.game-subtitle {
  font-family: var(--font-family);
  text-align: center;
  font-size: 3dvh;
  color: var(--darkblue);
  margin-bottom: 0.5rem;
}

/* LED */
.led-row {
  display: flex;
  gap: 15dvh;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}
.led {
  width: 5dvh;
  height: 5dvh;
  border-radius: 50%;
  background: var(--darkblue);
  transition: 0.15s;
}
.led--active {
  background: var(--lime);
  box-shadow: 0 0 5dvh var(--lime);
}
.led--listen {
  background: var(--pink);
  box-shadow: 0 0 5dvh var(--pink);
}


/* PLAYER PANEL */
.player-panel {
  border: 3px solid var(--darkblue);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.status-text {
  font-family: var(--font-family);
  font-size: 5dvh;
  margin-top: 4dvh;
  color: var(--violet);
}

/* HIT BUTTON */
.single-btn-wrapper {
  display: flex;
  justify-content: center;
}

.hit-btn-big {
  font-family: var(--font-family);
  color: var(--darkblue);
  padding: 18px 40px;
  font-size: 1.3rem;
  font-weight: bold;
  border-radius: 999px;
  border: 3px solid var(--darkblue);
  background: white;
  cursor: pointer;
  transition: 0.12s;
  margin-top: 4dvh;
}

.hit-btn-big:active {
  transform: translateY(1px) scale(0.97);
}

.hit-btn-big--correct {
  background: var(--lime) !important;
}

.hit-btn-big--wrong {
  background: var(--pink) !important;
}

/* VITE */
.life-heart {
  display: inline-block;
  margin: 0 1dvh;
  transition: transform 0.2s;
}

.life-heart.lost {
  animation: heartBreak 0.35s forwards;
}

@keyframes heartBreak {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.3) rotate(0deg); color: #ff0000; }
  100% { transform: scale(0) rotate(-45deg); opacity: 0; }
}

#lives {
  margin-top: 1dvh;
  margin-bottom: 1dvh;
  display: flex;
  gap: 1dvw; 
  align-items: center;
  justify-content: center;
}

.heart-icon {
  height: 10dvh; 
  width: auto;
  max-height: 300px; /* Limite massimo per PC */
  image-rendering: pixelated; /* Se sono icone in pixel art, rimarranno nitide */
}


.info-row {
  position: fixed;
  bottom: 8dvh;
  left: 30dvw;
  right: 30dvw;
  font-family: var(--font-family);
  display: flex;
  justify-content: space-between;
  font-size: 3dvh;
  color: var(--darkblue);
}

.small-note {
  font-family: var(--font-family);
  font-size: 0.75rem;
  color: var(--darkblue);
}

.pixel-art {
  
  display: block;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin: 1dvh auto;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated; 
  image-rendering: -moz-crisp-edges; /* Per Firefox */

  }


#leaderboardList ol li {
  margin: 6px 0;
}


