/* ============================================================
   [PATCH] MODULE: CASES - MAIN HUD & INTEL (Stealth Edge)
   ============================================================ */

/* Сброс фоновых привязок для всех элементов */
.cases-main-block > a[class^="icon"], 
.cases-main-block .main-case, 
.cases-main-block .roulette > #sound-point, 
.cases-main-block .roulette .roulette-slider, 
#prize .modal-content {
    background-image: none !important;
}

/* 1. ГЛАВНЫЙ КОНТЕЙНЕР (Синхронизация с .block) */
.cases-main-block {
    width: 100% !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important; /* 16px */
    padding: 30px !important;
    margin-bottom: 30px !important;
    position: relative !important;
    overflow: visible !important;
    box-shadow: var(--shadow-sm) !important;
    /* Анти-блюр стабилизация */
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* 2. КНОПКИ-ИНСТРУМЕНТЫ (История / Назад) */
.cases-main-block > a[class^="icon"] {
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute !important;
    top: 25px !important;
    background: #f1f5f9 !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important; /* Master System Radius */
    opacity: 1 !important;
    z-index: 20;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                background 0.3s ease, 
                color 0.3s ease !important;
}

/* Инъекция иконок Font Awesome 7 */
.cases-main-block > a.icon-open-cases::before { content: '\f084'; font-family: "Font Awesome 7 Free"; font-weight: 900; color: var(--text-muted); font-size: 16px; }
.cases-main-block > a.icon-back-to-cases::before { content: '\f060'; font-family: "Font Awesome 7 Free"; font-weight: 900; font-size: 16px; color: var(--text-muted); }

.cases-main-block > a[class^="icon"]:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3) !important;
}
.cases-main-block > a[class^="icon"]:hover::before { color: #fff !important; }

.cases-main-block > a.icon-open-cases { right: 30px !important; }
.cases-main-block > a.icon-back-to-cases { left: 30px !important; }

/* 3. ЗАГОЛОВОК (Engineered Typography) */
.cases-main-block h2 {
    font-family: "Inter", sans-serif !important;
    font-weight: 900 !important;
    font-size: 22px !important;
    letter-spacing: -0.03em !important;
    color: var(--text-dark) !important;
    text-transform: uppercase;
    text-align: left !important;
    margin: 0 0 35px 0 !important;
    padding: 0 0 15px 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
    display: flex !important;
    align-items: center;
    min-height: auto !important;
}

/* Датчик в заголовке */
.cases-main-block h2::before {
    content: '\f5d1'; /* fa-box-open */
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
    margin-right: 15px;
    color: var(--primary);
    font-size: 18px;
    width: 32px; height: 32px;
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: 50%;
    display: inline-flex;
    align-items: center; justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.1);
}

/* 4. ИНФОРМАЦИОННЫЙ БЛОК (Intel Briefing) */
.cases-main-block .info-block {
    background: #f8fafc !important;
    padding: 25px !important;
    margin-bottom: 30px !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    border-left: 4px solid var(--primary) !important;
    box-shadow: none !important;
}

.cases-main-block .info-block > h3 {
    font-family: "Inter", sans-serif !important;
    font-weight: 900 !important;
    font-size: 14px !important;
    color: var(--text-dark) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px 0 !important;
    text-shadow: none !important;
}

.cases-main-block .info-block > p, 
.cases-main-block .info-block > ul {
    color: var(--text-main) !important;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.8;
}

.cases-main-block .info-block > ul { list-style: none; padding-left: 0; }
.cases-main-block .info-block > ul li { position: relative; padding-left: 18px; margin-bottom: 8px; }
.cases-main-block .info-block > ul li::before {
    content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 2px;
    background: var(--primary); border-radius: 2px;
}

/* --- [UI] MAIN CASE VIEW (Tactical Pedestal) --- */

