/* =========================
   1) BASE
   ========================= */

.mt-page.wrapper-content{
  background: transparent;
  padding: 0px !important;
  max-width: 100% !important;
  display: block;
  margin: 0px;
  border: none;
}

.mt-page .card.mt-cardShell{
  width:100%;
  margin:0 auto;
  background:#f6f7fb;
  border-radius:0px;
  padding:0;
  box-shadow:none;
  border:none !important;
  overflow:hidden;
}

.mt-page .card.mt-cardShell:hover{
  box-shadow:none !important;
  font-weight:normal !important;
}

.reb-container{ display:none !important; }

.mt-page .main-test{
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding: 18px 24px 30px;
}

/* Responsive shell */
@media (max-width: 980px){
  .mt-page .card.mt-cardShell{
    max-width:760px;
  }
  .mt-page .main-test{
    max-width:100%;
    padding: 0px;
  }
}

/* =========================
   2) TOP GREEN BAR (DESKTOP)
   ========================= */

.mt-page .mt-topBar{
  background:#fff;
  color:#fff;
  display:flex;
  align-items:center;
  gap:14px;
  padding: 14px 18px;
}

.mt-page .mt-topBar__back{
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-weight:900;
  font-size:22px;
  color:#000;
  border-radius:12px;
  flex: 0 0 auto;
}
.mt-page .mt-topBar__back:hover{
  background: rgba(255,255,255,.14);
}

