:root {
  color-scheme: dark;
  --bg: #0b0b0f;
  --panel: #141419;
  --panel-soft: #1a1a21;
  --text: #f6f6f7;
  --muted: #9d9da8;
  --line: #292932;
  --accent: #ff6f7d;
  --accent-hover: #ff8290;
  --danger: #ff6363;
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body {
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px
    max(32px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 28px;
}

.brand {
  color: inherit;
  text-decoration: none;
}

.brand-name {
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: clamp(1.35rem, 5vw, 2rem);
}

.app-card {
  min-height: 480px;
  padding: clamp(22px, 6vw, 40px);
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 111, 125, 0.11),
      transparent 34%
    ),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1 {
  margin: 12px 0 10px;
  font-size: clamp(2rem, 8vw, 3.8rem);
  line-height: 0.97;
  letter-spacing: -0.055em;
}

.message {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 1.03rem;
}

.form {
  display: grid;
  gap: 15px;
  margin-top: 26px;
}

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

.field label {
  color: #d5d5db;
  font-size: 0.88rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: var(--panel-soft);
}

.field input:focus {
  border-color: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-button,
.secondary-button,
.ghost-button {
  border-radius: 12px;
  font-weight: 800;
}

.primary-button {
  border: 0;
  padding: 13px 18px;
  background: var(--accent);
  color: #161318;
}

.primary-button:hover {
  background: var(--accent-hover);
}

.secondary-button {
  padding: 12px 17px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.ghost-button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.status-box {
  margin-top: 28px;
  padding: 17px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.status-box strong {
  display: block;
  margin-bottom: 6px;
}

.error {
  color: var(--danger);
}

.loading {
  min-height: 400px;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 20px 4px;
  color: #6f6f79;
  font-size: 0.76rem;
}

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

@media (max-width: 520px) {
  .shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .app-card {
    border-radius: 18px;
  }

  .actions > * {
    flex: 1;
  }
}
