/* Lecture page specific styling */

.lecture-page {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 20px 20px 60px;
  width: 100%;
  min-height: 100vh;
  overflow: visible;
}

.lecture-content {
  width: 100%;
  max-width: 1280px;
  background-color: transparent;
  color: #ffffff;
  padding: 0 12px;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
  position: relative;
  min-height: 0;
}

#quiz-button {
  align-self: center;
  margin-top: 20px;
}

#lecture-title {
  display: none;
}

.lecture-page.loading::before {
  content: "Loading lecture...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 1.2em;
  opacity: 0.7;
}

body.lecture-inline-active {
  background-color: #000000;
  scroll-snap-type: y mandatory;
}

body.lecture-inline-active #starfield {
  opacity: 1;
  transition: opacity 0.8s ease;
}

body.lecture-inline-active.lecture-stars-faded #starfield {
  opacity: 0;
}

body.lecture-inline-active header {
  transition: transform 0.45s ease, opacity 0.45s ease;
  will-change: transform, opacity;
}

body.lecture-inline-active.lecture-focus-mode header {
  transform: translateY(-130%);
  opacity: 0;
  pointer-events: none;
}

body.lecture-inline-active main {
  transition: margin-top 0.45s ease, padding-top 0.45s ease;
}

body.lecture-inline-active .home-main {
  padding-top: 0;
}

body.lecture-inline-active #course-view {
  padding-top: 0;
}

body.lecture-inline-active #inline-lecture .lecture-page {
  padding-top: 0;
}

.lecture-focus-toggle {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #121212;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  opacity: 0;
  z-index: 1400;
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
  pointer-events: none;
}

.lecture-focus-toggle:hover {
  background: #1a1a1a;
  opacity: 0.85;
}

.lecture-focus-toggle:active {
  transform: translateX(-50%) scale(1.08);
  background: #222;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.lecture-focus-toggle .focus-toggle-icon {
  font-size: 18px;
  transition: transform 0.25s ease;
}

body.lecture-inline-active .lecture-focus-toggle {
  opacity: 0.55;
  pointer-events: auto;
  transform: translateX(-50%);
}

body.lecture-inline-active.lecture-focus-mode .lecture-focus-toggle {
  opacity: 1;
}

body.lecture-inline-active:not(.lecture-focus-mode) .lecture-focus-toggle .focus-toggle-icon {
  transform: rotate(180deg);
}

@media screen and (max-width: 768px) {
  .lecture-focus-toggle {
    top: 10px;
    width: 40px;
    height: 40px;
  }
}
