* { margin: 0; padding: 0; box-sizing: border-box; }

body { background: #000; font-family: Arial, sans-serif; }

#vault-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

#door-wrap {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transform-origin: left center;
  transition: transform 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#door-wrap.open {
  transform: perspective(1200px) rotateY(-110deg);
}

#vault-door {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

#overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 8;
}

#keypad-wrap {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.vault-label {
  font-size: 11px;
  letter-spacing: 8px;
  color: #999;
  text-transform: uppercase;
}

.keypad-box {
  background: rgba(8,8,8,0.88);
  border: 1px solid #555;
  border-radius: 12px;
  padding: 20px;
  width: 220px;
}

.code-display {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}

.digit-slot {
  width: 38px;
  height: 46px;
  background: #111;
  border: 1px solid #444;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: #c8a84b;
  transition: border-color 0.2s;
}

.digit-slot.active { border-color: #c8a84b; }

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.key-btn {
  background: #1e1e1e;
  border: 1px solid #444;
  border-radius: 7px;
  color: #ccc;
  font-size: 17px;
  font-weight: bold;
  height: 44px;
  cursor: pointer;
}

.key-btn:hover { background: #2e2e2e; }
.key-btn.del { font-size: 12px; color: #888; }
.key-btn.zero { grid-column: 2; }

.status-msg {
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #555;
  text-align: center;
  min-height: 16px;
}

.status-msg.unlocking { color: #c8a84b; }
.status-msg.granted { color: #6aaa6a; }

#welcome-screen {
  position: absolute;
  inset: 0;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s ease;
  z-index: 20;
}

#welcome-screen.visible { opacity: 1; pointer-events: all; }

.welcome-title {
  font-size: 42px;
  font-weight: bold;
  color: #c8a84b;
  letter-spacing: 10px;
  text-transform: uppercase;
}

.welcome-sub {
  font-size: 12px;
  letter-spacing: 5px;
  color: #666;
  text-transform: uppercase;
}

/* ─── MOBILE (phones 480px and under) ─── */
@media (max-width: 480px) {

  #keypad-wrap {
    width: 90%;
    gap: 10px;
  }

  .vault-label {
    font-size: 10px;
    letter-spacing: 5px;
  }

  .keypad-box {
    width: 100%;
    padding: 16px;
  }

  .code-display {
    gap: 6px;
    margin-bottom: 12px;
  }

  .digit-slot {
    width: 42px;
    height: 50px;
    font-size: 22px;
    flex: 1;
  }

  .keypad-grid {
    gap: 8px;
  }

  .key-btn {
    height: 52px;
    font-size: 18px;
    border-radius: 8px;
  }

  .status-msg {
    font-size: 9px;
    letter-spacing: 2px;
  }

  .welcome-title {
    font-size: 28px;
    letter-spacing: 6px;
  }

  .welcome-sub {
    font-size: 10px;
    letter-spacing: 3px;
  }

}