:root {
  color-scheme: dark;
  --background: #0b0b0c;
  --surface: #151516;
  --input-background: #101011;
  --text-primary: #f5f5f5;
  --text-secondary: #949498;
  --primary: #ff6b00;
  --primary-hover: #e85f00;
  --border: #2b2b2e;
  --border-hover: #3d3d41;
  --focus-ring: rgba(255, 107, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page-container {
  min-height: 100vh;
  padding: 12px;
}

.content-wrapper {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 4px 22px;
}

.brand-mark {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 8px 22px rgba(255, 107, 0, 0.18);
}

.brand-copy p {
  margin: 0;
}

.brand-title {
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.brand-description {
  margin-top: 1px !important;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.form-card {
  width: 100%;
  padding: 24px 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
}

.form-header {
  margin-bottom: 25px;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--border);
}

h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(1.45rem, 7vw, 1.9rem);
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.form-description {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

form {
  display: grid;
  gap: 17px;
}

.form-field {
  display: grid;
  gap: 7px;
}

label {
  color: #d7d7da;
  font-size: 0.82rem;
  font-weight: 620;
}

.field-hint {
  color: var(--text-secondary);
  font-size: 0.73rem;
  line-height: 1.4;
}

input {
  width: 100%;
  min-height: 51px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--input-background);
  color: var(--text-primary);
  caret-color: var(--primary);
  font: inherit;
  font-size: 0.94rem;
  transition: border-color 150ms ease, box-shadow 150ms ease,
    background-color 150ms ease;
}

input::placeholder {
  color: #66666b;
  opacity: 1;
}

input:hover {
  border-color: var(--border-hover);
}

input:focus {
  border-color: var(--primary);
  background: #131314;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

button {
  width: 100%;
  min-height: 53px;
  margin-top: 5px;
  padding: 13px 18px;
  border: 0;
  border-radius: 11px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 750;
  box-shadow: 0 10px 24px rgba(255, 107, 0, 0.16);
  transition: background-color 150ms ease, transform 150ms ease,
    box-shadow 150ms ease;
}

button:hover {
  background: var(--primary-hover);
  box-shadow: 0 12px 28px rgba(255, 107, 0, 0.22);
}

button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

input[aria-invalid="true"] {
  border-color: #d85050;
}

.form-message {
  display: none;
  margin: -2px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.form-message.is-visible {
  display: block;
}

.form-message.is-success {
  color: #70c995;
}

.form-message.is-error {
  color: #e78b8b;
}

.author-credit {
  padding: 10px 4px 0;
  color: #55555a;
  font-size: 0.66rem;
  font-weight: 400;
  text-align: right;
}

@media (min-width: 640px) {
  .page-container {
    display: flex;
    align-items: center;
    padding: 38px 24px;
  }

  .app-header {
    padding: 0 5px 24px;
  }

  .form-card {
    padding: 32px 34px 34px;
    border-radius: 20px;
  }

  .form-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
  }

  form {
    gap: 19px;
  }
}

@media (max-width: 359px) {
  .page-container {
    padding: 8px;
  }

  .form-card {
    padding-inline: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  input,
  button {
    transition: none;
  }
}
