:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #090a0f;
  color: #f1f5f9;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 105%, rgba(16, 18, 26, 0.92), transparent 48%),
    #090a0f;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: min(760px, 90vw);
  height: min(620px, 78vh);
  top: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.16), rgba(2, 132, 199, 0.035) 42%, transparent 70%);
  filter: blur(16px);
  animation: ambient 10s ease-in-out infinite alternate;
}

.studio-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  padding: 5px 11px;
  border: 1px solid #1e2230;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #8491a6;
  font-size: 11px;
  font-weight: 500;
}

.studio-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  animation: pulse 2.2s ease-in-out infinite;
}

.auth-shell {
  width: min(100%, 380px);
}

.card {
  padding: 32px;
  border: 1px solid #1e2230;
  border-radius: 12px;
  background: rgba(16, 18, 26, 0.97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
}

.header {
  margin-bottom: 27px;
}

.arc-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 17px;
  border: 1px solid rgba(2, 132, 199, 0.32);
  border-radius: 9px;
  background: rgba(2, 132, 199, 0.1);
}

.arc-mark svg {
  width: 27px;
  height: 27px;
}

.arc-mark path {
  stroke: #38bdf8;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: mark 4s ease-in-out infinite alternate;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-bottom: 6px;
  color: #f1f5f9;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 16px;
}

#page-subtitle,
.signed-in,
.panel > p {
  color: #8491a6;
  font-size: 13px;
  line-height: 1.5;
}

.panel {
  display: grid;
  gap: 18px;
}

.hidden {
  display: none !important;
}

.field {
  display: grid;
  gap: 7px;
}

.signup-fields {
  display: grid;
  gap: 18px;
}

.field-note {
  color: #647086;
  font-size: 10px;
  line-height: 1.4;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

label {
  color: #e7edf5;
  font-size: 12px;
  font-weight: 550;
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #1e2230;
  border-radius: 8px;
  outline: none;
  background: rgba(0, 0, 0, 0.22);
  color: #f1f5f9;
  font-size: 14px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder {
  color: #4f596b;
}

input:focus {
  border-color: #38bdf8;
  background: rgba(0, 0, 0, 0.38);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.primary,
.secondary {
  width: 100%;
  height: 42px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary {
  background: #f1f5f9;
  color: #090a0f;
}

.primary:hover {
  transform: translateY(-1px);
  background: #fff;
}

.secondary {
  border: 1px solid #1e2230;
  background: transparent;
  color: #e7edf5;
}

.secondary:hover {
  border-color: #2b3040;
  background: #161924;
}

.text-button {
  padding: 0;
  background: transparent;
  color: #8491a6;
  font-size: 12px;
}

.text-button:hover {
  color: #f1f5f9;
}

.logout {
  justify-self: center;
}

.divider {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #647086;
  font-size: 11px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #1e2230;
}

.pin {
  height: 60px;
  padding-left: 0.42em;
  text-align: center;
  color: #f1f5f9;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.42em;
}

.message {
  min-height: 19px;
  margin-top: 18px;
  color: #8491a6;
  font-size: 12px;
  line-height: 1.45;
}

.message:empty {
  display: none;
}

.message.error {
  color: #fb7185;
}

.message.success {
  color: #6ee7b7;
}

.privacy {
  margin-top: 20px;
  color: #596377;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
}

code {
  color: #7dd3fc;
}

.entrance {
  opacity: 0;
  animation: enter 620ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-shell {
  animation-delay: 80ms;
}

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

@keyframes ambient {
  from { transform: translate(-3%, -1%) scale(0.96); opacity: 0.72; }
  to { transform: translate(3%, 2%) scale(1.06); opacity: 1; }
}

@keyframes pulse {
  50% { opacity: 0.42; transform: scale(0.86); }
}

@keyframes mark {
  from { opacity: 0.72; }
  to { opacity: 1; filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.38)); }
}

@media (max-width: 440px) {
  body {
    justify-content: flex-start;
    padding-top: 44px;
  }

  .card {
    padding: 26px 22px;
  }
}