.battlepass-container {
    background-color: black;
    text-align: center;
    margin-top: -200px;
}
.battlepass-button:disabled {
    background: #444;
    cursor: not-allowed;
    color: #999;
    box-shadow: none;
    border: 1px solid #555;
}

.battlepass-title {
    font-family: 'Playfair Display SC', serif;
    font-size: 96px;
    color: white;
    margin-bottom: 40px;
}

.battlepass-buttons {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.battlepass-button {
    font-family: 'Playfair Display SC', serif;
    font-size: 24px;
    color: white;
    background-color: transparent;
    border: 2px solid red;
    padding: 12px 24px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s ease;
}

.battlepass-button:hover {
    background-color: red;
    color: black;
}




.battlepass-info {
    margin-bottom: -60px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    padding: 60px 10%;
    background-color: black;
    flex-wrap: wrap;
}

.battlepass-image {
    width: 775px;
    height: 510px;
    object-fit: cover;
    border: 3px solid red;
    border-radius: 20px;
}

.battlepass-text {
    width: 600px;
    height: 510px;
    color: white;
    font-family: 'Playfair Display SC', serif;
    font-size: 22px;
    line-height: 1.6;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.battlepass-text h2 {
    font-size: 40px;
    margin-bottom: 20px;
    color: white;
}






.battlepass-split-section {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 60px;
    padding: 100px 10%;
    background-color: black;
    flex-wrap: wrap;
}

.split-box {
    flex: 1;
    min-width: 400px;
    padding: 40px;
    border: 3px solid red;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    color: white;
    font-family: 'Playfair Display SC', serif;
    font-size: 20px;
    line-height: 1.8;
}

.split-box h3 {
    font-size: 32px;
    margin-bottom: 20px;
    color: white;
    border-bottom: 2px solid red;
    padding-bottom: 10px;
}







.battlepass-levels {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    padding: 80px 10%;
    background-color: black;
    flex-wrap: nowrap; /* Располагаем в ряд */
    overflow-x: auto;   /* Прокрутка, если экран маленький */
}

.level-box {
    flex: 1;
    min-width: 320px;
    max-width: 400px;
    padding: 40px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
    color: white;
    font-family: 'Playfair Display SC', serif;
    text-align: center;
}

.level-box h3 {
    font-size: 32px;
    margin-bottom: 20px;
    border-bottom: 2px solid red;
    padding-bottom: 10px;
    color: white;
}

.level-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 18px;
    text-align: left;
    line-height: 1.6;
    color: white; /* Белый текст */
}

.level-box ul li {
    margin-bottom: 10px;
    color: white; /* Белый текст для пунктов */
}






.battlepass-buy-info {
    width: 1000px;
    max-width: 95%;
    margin: 0 auto;
    padding: 80px 0;
    background-color: black;
    color: white;
    font-family: 'Playfair Display SC', serif;
    font-size: 20px;
    line-height: 1.8;
    text-align: left;
}

.battlepass-buy-info h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: white;
    border-bottom: 2px solid red;
    padding-bottom: 10px;
}

.battlepass-buy-info .highlight {
    font-size: 22px;
    font-weight: bold;
    margin-top: 30px;
    color: #ff4d4d;
}







/* .modal-content-two {
    width: 1200px;
    max-width: 95%;
    margin: 40px auto;
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    color: black;
    font-family: 'Playfair Display SC', serif;
    position: relative;
    overflow: hidden;
    height: auto;
}

.rating-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 30px;
}

.rating-column {
    flex: 1;
    background-color: #f8f8f8;
    color: black;
    border-radius: 16px;
    padding: 20px;
    max-height: 500px;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.rating-column h3 {
    text-align: center;
    font-size: 24px;
    color: red;
    margin-bottom: 15px;
}

.rating-entry {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

 */



.rating-grid {
    display: flex;
    justify-content: space-around;
    padding: 30px;
    gap: 30px;
    background: #0d0d0d;
    color: white;
    font-family: 'Playfair Display SC', serif;
}

