:root {
  color-scheme: dark;
  --bg: #0b1019;
  --card: #111827;
  --text: #e5e7ef;
  --muted: #9aa4b5;
  --accent: #7c5dff;
  --accent-2: #5de2ff;
  --error: #ff6b7a;
  --border: #1f2838;
  --radius: 14px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(124, 93, 255, 0.14), transparent 40%),
              radial-gradient(circle at 80% 30%, rgba(93, 226, 255, 0.14), transparent 40%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 32px 24px 80px;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 30% 0%, rgba(124, 93, 255, 0.2), transparent 35%),
              radial-gradient(circle at 80% 10%, rgba(93, 226, 255, 0.2), transparent 30%);
  filter: blur(60px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  margin-bottom: 24px;
  background: rgba(11, 16, 25, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #0b1019;
  letter-spacing: 0.5px;
}

.brand-text {
  line-height: 1.1;
}

.brand-name { font-weight: 700; }
.brand-tag { color: var(--muted); font-size: 13px; }

.nav {
  display: flex;
  gap: 14px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}

.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)) , var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.auth-card h1 { margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 18px; }

form { display: flex; flex-direction: column; gap: 14px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 15px;
  transition: border 0.2s, box-shadow 0.2s;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124, 93, 255, 0.16);
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1019;
  box-shadow: 0 10px 30px rgba(124, 93, 255, 0.4);
}

.btn.primary:hover { transform: translateY(-1px); }
.btn.primary:active { transform: translateY(0); }

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.form-error {
  min-height: 20px;
  color: var(--error);
  font-weight: 600;
}

.sub-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.sub-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.sub-links a:hover { color: var(--text); }

.hero {
  display: grid;
  gap: 12px;
  background: linear-gradient(135deg, rgba(124, 93, 255, 0.08), rgba(93, 226, 255, 0.05)), var(--card);
}

.eyebrow {
  color: var(--accent-2);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 0;
}

.hero h2 { margin: 0; font-size: 28px; }
.hero p { margin: 0; color: var(--muted); }

.bullets {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 6px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.stats div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
}

.stats strong { display: block; font-size: 22px; }
.stats span { color: var(--muted); }

.policy-summary h3, .contacts h3 { margin-top: 0; }
.policy-summary ul { margin: 8px 0 12px 18px; color: var(--text); }
.policy-summary p { color: var(--muted); }
.read-more {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  margin-top: 8px;
}
.read-more:hover { color: var(--accent); }

/* Модальное окно */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  margin: auto;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 101;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.modal-content .policy h3 { margin-top: 0; }
.modal-content .policy h4 {
  margin: 24px 0 12px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
.modal-content .policy h4:first-of-type { margin-top: 0; }
.modal-content .policy-meta {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  margin-bottom: 20px;
}
.modal-content .policy ul { margin: 8px 0 12px 18px; color: var(--text); line-height: 1.6; }
.modal-content .policy p { color: var(--muted); line-height: 1.6; margin: 0 0 12px 0; }
.modal-content .policy ul li { margin-bottom: 6px; }
.modal-content .policy ul li strong { color: var(--accent-2); }

.contacts p { color: var(--muted); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; }
.value { font-weight: 700; }

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
  z-index: 4;
}

.cookie-banner a { color: var(--accent-2); font-weight: 700; text-decoration: none; }
.cookie-banner.hidden { display: none; }

.footer {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer a:hover { color: var(--text); }

@media (max-width: 720px) {
  body { padding: 24px 16px 90px; }
  .topbar { flex-direction: column; gap: 10px; }
  .nav { width: 100%; justify-content: center; flex-wrap: wrap; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
  .footer { flex-direction: column; align-items: flex-start; }
  .modal-content { padding: 24px 20px; max-height: 95vh; }
  .modal-close { top: 12px; right: 12px; width: 32px; height: 32px; font-size: 20px; }
}