.cases-main-block .main-case {
  /* Аннигиляция старого фона */
  background: #f8fafc !important; 
  background-image: radial-gradient(var(--border-color) 0.5px, transparent 0.5px) !important;
  background-size: 20px 20px !important;
  
  border: 1px solid var(--border-color);
  border-radius: 16px;
  min-height: 280px !important;
  line-height: normal !important; /* Уходим от line-height центровки */
  display: flex !important;
  align-items: center;
  justify-content: center;
  
  max-width: 600px !important;
  width: 100%;
  margin: 0 auto 20px;
  position: relative;
  
  /* Стабилизация слоев */
  transform: translateZ(0);
}

.cases-main-block .main-case img {
  max-width: 260px !important;
  height: auto;
  /* Мягкая HUD-тень предмета */
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cases-main-block .main-case:hover img {
  transform: scale(1.05); /* Легкий зум предмета без текста */
}

/* --- [UI] OPEN CASE BUTTON (Master System CTA) --- */

.cases-main-block button.open-case {
  /* Геометрия Master System */
  height: 48px !important;
  padding: 0 40px !important;
  border-radius: 10px !important;
  margin: 30px auto !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  
  /* Типографика Stealth Edge */
  font-family: "Inter", sans-serif !important;
  font-weight: 900 !important;
  font-size: 11px !important; /* HUD-стандарт */
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  
  /* Цвета (Master CTA Gradient) */
  background-image: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3) !important;
  
  cursor: pointer !important;
  transform: translateY(0);
  backface-visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.3s ease, 
              filter 0.3s ease !important;
}

.cases-main-block button.open-case:hover:not([disabled]) {
  transform: translateY(-3px) !important;
  filter: brightness(1.1);
  box-shadow: 0 8px 25px -5px rgba(var(--primary-rgb), 0.4) !important;
}

/* Состояние Disabled (Cooldown) */
.cases-main-block button.open-case[disabled] {
  background: var(--text-muted) !important;
  background-image: none !important;
  opacity: 0.5;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Адаптив под мобильные */
@media (max-width: 991.99px) {
  .cases-main-block .main-case {
    min-height: 200px !important;
    background-size: 15px 15px !important;
  }
  .cases-main-block .main-case img {
    max-width: 180px !important;
  }
  .cases-main-block button.open-case {
    font-size: 10px !important;
    width: 100%;
    max-width: 300px;
  }
}

/* ============================================================
   [PATCH] MODULE: CASES - ROULETTE ENGINE (Stealth Edge)
   ============================================================ */

/* 1. ГЛАВНЫЙ КОРПУС РУЛЕТКИ */
.cases-main-block .roulette {
  padding: 0 !important;
  position: relative !important;
  /* Глубокий темный фон для максимального контраста предметов */
  background: #0f172a !important; 
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  overflow: hidden !important;
  width: 100%;
  height: 400px !important;
  max-width: 650px !important;
  margin: 0 auto;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.5), 0 20px 40px rgba(0,0,0,0.3) !important;
}

/* 2. КОНТРОЛЛЕР ЗВУКА (FA 7 Sync) */
.cases-main-block .roulette > #sound-point {
  width: 36px !important;
  height: 36px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 15px;
  top: 15px;
  opacity: 0.6;
  cursor: pointer;
  z-index: 100;
  background-image: none !important; /* УДАЛЕНО: icon-sound.png */
  transition: all 0.2s ease;
}

.cases-main-block .roulette > #sound-point:hover { opacity: 1; background: rgba(255, 255, 255, 0.1) !important; }

/* Маскировка состояний звука */
.cases-main-block .roulette > #sound-point.sound-on::before {
  content: '\f028'; font-family: "Font Awesome 7 Free"; font-weight: 900; color: #fff; font-size: 14px;
}
.cases-main-block .roulette > #sound-point.sound-off::before {
  content: '\f6a9'; font-family: "Font Awesome 7 Free"; font-weight: 900; color: var(--danger); font-size: 14px;
}

/* 3. СЛАЙДЕР И БОРТА (Удаление PNG-мусора) */
.cases-main-block .roulette .roulette-slider {
  padding: 0 !important;
  margin: 0 !important;
  position: relative;
  height: 100% !important;
  background: none !important;
  display: flex;
  align-items: center;
}

