/* Reset base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* Rimuove il flash blu al tap su mobile */
}

body, html {
  width: 100%;
  height: 100%;
  background-color: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden; /* Evita lo scroll */
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #000;
  z-index: 10;
}

.hidden {
  display: none !important;
}

/* Schermata iniziale */
#start-screen h1 {
  font-size: 24px;
  margin-bottom: 10px;
  text-align: center;
}

#start-screen p {
  color: #aaa;
  margin-bottom: 30px;
  text-align: center;
}

button {
  background-color: #333;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 15px 30px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:active {
  background-color: #555;
}

/* Barra di stato superiore (Orologio e batteria) */
#status-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

#clock {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

#battery {
  display: flex;
  align-items: center;
}

/* Area centrale (Schermata app) */
.center-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.instruction-text {
  color: #888;
  margin-bottom: 30px;
  font-size: 16px;
  text-align: center;
}

/* Area di estrazione (Pulsante + margine per i click "sbagliati") */
#extract-area {
  padding: 40px; /* Area cliccabile extra attorno al bottone */
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 20px;
  /* Uncomment the next line to debug the invisible area */
  /* background: rgba(255, 0, 0, 0.1); */ 
}

#btn-extract {
  background-color: #1a1a1a;
  border: 1px solid #333;
  padding: 20px 40px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  pointer-events: none; /* Facciamo in modo che il click sia intercettato da extract-area */
}

/* Schermata Risultato */
#result-screen {
  background-color: #000;
  z-index: 30;
}

#card-image {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: 10px;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