.rating-column {
    flex: 1;
    background: #1a1a1a;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(255,255,255,0.05);
}

.rating-column h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: #FFD700;
}

.rating-entry {
    background: #2a2a2a;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 12px;
    text-align: center;
    transition: 0.3s ease;
}

.rating-entry:hover {
    background: #333;
}

.login {
    font-weight: bold;
    font-size: 18px;
    color: #ffffff;
}

.level, .points {
    font-size: 14px;
    color: #ccc;
}





.checkpoint-button {
  padding: 10px 20px;
  margin: 5px;
  border-radius: 8px;
  background: #222;
  color: white;
  border: 1px solid #666;
  cursor: pointer;
  transition: all 0.2s ease;
}
.checkpoint-button:hover {
  background: #333;
  transform: scale(1.05);
}
.checkpoint-disabled {
  background: #444 !important;
  opacity: 0.3;
  cursor: not-allowed;
}






.close-task-map{
    cursor: pointer;
}




.task-card {
  background: linear-gradient(145deg, #1c1c1c, #2e2e2e);
  color: white;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 10px;
  border-left: 5px solid #e91e63;
  box-shadow: 0 0 12px rgba(0,0,0,0.6);
}
.task-card h4 {
  margin: 0 0 5px;
  font-size: 18px;
}
.task-card .desc {
  font-size: 14px;
  color: #ccc;
}
.task-card .points {
  font-weight: bold;
  color: #ffc107;
}
.checkpoint-button {
  background: #1f1f1f;
  color: white;
  border: 1px solid #444;
  padding: 12px 20px;
  margin: 6px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s;
}
.checkpoint-button:hover {
  background: #333;
  transform: scale(1.03);
}
.checkpoint-button[disabled] {
  background: #444;
  opacity: 0.5;
  cursor: not-allowed;
}




.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 30px;
  justify-items: center;
  background-color: #000;
}

.task-wrapper {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background-color: #1c1c1c;
  padding: 15px;
  border-radius: 12px;
  width: 90%;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
  position: relative;
  margin-top: 10px;
}

.task-wrapper h4 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #fff;
  text-align: left;
}

.task-wrapper .desc {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 10px;
  text-align: left;
}

.task-wrapper .points {
  font-size: 14px;
  color: #ffc107;
  text-align: left;
}

.checkpoint-button {
  margin-top: 10px;
  padding: 10px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #444;
  background-color: #1f1f1f;
  color: white;
  cursor: pointer;
  transition: 0.3s ease;
}

.checkpoint-button:hover {
  background-color: #333;
  transform: scale(1.03);
}

.checkpoint-button[disabled] {
  background-color: #000;
  opacity: 0.5;
  cursor: not-allowed;
}








/* Оверлей модалки */
#rewardsModal{
  display: none;                /* JS ставит flex */
  position: fixed;
  inset: 0;
  z-index: 10000;               /* выше шапки */
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Коробка модалки */
#rewardsModal .modal-content-two{
  width: min(1000px, 92vw);
  max-height: 90vh;            /* чтобы не уходило за экран */
  background: #000;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 0, 0, .5);
  overflow: hidden;            /* общий скролл скрыт */
}

/* Внутри — скроллим только контент */
#userRewardsContent{
  max-height: 75vh;
  overflow-y: auto;
  padding: 16px;
}


.reward-item h3{ margin: 10px 0; }


/* Кнопка закрытия (если нужна стилизация) */
.close-rewards{
  cursor: pointer;
}

/* На всякий случай: шапку ниже модалки */
.header-container{ z-index: 1; }
.reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.reward-item img {
    display: block;
    margin: 0 auto 10px auto;
    max-width: 250px;
    height: auto;
    object-fit: contain;
}















