@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --dark: #21002e;
  --pink: #e6007e;
  --pink-soft: #efb7d8;
  --input: #f8eff4;
  --border: #f3abd5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Nunito', Arial, sans-serif;
  color: var(--dark);
  background: #fff;
}

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.card {
  width: 360px;
  text-align: center;
  padding-top: 8px;
}

.screen { display: none; }
.screen.active { display: block; }

.logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 38px;
}

.logo span {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--pink);
  left: -10px;
  top: 9px;
}

h1 {
  font-size: 25px;
  line-height: 1.2;
  margin: 0 0 33px;
  font-weight: 700;
}

.intro {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.35;
}

.form {
  width: 305px;
  margin: 0 auto;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  height: 48px;
  border: 0;
  outline: 0;
  border-radius: 4px;
  background: var(--input);
  color: var(--dark);
  padding: 0 16px;
  margin-bottom: 16px;
  font-size: 16px;
  font-family: inherit;
}

input::placeholder { color: var(--dark); opacity: .95; }

.human-check {
  height: 88px;
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 25px;
  text-align: left;
  cursor: pointer;
  margin: 4px 0 20px;
  font-size: 16px;
  line-height: 1.25;
}

.human-check input { position: absolute; opacity: 0; }

.circle {
  width: 40px;
  height: 40px;
  border: 3px solid var(--pink);
  border-radius: 50%;
  flex: 0 0 40px;
  display: inline-block;
  position: relative;
}

.human-check input:checked + .circle::after {
  content: '';
  position: absolute;
  left: 10px;
  top: 5px;
  width: 12px;
  height: 20px;
  border-right: 4px solid var(--pink);
  border-bottom: 4px solid var(--pink);
  transform: rotate(42deg);
}

button {
  width: 100%;
  height: 48px;
  border-radius: 3px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.primary {
  border: 0;
  background: var(--pink-soft);
  color: #fff;
  margin-bottom: 11px;
}

.primary.enabled { background: var(--pink); }

.secondary {
  border: 1px solid var(--dark);
  background: #fff;
  color: var(--dark);
  margin-bottom: 17px;
}

.help {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

.error {
  display: none;
  margin: -8px 0 12px;
  font-size: 13px;
  color: var(--pink);
}

.error.show { display: block; }

.loader {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(255,255,255,.94);
  z-index: 10;
  color: var(--dark);
  font-size: 16px;
}

.loader.show { display: flex; }

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #f3c0dd;
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.token-screen { padding-top: 31px; }
.token-logo { font-size: 35px; margin-bottom: 28px; }
.token-logo span { width: 6px; height: 6px; left: -9px; top: 7px; }
.token-screen h1 { font-size: 25px; margin-bottom: 32px; }

.token-text {
  font-size: 15px;
  line-height: 1.35;
  margin: 0 0 94px;
}

.code-box {
  width: 264px;
  margin: 0 auto 68px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: 14px;
}

.code-box span {
  height: 26px;
  border-bottom: 1px solid var(--dark);
  font-size: 25px;
  color: var(--pink);
  font-weight: 800;
  line-height: 20px;
}

.keyboard {
  width: 300px;
  margin: 0 auto 41px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 19px;
  column-gap: 36px;
  align-items: center;
}

.keyboard button {
  height: 31px;
  border: none;
  background: transparent;
  color: var(--dark);
  font-size: 24px;
  line-height: 1;
  margin: 0;
}

.keyboard .backspace {
  width: 28px;
  height: 28px;
  justify-self: center;
  background: var(--dark);
  color: #fff;
  border-radius: 7px 4px 4px 7px;
  font-size: 18px;
}

.cancel {
  width: 296px;
  margin: 0 auto 14px;
  display: block;
  font-size: 16px;
}

#tokenError { margin-top: 8px; }

@media (max-width: 480px) {
  .card { width: 100%; padding: 12px 18px 0; }
  .form { width: min(305px, 100%); }
  .keyboard { width: min(300px, 100%); }
}
