/* Neuer Tresor mit Zifferntasten – voll responsiv & EXTRA kompakt auf kleinen Smartphones */
.new-tresor-wrapper {
  display: flex;
  justify-content: center;
  padding: 15px 8px;          /* Weniger Padding */
  background: linear-gradient(to bottom, #111, #000);
  border-radius: 16px;
  margin: 15px auto;
  max-width: 440px;           /* Etwas schmaler */
  box-shadow: 0 8px 25px rgba(0,0,0,0.8);
}

.new-tresor {
  width: 100%;
  text-align: center;
  font-family: 'Courier New', monospace;
}

.new-tresor-title {
  color: #0f0;
  font-size: 22px;            /* Kleiner Titel */
  margin-bottom: 15px;
  text-shadow: 0 0 12px #0f0;
}

.new-tresor-display {
  background: #000;
  color: #0f0;
  font-size: 42px;            /* Kleineres Display */
  font-weight: bold;
  letter-spacing: 10px;
  padding: 15px;              /* Weniger Innenabstand */
  margin: 15px auto;
  width: 85%;
  max-width: 320px;
  border: 3px solid #333;
  border-radius: 10px;
  box-shadow: inset 0 0 18px #0f0, 0 0 25px rgba(0,255,0,0.3);
  text-align: center;
}

.new-tresor-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;                  /* Kleinerer Abstand zwischen Tasten */
  max-width: 320px;
  margin: 0 auto;
  padding: 8px;
}

.key {
  background: linear-gradient(to bottom, #444, #222);
  color: #fff;
  font-size: 28px;            /* Kleinere Zahlen */
  font-weight: bold;
  height: 68px;               /* Niedrigere Tasten – besser tippbar auf klein */
  border-radius: 10px;
  border: none;
  box-shadow: 0 5px 10px rgba(0,0,0,0.6);
  cursor: pointer;
  transition: all 0.1s;
}

.key:active {
  transform: translateY(3px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.6);
  background: linear-gradient(to bottom, #333, #111);
}

.key.clear {
  background: linear-gradient(to bottom, #a33, #700);
  grid-column: 1 / 2;
}

.key.enter {
  background: linear-gradient(to bottom, #0a0, #070);
  grid-column: 3 / 4;
}

.new-tresor-status {
  margin-top: 20px;           /* Weniger Abstand oben */
  font-size: 32px;
  font-weight: bold;
  min-height: 50px;
  opacity: 0;
  transition: opacity 0.6s;
}

.new-tresor-status.success {
  color: #0f0;
  text-shadow: 0 0 25px #0f0;
  opacity: 1;
}

.new-tresor-status.fail {
  color: #f33;
  text-shadow: 0 0 25px #f33;
  opacity: 1;
}

/* Speziell für sehr kleine Smartphones (z. B. iPhone SE, alte Androids) */
@media (max-width: 380px) {
  .new-tresor-wrapper {
    padding: 10px 5px;
    margin: 10px auto;
    max-width: 100%;
    border-radius: 12px;
  }

  .new-tresor-title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .new-tresor-display {
    font-size: 32px;
    letter-spacing: 6px;
    padding: 12px;
    margin: 12px auto;
    max-width: 280px;
    border: 2px solid #333;
  }

  .new-tresor-keypad {
    gap: 8px;
    max-width: 280px;
    padding: 5px;
  }

  .key {
    height: 58px;
    font-size: 24px;
    border-radius: 8px;
  }

  .new-tresor-status {
    font-size: 28px;
    margin-top: 15px;
  }
}

/* Zusätzlich für extrem kleine Bildschirme */
@media (max-height: 600px) and (orientation: portrait) {
  .new-tresor-wrapper {
    padding: 8px;
  }
  .key {
    height: 55px;
  }
}