body {
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', sans-serif;
  background: radial-gradient(ellipse at top, #0a0a0a 0%, #000000 100%);
  color: #ffffff;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bat-container {
  text-align: center;
  padding: 30px;
  animation: fadeIn 2.5s ease-out;
}

.title {
  font-size: 2.8rem;
  color: #ffde59;
  text-shadow: 0 0 15px #ffde59aa;
  animation: pulseGlow 2s infinite ease-in-out;
}

.subtitle {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: #ccc;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-box {
  background: #111;
  border: 2px solid #ffde59;
  padding: 30px 40px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 20px #ffde59aa;
  animation: fadeIn 0.6s ease-out;
}
.secret-input {
  display: block;
  margin: 25px auto 0;
  padding: 12px 18px;
  font-size: 1.1rem;
  background-color: #0a0a0a;
  color: #ffde59;
  border: 2px solid #ffde59;
  border-radius: 6px;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  width: 280px;
  box-shadow: 0 0 10px #ffde59aa;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease-out forwards 0.5s;
}

.final-message {
  color: #ffde59;
  animation: textReveal 1s ease-out;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes textReveal {
  0% {
    opacity: 0;
    letter-spacing: 0.2em;
  }
  100% {
    opacity: 1;
    letter-spacing: normal;
  }
}

.popup-box p {
  color: #ffde59;
  font-size: 1.2rem;
  margin-bottom: 20px;
}
.logo {
  max-height: 120px;
  opacity: 0.1;
  animation: blink 1s steps(5, start) infinite;
  transition: opacity 1.5s ease-in-out;
}

.logo.visible {
  animation: none;
  opacity: 1;
}

@keyframes blink {
  to {
    visibility: hidden;
  }
}
@-webkit-keyframes blink {
  to {
    visibility: hidden;
  }
}


.secret-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0px;
  width:100%;
}

.secret-btn {
  margin-top: 15px;
  background: #ffde59;
  color: #000;
  border: none;
  padding: 10px 24px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-family: 'Orbitron', sans-serif;
  box-shadow: 0 0 10px #ffde59aa;
  animation: fadeInUp 1s ease-out forwards 0.7s;
}

.secret-btn:hover {
  background: #fff176;
  box-shadow: 0 0 25px #ffde59;
}

.error-message {
  color: red;
  margin-top: 10px;
  font-size: 0.95rem;
  height: 1.2em;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}


.input-error {
  border-color: red;
  box-shadow: 0 0 15px red;
  animation: pulseRed 0.8s ease-in-out;
}

@keyframes pulseRed {
  0% {
    box-shadow: 0 0 0 red;
  }
  50% {
    box-shadow: 0 0 20px red;
  }
  100% {
    box-shadow: 0 0 0 red;
  }
}

.shake {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.popup-box button {
  background: #ffde59;
  color: #000;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.popup-box button:hover {
  background: #fff176;
}

body.error-mode {
  animation: flashRed 0.4s ease;
  background: radial-gradient(ellipse at top, #3b0000 0%, #000000 100%);
}

@keyframes flashRed {
  0% { background-color: #300; }
  50% { background-color: #600; }
  100% { background-color: #000; }
}

.glitch-text {
  color: red;
  font-weight: bold;
  position: relative;
  animation: glitch 0.3s linear;
}

@keyframes glitch {
  0% { transform: translateX(0); }
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

.error-type {
  font-size: 1.1rem;
  color: #ff4d4d;
  text-shadow: 0 0 8px #ff0000;
  font-style: italic;
  animation: typeIn 1s steps(30, end) forwards;
  opacity: 0;
  white-space: normal; /* Permette l'andata a capo */
  overflow: hidden;
  display: inline-block;
  text-align: center;
  max-width: 90vw;
  line-height: 1.4;
}

@keyframes typeIn {
  0% { width: 0; opacity: 1; }
  100% { width: 100%; opacity: 1; }
}

.audio-btn {
  margin-top: 30px;
  background: #ffde59;
  color: #000;
  font-size: 16px;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 15px #ffde59aa;
  transition: all 0.3s ease;
}
.audio-btn:hover {
  background: #fff176;
  box-shadow: 0 0 25px #ffde59;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.time-box {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #ffde59;
  border-radius: 12px;
  padding: 25px;
  min-width: 100px;
  box-shadow: 0 0 20px #ffde5960;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.time-box:hover {
  transform: scale(1.1) rotate(-1deg);
  box-shadow: 0 0 30px #ffde59;
}

.time-box span {
  font-size: 2.5rem;
  display: block;
  color: #ffde59;
}

.time-box small {
  margin-top: 8px;
  display: block;
  color: #aaa;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    text-shadow: 0 0 10px #ffde59, 0 0 20px #ffde59aa;
  }
  50% {
    text-shadow: 0 0 25px #ffde59, 0 0 35px #ffde59aa;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .title {
    font-size: 2rem;
  }

  .countdown {
    gap: 15px;
  }

  .time-box {
    padding: 15px;
    min-width: 80px;
  }

  .time-box span {
    font-size: 2rem;
  }
}
