:root {
  --course-bg: #050505;
  --course-panel: #0d0d11;
  --course-panel-2: #111117;
  --course-border: rgba(255, 255, 255, 0.1);
  --course-text: #f4f4f0;
  --course-muted: rgba(244, 244, 240, 0.66);
  --course-muted-2: rgba(244, 244, 240, 0.42);
  --course-accent: #ffffff;
  --course-accent-text: #000000;
  --course-success: #29d17c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--course-bg);
  color: var(--course-text);
  font-family: "Manrope", sans-serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.course-shell {
  width: min(1240px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.course-shell.is-loading .course-content,
.course-shell.is-loading .guide-content,
.course-shell.is-loading .member-footer {
  display: none;
}

.course-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 38px;
}

.site-logo {
  width: 60px;
  height: auto;
  object-fit: contain;
}

.simple-link {
  color: var(--course-muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.simple-link:hover {
  color: var(--course-text);
}

.course-divider {
  height: 1px;
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.08);
}

.mono-label,
.course-stat-label,
.course-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.course-hero {
  padding: 52px 0 28px;
}

.mono-label {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--course-muted);
}

.course-hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  max-width: 10ch;
}

.course-copy {
  margin: 18px 0 0;
  max-width: 68ch;
  color: var(--course-muted);
  font-size: 1.02rem;
}

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

.action-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.action-button {
  border: 1px solid transparent;
  background: var(--course-accent);
  color: var(--course-accent-text);
  font-weight: 700;
}

.secondary-button,
.ghost-button {
  border: 1px solid var(--course-border);
  background: transparent;
  color: var(--course-text);
}

.action-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.loader-line {
  min-height: 24px;
  color: var(--course-muted);
}

.hidden {
  display: none !important;
}

.course-overview {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.course-stat {
  padding: 16px;
  border: 1px solid var(--course-border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.course-stat-label {
  color: var(--course-muted-2);
  font-size: 10px;
}

.course-stat-value {
  margin-top: 8px;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.course-content {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.course-sidebar,
.course-main,
.guide-panel {
  border: 1px solid var(--course-border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.course-sidebar {
  position: sticky;
  top: 18px;
  overflow: hidden;
}

.course-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.course-sidebar-title {
  margin: 0;
  font-size: 0.95rem;
  color: var(--course-text);
}

.course-progress-meta {
  color: var(--course-muted);
  font-size: 0.78rem;
}

.course-list {
  display: grid;
}

.course-item {
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.course-item:hover,
.course-item.is-active {
  background: rgba(255, 255, 255, 0.05);
}

.course-item-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.course-item-index {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--course-muted);
  font-size: 12px;
}

.course-item.is-complete .course-item-index {
  background: rgba(41, 209, 124, 0.16);
  color: var(--course-success);
}

.course-item-copy h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.course-item-copy p {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--course-muted);
}

.course-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--course-muted-2);
  font-size: 0.75rem;
}

.course-main {
  padding: 18px;
}

.course-video-shell {
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.course-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.course-player-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.course-section {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.course-section h2,
.course-section h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

.course-section h2 {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.course-section p {
  margin: 12px 0 0;
  color: var(--course-muted);
}

.course-section ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--course-muted);
}

.course-section li + li {
  margin-top: 8px;
}

.course-resource-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.course-resource-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: var(--course-text);
  background: rgba(255, 255, 255, 0.03);
}

.course-resource-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.course-secret {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.course-secret-label {
  color: var(--course-muted-2);
  font-size: 11px;
}

.course-secret-text {
  margin-top: 8px;
  color: var(--course-text);
  word-break: break-word;
}

.course-code {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.36);
  color: rgba(244, 244, 240, 0.84);
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.guide-content {
  max-width: 900px;
}

.guide-panel {
  padding: 26px;
}

.guide-rendered h1,
.guide-rendered h2,
.guide-rendered h3 {
  letter-spacing: -0.04em;
}

.guide-rendered h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.98;
  margin: 0 0 20px;
}

.guide-rendered h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.04;
  margin: 32px 0 14px;
}

.guide-rendered h3 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  margin: 24px 0 12px;
}

.guide-rendered p,
.guide-rendered li {
  color: var(--course-muted);
  line-height: 1.75;
}

.guide-rendered p {
  margin: 0 0 16px;
}

.guide-rendered ul,
.guide-rendered ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.guide-rendered li + li {
  margin-top: 8px;
}

.guide-rendered pre {
  margin: 18px 0;
  padding: 16px;
  border-radius: 16px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(244, 244, 240, 0.84);
  font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.guide-rendered code {
  padding: 0.1em 0.35em;
  border-radius: 0.45em;
  background: rgba(255, 255, 255, 0.08);
  color: var(--course-text);
  font: 0.92em ui-monospace, SFMono-Regular, Menlo, monospace;
}

.guide-rendered pre code {
  padding: 0;
  background: transparent;
}

.guide-rendered a {
  color: var(--course-text);
  text-decoration-color: rgba(255, 255, 255, 0.24);
  text-underline-offset: 0.18em;
}

.member-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 0 0;
  margin-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 980px) {
  .course-content,
  .course-overview {
    grid-template-columns: 1fr;
  }

  .course-sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .course-shell {
    width: min(100vw - 28px, 1240px);
  }

  .course-main,
  .course-sidebar,
  .guide-panel {
    border-radius: 20px;
  }

  .course-topline {
    flex-direction: column;
    align-items: flex-start;
  }
}