/* ===== АДАПТАЦИЯ ПОД РАЗНЫЕ ЭКРАНЫ ===== */
@media (max-width: 1024px) {
    .battlepass-title {
        font-size: 64px;
        margin-bottom: 20px;
    }

    .battlepass-image {
        width: 100%;
        height: auto;
    }

    .battlepass-text {
        width: 100%;
        height: auto;
    }

    .battlepass-info {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        padding: 40px 5%;
    }

    .battlepass-split-section {
        flex-direction: column;
        padding: 60px 5%;
    }

    .split-box {
        min-width: unset;
    }

    .battlepass-levels {
        flex-wrap: wrap;
        gap: 30px;
        padding: 50px 5%;
    }

    .level-box {
        min-width: 280px;
        max-width: 100%;
    }

    .battlepass-buy-info {
        width: 100%;
        padding: 50px 5%;
    }
}

@media (max-width: 768px) {
    .battlepass-title {
        font-size: 42px;
        margin-bottom: 15px;
    }

    .battlepass-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .battlepass-button {
        font-size: 18px;
        padding: 10px 18px;
    }

    .battlepass-info {
        padding: 20px 5%;
        gap: 20px;
    }

    .battlepass-split-section {
        padding: 40px 5%;
        gap: 20px;
    }

    .split-box h3 {
        font-size: 24px;
    }

    .level-box h3 {
        font-size: 24px;
    }

    .rating-grid {
        flex-direction: column;
        padding: 20px;
    }

    .rating-column {
        width: 100%;
    }

    .chapter-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }

    .task-wrapper {
        width: 100%;
    }

    /* Модалка наград */
    #rewardsModal .modal-content-two {
        width: 95%;
        max-height: 85vh;
    }

    #userRewardsContent {
        max-height: 65vh;
    }
}

@media (max-width: 480px) {
    .battlepass-title {
        font-size: 32px;
    }

    .battlepass-button {
        font-size: 16px;
        padding: 8px 14px;
    }

    .split-box {
        padding: 20px;
        font-size: 16px;
    }

    .level-box {
        padding: 20px;
        font-size: 16px;
    }

    .battlepass-buy-info {
        font-size: 16px;
    }

    .checkpoint-button {
        font-size: 12px;
        padding: 8px;
    }

    .task-wrapper h4 {
        font-size: 16px;
    }
}
@media (max-width: 768px) {
    .battlepass-buttons {
        margin-top: 150px; /* подбирай значение под высоту своей шапки */
        flex-direction: column; /* если хочешь в колонку на мобилке */
        gap: 20px;
    }
    .battlepass-button {
    font-family: 'Playfair Display SC', serif;
    font-size: 16px;
    color: white;
    background-color: transparent;
    border: 2px solid red;
    padding: 12px 24px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s ease;

    width: 85%;        /* Сделает кнопки чуть уже */
    max-width: 350px;  /* Ограничение, чтобы не были слишком широкими */
    margin: 0 auto;    /* Центровка */
    display: block;
}
.rating-grid {
    display: flex;
    justify-content: space-around;
    padding: 30px;
    gap: 30px;
    background: #0d0d0d;
    color: white;
    font-family: 'Playfair Display SC', serif;

    /* добавляем */
    max-height: 80vh; /* 80% от высоты экрана */
    overflow-y: auto; /* вертикальный скролл */
}
}
/* === ГЛАВА / КАРТА ЗАДАНИЙ: СТАВИМ В СТОЛБИК + СКРОЛЛ ===
   Работает по признакам: в модалке есть карточки задач (.task-wrapper|.task-card)
   и кнопки чекпоинтов (.checkpoint-button). Требует современный :has() (есть в Chrome/Edge/Opera/Safari). */

/* Контейнер модалки с задачами/чекпоинтами — делаем колонкой */
.modal-content-two:has(.checkpoint-button):has(.task-wrapper, .task-card){
  display: flex !important;
  flex-direction: column !important;      /* ← вертикально */
  align-items: stretch !important;
  gap: 22px !important;

  /* общий скролл внутри модалки */
  max-height: 85vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 8px;                      /* чтобы скролл не наезжал */
}

/* Два «столбца» внутри (левый с заданиями и правый с чекпоинтами)
   теперь занимают всю ширину и становятся друг под другом */
