:root {
  --bg: #0f1115;
  --card: #181b21;
  --card-border: #262b34;
  --text: #e7eaf0;
  --muted: #9aa3b2;
  --input-bg: #11141a;
  --input-border: #2b313b;
  --accent: #4f8cff;
  --accent-hover: #3d78e6;
  --error: #ff6b6b;
  --success: #34c77b;
  --radius: 12px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fa;
    --card: #ffffff;
    --card-border: #e6e9ef;
    --text: #1a1f29;
    --muted: #5b6472;
    --input-bg: #ffffff;
    --input-border: #d6dbe2;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.card {
  width: 100%;
  max-width: 620px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.brand { display: flex; gap: 14px; align-items: center; }

.logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #7b5cff);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

h1 { font-size: 1.35rem; margin: 0; }
.subtitle { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }

.lang-switch { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; }
.lang-switch a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.lang-switch .flag { font-size: 0.95rem; line-height: 1; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active {
  color: var(--accent);
  border-color: var(--input-border);
  background: var(--input-bg);
}

form { display: flex; flex-direction: column; gap: 18px; }

.row { display: flex; gap: 16px; }
.row .field { flex: 1; }

.field { display: flex; flex-direction: column; gap: 6px; }

label { font-size: 0.88rem; font-weight: 600; }

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18);
}

textarea { resize: vertical; min-height: 120px; }

input[type="file"] {
  width: 100%;
  padding: 9px;
  background: var(--input-bg);
  border: 1px dashed var(--input-border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
}

.hint { color: var(--muted); font-size: 0.8rem; }

button {
  margin-top: 6px;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
button:hover { background: var(--accent-hover); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.result { font-size: 0.92rem; text-align: center; min-height: 1.2em; }
.result.error { color: var(--error); }
.result.success { color: var(--success); }

.footer {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.hidden { display: none !important; }

@media (max-width: 520px) {
  .card { padding: 22px; }
  .row { flex-direction: column; gap: 18px; }
  .header { flex-direction: column; }
}
