/* ---------- Design tokens ---------- */
:root {
  --bg: #050816;
  --bg-elevated: rgba(15, 23, 42, 0.92);
  --bg-soft: rgba(15, 23, 42, 0.7);
  --border-subtle: rgba(148, 163, 184, 0.18);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.16);
  --accent-strong: #0ea5e9;
  --error: #fb7185;
  --error-soft: rgba(248, 113, 113, 0.12);
  --text-main: #e5e7eb;
  --text-soft: #9ca3af;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 22px 45px rgba(15, 23, 42, 0.75);
  --duration-fast: 160ms;
  --duration-med: 220ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", sans-serif;
  background: radial-gradient(circle at top, #1e293b 0, #020617 55%, #000 100%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.page-gradient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 55%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 50%),
    radial-gradient(circle at bottom, rgba(14, 116, 144, 0.18), transparent 55%);
  opacity: 0.9;
  z-index: -1;
}

.shell {
  min-height: 100vh;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(
      120deg,
      rgba(15, 23, 42, 0.9),
      rgba(15, 23, 42, 0.75)
    ),
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.16), transparent);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(26px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: radial-gradient(circle at 20% 0, #e0f2fe, #0ea5e9);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.6),
    0 12px 26px rgba(8, 47, 73, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #020617;
  font-size: 18px;
}

.logo-text {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.nav {
  display: flex;
  gap: 2px;
}

.nav-link {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.5);
}

.nav-link-active {
  color: #e0f2fe;
  background: linear-gradient(120deg, #22d3ee, #0ea5e9);
  border-color: rgba(15, 23, 42, 0.8);
  box-shadow: 0 10px 22px rgba(8, 47, 73, 0.75);
}

.hero {
  padding: 14px 6px 0;
}

.hero-title {
  font-size: clamp(28px, 4vw, 34px);
  letter-spacing: -0.04em;
  margin: 0 0 8px;
}

.hero-title span {
  color: #e0f2fe;
  background: linear-gradient(120deg, #38bdf8, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin: 0;
  max-width: 540px;
  color: var(--text-soft);
  font-size: 14px;
}

.card {
  margin-top: 6px;
  background: linear-gradient(
      145deg,
      rgba(15, 23, 42, 0.94),
      rgba(15, 23, 42, 0.86)
    ),
    radial-gradient(circle at top, rgba(148, 163, 184, 0.26), transparent 55%);
  border-radius: var(--radius-lg);
  padding: 20px 18px 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: #e5e7eb;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.field-label-soft {
  font-weight: 400;
  color: var(--text-soft);
}

.field-input-wrapper {
  display: flex;
  align-items: center;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top, rgba(30, 64, 175, 0.15), transparent 45%),
    rgba(15, 23, 42, 0.9);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.8);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.field-input-wrapper:focus-within {
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow:
    0 0 0 1px rgba(8, 47, 73, 0.8),
    0 0 0 1px rgba(56, 189, 248, 0.5);
}

.field-input-prefix {
  padding-left: 9px;
  gap: 4px;
}

.field-prefix {
  font-size: 13px;
  color: var(--text-soft);
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.55);
}

input,
select {
  border: none;
  outline: none;
  background: transparent;
  color: #f9fafb;
  font: inherit;
  width: 100%;
}

input::placeholder,
select::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 26px;
  background-color: transparent;
  color: #e5e7eb;
}

select option {
  background-color: #020617;
  color: #e5e7eb;
}

.field-hint {
  font-size: 11px;
  color: var(--text-soft);
}

.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 14px;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.btn {
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: none;
  color: var(--text-main);
  transition:
    background-color var(--duration-med) var(--ease-out),
    border-color var(--duration-med) var(--ease-out),
    color var(--duration-med) var(--ease-out),
    box-shadow var(--duration-med) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.btn-primary {
  background: linear-gradient(120deg, #22d3ee, #0ea5e9);
  color: #020617;
  border-color: rgba(8, 47, 73, 0.9);
  box-shadow:
    0 14px 28px rgba(8, 47, 73, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.8);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 18px 32px rgba(8, 47, 73, 0.95),
    0 0 0 1px rgba(15, 23, 42, 0.8);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 10px 24px rgba(8, 47, 73, 0.8),
    0 0 0 1px rgba(15, 23, 42, 0.8);
}

.btn-ghost {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.85);
}

.btn-ghost:hover {
  border-color: rgba(148, 163, 184, 0.7);
  background: rgba(30, 41, 59, 0.98);
}

.btn-outline {
  border-color: rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.96);
  padding-inline: 14px;
  font-size: 13px;
}

.btn-outline:hover {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 10px 22px rgba(8, 47, 73, 0.9);
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.4);
  border-top-color: rgba(15, 23, 42, 0.95);
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity var(--duration-fast) linear,
    transform var(--duration-fast) var(--ease-out);
}

.btn.loading .btn-spinner {
  opacity: 1;
  transform: scale(1);
  animation: spin 600ms linear infinite;
}

.btn.loading .btn-label {
  opacity: 0.7;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result {
  margin-top: 18px;
  padding: 12px 12px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: radial-gradient(circle at top, rgba(8, 47, 73, 0.45), transparent 55%),
    rgba(15, 23, 42, 0.96);
  box-shadow: 0 16px 28px rgba(8, 47, 73, 0.8);
}

.result-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(224, 242, 254, 0.9);
  margin-bottom: 6px;
}

.result-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.result-input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.96);
  font-size: 14px;
}

.result-input:focus {
  outline: none;
  border-style: solid;
  border-color: rgba(56, 189, 248, 0.85);
}

.result-meta {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.9);
}

.feedback {
  margin-top: 10px;
  font-size: 12px;
  min-height: 18px;
}

.feedback-error {
  color: #fecaca;
  background: var(--error-soft);
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feedback-error::before {
  content: "!";
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: rgba(248, 113, 113, 0.95);
  color: #111827;
}

.feedback-success {
  color: #bbf7d0;
}

.footer {
  margin-top: auto;
  padding: 10px 4px 0;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.9);
}

.accent {
  color: #e0f2fe;
}

.hidden {
  display: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .shell {
    padding-inline: 16px;
  }

  .header {
    padding-inline: 12px;
  }

  .card {
    padding-inline: 14px;
  }

  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-ghost {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


