/* ==========================================================================
   Z-LINGO STYLES · 06-decks-page.css
   Полноэкранная страница «Мои колоды» / «Курсы» (#decksPageView)
   ========================================================================== */

.home-dashboard-view {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.home-dashboard-view.hidden,
.decks-page-view.hidden,
.decks-overview-pane.hidden,
.deck-detail-pane.hidden {
  display: none !important;
}

.decks-page-view {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
}

.decks-page-view.detail-open .decks-desktop-tabs-bar {
  display: none;
}

/* --- Верхний космический заголовок над двухколоночной сеткой --- */
.decks-hero-banner {
  position: relative;
  overflow: visible;
  padding: 6px 0 2px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 20px;
  align-items: end;
}

.decks-desktop-planet-fx {
  position: absolute;
  right: 135px;
  top: -12px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side at 50% 42%, rgba(56, 189, 248, 0.42) 0%, rgba(37, 99, 235, 0.36) 48%, rgba(14, 116, 144, 0.16) 78%, rgba(15, 23, 42, 0.05) 100%);
  box-shadow:
    inset 0 4px 22px rgba(186, 230, 253, 0.9),
    inset 0 18px 54px rgba(56, 189, 248, 0.42),
    0 -10px 44px rgba(56, 189, 248, 0.36);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.88) 20%, rgba(0, 0, 0, 0) 35%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.88) 20%, rgba(0, 0, 0, 0) 35%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

[dir="rtl"] .decks-desktop-planet-fx {
  right: auto;
  left: 135px;
}

.decks-hero-left {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.decks-hero-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.decks-folder-svg-mobile {
  display: inline-flex;
  width: 48px;
  height: 44px;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 14px rgba(250, 204, 21, 0.36));
}

.decks-folder-svg-mobile svg {
  width: 100%;
  height: 100%;
}

.decks-hero-titles-box {
  min-width: 0;
}

.decks-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.72rem, 2.3vw, 2.2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  text-shadow: 0 2px 18px rgba(2, 6, 23, 0.7);
}

.decks-hero-subtitle {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: #a8b7cc;
  margin: 4px 0 0;
}

.decks-hero-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.decks-search-box {
  flex: 1 1 280px;
  min-width: 210px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border-radius: 12px;
  background: rgba(8, 15, 32, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.28);
  backdrop-filter: blur(12px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.decks-search-box:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.decks-search-svg {
  width: 17px;
  height: 17px;
  color: #94a3b8;
  flex-shrink: 0;
}

.decks-search-box input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #f8fafc;
  font-family: var(--font-ui);
  font-size: 0.88rem;
}

.decks-search-box input::placeholder {
  color: #7c8ea8;
}

.decks-amber-anki-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(11, 20, 42, 0.86);
  color: #f1f5f9;
  font-family: var(--font-ui);
  font-size: 0.87rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.decks-amber-anki-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(16, 28, 56, 0.94);
  color: #ffffff;
}

.decks-anki-box-svg {
  width: 17px;
  height: 17px;
  color: #93c5fd;
  flex-shrink: 0;
}

.decks-emerald-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(167, 243, 208, 0.85);
  background: linear-gradient(180deg, #34d399 0%, #10b981 65%, #059669 100%);
  color: #022c22;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.decks-emerald-create-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.decks-emerald-create-btn .create-plus-glyph {
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
}

/* Правый верхний 3-колоночный блок KPI */
.decks-hero-right {
  position: relative;
  z-index: 2;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(11, 21, 44, 0.88) 0%, rgba(7, 14, 30, 0.92) 100%);
  border: 1px solid rgba(100, 148, 214, 0.28);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  padding: 12px 4px;
}

.decks-hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
}

.decks-kpi-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 6px;
  text-align: center;
  border-inline-end: 1px solid rgba(148, 163, 184, 0.16);
}

.decks-kpi-cell:last-child {
  border-inline-end: none;
}

.decks-kpi-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.decks-kpi-svg.kpi-cyan {
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.55));
}

.decks-kpi-svg.kpi-gold {
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.55));
}

.decks-kpi-svg.kpi-flame {
  filter: drop-shadow(0 0 8px rgba(251, 146, 60, 0.55));
}

.decks-kpi-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.15;
  white-space: nowrap;
}

.decks-kpi-val {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

/* --- Двухколоночный корпус страницы --- */
.decks-page-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 20px;
  align-items: start;
}

