* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0d14;
  color: #f2f2f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  padding: 24px;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 20%, rgba(88, 101, 242, 0.25), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(235, 87, 190, 0.18), transparent 45%);
  animation: drift 12s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, -20px, 0) scale(1.05); }
}

.card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.card.wide {
  max-width: 720px;
}

.card.leaving {
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: 22px;
  margin: 0 0 6px;
  font-weight: 600;
}

.subtitle {
  margin: 0 0 28px;
  color: rgba(242, 242, 247, 0.55);
  font-size: 14px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input[type="text"] {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px 16px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

input[type="text"]:focus {
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.08);
}

button {
  background: #5865f2;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

button:hover {
  background: #4752c4;
}

button:active {
  transform: scale(0.97);
}

.error {
  min-height: 18px;
  color: #ff6b6b;
  font-size: 13px;
  margin: 12px 0 0;
}

.hello {
  margin: 0 0 20px;
  font-size: 15px;
  color: rgba(242, 242, 247, 0.75);
}

.hello span {
  color: #5865f2;
  font-weight: 600;
}

.video-wrapper {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

video {
  width: 100%;
  display: block;
  border-radius: 14px;
}

.lock-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.lock-hint.shake {
  animation: shake 0.4s ease;
  color: #ff8080;
  border-color: rgba(255, 107, 107, 0.4);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.progress-bar {
  margin-top: 16px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #5865f2, #eb57be);
  transition: width 0.2s linear;
}

.code-reveal {
  margin-top: 28px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.code-reveal.hidden {
  display: none;
}

.code-reveal.show {
  max-height: 240px;
  opacity: 1;
}

.code-box {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.code-title {
  margin: 0 0 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6ee7a7;
}

.code-label {
  margin: 0 0 14px;
  font-size: 14px;
  color: rgba(242, 242, 247, 0.6);
}

.code-value {
  margin: 0;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: linear-gradient(90deg, #5865f2, #eb57be);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