/* Полное скрытие всех PNG-накладок */
.roulette-slider .r-left, 
.roulette-slider .r-right, 
.roulette-slider .r-side, 
.roulette-slider .r-side2 {
  display: none !important;
}

/* --- [UI] THE SCANNER RETICLE (Прицел рулетки) --- */
/* Вместо PNG стрелок создаем неоновую линию захвата */
.cases-main-block .roulette .roulette-slider::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: var(--primary);
  box-shadow: 0 0 15px var(--primary), 0 0 30px rgba(var(--primary-rgb), 0.4);
  z-index: 50;
  transform: translateX(-50%);
  pointer-events: none;
}

/* Скрываем старые элементы-стрелки */
.roulette-slider .top-arr, 
.roulette-slider .bottom-arr {
  display: none !important;
}

/* 4. ОБЛАСТЬ ВЫДАЧИ (Fading Edges) */
.cases-main-block .roulette .roulette-slider .roulette-area {
  overflow: hidden;
  width: 100%;
  height: 220px;
  /* Мягкое затухание предметов по бокам через маску */
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.cases-main-block .roulette .roulette-slider .roulette-area #roulette {
  height: 100%;
  position: relative;
  margin: 0 auto;
  top: 0 !important; /* Сброс старого смещения */
  display: flex;
  align-items: center;
}

/* Внутренняя лента (Стабилизация GPU) */
.roulette-inner {
  display: flex !important;
  align-items: center;
  height: 100%;
  will-change: transform;
  transform: translateZ(0);
}

/* Индивидуальный блок предмета в рулетке */
.roulette-inner .subject-block {
  margin: 0 10px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  transition: transform 0.3s ease;
}

.roulette-inner .subject-block img {
  max-width: 110px !important;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}

/* ============================================================
   [PATCH] MODULE: CASES - GRID & CARDS (Pure Stealth)
   ============================================================ */

/* 1. ЗАГОЛОВКИ КАТЕГОРИЙ (Вместо p) */
#cases > p, #cases_not_open > p {
    font-family: "Inter", sans-serif !important;
    font-weight: 900 !important;
    font-size: 18px !important;
    color: var(--text-dark) !important;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 40px 0 20px 15px !important;
    text-shadow: none !important; /* Убили старые тени */
    display: flex;
    align-items: center;
}

#cases > p::before, #cases_not_open > p::before {
    content: '';
    width: 4px; height: 18px;
    background: var(--primary);
    margin-right: 12px;
    border-radius: 2px;
}

/* 2. КАРТОЧКА КЕЙСА (Case Capsule) */
#cases .case-block, 
#cases_not_open .case-block {
    background: #ffffff !important;
    background-image: radial-gradient(var(--border-color) 0.5px, transparent 0.5px) !important;
    background-size: 20px 20px !important; /* Тактическая сетка на фоне карточки */
    
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    height: 300px !important; /* Увеличили высоту для "воздуха" */
    margin-top: 0 !important;
    margin-bottom: 30px;
    
    box-shadow: var(--shadow-sm) !important;
    
    /* СТАБИЛИЗАЦИЯ (Rule #3: Static) */
    transform: none !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

#cases .case-block:hover, 
#cases_not_open .case-block:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 15px 35px -10px rgba(var(--primary-rgb), 0.15) !important;
}

/* 3. ИЗОБРАЖЕНИЕ (Unit Icon) */
#cases .case-block div.case-image-block, 
#cases_not_open .case-block div.case-image-block {
    height: 180px !important;
    line-height: 180px !important;
    background: transparent !important;
    margin-bottom: 10px;
}

#cases .case-block div.case-image-block img, 
#cases_not_open .case-block div.case-image-block img {
    max-height: 140px !important;
    width: auto !important;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05));
}

#cases .case-block:hover img {
    transform: scale(1.1) !important; /* Легкий зум иконки разрешен */
}