.decks-main-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* --- Десктопная панель вкладок [Курсы | Личные / Anki] и правых пилюль [Все | Недавние | Избранные] --- */
.decks-desktop-tabs-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding-bottom: 0;
}

.decks-tabs-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.decks-top-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 12px;
  border: none;
  border-radius: 12px 12px 0 0;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.decks-top-tab:hover {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.55);
}

.decks-top-tab.soft-active,
.decks-top-tab.active {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.22) 100%);
}

.decks-top-tab.soft-active::after,
.decks-top-tab.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #34d399, #2dd4bf);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.85);
}

.decks-tab-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.decks-tabs-pills {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.decks-top-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(100, 136, 190, 0.28);
  background: rgba(11, 19, 38, 0.85);
  color: #cbd5e1;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.decks-top-pill:hover {
  border-color: rgba(56, 189, 248, 0.55);
  color: #ffffff;
}

.decks-top-pill.active {
  border-color: #34d399;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(6, 78, 59, 0.42));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.24);
}

.decks-pill-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #94a3b8;
}

.decks-top-pill.active .decks-pill-svg {
  color: #34d399;
}

.decks-subtab-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(12, 20, 38, 0.86);
  color: #cbd5e1;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.decks-subtab-pill.return-battle {
  border-color: rgba(56, 189, 248, 0.72);
  background: rgba(14, 165, 233, 0.22);
  color: #e0f2fe;
}

/* --- Общие стили прогресс-бара и секций --- */
.decks-overview-pane {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.decks-section-block {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.decks-section-heading {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.decks-heading-layers-svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.decks-play-tri {
  color: #34d399;
  font-size: 0.88rem;
}

[dir="rtl"] .decks-play-tri {
  transform: scaleX(-1);
}

.decks-count-muted {
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.96rem;
}

.decks-prog-bar-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.decks-prog-track {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.92);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.decks-prog-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #34d399 0%, #2dd4bf 60%, #38bdf8 100%);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.58);
  transition: width 0.3s ease;
}

.decks-prog-pct {
  font-size: 0.8rem;
  font-weight: 800;
  color: #f8fafc;
  min-width: 32px;
  text-align: end;
}

/* --- Секция 1: 2 карточки «▶ Продолжить обучение» --- */
.decks-continue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.deck-continue-card {
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(155deg, rgba(11, 20, 42, 0.92) 0%, rgba(8, 14, 30, 0.95) 100%);
  border: 1px solid rgba(100, 136, 190, 0.26);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.deck-continue-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.58);
}

.deck-continue-card.is-active {
  border: 1.5px solid rgba(52, 211, 153, 0.82);
  background: linear-gradient(155deg, rgba(11, 28, 42, 0.94) 0%, rgba(8, 18, 32, 0.96) 100%);
  box-shadow: 0 0 26px rgba(16, 185, 129, 0.2), inset 0 0 18px rgba(16, 185, 129, 0.08);
}

.deck-cont-top {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.deck-icon-tile {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: radial-gradient(circle at 30% 25%, rgba(56, 189, 248, 0.28), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 14px rgba(0, 0, 0, 0.35);
}

.deck-tile-svg {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 3px 6px rgba(2, 6, 23, 0.5));
}

.deck-tile-svg.deck-unique-art-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: none;
}

.deck-icon-tile.art-auto {
  background: radial-gradient(circle at 30% 25%, rgba(225, 29, 72, 0.4), rgba(28, 16, 40, 0.95));
  border-color: rgba(251, 113, 133, 0.42);
}

.deck-icon-tile.art-business {
  background: radial-gradient(circle at 30% 25%, rgba(217, 119, 6, 0.42), rgba(38, 26, 16, 0.95));
  border-color: rgba(245, 158, 11, 0.44);
}

.deck-icon-tile.art-anki {
  background: radial-gradient(circle at 30% 25%, rgba(217, 119, 6, 0.36), rgba(34, 24, 20, 0.95));
  border-color: rgba(245, 158, 11, 0.38);
}

.deck-icon-tile.art-travel {
  background: radial-gradient(circle at 30% 25%, rgba(56, 189, 248, 0.4), rgba(14, 32, 62, 0.95));
  border-color: rgba(96, 165, 250, 0.46);
}

.deck-icon-tile.art-food {
  background: radial-gradient(circle at 30% 25%, rgba(168, 85, 247, 0.4), rgba(28, 16, 48, 0.95));
  border-color: rgba(192, 132, 252, 0.45);
}

.deck-icon-tile.art-base,
.deck-icon-tile.art-chat,
.deck-icon-tile.art-it {
  background: radial-gradient(circle at 30% 25%, rgba(16, 185, 129, 0.36), rgba(12, 34, 30, 0.95));
  border-color: rgba(52, 211, 153, 0.45);
}

.deck-cont-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.deck-badges-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.deck-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.deck-badge-mini-svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.deck-tag-badge.creator {
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.44);
  color: #bae6fd;
}

