@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: #181a20;
  --text: #f2f3f5;
  --muted: #9297a3;
  --line: #30333d;
  --blue: #718db5;
  --blue-hover: #86a2ca;
  --danger: #f08a8a;
  --success: #91c9a6;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
}

button, input, select { font: inherit; }

.topbar {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 2;
}

.language { position: relative; }
.language-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #181a20;
  color: var(--text);
  cursor: pointer;
}
.language-toggle img { display: block; object-fit: contain; }
.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 145px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #1b1e25;
  box-shadow: 0 14px 35px #0008;
}
.language-menu a {
  display: block;
  padding: 10px;
  border-radius: 7px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
}
.language-menu a:hover, .language-menu a:focus-visible { background: #252934; }
.language-menu a[aria-current="page"] { color: var(--blue-hover); }

.page {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 24px;
}

.registration-card {
  width: min(100%, 390px);
  padding: 27px;
  border: 1px solid #ffffff12;
  border-radius: 15px;
  background: var(--panel);
  box-shadow: 0 20px 60px #0004;
}

form { display: flex; flex-direction: column; }
label {
  margin: 0 0 7px;
  color: #dfe1e6;
  font-size: 12px;
  font-weight: 600;
}
input, select {
  width: 100%;
  height: 44px;
  margin: 0 0 15px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #12141a;
  color: var(--text);
  font-size: 13px;
}
input::placeholder { color: #656b78; }
input:focus, select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #718db526;
}
select:invalid { color: #656b78; }
select option { color: var(--text); }

.submit-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  margin-top: 2px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #10151d;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.submit-button:hover { background: var(--blue-hover); }
.submit-button:disabled { cursor: wait; opacity: .65; }
.form-status {
  min-height: 16px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.form-status.error { color: var(--danger); }
.form-status.success { color: var(--success); }

@media (max-height: 560px) {
  .registration-card { padding: 18px 22px; }
  input, select { height: 38px; margin-bottom: 10px; }
  .submit-button { min-height: 40px; }
  .form-status { margin-top: 5px; }
}

@media (max-width: 420px) {
  .page { padding: 16px; }
  .registration-card { padding: 22px 18px; }
  .topbar { top: 12px; right: 12px; }
}

.submit-button img { width: 18px; height: 18px; object-fit: contain; }


.platform-select {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}
.platform-select select {
  margin: 0;
  padding-right: 42px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.platform-chevron {
  position: absolute;
  top: 50%;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 20px;
  transform: translateY(-50%);
  pointer-events: none;
}
.platform-chevron img {
  display: block;
  width: 14px;
  height: 10px;
  filter: invert(1);
}
.platform-chevron .chevron-up { display: none; }
.platform-select:focus-within .chevron-down { display: none; }
.platform-select:focus-within .chevron-up { display: block; }
