:root {
  color-scheme: dark;
  --bg-a: #0f1e57;
  --bg-b: #2f76d2;
  --bg-c: #f4a5bf;
  --card: rgba(255, 255, 255, 0.14);
  --card-border: rgba(255, 255, 255, 0.24);
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.72);
  --input: rgba(255, 255, 255, 0.1);
  --button-a: #a58cff;
  --button-b: #5fd8ff;
  --danger: #ffb3c0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(174,122,255,0.28), transparent 26%),
    radial-gradient(circle at 75% 82%, rgba(255,181,196,0.32), transparent 24%),
    linear-gradient(140deg, var(--bg-a), var(--bg-b) 52%, var(--bg-c));
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(100%, 520px);
  padding: 28px;
  border-radius: 32px;
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(8, 15, 46, 0.28);
}

.badge {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

h1 {
  margin: 18px 0 8px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.02;
}

.subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.locale-picker {
  display: inline-grid;
  gap: 6px;
  margin-bottom: 18px;
  width: min(100%, 260px);
}

.locale-picker span {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.locale-picker-control {
  position: relative;
  width: 100%;
}

.locale-picker-control::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 10px;
  height: 10px;
  pointer-events: none;
  transform: translateY(-60%) rotate(45deg);
  border-right: 2px solid rgba(255, 255, 255, 0.72);
  border-bottom: 2px solid rgba(255, 255, 255, 0.72);
  z-index: 2;
}

.locale-picker select,
.locale-trigger {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 40px 10px 12px;
  outline: none;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.locale-trigger {
  text-align: left;
  margin-top: 0;
  cursor: pointer;
}

.locale-picker select:focus,
.locale-trigger:focus {
  border-color: rgba(95, 216, 255, 0.64);
  box-shadow: 0 0 0 3px rgba(95, 216, 255, 0.16);
}

.locale-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(196, 226, 255, 0.22);
  background: linear-gradient(180deg, #6c96d5 0%, #5f85cb 100%);
  backdrop-filter: none;
  box-shadow:
    0 22px 64px rgba(10, 22, 60, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.locale-search {
  width: 100%;
  border: 1px solid rgba(203, 233, 255, 0.32);
  background: #5a82c7;
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.locale-search::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.locale-search:focus {
  border-color: rgba(95, 216, 255, 0.64);
  box-shadow: 0 0 0 3px rgba(95, 216, 255, 0.16);
}

.locale-options {
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.42) rgba(255, 255, 255, 0.08);
}

.locale-options::-webkit-scrollbar {
  width: 10px;
}

.locale-options::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(28, 48, 107, 0.34);
}

.locale-options::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(169, 231, 255, 0.58));
  border: 2px solid rgba(52, 79, 145, 0.38);
}

.locale-option {
  width: 100%;
  margin: 0;
  border: 1px solid rgba(202, 231, 255, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  background: #4f74bb;
  color: var(--text);
  text-align: left;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.locale-option:hover,
.locale-option:focus {
  border-color: rgba(255, 255, 255, 0.22);
  background: #5c84c9;
}

.locale-option.is-active {
  border-color: rgba(129, 228, 255, 0.42);
  background: linear-gradient(180deg, #74cfff 0%, #86b8ff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(129, 228, 255, 0.08);
}

.locale-option-meta {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 500;
}

.locale-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
}

.locale-native-select {
  display: none;
}

.status {
  padding: 14px 16px;
  border-radius: 20px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  line-height: 1.45;
}

.status.info {
  padding: 0;
  margin-bottom: 16px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 14px;
}

.status.error {
  color: #fff3f6;
  background: rgba(165, 36, 83, 0.28);
  border-color: rgba(255, 188, 207, 0.28);
}

.status.success {
  color: #f6fffd;
  background: rgba(38, 148, 118, 0.28);
  border-color: rgba(181, 255, 235, 0.28);
}

.success-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  margin-bottom: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.success-panel h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

.success-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 70px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f6fffd;
  background: rgba(38, 148, 118, 0.34);
  border: 1px solid rgba(181, 255, 235, 0.24);
}

.form {
  display: grid;
  gap: 14px;
}

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

.field span {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.84);
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--input);
  color: var(--text);
  border-radius: 18px;
  padding: 14px 16px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: rgba(95, 216, 255, 0.64);
  box-shadow: 0 0 0 3px rgba(95, 216, 255, 0.16);
}

button {
  margin-top: 8px;
  border: 0;
  border-radius: 20px;
  padding: 15px 18px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--button-a), var(--button-b));
  cursor: pointer;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 14px 18px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.hidden {
  display: none;
}

@media (pointer: coarse) {
  .locale-native-select {
    display: block;
  }

  .locale-trigger,
  .locale-menu {
    display: none;
  }
}

@media (pointer: fine) {
  .locale-native-select {
    display: none;
  }

  .locale-trigger {
    display: block;
  }
}
