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

:root {
  --red: #e10600;
  --red-dark: #b00400;
  --black: #0a0a0d;
  --black-soft: #15151c;
  --white: #f7f7fb;
  --muted: #b5b5c2;
  --line: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.06);
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --container: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--white);
  background:
    radial-gradient(1100px 650px at 12% 8%, rgba(225, 6, 0, 0.32), transparent 60%),
    radial-gradient(900px 520px at 88% 0%, rgba(225, 6, 0, 0.18), transparent 60%),
    linear-gradient(160deg, #08080b 0%, #0f0f16 45%, #15151f 100%);
  min-height: 100vh;
}

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

/* Public header */
.public-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(8, 8, 11, 0.9);
  border-bottom: 1px solid var(--line);
}

.public-header .wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-name {
  font-family: "Unbounded", sans-serif;
  letter-spacing: 0.08em;
  font-size: 20px;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

.public-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.public-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.public-nav a:hover {
  color: var(--white);
  background: rgba(225, 6, 0, 0.12);
  border-color: rgba(225, 6, 0, 0.25);
}

.public-nav .cta {
  color: var(--white);
  background: var(--red);
}

.public-shell {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* App layout */
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

aside {
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 20, 27, 0.95), rgba(8, 8, 11, 0.95));
  position: sticky;
  top: 0;
  height: 100vh;
}

