:root {
  color-scheme: dark;
  background: #2e2e2e;
  color: #f5f5f5;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #2e2e2e;
  color: #f5f5f5;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  padding: 1.5rem;
  background: #383838;
  border-bottom: 1px solid #464646;
}

.app-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 2.4vw, 2.6rem);
}

.app-header p {
  margin: 0;
  color: #d8d8d8;
}

.app-main {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  padding: 1.5rem;
}

.lesson-list {
  background: #363636;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 1rem;
  position: sticky;
  top: 1.5rem;
  align-self: start;
  max-height: calc(100vh - 3.5rem);
  overflow: auto;
}

.lesson-list h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.lesson-button {
  padding: 0.65rem 0.9rem;
  background: linear-gradient(180deg, #3b3b3b, #393939);
  border: 1px solid #505050;
  color: #f5f5f5;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.12s ease, box-shadow 0.12s ease;
  font-size: 0.98rem;
}

.lesson-button:hover,
.lesson-button:focus {
  background: #4b4b4b;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.lesson-button.active {
  background: linear-gradient(180deg, #5e5e5e, #575757);
  border-color: #8b8b8b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.lesson-title {
  margin: 0 0 1rem;
  font-size: 1.55rem;
  color: #ffe082;
  line-height: 1.2;
}

.lesson-content {
  min-height: 420px;
  background: linear-gradient(180deg,#383838,#343434);
  border: 1px solid #444;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.placeholder,
.output {
  width: 100%;
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  background: #2f2f2f;
  border-radius: 10px;
  color: #cfcfcf;
  line-height: 1.7;
  padding: 1rem;
}

.hidden {
  display: none;
}

.output {
  white-space: normal;
  overflow-y: auto;
  max-height: 70vh;
  color: #f2f2f2;
  line-height: 1.65;
  padding-right: 0.5rem;
}

.lesson-heading {
  margin: 1rem 0 0.35rem;
  font-size: 1rem;
  color: #ffeead;
}

.lesson-spacer {
  height: 0.8rem;
}

.lesson-image-wrapper {
  margin: 1rem 0;
  text-align: center;
}

.lesson-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid #555;
}

.lesson-image-caption {
  margin-top: 0.5rem;
  color: #c3c3c3;
  font-size: 0.95rem;
}

.lesson-list-items {
  margin: 1rem 0;
  padding-left: 1.4rem;
  color: #f3f1c5;
}

.lesson-list-items li {
  margin: 0.45rem 0;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .app-main {
    grid-template-columns: 1fr;
  }
}
