:root {
  color-scheme: dark;
  font-family: 'Instrument Sans', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  color: #f1faf5;
  background: #061211;
  --mint: #a6f3cd;
  --muted: #acbfb8;
  --edge: rgba(185, 239, 217, .21);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; flex: none; }

.backdrop { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.exhibition {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
  animation: camera-drift 22s ease-in-out infinite alternate;
}
.background-blur {
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: .20;
}
.ambient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 77% 48%, rgba(124, 245, 209, .19), transparent 42%);
  mix-blend-mode: screen;
  animation: ambient-light 7s ease-in-out infinite alternate;
}
.backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 12, 12, .94), rgba(3, 12, 12, .7) 28%, transparent 65%),
    linear-gradient(0deg, rgba(3, 12, 12, .56), transparent 32%);
}
@keyframes camera-drift {
  from { transform: scale(1.025); }
  to { transform: translate3d(-1.5%, -.8%, 0) scale(1.10); }
}
@keyframes ambient-light {
  from { opacity: .24; }
  to { opacity: 1; }
}
.motion-paused :is(.exhibition, .ambient) { animation-play-state: paused; }

.layout {
  position: relative;
  display: grid;
  grid-template: auto 1fr auto / minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 36px clamp(32px, 5.6vw, 104px) 28px;
}
.brand { display: flex; align-items: center; gap: 13px; grid-column: 1 / -1; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--edge);
  border-radius: 11px;
  background: #132b26;
  color: var(--mint);
}
.brand-mark svg { width: 25px; height: 25px; }
.brand strong { display: block; font-size: 16px; letter-spacing: .08em; }
.brand div span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .22em; }

.login {
  align-self: center;
  width: min(100%, 424px);
  padding: 34px;
  border: 1px solid var(--edge);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(20, 43, 39, .94), rgba(7, 21, 20, .91) 80%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .40), inset 0 1px rgba(234, 255, 246, .07);
  backdrop-filter: blur(18px);
}
.login h1 { margin: 0; font-size: clamp(28px, 3.3vw, 38px); line-height: 1.18; letter-spacing: -.035em; }
.intro { margin: 12px 0 28px; color: var(--muted); font-size: 14px; line-height: 1.6; }
form, .field { display: grid; }
form { gap: 17px; }
.field { gap: 8px; }
label { font-size: 13px; font-weight: 650; }
.input-wrap {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding-inline-start: 14px;
  border: 1px solid var(--edge);
  border-radius: 9px;
  background: #071815;
  color: #92b7a9;
  transition: border-color .18s, box-shadow .18s;
}
.input-wrap:focus-within { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(166, 243, 205, .12); }
.input-wrap > svg { width: 17px; height: 17px; }
input {
  min-width: 0;
  width: 100%;
  padding: 12px;
  border: 0;
  background: transparent;
  color: #f1faf5;
  font-size: 16px;
  outline: none;
}
input::placeholder { color: #91a8a0; }
.password-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #a9c6bc;
}
.password-toggle:hover { color: var(--mint); }
.eye-slash, .play-icon { display: none; }
input[type='text'] + .password-toggle .eye-slash, .motion-paused .play-icon { display: block; }
.motion-paused .pause-icon { display: none; }
.error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 170, 154, .35);
  border-radius: 8px;
  background: rgba(255, 170, 154, .08);
  color: #ffb9ad;
  font-size: 13px;
  line-height: 1.5;
}
.submit {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  margin-top: 5px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 9px;
  background: linear-gradient(110deg, #c8f9dc, #8fe3bd);
  box-shadow: 0 7px 24px rgba(102, 227, 169, .15);
  color: #09251b;
  font-size: 15px;
  font-weight: 750;
  transition: filter .18s, box-shadow .18s;
}
.submit:hover { filter: brightness(1.08); box-shadow: 0 8px 28px rgba(102, 227, 169, .28); }
button:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

.motion-toggle {
  grid-column: 2;
  grid-row: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--edge);
  border-radius: 9px;
  background: rgba(7, 24, 21, .88);
  color: #d9eee6;
  font-size: 12px;
}
.motion-toggle svg { width: 16px; height: 16px; }
.motion-toggle:hover { color: var(--mint); border-color: var(--mint); }

@media (max-width: 720px) {
  .backdrop { height: 62svh; min-height: 340px; }
  .exhibition { object-position: 75% 44%; }
  .backdrop::after {
    background: linear-gradient(180deg, rgba(3, 12, 12, .68), transparent 32%, rgba(6, 18, 17, .5) 61%, #061211);
  }
  .layout { grid-template: auto 1fr auto / minmax(0, 1fr); gap: 14px; padding: 22px 18px; }
  .login { justify-self: center; margin-top: clamp(82px, 16svh, 155px); padding: clamp(20px, 6vw, 30px); }
  .motion-toggle { grid-column: 1; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  .motion-toggle { display: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