.deck-tag-badge.anki {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.46);
  color: #bfdbfe;
}

.deck-tag-badge.cefr {
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.34);
  color: #e2e8f0;
}

.deck-cont-title {
  font-family: var(--font-heading);
  font-size: 0.94rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.22;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deck-cont-meta {
  font-size: 0.77rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-cont-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(167, 243, 208, 0.85);
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
  color: #022c22;
  font-family: var(--font-ui);
  font-size: 0.83rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.36);
  transition: all 0.14s ease;
  white-space: nowrap;
}

.deck-cont-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

/* --- Горизонтальные чипы категорий над списком «Все колоды» --- */
.decks-cat-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.decks-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(100, 136, 190, 0.28);
  background: rgba(11, 19, 38, 0.84);
  color: #cbd5e1;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.decks-cat-chip:hover {
  border-color: rgba(56, 189, 248, 0.58);
  color: #ffffff;
  background: rgba(19, 31, 60, 0.92);
}

.decks-cat-chip.active {
  border-color: #34d399;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(6, 78, 59, 0.45));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
}

.decks-cat-chip .topic-chip-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* --- Вертикальный список горизонтальных строк колод (#decksAllGrid) --- */
.decks-all-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deck-full-card {
  position: relative;
  border-radius: 16px;
  padding: 13px 16px;
  background: linear-gradient(160deg, rgba(11, 19, 39, 0.92) 0%, rgba(7, 13, 28, 0.95) 100%);
  border: 1px solid rgba(100, 136, 190, 0.24);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.deck-full-card:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.52);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.52), 0 0 18px rgba(56, 189, 248, 0.1);
}

.deck-full-card.is-active {
  border-color: rgba(52, 211, 153, 0.56);
}

.deck-desktop-card-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(205px, 0.88fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-width: 0;
}

.deck-row-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.deck-row-info .deck-icon-tile {
  width: 50px;
  height: 50px;
  border-radius: 13px;
}

.deck-row-info .deck-tile-svg {
  width: 31px;
  height: 31px;
}

.deck-row-texts {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.deck-row-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.deck-card-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.22;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-row-fav-star {
  color: #fbbf24;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.deck-card-desc {
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deck-row-mid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.deck-row-meta {
  font-size: 0.77rem;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.deck-more-btn {
  width: 30px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
}

.deck-more-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.3);
  color: #ffffff;
}

/* Плашка предупреждения, если в старом импорте в браузере не было русского перевода */
.deck-broken-ru-alert {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(180, 83, 9, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fef3c7;
  font-size: 0.76rem;
  line-height: 1.35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.deck-broken-ru-alert button {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid rgba(251, 113, 133, 0.65);
  background: rgba(159, 18, 57, 0.45);
  color: #ffe4e6;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.deck-mini-lesson {
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  text-align: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  transition: all 0.14s ease;
}

.deck-mini-lesson:hover {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(30, 41, 59, 0.92);
}

.deck-mini-lesson.done {
  border-color: rgba(52, 211, 153, 0.62);
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.36), rgba(15, 23, 42, 0.86));
}

.deck-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #f8fafc;
}

.deck-mini-check {
  color: #34d399;
  font-weight: 900;
}

.deck-mini-sub {
  font-size: 0.71rem;
  color: #94a3b8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.22;
}

.deck-lessons-count-sub {
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 600;
}

.deck-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.deck-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(167, 243, 208, 0.85);
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
  color: #022c22;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
  transition: all 0.14s ease;
}

.deck-btn-primary:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.deck-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(100, 148, 214, 0.34);
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  font-family: var(--font-ui);
  font-size: 0.81rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.deck-btn-secondary:hover {
  border-color: rgba(56, 189, 248, 0.6);
  color: #ffffff;
  background: rgba(30, 41, 59, 0.95);
}

.deck-open-book-svg {
  width: 14px;
  height: 14px;
  color: #93c5fd;
  flex-shrink: 0;
}

