/* Importa un font futuristico */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

/* Stili base */
body {
  background: radial-gradient(circle at center, #121212, #000000);
  color: #e0e0e0;
  font-family: 'Orbitron', sans-serif;
  text-align: center;
  margin: 0;
  padding: 20px;
}

.hidden {
  display: none;
}

/* Login e Classifica */
.login-container {
  max-width: 400px;
  margin: 0 auto;
  background: rgba(20, 20, 20, 0.8);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.login-container h1,
.login-container h2 {
  color: #00ffff;
}

.login-container input {
  padding: 10px;
  margin: 10px 0;
  width: 80%;
  border: 2px solid #00ffff;
  background: transparent;
  color: #e0e0e0;
  border-radius: 5px;
  outline: none;
  transition: border-color 0.3s;
}

.login-container input:focus {
  border-color: #ff00ff;
}

.login-container button {
  padding: 10px 20px;
  margin: 10px 5px;
  background: linear-gradient(45deg, #00ffff, #ff00ff);
  border: none;
  border-radius: 5px;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.login-container button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.7);
}

.error {
  color: #ff5555;
}

/* Contenitore principale del gioco */
.container {
  max-width: 800px;
  margin: 20px auto;
  position: relative;
  background: rgba(20, 20, 20, 0.85);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
}

/* Controlli del gioco */
.controls {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  margin-bottom: 20px;
}

.controls button {
  padding: 10px 20px;
  background: linear-gradient(45deg, #00ffff, #ff00ff);
  border: none;
  border-radius: 5px;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.controls button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.7);
}

#score-display {
  font-size: 20px;
  color: #ff00ff;
}

/* AREA DEL PENTAGRAMMA */
.staff {
  width: 100%;
  max-width: 800px;
  height: 200px;
  margin: 20px auto;
  border: 1px solid #00ffff;
  border-radius: 5px;
  background: white;
}

/* Tabella per l'inserimento delle sillabe */
.table-croce {
  border-collapse: collapse;
  margin: 20px auto;

  border-radius: 5px;
  overflow: hidden;
}

.table-croce td {
  width: 100px;
  height: 100px;
  text-align: center;
  /* I bordi verranno gestiti dinamicamente via JS, quindi qui li lasciamo neutri */
  border: none;
  position: relative;
  overflow: hidden;
  transition: background 0.3s, color 0.3s;
}

/* Esempio di stile per celle editabili al focus */
.table-croce td:focus {
  outline: none;
  background: rgba(0, 255, 255, 0.2);
  color: #00ffff;
}

/* Pulsante disabilitato */
.btn-disabled {
  background-color: #aaa;
  color: #666;
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
  transition: background-color 0.3s, opacity 0.3s;
}

/* Animazione per il punteggio in floating */
@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) rotate(0deg);
  }
  25% {
    transform: translateX(-50%) translateY(-40px) rotate(5deg);
  }
  50% {
    transform: translateX(-50%) translateY(-80px) rotate(-5deg);
  }
  75% {
    transform: translateX(-50%) translateY(-120px) rotate(5deg);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-160px) rotate(0deg);
  }
}

.floating-score {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%);
  font-size: 100px;
  font-weight: bold;
  color: #ff00ff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: floatUp 5s ease-out forwards;
  pointer-events: none;
}

/* Classifica */
#leaderboardContainer {
  margin-top: 20px;
}

#leaderboardContainer ul {
  list-style: none;
  padding: 0;
}

#leaderboardContainer li {
  margin: 5px 0;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 3px;
  color: #00ffff;
}
@keyframes bgMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Classe da aggiungere per attivare l'animazione */
@keyframes bgMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.bg-animated {
  background: linear-gradient(-45deg, #121212, #1a1a2e, #000000, #272727);
  background-size: 600% 600%;
  animation: bgMove 20s ease infinite;
}




/* Media Query per mobile */
@media (max-width: 600px) {
  .staff {
    height: 150px;
  }
  .controls button,
  .controls div {
    font-size: 14px;
  }
  .table-croce td {
    width: 60px;
    height: 60px;
  }
}

.credits {
    font-size: 12px;
    color: #aaa;
    text-align: center;
    margin-top: 20px;
}

.credits a {
    color: #00ffff;
    text-decoration: none;
}

.credits a:hover {
    text-decoration: underline;
}
        .modal {
            display: none; /* Inizialmente nascosto */
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5); /* Sfondo scuro trasparente */
        }

        .modal-content {
            background-color: white;
            width: 40%;
            margin: 15% auto;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
            text-align: center;
        }

        .modal-header {
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .modal-body {
            font-size: 16px;
            margin-bottom: 20px;
        }

        .modal-footer {
            display: flex;
            justify-content: center;
            gap: 10px;
        }

        /* Stile per i pulsanti */
        .btnModal {
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
        }

        .btn-primary {
            background-color: #007bff;
            color: white;
        }

        .btn-success {
            background-color: #28a745;
            color: white;
        }

        .btn-secondary {
            background-color: #6c757d;
            color: white;
        }

        .btnModal:hover {
            opacity: 0.8;
        }