/* 4. НАЗВАНИЕ (ID Tag) */
#cases .case-block span:nth-child(2), 
#cases_not_open .case-block span:nth-child(2) {
    position: absolute !important;
    bottom: 65px !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    line-height: 1.2 !important;
    background: none !important;
    
    font-family: "Inter", sans-serif !important;
    font-weight: 900 !important;
    font-size: 14px !important;
    color: var(--text-dark) !important;
    text-transform: uppercase;
    text-align: center;
    padding: 0 15px !important;
}

/* 5. ЦЕНА / КНОПКА (Action Value) */
#cases .case-block span:nth-child(3), 
#cases .case-block span:nth-child(4), 
#cases_not_open .case-block span:nth-child(3), 
#cases_not_open .case-block span:nth-child(4) {
    position: absolute !important;
    bottom: 15px !important;
    left: 15px !important;
    right: 15px !important;
    width: auto !important; /* Растягиваем по карточке */
    height: 40px !important;
    line-height: 40px !important;
    
    background: var(--primary) !important;
    background-image: none !important;
    border-radius: 8px !important;
    
    font-family: "Inter", sans-serif !important;
    font-weight: 900 !important;
    font-size: 13px !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
    transition: background 0.3s ease !important;
}

#cases .case-block:hover span:nth-child(3) {
    background: var(--primary-hover) !important;
}

/* ============================================================
   [REPLACE] MODULE: SUBJECT BLOCKS (Tactical Rarity Grid)
   ============================================================ */

#subjects, #roulette, #prize_area {
    text-align: center !important;
}

#subjects .modal-dialog, 
#roulette .modal-dialog, 
#prize_area .modal-dialog {
    text-align: left !important;
}

/* 1. КАРТОЧКА ПРЕДМЕТА (The Data Slot) */
#subjects .subject-block, 
#roulette .subject-block, 
#prize_area .subject-block {
    overflow: hidden !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    
    height: 200px !important;
    width: 180px !important;
    margin: 8px !important;
    
    /* СТЕКЛЯННАЯ БАЗА */
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    border: 1px solid rgba(var(--primary-rgb), 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2) !important;
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: translateZ(0);
}

/* 2. ТАКТИЧЕСКИЕ РАМКИ (Neon Edges) */
.subject-block .b-top, .subject-block .b-bottom, 
.subject-block .b-left, .subject-block .b-right {
    position: absolute !important;
    display: block !important;
    background: var(--primary); /* Базовый системный цвет */
    opacity: 0.3;
    z-index: 10;
}

.subject-block .b-top, .subject-block .b-bottom { height: 2px !important; left: 10px; right: 10px; }
.subject-block .b-left, .subject-block .b-right { width: 2px !important; top: 10px; bottom: 10px; }

.subject-block .b-top { top: 0; }
.subject-block .b-bottom { bottom: 0; }
.subject-block .b-left { left: 0; }
.subject-block .b-right { right: 0; }

/* --- [UI] СИСТЕМА РЕДКОСТЕЙ (Replacing PNG backgrounds) --- */

/* ORANGE (Legendary) */
.subject-block.orange { background: rgba(245, 158, 11, 0.05) !important; border-color: rgba(245, 158, 11, 0.3) !important; }
.subject-block.orange [class^="b-"] { background: var(--warning) !important; box-shadow: 0 0 10px var(--warning); opacity: 0.6; }

/* RED (Mythical) */
.subject-block.red { background: rgba(239, 68, 68, 0.05) !important; border-color: rgba(239, 68, 68, 0.3) !important; }
.subject-block.red [class^="b-"] { background: var(--danger) !important; box-shadow: 0 0 10px var(--danger); opacity: 0.6; }