/* --- Правый сайдбар: Быстрые фильтры + Недавняя активность --- */
.decks-right-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 8px;
}

.decks-quick-filters-card,
.decks-recent-activity-card {
  border-radius: 16px;
  padding: 15px;
  background: linear-gradient(175deg, rgba(10, 18, 38, 0.92) 0%, rgba(7, 12, 26, 0.95) 100%);
  border: 1px solid rgba(100, 148, 214, 0.24);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.decks-sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 800;
  color: #f8fafc;
}

.decks-heading-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.decks-sidebar-head-svg {
  width: 17px;
  height: 17px;
  color: #94a3b8;
  flex-shrink: 0;
}

.decks-quick-filters-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.decks-quick-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: start;
}

.decks-quick-row:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(24, 36, 62, 0.82);
  color: #ffffff;
}

.decks-quick-row.active {
  border-color: rgba(52, 211, 153, 0.78);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.22), rgba(15, 23, 42, 0.88));
  color: #ffffff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.22);
}

.decks-quick-left {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.decks-quick-svg {
  width: 16px;
  height: 16px;
  color: #94a3b8;
  flex-shrink: 0;
}

.decks-quick-row.active .decks-quick-svg:not(.is-user) {
  color: #34d399;
}

.decks-quick-count {
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
  font-size: 0.74rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.decks-quick-row.active .decks-quick-count {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(6, 78, 59, 0.72);
  color: #a7f3d0;
}

.decks-sidebar-compact-filters {
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.decks-compact-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.decks-compact-label {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  color: #94a3b8;
}

.decks-compact-lang-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.decks-compact-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.8);
  color: #cbd5e1;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.decks-compact-lang-btn:hover {
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
}

.decks-compact-lang-btn.active {
  border-color: rgba(52, 211, 153, 0.78);
  background: rgba(16, 185, 129, 0.22);
  color: #ecfdf5;
}

.decks-lang-flag {
  display: inline-flex;
  align-items: center;
}

.decks-lang-flag .svg-flag-icon {
  width: 16px;
  height: 11px;
  border-radius: 2px;
}

.decks-level-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.decks-level-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.decks-level-pill:hover {
  border-color: rgba(56, 189, 248, 0.55);
  color: #ffffff;
}

.decks-level-pill.active {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.22);
  color: #ecfdf5;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.22);
}

/* Недавняя активность */
.decks-recent-activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.decks-recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.56);
  cursor: pointer;
  transition: all 0.14s ease;
  min-width: 0;
}

.decks-recent-item:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(24, 36, 62, 0.8);
}

.decks-recent-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 25%, rgba(56, 189, 248, 0.28), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.decks-recent-icon .deck-tile-svg {
  width: 24px;
  height: 24px;
}

.decks-recent-icon .deck-tile-svg.deck-unique-art-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.decks-recent-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.decks-recent-name {
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.decks-recent-sub {
  font-size: 0.71rem;
  color: #8496b0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.decks-recent-play-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #34d399;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.14s ease, transform 0.14s ease;
}

.decks-recent-play-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  transform: scale(1.08);
}

[dir="rtl"] .decks-recent-play-btn {
  transform: scaleX(-1);
}

/* --- Встроенная страница деталей и редактирования колоды (#deckDetailPane) --- */
.deck-detail-pane {
  border-radius: 20px;
  padding: 20px;
  background: linear-gradient(165deg, rgba(10, 18, 37, 0.96) 0%, rgba(7, 13, 27, 0.97) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.58);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.deck-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.deck-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(15, 23, 42, 0.9);
  color: #e0f2fe;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.deck-back-btn:hover {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.22);
}

.deck-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.deck-detail-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1 1 320px;
}

.deck-detail-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  margin: 4px 0;
}

.deck-detail-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
}

.deck-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.deck-delete-danger-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(251, 113, 133, 0.55);
  background: rgba(159, 18, 57, 0.28);
  color: #fecdd3;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.deck-delete-danger-btn:hover {
  background: rgba(225, 29, 72, 0.5);
  color: #ffffff;
}

/* Встроенная панель редактирования личной/Anki колоды */
.deck-inline-editor {
  border-radius: 14px;
  padding: 15px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(52, 211, 153, 0.45);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.deck-editor-grid {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) minmax(120px, 1fr);
  gap: 10px;
}

.deck-subdeck-pills {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.deck-detail-lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 9px;
  max-height: 330px;
  overflow-y: auto;
  padding-right: 4px;
}