.nav {
  display: grid;
  gap: 10px;
  margin: 16px 0 22px;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav a.active,
.nav a:hover {
  color: var(--white);
  background: rgba(225, 6, 0, 0.12);
  border-color: rgba(225, 6, 0, 0.25);
}

.profile {
  margin-top: auto;
  padding: 14px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.profile strong { display: block; }
.profile small { color: var(--muted); }

.page {
  padding: 34px 6vw 52px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Content blocks */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: center;
}

.hero h1 {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(28px, 3.2vw, 46px);
  margin: 0 0 12px;
}

.hero p {
  color: var(--muted);
  max-width: 560px;
  line-height: 1.6;
}

.hero-card {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-card-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.hero ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card h3 { margin: 0 0 10px; }
.card p { margin: 0; color: var(--muted); }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}

.tags span {
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

/* Dashboard helpers */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.headline h1 {
  font-family: "Unbounded", sans-serif;
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 38px);
}

.headline p { margin: 0; color: var(--muted); }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.progress {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.progress span {
  display: block;
  height: 100%;
  width: 68%;
  background: linear-gradient(90deg, var(--red), #ff3b30);
}

.list { display: grid; gap: 12px; }

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.badge {
  background: var(--red);
  color: white;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.timeline { display: grid; gap: 10px; }

.timeline div {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px rgba(225, 6, 0, 0.6);
}

/* Buttons */
.button,
.btn {
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.button.primary,
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 16px 30px rgba(225, 6, 0, 0.35);
}

.button.primary:hover,
.btn-primary:hover { background: var(--red-dark); }

.button.ghost,
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line);
}

/* Forms */
.form { display: grid; gap: 12px; }

.form input,
.form textarea,
.form select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-family: inherit;
}

.form-card { max-width: 460px; margin: 0 auto; }

.muted { color: var(--muted); font-size: 14px; }

.alert {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  background: rgba(225, 6, 0, 0.12);
  border: 1px solid rgba(225, 6, 0, 0.35);
  color: #ffd7d3;
}

.placeholder {
  height: 160px;
  border-radius: 16px;
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  margin-top: 10px;
}

.test { display: grid; gap: 20px; }
.option { display: block; margin: 8px 0; }

.flashcard-shell {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 70px;
  gap: 18px;
  align-items: center;
  width: 100%;
  margin: 0 0 28px;
}

.flashcard {
  background: var(--card);
  color: var(--white);
  border-radius: calc(var(--radius) + 10px);
  padding: 40px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  width: 100%;
  min-height: 360px;
}

.flashcard-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.flashcard-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.flashcard-icon svg {
  width: 18px;
  height: 18px;
}

.flashcard-icon:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.flashcard-body {
  margin: 18px 0 8px;
  line-height: 1.6;
}

.flashcard-question {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.flashcard-answer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
}

.flashcard-actions {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.flashcard-actions.main-actions {
  justify-content: center;
}

.flashcard .button.ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.flashcard-btn {
  padding: 14px 28px;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.status-actions .status-btn {
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
}

.flashcard-hint {
  margin: 26px -40px -40px;
  padding: 14px 24px;
  background: var(--red);
  color: #ffffff;
  font-weight: 600;
  text-align: center;
  border-radius: 0 0 calc(var(--radius) + 10px) calc(var(--radius) + 10px);
}

.flashcard-arrow {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.flashcard-arrow:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.flashcard-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.flashcard-progress {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.flashcard-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.flashcard-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red), #ff3b30);
}

.flashcard-stats {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}

.flashcard-answer[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .flashcard-shell {
    grid-template-columns: 1fr;
  }
  .flashcard {
    padding: 30px 24px;
  }
  .flashcard-hint {
    margin: 22px -24px -24px;
  }
  .flashcard-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 26px;
    z-index: 2;
  }
  .flashcard-arrow.left { left: 8px; }
  .flashcard-arrow.right { right: 8px; }
}

@media (max-width: 600px) {
  .flashcard-question { font-size: 24px; }
  .flashcard-answer { font-size: 16px; }
}

.certificate-preview {
  display: grid;
  place-items: center;
  padding: 12px 0 28px;
}

.certificate-card {
  width: min(900px, 100%);
  aspect-ratio: 210 / 297;
  min-height: 640px;
  background: #ffffff;
  border-radius: 28px;
  padding: 56px 72px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  text-align: center;
  position: relative;
  overflow: hidden;
  color: #1f2937;
}

.certificate-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(225, 6, 0, 0.12);
  border-radius: 22px;
  pointer-events: none;
}

.certificate-card::after {
  content: "LOCADEMY";
  position: absolute;
  right: 24px;
  bottom: 18px;
  font-family: "Unbounded", sans-serif;
  font-size: 18px;
  letter-spacing: 0.14em;
  color: rgba(31, 41, 55, 0.08);
  pointer-events: none;
}

.certificate-card h3 {
  font-size: 26px;
  margin: 0 0 18px;
}

.certificate-brand {
  font-family: "Unbounded", sans-serif;
  font-size: 26px;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: 18px;
}

.certificate-name {
  font-size: 34px;
  font-weight: 700;
  margin: 16px 0 18px;
}

.certificate-card p {
  font-size: 18px;
  line-height: 1.7;
  color: #374151;
}

.certificate-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  font-size: 15px;
  color: var(--muted);
}

.certificate-note { margin-top: 20px; font-size: 12px; color: var(--muted); }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  padding: 24px 6vw 40px;
  color: var(--muted);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

.form.compact {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.wizard {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wizard-step {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

.wizard-step.active {
  color: var(--white);
  background: rgba(225, 6, 0, 0.12);
  border-color: rgba(225, 6, 0, 0.25);
}

.wizard-panel {
  display: none;
}

.wizard-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

details {
  margin-top: 12px;
  color: var(--muted);
}

details summary {
  cursor: pointer;
  margin-bottom: 10px;
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.deck-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 6px;
  color: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.deck-card:hover {
  transform: translateY(-2px);
  border-color: rgba(225, 6, 0, 0.35);
}

.deck-card.active {
  border-color: rgba(225, 6, 0, 0.55);
  box-shadow: 0 18px 40px rgba(225, 6, 0, 0.25);
}

.deck-title {
  font-weight: 600;
}

.deck-meta {
  font-size: 13px;
  color: var(--muted);
}
.form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 12px) calc(1em + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  aside { position: relative; height: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .public-header .wrap { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 900px) {
  .certificate-card {
    aspect-ratio: auto;
    min-height: 520px;
    padding: 36px 32px;
  }
  .certificate-name { font-size: 28px; }
  .certificate-card p { font-size: 16px; }
}

 (max-width: 720px) {
  .certificate-meta { flex-direction: column; gap: 6px; text-align: center; }
}

 (max-width: 600px) {
  .certificate-card {
    padding: 28px 22px;
    border-radius: 20px;
  }
  .certificate-brand { font-size: 20px; }
  .certificate-name { font-size: 24px; }
}


/* Course editor */
.editor-shell { display: grid; gap: 18px; }
.editor-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
}
.tab-button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.tab-button.active {
  background: rgba(225, 6, 0, 0.15);
  color: var(--white);
}
.editor-panel { display: none; }
.editor-panel.active { display: block; }
.list {
  display: grid;
  gap: 8px;
}
.list-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}
.drag-list { display: grid; gap: 12px; }
.drag-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
}
.drag-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.drag-handle {
  cursor: grab;
  font-size: 18px;
  color: var(--muted);
}
.inline-form {
  display: grid;
  gap: 8px;
  margin: 8px 0 14px;
}
.inline-form input[type="text"],
.inline-form textarea,
.block-form input,
.block-form textarea,
.block-form select {
  width: 100%;
}
.block-form {
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.module-blocks, .lesson-blocks { margin-top: 14px; }
.lesson-preview, .block-preview {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  color: var(--muted);
}

@media (max-width: 720px) {
  .editor-tabs { border-radius: 14px; }
  .tab-button { width: 100%; text-align: left; }
}

/* Content blocks */
.rich-editor {
  min-height: 120px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--white);
}
.rich-editor:focus { outline: 2px solid rgba(225, 6, 0, 0.4); }

.block-viewer {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.block-title { font-weight: 600; margin-bottom: 8px; }
.block-content { color: var(--muted); line-height: 1.6; }

.pdf-frame {
  width: 100%;
  height: 360px;
  border: none;
  border-radius: 12px;
  background: #0f0f16;
  margin-bottom: 8px;
}

.video-frame {
  position: relative;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: #0f0f16;
  margin-bottom: 8px;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-file {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 8px;
}

.link-card a { color: var(--white); font-weight: 600; }
.link-card p { color: var(--muted); margin: 6px 0 0; }
