/* ===============================
   Base reset
   =============================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #f8f9fb;
  color: #111827;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

/* ===============================
   App layout
   =============================== */
#app {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px;
}

/* Экранная логика управляется JS
   screen.style.display = "block"
   el.style.display = "none"
*/
.screen {
  display: none;
}

/* ===============================
   Home screen
   =============================== */
.home-title {
  font-size: 22px;
  font-weight: 700;
  margin: 8px 0 20px;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Карточка эпизода — компактная, 5 на экран */
.episode-item {
  display: grid;
  grid-template-columns: 30% 70%;
  align-items: center;
  height: 72px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.episode-item:hover {
  border-color: #c7d2fe;
  background: #f9fafb;
}

.episode-item:active {
  transform: scale(0.985);
}

/* Картинка эпизода */
.episode-item__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Название эпизода */
.episode-item__title {
  padding: 0 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: #111827;
}

/* ===============================
   Episode header
   =============================== */
.episode-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.btn-home {
  background: transparent;
  border: none;
  padding: 4px 6px;
  font-size: 14px;
  color: #2563eb;
  cursor: pointer;
}

.btn-home:active {
  opacity: 0.6;
}

.episode-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

/* ===============================
   Video block
   =============================== */
.episode-video {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #000000;
  margin-bottom: 20px;
  margin-bottom: 10px;
}

.episode-video iframe {
  display: block;
  width: 100%;
  height: 215px;
}

#video-restart {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
}

#video-restart:active {
  transform: scale(0.95);
}

/* ===============================
   Phrase section
   =============================== */
.phrase-section {
  margin-top: 8px;
}

.phrase-section__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
}

.phrase-section__subtitle{
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 4px;
}

.phrase-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* ===============================
   Phrase card
   =============================== */
/* Левая колонка — обёртка */
.phrase-item__content {
  display: flex;
  flex-direction: column;
}
/* Правая колонка — обёртка */
.phrase-item__actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

.phrase-item {
  display: grid;
  grid-template-columns: 80% 20%;
  gap: 12px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
}


.phrase-item__ru {
  font-size: 17px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
}

.phrase-item__en {
  font-size: 16px;
  font-weight: 500;
  color: #111827;
  min-height: 22px;

  transition: filter 0.15s ease, opacity 0.15s ease;
}

.phrase-item__en.is-hidden {
  filter: blur(4px);
  opacity: 0.3;
  background-color: gray;
}

/* Раскрытие */
.phrase-item__en:not(.is-hidden) {
  filter: blur(0);
  opacity: 1;
}

/* Кнопка */
.phrase-item__listen {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #2563eb;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phrase-item__listen:hover {
  background: #1d4ed8;
}

.phrase-item__listen:active {
  transform: scale(0.94);
}

/* === Practice instruction block === */

.phrase-section__info {
  margin-top: 20px;
  padding: 16px;
  background: #ffffff;            /* чистый фон */
  border: 1px solid #e5e7eb;      /* нейтральная рамка */
  border-left: 4px solid #2563eb; /* акцент-индикатор инструкции */
  border-radius: 14px;
}

/* Заголовок инструкции */
.practice-note__title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 10px;
}

/* Список шагов */
.practice-note__list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.practice-note__list li {
  font-size: 14px;
  color: #374151;
  line-height: 1.4;
}

/* Подсказка / принцип */
.practice-note__hint {
  margin-top: 12px;
  font-size: 13px;
  color: #6b7280;
}

.practice-note__hint strong {
  font-weight: 600;
  color: #111827;
}

/* === Summary / completion block === */

.phrase-section__sumpu {
  margin-top: 24px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #16a34a; /* спокойный зелёный — завершение */
  border-radius: 16px;
  margin-bottom: 10px;
}

/* Заголовок итога */
.after-phrases__title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
}

/* Лид-абзац */
.after-phrases__lead {
  font-size: 14px;
  color: #374151;
  margin: 0 0 12px;
  line-height: 1.4;
}

/* Шаги */
.after-phrases__steps {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.after-phrases__steps li {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.4;
}