/* ========== BATTLE PASS ==========
   Оверлей/окно — тот же паттерн, что у leaderboard_styles.css (fixed + центрирование). */

#battlePassOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

#battlePassWindow {
  background: white;
  width: 96%;
  max-width: 760px;
  max-height: 88vh;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

#battlePassContent {
  padding: 18px;
  overflow-y: auto;
}

.bp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.bp-season-name {
  font-size: 22px;
  font-weight: 800;
  color: #3d3494;
}

.bp-season-ends { font-size: 12px; color: #888; }

.bp-active-badge {
  background: #e8f5e9;
  color: #2e7d32;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.bp-activate-btn { font-size: 14px; padding: 10px 18px; }

.bp-progress { margin-bottom: 8px; }
.bp-progress-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }

.bp-progress-track {
  height: 10px;
  background: #e6e2f7;
  border-radius: 6px;
  overflow: hidden;
}

.bp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.bp-hint { font-size: 12px; color: #777; margin: 6px 0; }
.bp-vip-hint { background: #fff8e1; border: 1px solid #ffe082; border-radius: 8px; padding: 6px 10px; color: #7a5b00; }

.bp-board {
  position: relative;
  display: flex;
  align-items: stretch;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
}

/* Подписи строк слева — не прокручиваются вместе с лентой */
.bp-labels {
  flex: 0 0 74px;
  display: grid;
  grid-template-rows: 132px 40px 132px;
  background: #f7f8fc;
  border-right: 1px solid #eee;
  font-size: 11px;
  font-weight: 700;
  color: #555;
  text-align: center;
}

.bp-label { display: flex; align-items: center; justify-content: center; padding: 4px; }
.bp-label-level { background: #efeefb; }
.bp-label-vip { background: #fffbeb; }

/* Лента уровней слева направо; стандартный скроллбар скрыт — листаем стрелками */
.bp-scroller {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.bp-scroller::-webkit-scrollbar { display: none; }

.bp-track { display: flex; width: max-content; }

.bp-col {
  flex: 0 0 auto;
  display: grid;
  grid-template-rows: 132px 40px 132px;
  border-right: 1px solid #f0f0f0;
  box-sizing: border-box;
}

.bp-col-current { background: #f3f0ff; }

.bp-level-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #999;
  background: #fafafa;
}

.bp-level-cell.reached { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }

.bp-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 6px;
  font-size: 13px;
  text-align: center;
}

.bp-vip { background: #fffdf5; }
.bp-cell-reward { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.bp-cell-action { min-height: 26px; display: flex; align-items: center; }
.bp-cell .item-btn { padding: 4px 10px; font-size: 12px; }
.bp-reward-icon { font-size: 26px; }
.bp-reward-img { width: 44px; height: 44px; object-fit: contain; }
.bp-reward-name { font-size: 11px; line-height: 1.2; }
.bp-reward-empty { color: #ccc; }
.bp-state-locked-level { opacity: 0.55; }
.bp-state-claimed { opacity: 0.6; }
.bp-state-locked-vip { opacity: 0.5; }
.bp-claimed-mark { color: #2e7d32; font-size: 12px; font-weight: 700; }

.bp-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 34px;
  height: 56px;
  border: none;
  background: rgba(61, 52, 148, 0.85);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.bp-arrow:hover:not(:disabled) { background: #3d3494; }
.bp-arrow:disabled { opacity: 0.25; cursor: default; }
.bp-arrow-left { left: 74px; border-radius: 0 10px 10px 0; }
.bp-arrow-right { right: 0; border-radius: 10px 0 0 10px; }

@media (max-width: 520px) {
  #battlePassContent { padding: 12px; }
  .bp-labels { flex-basis: 52px; font-size: 10px; }
  .bp-arrow-left { left: 52px; }
}

/* Вкладки "Задания" / "Награды" */
.bp-tabs { display: flex; gap: 8px; margin: 10px 0; }
.bp-tab-btn {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid #d8d6f0;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.bp-tab-btn:hover { background: #f5f6ff; }
.bp-tab-btn.active { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border-color: transparent; }

/* Ежедневные задания */
.bp-quests { display: flex; flex-direction: column; gap: 8px; }
.bp-quest {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e3e3f0;
  border-radius: 12px;
  background: #fafaff;
}
.bp-quest.done { opacity: 0.65; background: #f1faf1; border-color: #cfe8cf; }
.bp-quest.bonus { background: #fffbeb; border-color: #ffe082; }
.bp-quest-icon { font-size: 28px; width: 36px; text-align: center; flex-shrink: 0; }
.bp-quest-body { flex: 1; min-width: 0; }
.bp-quest-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.bp-quest-bar { height: 8px; background: #e8e8f4; border-radius: 6px; overflow: hidden; }
.bp-quest-fill { height: 100%; background: linear-gradient(90deg, #667eea, #764ba2); transition: width 0.3s; }
.bp-quest.done .bp-quest-fill { background: #4caf50; }
.bp-quest-count { font-size: 11px; color: #888; margin-top: 3px; }
.bp-quest-points {
  flex-shrink: 0;
  min-width: 52px;
  text-align: center;
  padding: 6px 8px;
  border-radius: 999px;
  background: #efeefb;
  color: #3d3494;
  font-weight: 800;
  font-size: 14px;
}
.bp-quest.done .bp-quest-points { background: #e0f2e0; color: #2e7d32; }
.bp-quests-reset { text-align: center; font-size: 12px; color: #888; margin: 6px 0 0; }
