:root {
  --bg: #07090d;
  --surface: rgba(15, 19, 27, 0.78);
  --surface-strong: rgba(20, 25, 35, 0.92);
  --border: rgba(255, 255, 255, 0.09);
  --border-focus: rgba(184, 243, 107, 0.55);
  --text: #f3f5f8;
  --text-muted: #98a2b3;
  --text-dim: #667085;
  --accent: #b8f36b;
  --accent-ink: #0a1006;
  --accent-glow: rgba(184, 243, 107, 0.16);
  --ok-bg: rgba(16, 185, 129, 0.12);
  --ok-border: rgba(16, 185, 129, 0.32);
  --ok-text: #6ee7b7;
  --err-bg: rgba(244, 63, 94, 0.12);
  --err-border: rgba(244, 63, 94, 0.34);
  --err-text: #fda4af;
  --radius-lg: 24px;
  --radius-md: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px 16px;
  overflow-x: hidden;
}

/* Ambient background - GPU composited, zero layout shift */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  transform: translateZ(0);
}

.orb-a {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(184, 243, 107, 0.28) 0%, transparent 70%);
}

.orb-b {
  width: 460px;
  height: 460px;
  bottom: -160px;
  left: -140px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
}

.grid-mask {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 20%, transparent 78%);
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

.panel {
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px 26px;
  box-shadow:
    0 24px 64px -16px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: panel-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.head {
  margin-bottom: 26px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(184, 243, 107, 0.28);
}

.brand-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.status-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ok-text);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.24);
}

.status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #ffffff;
}

.subtitle {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

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

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

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

label {
  font-size: 13px;
  font-weight: 500;
  color: #e4e7ec;
}

.hint {
  font-size: 11.5px;
  color: var(--text-dim);
}

.link-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.link-btn:hover {
  opacity: 1;
  text-decoration: underline;
}

.input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(7, 9, 13, 0.65);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.input-wrap input::placeholder {
  font-family: var(--font-sans);
  color: var(--text-dim);
  letter-spacing: normal;
}

.input-wrap input:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.input-wrap input:focus {
  border-color: var(--border-focus);
  background: var(--surface-strong);
  box-shadow: 0 0 0 4px rgba(184, 243, 107, 0.12);
}

.guide {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.guide p {
  margin: 0;
}

.guide p + p {
  margin-top: 4px;
}

.guide code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #e4e7ec;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.guide .warn {
  color: #fbbf24;
}

.submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  margin-top: 4px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 10px 26px -10px rgba(184, 243, 107, 0.55);
}

.submit-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(10, 16, 6, 0.28);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.submit-btn.is-loading .btn-spinner {
  display: inline-block;
}

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

.feedback {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  border: 1px solid transparent;
}

.feedback.is-ok {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-text);
}

.feedback.is-err {
  background: var(--err-bg);
  border-color: var(--err-border);
  color: var(--err-text);
}

.foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-k {
  font-size: 11px;
  color: var(--text-dim);
}

.meta-v {
  font-size: 12.5px;
  color: #d0d5dd;
  font-weight: 500;
}

.meta-sep {
  width: 1px;
  height: 26px;
  background: var(--border);
}

@media (max-width: 480px) {
  .panel {
    padding: 26px 20px 22px;
    border-radius: 20px;
  }

  h1 {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel,
  .btn-spinner {
    animation: none;
  }
  .submit-btn,
  .input-wrap input {
    transition: none;
  }
}