/* PURPLE (Epic) */
.subject-block.purple { background: rgba(168, 85, 247, 0.05) !important; border-color: rgba(168, 85, 247, 0.3) !important; }
.subject-block.purple [class^="b-"] { background: #a855f7 !important; box-shadow: 0 0 10px #a855f7; opacity: 0.6; }

/* BLUE (Rare) */
.subject-block.blue { background: rgba(59, 130, 246, 0.05) !important; border-color: rgba(59, 130, 246, 0.3) !important; }
.subject-block.blue [class^="b-"] { background: var(--primary) !important; box-shadow: 0 0 10px var(--primary); opacity: 0.6; }

/* MILITARY (Common) */
.subject-block.military { background: rgba(148, 163, 184, 0.05) !important; border-color: rgba(148, 163, 184, 0.3) !important; }
.subject-block.military [class^="b-"] { background: var(--text-muted) !important; opacity: 0.4; }

/* --- [UI] ВНУТРЕННИЙ КОНТЕНТ (Flex modernization) --- */

.subject-block > .subject-services {
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px !important;
}

.subject-block .subject-fix {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.subject-block .subject span {
    width: 160px !important;
    display: block !important;
    text-align: center !important;
}

/* Название предмета (Inter 900) */
.subject-block .subject span:nth-child(1) {
    font-family: "Inter", sans-serif !important;
    font-weight: 900 !important;
    font-size: 15px !important;
    text-transform: uppercase !important;
    letter-spacing: -0.02em;
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    margin-bottom: 5px !important;
}

/* Описание предмета */
.subject-block .subject span:nth-child(2), 
.subject-block .subject span:nth-child(3) {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.5) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px;
    line-height: 1.2 !important;
    text-shadow: none !important;
}

/* Фикс для оранжевой редкости (текст) */
.subject-block.orange .subject span:nth-child(1) { color: #f7e3a0 !important; }
.subject-block.red .subject span:nth-child(1) { color: #fbabb8 !important; }
.subject-block.purple .subject span:nth-child(1) { color: #fb9ed5 !important; }
.subject-block.blue .subject span:nth-child(1) { color: #b2a9fa !important; }
.subject-block.military .subject span:nth-child(1) { color: #9ebffb !important; }

/* ============================================================
   [REPLACE] MODULE: PRIZE MODAL (Tactical Extraction View)
   ============================================================ */

/* 1. КОРПУС ОКНА ВЫИГРЫША */
#prize .modal-content {
  /* Глубокое темное стекло для максимального фокуса на призе */
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px !important; /* Наш стандарт для крупных блоков */
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 
              inset 0 0 20px rgba(var(--primary-rgb), 0.05) !important;
  overflow: hidden;
}

/* 2. ЗАГОЛОВОК "ТВОЙ ВЫИГРЫШ" */
#prize .modal-content h4 {
  font-family: "Inter", sans-serif !important;
  font-weight: 900 !important;
  font-size: 24px !important; /* Уменьшили до тактического стандарта */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff !important;
  text-align: center !important;
  margin: 40px 0 20px 0 !important;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* 3. ЗОНА ПРЕДМЕТА (The Pedestal) */
#prize .modal-content #prize_area {
  text-align: center !important;
  padding: 40px 0 !important;
  perspective: 1000px;
}

/* Усиление предмета в окне выигрыша */
#prize .modal-content #prize_area .subject-block {
  /* Rule #4: ЗАПРЕТ SCALE(1.25), заменяем на визуальное возвышение */
  margin: 0 auto !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
  
  /* Стабилизация для четкости текста при анимации */
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* --- [UI] EXTRACTION HALO (Свечение по редкости) --- */
/* Вместо масштабирования используем мощное внешнее свечение (Halo) */
#prize .modal-content #prize_area .subject-block.orange { box-shadow: 0 0 40px -5px rgba(245, 158, 11, 0.4) !important; }
#prize .modal-content #prize_area .subject-block.red { box-shadow: 0 0 40px -5px rgba(239, 68, 68, 0.4) !important; }
#prize .modal-content #prize_area .subject-block.purple { box-shadow: 0 0 40px -5px rgba(168, 85, 247, 0.4) !important; }
#prize .modal-content #prize_area .subject-block.blue { box-shadow: 0 0 40px -5px rgba(59, 130, 246, 0.4) !important; }

/* 4. ТЕКСТОВОЕ ОПИСАНИЕ */
#prize .modal-content p {
  font-size: 13px !important;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6) !important;
  text-align: center !important;
  max-width: 80% !important;
  margin: 0 auto 40px !important;
  line-height: 1.6;
}

/* 5. КНОПКА ЗАКРЫТИЯ (Close Icon) */
#prize .modal-content .close {
  position: absolute !important;
  top: 20px;
  right: 20px;
  color: #fff !important;
  opacity: 0.5;
  text-shadow: none !important;
  transition: all 0.2s ease;
  z-index: 100;
}

#prize .modal-content .close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

/* ВАУ-ЭФФЕКТ: Световой индикатор сверху окна */
#prize .modal-content::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 15px var(--primary);
  z-index: 10;
}