.deck-detail-words-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.deck-words-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.deck-word-item {
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.deck-word-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.deck-word-foreign {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
}

.deck-word-trans {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fde047;
}

.deck-word-item-btns {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* Баннер умного распознавания Anki в окне загрузки .apkg */
.anki-auto-banner {
  padding: 9px 12px;
  border-radius: 11px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.2), rgba(14, 165, 233, 0.18));
  border: 1px solid rgba(52, 211, 153, 0.55);
  color: #d1fae5;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}

.anki-manual-cols-accordion {
  margin: 2px 0;
}

.anki-confirm-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Языковые акценты заголовков:
   🇬🇧 EN -> Exo 2 / Orbitron
   🇮🇱 HE -> Rubik / Noto Sans Hebrew + Rubik Bold (700) */
html[lang="en"] .promo-stage-pill,
html[lang="en"] .arena-wave-pill,
html[lang="en"] .sleft-section-title,
html[lang="en"] .hit-header-text,
html[lang="en"] .hud-brand-tag {
  font-family: 'Orbitron', 'Exo 2', sans-serif;
}

html[lang="he"] .hero-line-white,
html[lang="he"] .hero-line-gold,
html[lang="he"] .bento-card-title,
html[lang="he"] .qs-card-title,
html[lang="he"] .overlay-title,
html[lang="he"] .dialog-title,
html[lang="he"] .catalog-course-title,
html[lang="he"] .sleft-section-title,
html[lang="he"] .hit-header-text,
html[lang="he"] .decks-hero-title,
html[lang="he"] .decks-section-heading,
html[lang="he"] .deck-card-title,
html[lang="he"] .deck-cont-title,
html[lang="he"] .deck-detail-title,
html[lang="he"] .decks-sidebar-heading,
[dir="rtl"] .hero-line-white,
[dir="rtl"] .hero-line-gold,
[dir="rtl"] .bento-card-title,
[dir="rtl"] .qs-card-title,
[dir="rtl"] .overlay-title,
[dir="rtl"] .dialog-title,
[dir="rtl"] .catalog-course-title,
[dir="rtl"] .sleft-section-title,
[dir="rtl"] .hit-header-text,
[dir="rtl"] .decks-hero-title,
[dir="rtl"] .decks-section-heading,
[dir="rtl"] .deck-card-title,
[dir="rtl"] .deck-cont-title,
[dir="rtl"] .deck-detail-title,
[dir="rtl"] .decks-sidebar-heading {
  font-family: 'Rubik', 'Noto Sans Hebrew', sans-serif;
  font-weight: 700;
  font-style: normal;
}

/* Адаптивность для ноутбуков и мобильных устройств */
@media (max-width: 1180px) {
  .decks-hero-banner,
  .decks-page-layout {
    grid-template-columns: minmax(0, 1fr) 264px;
    gap: 16px;
  }

  .deck-desktop-card-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(185px, 0.85fr) auto;
    gap: 14px;
  }

  .decks-hero-controls {
    flex-wrap: wrap;
  }

  .decks-desktop-planet-fx {
    right: 110px;
    width: 520px;
    height: 520px;
  }

  [dir="rtl"] .decks-desktop-planet-fx {
    right: auto;
    left: 110px;
  }
}

@media (max-width: 1120px) {
  .home-bento-grid {
    grid-template-columns: 215px minmax(0, 1fr);
  }

  .home-right-stack {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .quickstart-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .decks-hero-banner,
  .decks-page-layout {
    grid-template-columns: 1fr;
  }

  .decks-right-sidebar {
    position: static;
  }

  .decks-continue-grid {
    grid-template-columns: 1fr;
  }

  .deck-desktop-card-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .deck-editor-grid {
    grid-template-columns: 1fr;
  }
  body.mode-play .sidebar-left,
  body.mode-play .sidebar-right {
    display: none !important;
  }

  .battle-arena-frame {
    top: 58px;
    left: 6px;
    right: 6px;
    bottom: 186px;
    padding: 7px 10px;
    border-radius: 13px;
  }

  .hud-center-selectors .hud-pill-selector:first-child {
    display: none;
  }

  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-line-white,
  .hero-line-gold {
    font-size: clamp(1.65rem, 6vw, 2.25rem);
  }

  .home-promo-monitor {
    min-height: 195px;
  }

  .home-bento-grid {
    grid-template-columns: 1fr;
  }

  .home-right-stack {
    flex-direction: column;
  }

  .home-bottom-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

