﻿:root {
  --ink: #0b1220;
  --ink-soft: #475569;
  --paper: #ebf2ff;
  --panel: rgba(255, 255, 255, 0.9);
  --line: rgba(37, 99, 235, 0.16);
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: #dbeafe;
  --ok: #1d4ed8;
  --warn: #b45309;
  --danger: #b91c1c;
  --shadow: 0 18px 50px rgba(37, 99, 235, 0.12);
  --radius: 18px;
  --font: "Manrope", sans-serif;
  --display: "Syne", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 8% -8%, #93c5fd 0%, transparent 52%),
    radial-gradient(900px 520px at 100% 0%, #60a5fa 0%, transparent 48%),
    linear-gradient(180deg, #dbeafe 0%, #eff6ff 42%, #e0eaff 100%);
  min-height: 100vh;
  line-height: 1.5;
}

.bg-orb {
  position: fixed;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(36px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: drift 14s ease-in-out infinite alternate;
}
.bg-orb-a { background: #3b82f6; top: 8%; left: -90px; }
.bg-orb-b { background: #2563eb; bottom: 4%; right: -110px; animation-delay: -4s; }

@keyframes drift {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(30px) scale(1.08); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fillbar {
  from { width: 0; }
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.page, .page-wide, .page-auth, .page-landing {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 3rem;
  animation: rise 0.45s ease both;
}
.page-wide { width: min(1280px, calc(100% - 2rem)); }
.page-auth { width: min(460px, calc(100% - 2rem)); margin-top: 4rem; }
.page-landing { width: min(1100px, calc(100% - 2rem)); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  backdrop-filter: blur(14px);
  background: rgba(219, 234, 254, 0.9);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #3b82f6, #1e3a8a);
  color: #fff;
  font-size: 0.95rem;
}
.brand-text { font-size: 1.2rem; color: #1e3a8a; }
.brand-wordmark {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.35rem;
  text-decoration: none;
  line-height: 1;
}
.brand-data { color: #0f172a; }
.brand-study { color: #1e3a8a; }

.topnav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.topnav a, .linkish {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.topnav a:hover, .linkish:hover { background: #bfdbfe; color: #1e3a8a; text-decoration: none; }
.topnav a.active { background: #1d4ed8; color: #fff; }
.nav-creator { outline: 1px solid rgba(37, 99, 235, 0.45); }
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0.4rem 0.7rem;
  font-size: 1.1rem;
}

.flash-stack {
  width: min(1120px, calc(100% - 2rem));
  margin: 1rem auto 0;
  display: grid;
  gap: 0.5rem;
  position: relative;
  z-index: 5;
}
.flash {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: rise 0.35s ease both;
}
.flash-success { border-color: rgba(37, 99, 235, 0.35); background: #eff6ff; }
.flash-error, .flash-danger { border-color: rgba(185, 28, 28, 0.3); background: #fef2f2; }
.flash-warning { border-color: rgba(180, 83, 9, 0.3); background: #fffbeb; }

h1, h2, h3 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
  line-height: 1.15;
  color: #0f172a;
}
h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h2 { font-size: 1.45rem; }
.lead { color: var(--ink-soft); font-size: 1.05rem; max-width: 42rem; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.88rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
}

.hero-panel {
  padding: 1.75rem;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(59, 130, 246, 0.12)),
    rgba(255,255,255,0.85);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 28px;
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
}

.grid-2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.stack { display: grid; gap: 1rem; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.15rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: #1e3a8a;
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; box-shadow: 0 10px 24px rgba(37,99,235,0.28); color: #fff; }
.btn-primary { background: linear-gradient(145deg, #3b82f6, #1d4ed8); }
.btn-secondary { background: #fff; color: #1e3a8a; border-color: #93c5fd; }
.btn-secondary:hover { color: #1e3a8a; background: #eff6ff; }
.btn-accent { background: linear-gradient(145deg, #2563eb, #1e40af); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: #bfdbfe; }
.btn-sm { padding: 0.45rem 0.8rem; border-radius: 10px; font-size: 0.88rem; }
.btn-danger { background: var(--danger); }

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.92rem; }
.field-input, input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="number"], input[type="datetime-local"], select, textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
.field-input:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  border-color: #2563eb;
}
.errorlist { color: var(--danger); list-style: none; padding: 0; margin: 0.3rem 0 0; font-size: 0.88rem; }

.progress {
  height: 10px;
  background: #bfdbfe;
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1d4ed8, #60a5fa);
  border-radius: inherit;
  animation: fillbar 0.8s ease both;
}

.course-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 1.2rem;
  border-radius: 22px;
  border: 1px solid #bfdbfe;
  background: rgba(255,255,255,0.9);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.course-card:hover { transform: translateY(-3px); }
.course-cover {
  height: 8px;
  border-radius: 999px;
  margin-bottom: 1rem;
  background: #2563eb;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #dbeafe;
  color: #1d4ed8;
}
.badge-warn { background: #fff7ed; color: var(--warn); }
.badge-ok { background: #dbeafe; color: #1d4ed8; }

.skill-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #bfdbfe;
}
.skill-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: #fff;
}
.lesson-list { display: grid; gap: 0.55rem; }
.lesson-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #bfdbfe;
  text-decoration: none;
  color: inherit;
}
.lesson-item:hover { border-color: #2563eb; text-decoration: none; }
.lesson-item.locked { opacity: 0.55; }
.lesson-item.done { border-color: #60a5fa; background: #eff6ff; }

.layout-lesson {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}
.sidebar-lessons {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow: auto;
}
.content-body {
  white-space: pre-wrap;
  font-size: 1.05rem;
  line-height: 1.7;
}
.video-frame {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #1e3a8a;
  margin-bottom: 1rem;
}
.video-frame iframe, .video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.character-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.character-options label {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid #bfdbfe;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
}
.character-options input { accent-color: #2563eb; }

.stat {
  padding: 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #bfdbfe;
}
.stat strong { display: block; font-family: var(--display); font-size: 1.6rem; color: #1e3a8a; }

.creator-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.25rem;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #bfdbfe;
  vertical-align: top;
}
.inline-form { display: inline; margin: 0; }

.auth-card {
  padding: 1.75rem;
  border-radius: 24px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #93c5fd;
  box-shadow: var(--shadow);
}
.landing-hero {
  min-height: calc(100vh - 2rem);
  display: grid;
  align-content: center;
  gap: 1.25rem;
  padding: 2rem 0 3rem;
}
.landing-brand {
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin: 0;
  animation: rise 0.6s ease both;
}
.landing-brand .brand-data { color: #0f172a; }
.landing-brand .brand-study { color: #1e3a8a; }
.landing-sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 28rem;
  animation: rise 0.7s ease both;
}
.landing-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  animation: rise 0.8s ease both;
}
.landing-visual {
  margin-top: 2rem;
  height: min(42vh, 360px);
  border-radius: 28px;
  background:
    linear-gradient(145deg, #2563eb 0%, #1e3a8a 100%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: rise 0.9s ease both;
}
.landing-visual::after {
  content: "Учись. Прокачивайся. Расти.";
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  color: #fff;
  font-family: var(--display);
  font-size: clamp(1.3rem, 3vw, 2rem);
  max-width: 12ch;
  line-height: 1.1;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}
.search-bar input { flex: 1; }

.empty {
  padding: 2rem;
  text-align: center;
  color: var(--ink-soft);
}

.career-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.career-subnav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.06);
}
.career-subnav a.active,
.career-subnav a:hover {
  color: #fff;
  background: var(--brand, #1d4ed8);
}
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.card-link {
  display: block;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #bfdbfe;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.card-link:hover { border-color: #1d4ed8; }
.status-line { margin: 0.35rem 0 0; display: inline-flex; align-items: center; gap: 0.4rem; }
.status-ok { color: #15803d; font-weight: 600; }
.status-pending { color: var(--ink-soft); }
.status-check {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: #16a34a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
.field-hint { display: block; margin-top: 0.35rem; font-size: 0.85rem; color: var(--ink-soft); font-weight: 400; }
.generate-progress { max-width: 640px; margin: 1.5rem auto; }
.progress-steps { list-style: none; padding: 0; margin: 1.5rem 0 1rem; display: grid; gap: 0.85rem; }
.progress-step { display: flex; align-items: center; gap: 0.75rem; color: var(--ink-soft); font-weight: 500; }
.progress-step .step-dot {
  width: 0.85rem; height: 0.85rem; border-radius: 50%;
  background: #cbd5e1; flex-shrink: 0;
}
.progress-step.is-active { color: var(--ink); font-weight: 700; }
.progress-step.is-active .step-dot { background: #1d4ed8; box-shadow: 0 0 0 4px rgba(29,78,216,.18); }
.progress-step.is-done { color: #15803d; }
.progress-step.is-done .step-dot { background: #16a34a; }
.progress-bar {
  height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin: 1rem 0 0.75rem;
}
.progress-bar span {
  display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2563eb, #1d4ed8);
  transition: width .4s ease;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.repeat-block {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.5rem;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.metric {
  background: #eff6ff;
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
}
.metric-value { display: block; font-size: 1.5rem; font-weight: 800; }
.metric-label { color: var(--ink-soft); font-size: 0.85rem; }
.status-attention { color: #b91c1c; }
.status-positive { color: #047857; }
.status-neutral { color: var(--ink-soft); }
.check-row { display: flex; gap: 0.5rem; align-items: center; margin: 0.35rem 0; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 0.65rem 0.4rem; border-bottom: 1px solid #e2e8f0; }
.btn-accent { background: #0f766e; color: #fff; }
.plan-list { padding-left: 1.1rem; }
.plan-list li { margin-bottom: 0.85rem; }
@media (max-width: 900px) {
  .grid-cards, .form-grid, .metrics { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .grid-2, .layout-lesson, .grid-3 { grid-template-columns: 1fr; }
  .sidebar-lessons { position: static; max-height: none; }
  .nav-toggle { display: inline-flex; }
  .topnav {
    display: none;
    position: absolute;
    top: 64px;
    right: 0.75rem;
    left: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    box-shadow: var(--shadow);
  }
  .topnav.open { display: flex; }
  .topbar { position: relative; }
}

.brand-logo { height: 36px; width: auto; display: block; }
.brand-auth-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 1.5rem;
}
.brand-logo-link { display: inline-flex; }
.brand-logo-auth { height: 72px; width: auto; max-width: 100%; }
.landing-logo { height: 58px; width: auto; margin-bottom: 1rem; }
.consent-stack { margin-top: 1rem; display: grid; gap: 0.75rem; }
.consent-row { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.92rem; color: var(--ink-soft); }
.consent-row em { color: #b91c1c; font-style: normal; }
.skill-level-legend { display: grid; gap: 0.35rem; padding: 0.85rem 1rem; background: #eff6ff; border-radius: 12px; font-size: 0.9rem; }
.skill-label-row { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 0.35rem; font-weight: 600; }
.info-tip { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; background: #1d4ed8; color: #fff; cursor: help; }
.custom-skills { display: grid; gap: 0.75rem; margin-top: 1rem; }
.custom-skill-row { display: grid; grid-template-columns: 1fr 180px auto; gap: 0.65rem; align-items: end; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 0.45rem 1rem; margin: 0.75rem 0 0; }
.kv dt { color: var(--ink-soft); margin: 0; }
.kv dd { margin: 0; }
@media (max-width: 700px) {
  .custom-skill-row { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
}
.home-banners { max-width: 960px; margin: 1.5rem auto 0; display: grid; gap: 1rem; padding: 0 1rem 2rem; }
.home-banner { display: flex; justify-content: space-between; gap: 1rem; align-items: center; background: #fff; border: 1px solid #bfdbfe; border-radius: 18px; padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.code-wrap { position: relative; margin: 1rem 0; }
.code-wrap pre { margin: 0; padding: 1rem 1rem 2.5rem; overflow: auto; background: #0f172a; color: #e2e8f0; border-radius: 12px; }
.code-copy-btn { position: absolute; top: 0.5rem; right: 0.5rem; border: 0; border-radius: 8px; padding: 0.35rem 0.65rem; background: #1d4ed8; color: #fff; cursor: pointer; font-size: 0.8rem; }
.rich-content h1, .rich-content h2, .rich-content h3 { margin: 1rem 0 0.5rem; }
.rich-content p { margin: 0.6rem 0; }
.rich-content ul, .rich-content ol { padding-left: 1.2rem; }
@media (max-width: 900px) { .home-banner { flex-direction: column; align-items: flex-start; } }
