:root {
  --bg: #101926;
  --bg-soft: #172335;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f7f1e9;
  --muted: #b9b0a5;
  --accent: #f1b16f;
  --accent-strong: #ffd1a2;
  --success: #8dc7a1;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(241, 177, 111, 0.15), transparent 20%),
    linear-gradient(180deg, #0d1622 0%, #111b28 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 28px;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.button,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
}

.button {
  background: linear-gradient(135deg, var(--accent), #ff9d74);
  color: #1a120d;
}

.button-ghost {
  border-color: var(--line);
  color: var(--text);
}

.button-ghost.is-active {
  background: rgba(255, 255, 255, 0.06);
}

.hero-card,
.module-card,
.lesson-card,
.login-card,
.profile-card,
.settings-card,
.admin-header-card,
.admin-editor-card,
.editor-module,
.editor-lesson {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 30px;
  border-radius: var(--radius-xl);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 0.98;
}

.hero-text {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 26px;
}

.hero-meta div {
  padding: 18px;
  border-radius: 20px;
  background: var(--panel);
}

.hero-meta strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 1.05rem;
}

.hero-meta span {
  color: var(--muted);
  line-height: 1.6;
}

.modules {
  display: grid;
  gap: 22px;
  margin-top: 30px;
}

.module-card {
  padding: 26px;
  border-radius: var(--radius-xl);
}

.module-head {
  max-width: 760px;
  margin-bottom: 18px;
}

.module-head p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.lessons {
  display: grid;
  gap: 16px;
}

.lesson-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.lesson-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.lesson-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: start;
  margin-top: 16px;
}

.commands {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.commands li,
.video-placeholder {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.commands li::before {
  content: "•";
  margin-right: 10px;
  color: var(--accent);
}

.video-placeholder {
  min-height: 152px;
  display: flex;
  align-items: center;
  color: var(--muted);
  line-height: 1.6;
}

.video-frame {
  width: 100%;
  min-height: 220px;
  border: 0;
  border-radius: 18px;
  background: #000;
}

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

.login-card {
  width: min(100%, 460px);
  padding: 28px;
  border-radius: var(--radius-xl);
}

.login-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.login-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.login-form input {
  min-height: 54px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
}

.hint,
.error {
  margin-top: 14px;
  border-radius: 16px;
  padding: 14px 16px;
}

.hint {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.error {
  background: rgba(255, 122, 94, 0.12);
  color: #ffd4ca;
}

.login-links {
  margin-top: 14px;
}

.login-links a {
  color: var(--accent-strong);
}

.profile-grid,
.course-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.profile-card,
.settings-card,
.admin-header-card,
.admin-editor-card {
  padding: 28px;
  border-radius: var(--radius-xl);
}

.account-meta {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.account-meta div,
.reset-link-block,
.editor-lesson,
.editor-module {
  border-radius: 18px;
  background: var(--panel);
}

.account-meta div {
  padding: 16px 18px;
}

.account-meta strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-strong);
}

.account-meta span {
  color: var(--muted);
  line-height: 1.6;
}

.settings-card h2,
.admin-editor-card h2,
.editor-module h2,
.editor-lesson h3 {
  margin-bottom: 14px;
}

.settings-form,
.course-meta-grid,
.editor-module,
.editor-lesson {
  display: grid;
  gap: 14px;
}

.settings-form + h2 {
  margin-top: 24px;
}

.settings-form label,
.course-meta-grid label,
.editor-module label,
.editor-lesson label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.settings-form input,
.course-meta-grid input,
.course-meta-grid textarea,
.editor-module input,
.editor-module textarea,
.editor-lesson input,
.editor-lesson textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
}

.course-meta-grid textarea,
.editor-module textarea,
.editor-lesson textarea {
  min-height: 120px;
  resize: vertical;
}

.reset-link-block {
  margin-top: 12px;
  padding: 14px 16px;
}

.reset-link-block strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
}

.reset-link-block a {
  color: var(--accent-strong);
  word-break: break-all;
}

.shell-wide {
  max-width: 1320px;
}

.admin-toolbar,
.editor-module-head,
.editor-lesson-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-modules,
.editor-lessons {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.editor-module,
.editor-lesson {
  padding: 20px;
}

.danger {
  border-color: rgba(255, 122, 94, 0.3);
  color: #ffd4ca;
}

@media (max-width: 900px) {
  .hero-meta,
  .lesson-grid,
  .profile-grid,
  .course-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 20px;
  }

  .hero-card,
  .module-card,
  .lesson-card,
  .login-card,
  .profile-card,
  .settings-card,
  .admin-header-card,
  .admin-editor-card,
  .editor-module,
  .editor-lesson {
    padding: 20px;
  }
}
