:root {
  --bg: #130814;
  --text: #fff4fa;
  --muted: #d2bfd0;
  --line: rgba(255, 146, 186, 0.16);
  --line-strong: rgba(255, 146, 186, 0.28);
  --panel: rgba(23, 7, 24, 0.84);
  --panel-strong: rgba(31, 10, 33, 0.92);
  --primary: #ff5ea0;
  --primary-hover: #ff78b6;
  --secondary: #b96cff;
  --danger: #ff7d9f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --control-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  --control-fill: rgba(255, 214, 234, 0.055);
  --control-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Manrope", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 86, 143, 0.26), transparent 27%),
    radial-gradient(circle at 84% 14%, rgba(164, 99, 255, 0.3), transparent 29%),
    radial-gradient(circle at 50% 48%, rgba(124, 62, 110, 0.34), transparent 38%),
    radial-gradient(circle at 50% 76%, rgba(255, 127, 172, 0.14), transparent 40%),
    linear-gradient(150deg, #26111f 0%, #38203a 38%, #46294a 62%, #281520 100%);
  pointer-events: none;
}

a,
button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-page {
  min-height: 100vh;
  max-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.showcase-panel {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 74, 167, 0.28), transparent 26%),
    radial-gradient(circle at 78% 16%, rgba(185, 108, 255, 0.26), transparent 24%),
    radial-gradient(circle at 50% 48%, rgba(112, 44, 94, 0.22), transparent 32%),
    radial-gradient(circle at 50% 68%, rgba(255, 128, 172, 0.14), transparent 30%),
    linear-gradient(145deg, #43203e 0%, #663159 38%, #2c1425 100%);
}

.showcase-panel__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-panel__inner--center {
  justify-content: center;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  z-index: 1;
}

.blob--top {
  top: 18%;
  right: 16%;
  width: 260px;
  height: 260px;
  background: rgba(219, 39, 119, 0.18);
}

.blob--bottom {
  left: 10%;
  bottom: 12%;
  width: 360px;
  height: 360px;
  background: rgba(185, 108, 255, 0.16);
}

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: transparent;
}

.form-shell {
  width: 100%;
  max-width: 420px;
  padding: 38px 34px 30px;
  border: 1px solid rgba(255, 146, 186, 0.12);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(20, 8, 22, 0.78);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(22px);
}

.brand {
  display: none;
}

.form-header {
  margin-bottom: 36px;
  text-align: left;
}

.form-header h1 {
  margin: 0 0 8px;
  font-size: 52px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-title {
  display: inline-block;
  position: relative;
  color: var(--text);
}

.hero-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background-image: linear-gradient(135deg, #fff4fa 0%, #fff4fa 28%, #ff5ea0 44%, #b96cff 54%, #ff89bf 62%, #fff4fa 76%, #fff4fa 100%);
  background-size: 240% 240%;
  background-position: 0% 0%;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0;
  pointer-events: none;
  will-change: background-position, opacity, filter;
}

.hero-title.is-animating::after {
  opacity: 1;
  animation: title-glow-sweep 980ms linear forwards;
}

@keyframes title-glow-sweep {
  0% {
    background-position: 0% 0%;
    opacity: 0;
    filter: drop-shadow(0 0 0 rgba(255, 94, 160, 0));
  }

  12% {
    opacity: 1;
  }

  58% {
    background-position: 60% 60%;
    opacity: 1;
    filter: drop-shadow(0 10px 22px rgba(255, 94, 160, 0.28));
  }

  100% {
    background-position: 100% 100%;
    opacity: 0;
    filter: drop-shadow(0 0 0 rgba(255, 94, 160, 0));
  }
}

.form-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-size: 14px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(255, 146, 186, 0.12);
  border-radius: 18px;
  padding: 0 14px;
  background: var(--control-bg), var(--control-fill);
  color: var(--text);
  box-shadow: var(--control-shadow);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field input:hover {
  border-color: rgba(255, 146, 186, 0.22);
}

.field input:focus {
  outline: none;
  border-color: rgba(255, 146, 186, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(255, 222, 238, 0.075);
  box-shadow:
    0 0 0 2px rgba(255, 94, 160, 0.1),
    0 12px 28px rgba(0, 0, 0, 0.2);
}

.field input::placeholder {
  color: rgba(255, 233, 243, 0.38);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 72px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.toggle-password:hover {
  background: rgba(255, 94, 160, 0.12);
  color: var(--primary);
  transform: translateY(-50%) scale(1.02);
}

.icon-eye {
  width: 18px;
  height: 18px;
}

.icon-eye--closed {
  display: none;
}

.toggle-password.is-visible .icon-eye--open {
  display: none;
}

.toggle-password.is-visible .icon-eye--closed {
  display: block;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 236, 244, 0.74);
}

.remember input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.inline-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.inline-link:hover,
.form-footer a:hover {
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: none;
}

.error-box {
  display: none;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 125, 159, 0.26);
  background: rgba(255, 125, 159, 0.08);
  color: var(--danger);
  font-size: 14px;
}

.error-box.is-visible {
  display: block;
}

.primary-button {
  width: 100%;
  height: 48px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.primary-button {
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.24),
    0 0 24px rgba(255, 94, 160, 0.18);
}

.primary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.28),
    0 0 30px rgba(255, 94, 160, 0.22);
}

.form-footer {
  margin: 4px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.form-footer a {
  color: rgba(255, 244, 250, 0.92);
  text-decoration: none;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(16, 6, 18, 0.94);
  border: 1px solid rgba(255, 146, 186, 0.18);
  color: #ffffff;
  font-size: 14px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .showcase-panel {
    display: none;
  }

  html,
  body {
    overflow: auto;
  }

  .form-panel {
    min-height: 100vh;
  }
}

@media (max-width: 520px) {
  .form-panel {
    padding: 24px;
  }

  .form-header {
    margin-bottom: 32px;
  }

  .form-header h1 {
    font-size: 42px;
  }

  .field-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}
