:root {
  --bg-1: #07120b;
  --bg-2: #020603;
  --matrix-main: #58f58a;
  --matrix-glow: #b5ffcd;
  --accent: #ffd8a8;
  --text-main: #fff8ef;
  --text-muted: #e9dac6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", "Trebuchet MS", "Verdana", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 20% 20%, #173825 0%, transparent 45%),
    radial-gradient(circle at 80% 0%, #2e1e14 0%, transparent 35%),
    linear-gradient(150deg, var(--bg-1), var(--bg-2));
  overflow: hidden;
}

#matrix-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  opacity: 0.85;
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: min(100% - 2rem, 900px);
  margin: 0 auto;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  animation: lift-in 1.2s ease-out;
}

.title {
  margin: 0;
  font-family: "Segoe Script", "Brush Script MT", "Comic Sans MS", cursive;
  font-size: clamp(3rem, 9vw, 6.7rem);
  line-height: 1;
  color: #fff5e8;
  text-shadow:
    0 0 22px rgba(255, 216, 168, 0.34),
    0 8px 30px rgba(0, 0, 0, 0.52);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  animation: title-rise 1.2s cubic-bezier(0.21, 1.02, 0.28, 1) 0.45s forwards;
}

.message {
  margin: 1.2rem auto 0;
  max-width: 42ch;
  color: var(--text-muted);
  font-weight: 600;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  line-height: 1.6;
  min-height: 5.8em;
  white-space: pre-line;
  opacity: 0;
  animation: fade-up 0.9s ease-out 0.9s forwards;
}

.unlock-panel {
  margin-top: 1.25rem;
  width: min(92vw, 560px);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 280ms ease, transform 280ms ease;
}

.unlock-panel.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.unlock-label {
  margin: 0 0 0.65rem;
  color: #f4d2d2;
  font-size: clamp(0.9rem, 2vw, 1rem);
  font-weight: 600;
}

.unlock-controls {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
}

.password-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 182, 182, 0.45);
  border-radius: 999px;
  background: rgba(24, 5, 5, 0.58);
  color: #ffeaea;
  padding: 0.72rem 0.95rem;
  font: inherit;
  outline: none;
}

.password-input::placeholder {
  color: rgba(255, 223, 223, 0.58);
}

.password-input:focus {
  border-color: rgba(255, 210, 210, 0.78);
  box-shadow: 0 0 0 2px rgba(255, 120, 120, 0.22);
}

.unlock-button {
  border: 1px solid rgba(255, 207, 207, 0.62);
  border-radius: 999px;
  padding: 0.72rem 1.05rem;
  font: inherit;
  font-weight: 700;
  color: #fff5f5;
  background: linear-gradient(165deg, rgba(255, 122, 122, 0.35), rgba(255, 77, 77, 0.15));
  transition: opacity 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.unlock-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.unlock-button:not(:disabled) {
  cursor: pointer;
}

.unlock-button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.password-status {
  min-height: 1.2em;
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: rgba(255, 222, 222, 0.9);
}

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes title-rise {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .hero {
    width: min(100% - 1.2rem, 900px);
    padding: 1.5rem 1rem;
  }

  .message {
    max-width: 30ch;
  }

  .unlock-controls {
    flex-direction: column;
  }

  .unlock-button,
  .password-input {
    width: 100%;
  }
}