.modal-content-two:has(.checkpoint-button):has(.task-wrapper, .task-card) > *{
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
  float: none !important;                  /* на случай старых float */
}

/* На всякий пожарный гасим любые сетки внутри контейнера двух колонок */
.modal-content-two:has(.checkpoint-button):has(.task-wrapper, .task-card) > *{
  display: block !important;               /* перетираем grid/flex-ряд */
}

/* Список чекпоинтов — вниз и столбиком */
.modal-content-two .checkpoints-list,
.modal-content-two .checkpoint-list{
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

/* Доп. скролл можно повесить на правый блок, если нужно ограничить его отдельно */
.modal-content-two .checkpoints-list,
.modal-content-two [class*="checkpoints"]{
  max-height: none;        /* или, если надо, поставь, например, 70vh */
  overflow-y: visible;
}

/* Красивый скролл */
.modal-content-two:has(.checkpoint-button):has(.task-wrapper, .task-card)::-webkit-scrollbar{ width: 10px; }
.modal-content-two:has(.checkpoint-button):has(.task-wrapper, .task-card)::-webkit-scrollbar-track{ background:#0d0d0d; }
.modal-content-two:has(.checkpoint-button):has(.task-wrapper, .task-card)::-webkit-scrollbar-thumb{
  background:#2a2a2a; border-radius:10px; border:2px solid #0d0d0d;
}
.modal-content-two:has(.checkpoint-button):has(.task-wrapper, .task-card){
  scrollbar-width: thin; scrollbar-color:#2a2a2a #0d0d0d;
}
.tasks-col{ order: 1 !important; }
.checkpoints-col{ order: 2 !important; margin-top: 10px; }
/* ===== 1980px до 1025px — ГОРИЗОНТАЛЬ ===== */
@media (min-width: 1025px) and (max-width: 1980px) {
  #chapterModal .modal-content-three {
    display: flex !important;
    flex-direction: row !important; /* горизонтально */
    align-items: flex-start !important;
    gap: 20px;
  }
  #chapterTasks {
    flex: 2;
    border-right: 1px solid #444;
    padding-right: 20px;
  }
  #taskMapContainer {
    flex: 1;
    padding-left: 20px;
  }
}

/* ===== 1024px и меньше — ВЕРТИКАЛЬ ===== */
@media (max-width: 1024px) {
  #chapterModal .modal-content-three {
    display: flex !important;
    flex-direction: column !important; /* вертикально */
    align-items: stretch !important;
    gap: 20px;
  }
  #chapterTasks,
  #taskMapContainer {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-right: none !important;
    padding: 0 !important;
  }
}
/* ===== ВЕРТИКАЛЬ (≤1024): общий скролл внутри модалки ===== */
@media (max-width: 1024px){
  #chapterModal .modal-content-three{
    /* контейнер уже имеет height: 90vh инлайном — тут даём скролл */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 12px;             /* чтобы полоса не наезжала на контент */
    -webkit-overflow-scrolling: touch; /* плавный скролл на тач-устройствах */
  }

  /* внутри секции не ограничиваем высоту, чтобы скролл был у контейнера */
  #chapterTasks,
  #taskMapContainer{
    max-height: none !important;
    overflow: visible !important;
    border-right: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    flex: 0 0 auto !important;
  }

  /* если чекпоинты рисуются как фикс-блоки — снимаем фикс-ширину на всякий */
  #taskMapContainer > div{ width: 100% !important; }
}

/* чуть приукрасим полосы прокрутки в модалке */
@media (max-width: 1024px){
  #chapterModal .modal-content-three::-webkit-scrollbar{ width:10px; }
  #chapterModal .modal-content-three::-webkit-scrollbar-track{ background:#0d0d0d; }
  #chapterModal .modal-content-three::-webkit-scrollbar-thumb{
    background:#2a2a2a; border-radius:10px; border:2px solid #0d0d0d;
  }
  #chapterModal .modal-content-three{
    scrollbar-width: thin; scrollbar-color:#2a2a2a #0d0d0d;
  }
}