/* ============================================================
   [REPLACE] MODULE: CASE HISTORY (Tactical Transaction Log)
   ============================================================ */

/* 1. ЭФФЕКТ РАЗМЫТИЯ ФОНА (Modern Glass) */
.modal-backdrop-blur {
  /* Используем более современный метод размытия */
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  background-color: rgba(15, 23, 42, 0.4) !important; /* Глубокий оттенок */
  filter: none !important; /* Убираем старый фильтр, который "мылил" саму модалку */
}

/* 2. СТРОКА ИСТОРИИ (Data Entry) */
#my_cases_area .opened-case {
  width: 100% !important;
  display: flex !important; /* Уходим от флоатов к Flexbox */
  align-items: center !important;
  gap: 20px;
  padding: 15px 20px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  background: transparent;
  transition: background 0.2s ease;
}

#my_cases_area .opened-case:hover {
  background: rgba(var(--primary-rgb), 0.02) !important;
}

#my_cases_area .opened-case:last-child {
  border-bottom: 0 !important;
}

/* 3. ИЗОБРАЖЕНИЕ КЕЙСА (Module Preview) */
#my_cases_area .opened-case .case-img {
  width: 60px !important; /* Уменьшили до тактического размера */
  height: 60px !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

#my_cases_area .opened-case .case-img img {
  width: 100% !important;
  height: auto !important;
  max-width: 45px !important;
  object-fit: contain;
  /* Защита от блюра */
  transform: translateZ(0);
}

/* 4. ИНФО-БЛОК (Data Cluster) */
#my_cases_area .opened-case .case-info {
  width: auto !important;
  flex: 1;
  float: none !important; /* Аннигиляция флоата */
}

/* Название кейса (Inter 900) */
#my_cases_area .opened-case .case-info h3 {
  font-family: "Inter", sans-serif !important;
  font-weight: 900 !important;
  font-size: 14px !important;
  color: var(--text-dark) !important;
  text-transform: uppercase !important;
  letter-spacing: -0.02em;
  margin: 0 0 4px 0 !important;
  line-height: 1 !important;
}

/* Выигрыш (Subject Identification) */
#my_cases_area .opened-case .case-info .subject {
  display: block !important;
  width: 100% !important;
  font-size: 12px !important;
  font-weight: 700;
  color: var(--primary) !important; /* Акцент на выигрыше */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 !important;
  
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Добавляем тех-маркер к истории */
#my_cases_area .opened-case::after {
  content: 'LOG_ENTRY';
  font-size: 8px;
  font-weight: 900;
  color: var(--text-muted);
  opacity: 0.3;
  letter-spacing: 1px;
}

/* ============================================================
   [REPLACE] MODULE: CASE BANNER (Stealth Edge - Access Terminal)
   ============================================================ */

.case-banner {
  position: relative !important;
  width: 100%;
  /* Чистая база вместо фиолетового фона */
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important; /* Наш стандарт 12px */
  margin-bottom: 30px;
  overflow: hidden !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.case-banner:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 12px 30px -10px rgba(var(--primary-rgb), 0.15) !important;
}

.case-banner a {
  padding: 30px 25px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-decoration: none !important;
  width: 100%;
  height: 100%;
  position: relative;
}