.mt-page .mt-topBar__title{
  margin:0;
  font-size: 16px;
  font-weight: 300;
  color:#fff;
  text-align:left;
  line-height:1.1;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mt-page .mt-topBar__titleAccent{ color:#000; }
.mt-page .mt-topBar__titleRest{ color:#000; }

.mt-page .mt-topBar__btn{
  height:44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.10);
  color:#000;
  font-weight: 300;
  cursor:pointer;
  flex: 0 0 auto;
}
.mt-page .mt-topBar__btn:hover{
  background: rgba(255,255,255,.16);
}

/* mobile: кнопка уходит вниз */
@media (max-width: 640px){
  .mt-page .mt-topBar{
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 12px;
  }
  .mt-page .mt-topBar__title{
    flex: 1 1 calc(100% - 54px);
  }
  .mt-page .mt-topBar__btn{
    width: 100%;
  }
}

/* =========================
   ✅ 2.05) MOBILE GREEN TOP BAR (NEW)
   ========================= */

.mt-page{
  --mtMobileBarH: 60px;
}

.mt-mTopBar{
  display:none; /* показываем только на мобилке */
  height: var(--mtMobileBarH);
  background: #242424;
  color:#fff;
  align-items:center;
  justify-content: space-between;
  padding: 0 14px;
}

.mt-mTopBar__title{
  margin:0;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.1;
  min-width: 0;
  flex: 1 1 auto;
}

.mt-mTopBar__titleText{
  display:block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.mt-mTopBar__menuBtn{
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,.18);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}

.mt-mTopBar__menuBtn:hover{
  background: rgba(255,255,255,.24);
}

.mt-mTopBar__menuIcon{
  width: 18px;
  height: 12px;
  display:block;
  background:
    linear-gradient(#fff,#fff) 0 0/100% 2px,
    linear-gradient(#fff,#fff) 0 50%/100% 2px,
    linear-gradient(#fff,#fff) 0 100%/100% 2px;
  background-repeat:no-repeat;
  border-radius: 2px;
}

/* ВКЛ/ВЫКЛ desktop/mobile хедера */
@media (max-width: 640px){
  .mt-mTopBar{ display:flex; }
  .mt-topBar--desktop{ display:none !important; }
}

/* =========================
   ✅ 2.1) PROGRESS BAR (UNDER GREEN BAR)
   ========================= */

.mt-page .mt-progressWrap{
  background:#fff;
}

/* ВАЖНО: если progress_bar.php делает fixed/top:0 — ломаем это только внутри mt-page */
.mt-page .mt-progressWrap *,
.mt-page .mt-progressWrap{
  top: auto !important;
  left: auto !important;
  right: auto !important;
}

.mt-page .mt-progressWrap .progress,
.mt-page .mt-progressWrap .progress-bar,
.mt-page .mt-progressWrap .progressBar,
.mt-page .mt-progressWrap .progress_bar,
.mt-page .mt-progressWrap .progress__bar,
.mt-page .mt-progressWrap .progress_line,
.mt-page .mt-progressWrap .progress__line{
  position: relative !important;
}

/* На всякий случай: если у корневого прогресса стоит fixed в глобальном CSS */
.mt-page .progress,
.mt-page .progress-bar,
.mt-page .progressBar,
.mt-page .progress_bar,
.mt-page .progress__bar{
  position: relative !important;
}

/* =========================
   3) LAYOUT (2 columns)
   ========================= */

.mt-page .js-mainTestWrapper{ display:block; }

.mt-page .mt-quizLayout{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:26px;
  align-items:center;
  padding: 10px 0 6px;
}

.mt-page .mt-quizIll{
  display:flex;
  align-items:center;
  justify-content:center;
}

.mt-page .mt-quizMain{ width:100%; }

@media (max-width: 980px){
  .mt-page .mt-quizLayout{
    grid-template-columns: 1fr;
    gap:18px;
    padding: 10px 10px 6px;
  }
}

/* =========================
   4) IMAGE
   ========================= */

.mt-page .mainTestImage{
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  width:100%;
}

.mt-page .mainTestImage__image{
  max-width:320px;
  width:100%;
  height:auto;
  display:block;
  border-radius:0;
  transform:none !important;
}

@media (max-width: 980px){
  .mt-page .mainTestImage__image{ max-width:360px; }
}

.mt-page .player_icon{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  width:42px;
  height:42px;
}

/* =========================
   5) RIGHT COLUMN
   ========================= */

.mt-page .js-mainTestInstruction{
  text-align:center;
  margin: 0 0 8px 0;
}

.mt-page .main-test__user-word{
  display:flex;
  gap:8px;
  justify-content:center;
  flex-wrap:wrap;
  margin: 6px auto 0;
  padding: 0;
}

.mt-page .user-slot{
  width:clamp(28px, 7.5vw, 40px);
  height:clamp(34px, 9vw, 48px);
  background:transparent;
  border:none;
  border-bottom:2px solid #8b8f93;
  border-radius:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:clamp(16px, 4.6vw, 20px);
  color:#222;
}
.mt-page .user-slot.sep{
  width:24px;
  height:clamp(34px, 9vw, 48px);
  border-bottom:none;
  background:transparent;
}

.mt-page .main-test__sentence{
  margin: 10px auto 0;
  padding: 6px 10px 10px;
  font-size: clamp(16px, 4.4vw, 18px);
  color:#333;
  background: transparent;
  text-align:center;
  font-weight:700;
}

.mt-page .js-introduction{
  text-align:center;
  font-size:16px;
  color:#111;
  margin-top: 8px;
}
.mt-page .js-introductionButton{ display:none !important; }

.mt-page .main-test__introduction__content{
  padding: 8px 10px 0;
  font-size: 16px;
  color:#111;
}

.mt-page .main-test__content{
  display:block;
  padding:0;
}

.mt-page .main-test__rightCol{
  width:100%;
  max-width:100%;
}

.mt-page .main-test__options{
  height:auto;
  margin-top: 14px;
  text-align:center;
  font-size:16px;
}

/* =========================
   6) LETTER BUTTONS
   ========================= */

.mt-page .letter-button{
  min-width:clamp(34px, 8vw, 42px);
  height:clamp(34px, 8vw, 42px);
  margin: 0 10px 10px 0;
  font-size:clamp(14px, 4.2vw, 16px);
  font-weight:800;
  border-radius:10px;
  border:1px solid #d7dbeb;
  background:#fff;
  box-shadow:none;
  cursor:pointer;
  color:#242424;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}

.mt-page .letter-button--error{
  background:#ffebee;
  border-color:#ff6b6b;
}

.mt-page .letter-button--mask{ position:relative; }
.mt-page .letter-button--mask::after{
  content: attr(data-count);
  position:absolute;
  top:-10px;
  right:-7px;
  width:22px;
  height:22px;
  border-radius:50%;
  line-height:22px;
  font-size:13px;
  font-weight:900;
  background:#dadada;
  color:#fff;
}

/* DISABLED LETTERS */
.mt-page .letter-button:disabled{
  opacity: .35 !important;
  cursor: default !important;
  transform: none !important;
  pointer-events: none !important;
  background: #f2f3f5 !important;
  border-color: #e1e5f2 !important;
  color: #9aa3b2 !important;
  box-shadow: none !important;
}
.mt-page .letter-button:disabled.letter-button--mask::after{
  opacity: .45 !important;
}

/* pagination */
.mt-page .main-test__panel{
  margin-top:12px;
  text-align:center;
  font-size:16px;
  display: none;
}
.mt-page .main-test__pagination{
  display:block;
  font-weight:800;
  color:#1b1f3a;
}

/* Mobile buttons grid */
@media (max-width: 420px){
  .mt-page .main-test__options{
    display:grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    justify-items: stretch;
  }
  .mt-page .letter-button{
    width:100%;
    min-width:0;
    margin:0;
  }
}

/* =========================
   7) Animation
   ========================= */

.mt-page .mt-card{
  will-change: transform, opacity;
  opacity: 1 !important;
  transform: translateX(0) !important;
  transition: transform .22s ease, opacity .22s ease !important;
}
.mt-page .mt-card.mt-out{
  opacity: 0 !important;
  transform: translateX(-40px) !important;
}
.mt-page .mt-card.mt-in{
  opacity: 0 !important;
  transform: translateX(40px) !important;
}
.mt-page .mt-card.mt-in.mt-in--on{
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* existing override */
@media screen and (max-width: 1260px) {
  .wrapper-content { padding: 10px 10px 6px !important; }
  .mt-page .card.mt-cardShell { background: transparent !important; }
}

/* =========================
   8) RESULT SCREEN CENTERING
   ========================= */

.mt-page .mt-quizLayout.mt-result-layout{
  grid-template-columns: 1fr !important;
  justify-items: center !important;
  align-items: start !important;
  padding: 0 !important;
}

.mt-page .mt-quizLayout.mt-result-layout .mt-quizMain{
  width: 100% !important;
  max-width: 560px !important;
  margin: 0 auto !important;
  text-align: center !important;
}

.mt-page .mt-quizLayout.mt-result-layout .js-mainTestInstruction,
.mt-page .mt-quizLayout.mt-result-layout .js-mainTestSentence,
.mt-page .mt-quizLayout.mt-result-layout .js-userWord,
.mt-page .mt-quizLayout.mt-result-layout .js-introduction{
  /*display: none !important;*/
}

.mt-page .mt-quizLayout.mt-result-layout .main-test__content_resultScreen{
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
  padding-top: 10px !important;
}

.mt-page .mt-quizLayout.mt-result-layout .main-test__resultScreen-text{
  text-align: center !important;
  margin: 14px auto 10px !important;
  max-width: 560px !important;
}

.mt-page .mt-quizLayout.mt-result-layout .main-test__resultScreen-button{
  display: inline-flex !important;
  justify-content: center !important;
}


/* =========================================================
   FIX: убираем большой "серый блок" прогресса и зазор
   Добавить в САМЫЙ КОНЕЦ CSS
   ========================================================= */

.mt-page .mt-progressWrap{
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* глушим стили контейнера прогресса (они и создают "плиту") */
.mt-page .mt-progressWrap .pb-container,
.mt-page .mt-progressWrap .pb-content{
  margin: 0 !important;
  padding: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* делаем сам прогресс тонкой полосой */
.mt-page .mt-progressWrap .progress-bar{
  margin: 0 !important;
  padding: 0 !important;
  height: 8px !important;        /* можно 6px если хочешь тоньше */
  display: flex !important;
  align-items: stretch !important;
  gap: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: hidden !important;   /* чтобы не было округлений/вылезаний */
}

/* чтобы элементы НЕ растягивали контейнер по высоте */
.mt-page .mt-progressWrap .progress-bar__item{
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* и убираем возможные "раздвигатели" вокруг */
.mt-page .mt-progressWrap *{
  line-height: normal !important;
}

/* добиваем зазор сверху у теста (если он тоже добавлял расстояние) */
.mt-page .main-test{
  padding-top: 50px !important;
  padding-bottom: 50px !important;
}

.mt-page .mt-quizLayout{
  padding-top: 50px !important;
  padding-bottom: 50px !important;
  margin-top: 0 !important;
}

@media screen and (max-width: 790px) {
    footer {
        display: block;
    }
    .mt-page .mt-quizLayout{
      padding-top: 0px !important;
    }
}

/* =========================================================
   FIX: mobile top bar must be clickable (menu button)
   Добавить в САМЫЙ КОНЕЦ CSS
   ========================================================= */

@media (max-width: 640px){
  .mt-mTopBar{
    position: relative;
    z-index: 20;
  }
  .mt-mTopBar__menuBtn{
    position: relative;
    z-index: 21;
    pointer-events: auto;
  }
}

.mt-mMenu{ z-index: 9998; }
.vt-modal{ z-index: 9999; }

/* =========================
   MOBILE TOP BAR: fixed on scroll
   ========================= */
@media (max-width: 640px){
  .mt-mTopBar{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mtMobileBarH);
    z-index: 1000; /* выше контента и mobile-menu */
  }

  /* чтобы тест не уходил под fixed-шапку */
  .mt-page .mt-progressWrap{
    margin-top: var(--mtMobileBarH) !important;
  }
}