@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

body {
  font-family: 'Manrope', sans-serif !important;
}

.navbar-brand, .nav-link, h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', sans-serif !important;
}

.desmos-container {
  width: 100%;
  height: 500px;
  margin: 1.5em 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 1.5em 0;
  border-radius: 8px;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.d3-container {
  width: 100%;
  margin: 1.5em 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}

.d3-container svg {
  display: block;
  width: 100%;
  height: auto;
}

.d3-controls {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0.75em 1em;
  background: #f0f0f0;
  border-top: 1px solid #ddd;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  flex-wrap: wrap;
}

.d3-controls label {
  font-weight: 600;
  white-space: nowrap;
}

.d3-controls input[type="range"] {
  flex: 1;
  min-width: 120px;
  accent-color: #2d70b3;
}

.d3-controls .value-display {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  min-width: 60px;
}

.d3-controls button {
  padding: 0.4em 1.2em;
  background: #2d70b3;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 13px;
}

.d3-controls button:hover {
  background: #1a5490;
}

.three-container {
  width: 100%;
  height: 500px;
  margin: 1.5em 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a2e;
  position: relative;
}

.three-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 16px;
  font-family: 'Manrope', sans-serif;
}

.fullscreen-btn:hover {
  background: rgba(0,0,0,0.8);
}

.d3-container .fullscreen-btn,
.three-container .fullscreen-btn {
  position: absolute;
  top: 8px;
  right: 8px;
}

.d3-container {
  position: relative;
}

:fullscreen .d3-container,
:fullscreen .three-container {
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

:fullscreen .d3-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  border-radius: 0;
}

.three-info {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #ccc;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  background: rgba(0,0,0,0.6);
  padding: 6px 12px;
  border-radius: 4px;
  pointer-events: none;
}

.video-switch {
  display: flex;
  gap: 6px;
  margin: 1.5em 0 0 0;
  padding: 0;
}

.video-switch button {
  padding: 0.7em 2em;
  border: 3px solid #2d70b3;
  background: #fff;
  color: #2d70b3;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px 10px 0 0;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.video-switch button.active {
  background: #2d70b3;
  color: #fff;
  border-bottom-color: #2d70b3;
}

.video-switch button:hover:not(.active) {
  background: #dbeafe;
}

.video-panel {
  border: 2px solid #2d70b3;
  border-radius: 0 8px 8px 8px;
  overflow: hidden;
  background: #000;
  margin-bottom: 1.5em;
}

.video-panel .video-source {
  display: none;
}

.video-panel .video-source.active {
  display: block;
}

.video-panel .video-container {
  margin: 0;
  border-radius: 0;
  border: none;
}

.key-formula {
  background: #f8f9fa;
  border-left: 4px solid #0d6efd;
  padding: 1em 1.5em;
  margin: 1em 0;
  border-radius: 0 8px 8px 0;
}

/* ---- Physics lesson additions ---- */
.lesson-hero {
  background: linear-gradient(135deg, #11113a 0%, #2b2b6e 60%, #3a2d6e 100%);
  color: #fff;
  padding: 2.4em 2em;
  border-radius: 12px;
  margin: 0 0 1.6em 0;
}
.lesson-hero.compact { padding: 1.7em 1.8em; }
.lesson-hero .lesson-kicker {
  text-transform: uppercase; letter-spacing: 0.09em;
  font-size: 0.78em; opacity: 0.82; margin: 0 0 0.5em;
}
.lesson-hero h1, .lesson-hero h2 { color: #fff; margin: 0 0 0.35em; border: none; padding: 0; }
.lesson-hero p { margin: 0; opacity: 0.92; font-size: 1.04em; line-height: 1.5; }
.key-frame { width: 100%; border-radius: 8px; border: 1px solid #ddd; margin: 0.4em 0; }
.frame-caption { font-size: 0.85em; color: #666; text-align: center; margin: 0.2em 0 1.4em; }
.transcript-panel { margin: 1em 0; }
.transcript-text { white-space: pre-wrap; font-size: 0.86em; line-height: 1.5; max-height: 460px; overflow-y: auto; background: #fafafa; padding: 1em; border-radius: 8px; }