/* 1. ЗАГОЛОВОК (Inter 900 HUD Style) */
.case-banner h3 {
  font-family: "Inter", sans-serif !important;
  font-weight: 900 !important;
  font-size: 14px !important;
  color: var(--text-dark) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em;
  text-align: center !important;
  margin: 0 0 25px 0 !important;
  text-shadow: none !important; /* Аннигиляция теней */
  
  /* Добавляем тех-метку */
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.case-banner h3::after {
  content: 'ACCESS_AUTHORIZED';
  font-size: 8px;
  color: var(--success);
  letter-spacing: 2px;
  opacity: 0.8;
}

/* 2. ИЗОБРАЖЕНИЕ (Central Asset) */
.case-banner img {
  width: 100% !important;
  max-width: 180px !important; /* Оптимальный размер для сайдбара */
  display: block !important;
  margin: 0 auto 25px !important;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.case-banner a:hover img {
  transform: scale(1.1) rotate(2deg) !important;
}

/* 3. ТЕКСТ ПРИЗЫВА (System Message) */
.case-banner p {
  background: rgba(var(--primary-rgb), 0.05) !important;
  color: var(--primary) !important;
  width: 100% !important;
  padding: 12px 10px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 900 !important; /* Inter 900 */
  text-transform: uppercase !important;
  letter-spacing: 0.05em;
  text-align: center !important;
  margin: 0 !important;
  border: 1px solid rgba(var(--primary-rgb), 0.1) !important;
  transition: all 0.3s ease !important;
}

.case-banner a:hover p {
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3) !important;
}

/* ВАУ-ЭФФЕКТ: Световая точка в углу */
.case-banner::before {
  content: '';
  position: absolute;
  top: 15px; left: 15px;
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success);
  z-index: 10;
}

/* ============================================================
   [FINAL FIX] MODULE: CASES - PURE CSS LOGIC (No TPL Changes)
   ============================================================ */

/* 1. ГЕРМЕТИЗАЦИЯ СЕТКИ (Перехват Bootstrap Row) */
#cases.row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* Ровно 3 в ряд */
    gap: 20px !important;
    margin: 0 !important;
}

/* Обнуляем колонки Bootstrap, чтобы они не мешали сетке */
#cases.row > div[class^="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
}

/* 2. КОРПУС КАРТОЧКИ (Flex-контейнер) */
.case-block {
    display: flex !important;
    flex-direction: column !important; /* Текст падает под картинку */
    height: 320px !important;
    padding: 20px !important;
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    text-decoration: none !important;
    position: relative !important;
    
    /* СТАБИЛИЗАЦИЯ */
    transform: none !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.case-block:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08) !important;
}

/* 3. ИЗОБРАЖЕНИЕ КЕЙСА */
.case-image-block {
    height: 160px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f8fafc !important;
    border-radius: 10px !important;
    margin-bottom: 15px !important;
}

.case-image-block img {
    max-width: 140px !important;
    height: auto !important;
    transition: transform 0.4s ease !important;
}

.case-block:hover .case-image-block img {
    transform: scale(1.1) !important;
}

/* 4. НАЗВАНИЕ КЕЙСА (Первый span в TPL) */
.case-block span:nth-of-type(1) {
    display: block !important;
    position: static !important; /* УБИРАЕМ ABSOLUTE, который ломал всё */
    width: 100% !important;
    
    font-family: "Inter", sans-serif !important;
    font-weight: 900 !important; /* Inter 900 */
    font-size: 14px !important;
    color: var(--text-dark) !important;
    text-transform: uppercase !important;
    letter-spacing: -0.02em;
    text-align: center !important;
    margin-bottom: 15px !important;
}

/* 5. ЦЕНА КЕЙСА (Второй span в TPL) */
.case-block span:nth-of-type(2) {
    display: flex !important;
    position: static !important; /* УБИРАЕМ ABSOLUTE */
    
    /* Превращаем спан в кнопку */
    margin-top: auto !important; /* Прижимаем к низу карточки */
    height: 44px !important;
    width: 100% !important;
    
    background: var(--primary) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    
    align-items: center !important;
    justify-content: center !important;
    
    font-family: "Inter", sans-serif !important;
    font-weight: 900 !important;
    font-size: 13px !important;
    transition: background 0.3s ease !important;
}

.case-block:hover span:nth-of-type(2) {
    background: var(--primary-hover) !important;
}

/* Сброс лишних стилей из движка */
.case-block span[title] {
    line-height: normal !important;
}