/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: system-ui, Arial, sans-serif;
  background: #0d0d0d;
  color: #f5f5f5;
}

/* ===== CONTAINER ===== */
body {
  padding: 12px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}

/* ===== TEXT ===== */
h1 {
  color: #ff2a2a;
  margin-bottom: 4px;
}

.subtitle {
  color: #bbb;
  margin-bottom: 16px;
}

/* ===== LAYOUT ===== */
.layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.layout > * {
  margin-left: auto;
  margin-right: auto;
}

/* ===== PLAYER ===== */
.player {
  flex: 2;
  position: sticky;
  top: 16px;
  background: #000;
  padding: 10px;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255,42,42,0.45);
}

.video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== LESSON LIST ===== */
.list {
  flex: 1;
  background: #111;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 0 0 1px rgba(255,42,42,0.45);
  max-height: calc(92vh - 140px);
  overflow-y: auto;
}

/* ===== LESSON ITEM ===== */
.item {
  cursor: pointer;
  padding: 10px 12px;
  margin: 6px 0;
  border-radius: 10px;
  background: #1a1a1a;
  transition: background 0.2s ease, transform 0.1s ease;
  font-size: 14px;
}

.item:hover {
  background: #ff2a2a;
  transform: translateX(4px);
}

.item.active {
  background: #ff2a2a;
  font-weight: 600;
}

/* ===== SCROLLBAR ===== */
.list::-webkit-scrollbar {
  width: 6px;
}

.list::-webkit-scrollbar-thumb {
  background: #ff2a2a;
  border-radius: 4px;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

  body {
    padding: 0;
  }

  .container {
    padding: 0 12px;
  }

  .layout {
    flex-direction: column;
    align-items: center;
  }

  .player,
  .list {
    width: 100%;
  }

  .player {
    position: static;
  }

  .list {
    max-height: calc(88vh - 60vw);
  }
}
