/* --- НАЧАЛО ИСПРАВЛЕННОГО CSS КОДА --- */

/* Импорт современного шрифта для интерфейса */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- НОВЫЕ ПЕРЕМЕННЫЕ ДЛЯ ЧЕРНО-БЕЛОЙ ТЕМЫ --- */
:root {
    --bg-gradient-start: #111111;
    --bg-gradient-mid: #000000;
    --bg-gradient-end: #0a0a0a;
    --surface-color: #1a1a1a;
    --surface-hover-color: #2c2c2c;
    --primary-color: #ffffff; /* Белый как основной акцентный цвет */
    --primary-gradient-start: #ffffff;
    --primary-gradient-end: #dddddd;
    --secondary-color: #007AFF; /* Оставим синий для особых акцентов, если потребуется */
    --text-primary: #f5f5f7; /* Слегка приглушенный белый для комфорта глаз */
    --text-secondary: #a1a1a6;
    --text-placeholder: #7a7f8f;
    --text-price-color: #c7cdd6;
    --border-color: rgba(255, 255, 255, 0.15);
    --border-highlight: var(--primary-color);
    --danger-color: #FF3B30;
    --success-color: #30D158;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --main-border-radius: 16px;
    --button-border-radius: 12px;
    --soft-shadow: 0px 8px 24px rgba(0, 0, 0, 0.5); /* Более выраженная тень для контраста */
    --case-grad-default: linear-gradient(145deg, var(--surface-color), var(--surface-hover-color));
    --roulette-item-height: 100px;
    --roulette-visible-items: 3;
    --single-roulette-row-visual-height: calc(var(--roulette-item-height) * var(--roulette-visible-items) + 20px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-overflow-scrolling: touch; }

/* Предотвращение перетаскивания элементов рулетки и кейсов на мобильных устройствах */
.wheel, 
.wheel-wrap, 
.wheel-rotor,
.roulette-item, 
.roulette-spinner-reel,
.roulette-individual-reel-row-visual,
#roulette-wheel-container,
.case-card,
.case-image-display,
.case-animation-display,
#cases-modal .cases-grid,
#fortune-modal .content-card,
#fortune-modal .wheel-wrap,
#cases-modal .modal-body,
#fortune-modal .modal-body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    touch-action: pan-y pinch-zoom;
    -webkit-touch-callout: none;
}

/* Для изображений внутри элементов */
.wheel img,
.roulette-item img,
.case-card img,
.case-image-display img,
#fortune-modal img,
#cases-modal img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(160deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    font-weight: 500;
    font-size: 16px; /* Немного увеличим базовый размер для читаемости */
    line-height: 1.5;
}

/* Эффект свечения для премиального вида */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    animation: backgroundGlow 15s ease-in-out infinite;
}

#app-container { display: flex; flex-direction: column; flex-grow: 1; }
#app-header { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; background: rgba(10, 10, 10, 0.8); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%); border-bottom: 1px solid var(--border-color); box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
#app-header .app-title-container { display: flex; align-items: center; gap: 8px; }
#app-header .app-logo { width: 32px; height: 32px; border-radius: 6px; }
#app-header .app-title { font-size: 1.5em; font-weight: 700; color: var(--text-primary); letter-spacing: -0.5px; flex-shrink: 0; margin-right: 10px; }
#app-header .wallet-info { display: flex; align-items: center; gap: 8px; flex-shrink: 1; min-width: 0; }
#ton-connect-button { display: inline-block; flex-shrink: 0; }
#wallet-address-display { background-color: var(--surface-hover-color); padding: 8px 12px; border-radius: var(--button-border-radius); font-size: 0.875em; font-weight: 600; border: 1px solid var(--border-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; display: none; transition: background-color 0.2s; }
#balance { background-color: var(--surface-hover-color); padding: 8px 12px; border-radius: var(--button-border-radius); font-size: 0.875em; font-weight: 600; border: 1px solid var(--border-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; display: flex; align-items: center; transition: background-color 0.2s; }

#wallet-address-display:hover, #balance:hover { background-color: var(--surface-color); }
#wallet-address-display.connected { display: block; }
#ton-connect-button.connected { display: none; }
#app-content { flex-grow: 1; padding: 24px 18px; overflow-y: auto; padding-bottom: 80px; }
.page { display: none; } .page.active { display: block; animation: pageFadeInMinimal 0.3s ease-out; }
@keyframes pageFadeInMinimal { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: translateY(0px);} }

/* ===== НАВИГАЦИОННОЕ МЕНЮ ===== */
#app-nav {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    background: #000000;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 215, 0, 0.4);
    padding: 4px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    min-height: 55px;
    box-shadow: 
        0 -2px 15px rgba(0, 0, 0, 0.8),
        0 -1px 0 rgba(255, 215, 0, 0.3);
}

.nav-button {
    background: transparent;
    border: none;
    color: rgba(150, 150, 170, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 2px;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
    line-height: 1.2;
    border-radius: 0;
    min-width: 0;
    position: relative;
}

.nav-button:hover {
    background: rgba(255, 215, 0, 0.08);
    color: rgba(255, 215, 0, 0.9);
}

.nav-button:active { 
    transform: scale(0.96); 
}

.nav-button.active {
    color: #ffd700;
    font-weight: 700;
    background: rgba(255, 215, 0, 0.12);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.nav-button svg {
    width: 24px;
    height: 24px;
    margin-bottom: 3px;
    fill: currentColor;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nav-button:hover svg {
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
}

.nav-button.active svg {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.7));
}

/* --- ОБНОВЛЕННЫЕ СТИЛИ КНОПОК --- */
.button {
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    color: #000000; /* Черный текст для контраста на белой кнопке */
    border: none;
    padding: 15px 24px;
    border-radius: var(--button-border-radius);
    font-size: 1.0em;
    font-weight: 700; /* Увеличим жирность для акцента */
    cursor: pointer;
    transition: all 0.25s ease-out;
    text-align: center;
    display: block;
    width: 100%;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
    text-transform: uppercase; /* Добавим для стиля */
    letter-spacing: 0.5px;
}
.button:hover {
    filter: brightness(1.0);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.2);
}
.button:active {
    transform: scale(0.98) translateY(0);
    filter: brightness(0.9);
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.15);
}
.button:disabled {
    background: var(--surface-hover-color);
    color: var(--text-placeholder);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    filter: grayscale(0.8);
}

.button-secondary {
    background-color: var(--surface-hover-color);
    color: var(--text-primary); /* Белый текст на темном фоне */
    border: 1px solid var(--border-color);
    box-shadow: none;
    background-image: none;
}
.button-secondary:hover {
    background-color: var(--surface-color);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.25);
}
.button-secondary:active {
    background-color: var(--surface-hover-color);
    filter: brightness(0.9);
}
.button-secondary:disabled {
    background: var(--surface-color);
    color: var(--text-placeholder);
    border-color: var(--border-color);
    cursor: not-allowed;
    filter: grayscale(0.3);
}

.button.button-success {
    background: var(--success-color);
    color: white;
    background-image: none;
    box-shadow: 0 3px 8px rgba(48, 209, 88, 0.35);
}
.button.button-success:hover {
    background-color: var(--success-color);
    filter: brightness(1.15);
    box-shadow: 0 4px 12px rgba(48, 209, 88, 0.4);
}
.button.button-success:active {
    filter: brightness(0.9);
    transform: scale(0.97);
}

.button.button-sell-gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%) !important;
    color: #000 !important;
    font-weight: 700;
    border: 2px solid #ffed4e !important;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4) !important;
}
.button.button-sell-gold:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 50%, #ffed4e 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6) !important;
    filter: none !important;
}
.button.button-sell-gold:active {
    transform: translateY(0px) !important;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4) !important;
}

/* --- ОБНОВЛЕННЫЕ СТИЛИ ЗАГОЛОВКОВ --- */
h2 {
    margin-top: 0;
    font-size: 2.2em;
    font-weight: 800;
    color: #fff;
    padding: 15px 0;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    
    /* Эффект свечения */
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(255, 107, 107, 0.3);
    
    /* Градиентная обводка снизу */
    border-bottom: 2px solid transparent;
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(255, 215, 0, 0.3) 20%,
        rgba(255, 215, 0, 0.6) 50%,
        rgba(255, 215, 0, 0.3) 80%,
        transparent 100%) bottom;
    background-size: 100% 2px;
    background-repeat: no-repeat;
    
    position: relative;
    animation: titlePulse 3s ease-in-out infinite;
}

h2::before {
    content: '✨';
    margin-right: 15px;
    font-size: 0.8em;
    animation: sparkle 2s ease-in-out infinite;
}

h2::after {
    content: '✨';
    margin-left: 15px;
    font-size: 0.8em;
    animation: sparkle 2s ease-in-out infinite 1s;
}

@keyframes titlePulse {
    0%, 100% {
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.4),
            0 4px 8px rgba(0, 0, 0, 0.8),
            0 0 60px rgba(255, 107, 107, 0.3);
    }
    50% {
        text-shadow: 
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 50px rgba(255, 215, 0, 0.6),
            0 4px 8px rgba(0, 0, 0, 0.9),
            0 0 80px rgba(255, 107, 107, 0.5);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(10deg);
    }
}

h3 {
    font-size: 1.2em;
    font-weight: 700;
    color: #ffd700;
    margin-top: 32px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    
    text-shadow: 
        0 0 15px rgba(255, 215, 0, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.8);
    
    position: relative;
    padding: 10px 0;
}

h3::before,
h3::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(255, 215, 0, 0.5) 50%,
        transparent 100%);
}

h3::before {
    left: 0;
}

h3::after {
    right: 0;
}

.content-card { background-color: var(--surface-color); padding: 20px; border-radius: var(--main-border-radius); margin-bottom: 20px; border: 1px solid var(--border-color); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.cases-grid, .slots-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(max(150px, calc(50% - 10px - 1px)), 1fr)); 
    gap: 24px;
    padding: 20px 0;
    position: relative;
}

/* Анимированный фон для секции с кейсами */
#main-page {
    position: relative;
    z-index: 1;
}

#main-page > * {
    position: relative;
    z-index: 2;
}

#main-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 107, 107, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(78, 205, 196, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: bgShift 20s ease-in-out infinite;
}

@keyframes bgShift {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Эффект блика на карточках кейсов */

/* Добавим блик автоматически через псевдоэлемент */
.case-card > *:not(.case-image-display):not(.case-name):not(.case-card-title):not(.title):not(.name):not(.case-price):not(.price):not(.stars):not(.stars-line):not(.case-bottom) {
    position: relative;
    z-index: 2;
}

.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(10, 10, 10, 0.8); backdrop-filter: blur(12px) saturate(150%); -webkit-backdrop-filter: blur(12px) saturate(150%); overflow-y: auto; align-items: flex-start; justify-content: center; padding-top: 5vh; padding-bottom: 5vh; }
.modal.active { display: flex; animation: modalFadeInMinimal 0.3s ease-out; }
.modal-content { background-color: var(--surface-color); padding: 28px; border-radius: var(--main-border-radius); width: 100%; max-width: 420px; text-align: center; box-shadow: 0 15px 40px rgba(0,0,0,0.4); border: 1px solid var(--border-color); display: flex; flex-direction: column; margin: auto; position: relative; }
.modal-content h3 { margin-top: 0; margin-bottom: 20px; font-size: 1.4em; font-weight: 700; color: var(--text-primary); flex-shrink: 0; }
.modal-actions { margin-bottom: 18px; display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; }
.modal-body { overflow-y: auto; flex-grow: 1; -webkit-overflow-scrolling: touch; margin-top: 12px; max-height: 60vh; }

/* ===== КРАСИВЫЙ КОНТЕЙНЕР БАРАБАНОВ ===== */
#roulette-wheel-container {
    width: 100%;
    flex-shrink: 0;
    height: var(--single-roulette-row-visual-height);
    display: flex;
    gap: 12px;
    align-items: center;
    background: linear-gradient(135deg, 
      rgba(20, 20, 40, 0.95) 0%, 
      rgba(30, 30, 50, 0.95) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    padding: 15px;
    box-shadow: 
      0 8px 25px rgba(0, 0, 0, 0.4),
      0 0 40px rgba(255, 215, 0, 0.2),
      inset 0 2px 0 rgba(255, 255, 255, 0.1),
      inset 0 -2px 10px rgba(0, 0, 0, 0.3);
}

#roulette-wheel-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    transparent 100%);
  animation: wheelShine 3s ease-in-out infinite;
  z-index: 1;
}

@keyframes wheelShine {
  0%, 90% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.roulette-individual-reel-row-visual {
    flex: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg,
      rgba(40, 40, 70, 0.8) 0%,
      rgba(30, 30, 50, 0.9) 50%,
      rgba(40, 40, 70, 0.8) 100%);
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.2);
    box-shadow: 
      inset 0 2px 8px rgba(0, 0, 0, 0.4),
      0 0 15px rgba(255, 215, 0, 0.1);
    display: none;
    z-index: 2;
}
.roulette-individual-reel-row-visual.active { display: block; }
.roulette-individual-reel-row-visual::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background-color: #ffffff; /* Белый указатель вертикально по центру */
    opacity: 0.9;
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}
.roulette-spinner-reel { display: flex; flex-direction: row; position: absolute; left: 0; height: 100%; top: 0; }
.roulette-item { width: var(--roulette-item-height); display: flex; align-items: center; justify-content: center; padding: 5px 0; box-sizing: border-box; overflow: hidden; transition: opacity 0.3s; flex-shrink: 0; }
.roulette-item img { max-height: 95%; max-width: calc(var(--roulette-item-height) - 8px); object-fit: contain; }
/* ===== КРАСИВЫЕ КНОПКИ МНОЖИТЕЛЕЙ ===== */
.case-multiplier-selector { 
  display: flex; 
  justify-content: center; 
  gap: 12px; 
  margin-top: 25px; 
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(20, 20, 40, 0.5);
  border-radius: 14px;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.case-multiplier-selector button { 
  width: auto; 
  flex-grow: 1; 
  padding: 12px 20px; 
  font-size: 1em;
  font-weight: 700;
  background: linear-gradient(135deg, 
    rgba(40, 40, 70, 0.8) 0%, 
    rgba(30, 30, 50, 0.9) 100%);
  border: 2px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  color: rgba(255, 215, 0, 0.7);
  transition: all 0.3s ease;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.case-multiplier-selector button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, 
    rgba(255, 215, 0, 0.1) 0%, 
    transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.case-multiplier-selector button:hover {
  border-color: rgba(255, 215, 0, 0.5);
  color: #ffd700;
  transform: translateY(-2px);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 15px rgba(255, 215, 0, 0.2);
}

.case-multiplier-selector button:hover::before {
  opacity: 1;
}

.case-multiplier-selector button.active-multiplier {
  background: linear-gradient(135deg, 
    rgba(255, 215, 0, 0.3) 0%, 
    rgba(255, 165, 0, 0.3) 100%);
  border: 2px solid #ffd700;
  color: #fff;
  box-shadow: 
    0 0 20px rgba(255, 215, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 15px rgba(255, 215, 0, 0.3);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.case-multiplier-selector button.active-multiplier::before {
  opacity: 1;
}

/* ===== КРАСИВЫЕ КАРТОЧКИ ПРИЗОВ ===== */
#possible-prizes-display {
    padding-right: 0px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 15px;
    flex-shrink: 0;
    margin-top: 15px;
}

.prize-card {
    background: linear-gradient(135deg, 
      rgba(40, 40, 70, 0.6) 0%, 
      rgba(30, 30, 50, 0.7) 100%);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid rgba(255, 215, 0, 0.2);
    text-align: center;
    min-height: 110px;
    transition: all 0.3s ease;
    box-shadow: 
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.prize-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, 
    rgba(255, 215, 0, 0.1) 0%, 
    transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.prize-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 15px rgba(255, 215, 0, 0.2),
    0 0 20px rgba(255, 215, 0, 0.15);
}

.prize-card:hover::before {
  opacity: 1;
}
.prize-card-image-placeholder {
    width: 55px;
    height: 55px;
    background-color: transparent;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.prize-card-image-placeholder img { 
    display: block; 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    position: relative; 
    z-index: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.prize-card:hover .prize-card-image-placeholder img {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 10px rgba(255, 215, 0, 0.4));
}

.prize-card-name {
    font-size: 0.8em;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.25;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    max-width: 100%;         /* <--- КЛЮЧЕВОЕ ИСПРАВЛЕНИЕ */
    word-break: break-word;  /* <--- ДОПОЛНИТЕЛЬНОЕ ИСПРАВЛЕНИЕ */
}

.prize-card-price {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 255, 255, 0.9); /* Белый фон */
    color: #000000; /* Черный текст */
    font-size: 0.7em;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 5px;
    line-height: 1;
}

/* СТАРЫЕ СТИЛИ - ЗАКОММЕНТИРОВАНЫ, ИСПОЛЬЗУЮТСЯ НОВЫЕ СТИЛИ НИЖЕ
.case-card {
    background-image: var(--case-grad-default);
    border-radius: var(--main-border-radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
}
.case-card:hover { filter: brightness(1.12); transform: translateY(-6px) scale(1.02); box-shadow: var(--soft-shadow); }
.case-image-display { width: 100%; height: 0; padding-bottom: 100%; position: relative; background-color: transparent; display:flex; align-items:center; justify-content:center; }
.case-image-display img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}
.case-image-display .overlay-image { position: absolute; width: 70%; height: 70%; top: 50%; left: 50%; transform: translate(-50%, -50%); object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.35)); }
.case-name { font-weight: 600; font-size: 1.05em; margin-bottom: 8px; color: var(--text-primary); min-height: 2.5em; display: flex; align-items: center; justify-content: center; }
.case-card .case-name {
    display: flex;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-primary);
    line-height: 1.3;
    padding: 0 8px;
    min-height: 15px;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.case-price {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-primary);
    padding: 12px 0;
    background-color: rgba(0,0,0,0.4);
    width: 100%;
    border-top: 1px solid var(--border-color);
}
*/ 

/* Новые стили кейсов находятся ниже в файле (начиная со строки ~730) */

@keyframes backgroundDrift {
    0%   { transform: translate(10vw, -15vh) scale(1.1); opacity: 0.6; }
    25%  { transform: translate(-20vw, 20vh) scale(1.3); opacity: 0.4; }
    50%  { transform: translate(25vw, 30vh) scale(1.0); opacity: 0.7; }
    75%  { transform: translate(5vw, -25vh) scale(1.4); opacity: 0.5; }
    100% { transform: translate(10vw, -15vh) scale(1.1); opacity: 0.6; }
}

.slot-card { background-image: var(--case-grad-default); border-radius: var(--main-border-radius); padding: 20px; text-align: center; cursor: pointer; transition: all 0.2s ease; border: 1px solid var(--border-color); overflow: hidden; position: relative; }
.slot-card:hover { filter: brightness(1.12); transform: translateY(-6px) scale(1.02); box-shadow: var(--soft-shadow); }
.slot-image-display { width: 85px; height: 85px; margin: 0 auto 18px auto; background-color: transparent; border-radius: var(--button-border-radius); overflow: hidden; position: relative; display:flex; align-items:center; justify-content:center;}
.slot-image-display img { display: block; width: 100%; height: 100%; object-fit: contain; }
.slot-name { font-weight: 600; font-size: 1.05em; margin-bottom: 8px; color: var(--text-primary); min-height: 2.5em; display: flex; align-items: center; justify-content: center; }
.slot-price { font-size: 0.9em; font-weight: 500; color: var(--text-price-color); }
#profile-balance-display { font-size: 1.6em; font-weight: 600; color: var(--primary-color); margin-bottom: 20px; }

/* ===== КРАСИВОЕ ОКНО ВЫИГРЫША ===== */
#win-overlay-modal .modal-content, #upgrade-result-modal .modal-content { 
  max-width: 400px;
  background: linear-gradient(135deg, 
    rgba(20, 20, 40, 0.98) 0%, 
    rgba(40, 20, 60, 0.98) 100%);
  border: 3px solid #ffd700;
  box-shadow: 
    0 0 40px rgba(255, 215, 0, 0.6),
    inset 0 0 40px rgba(255, 215, 0, 0.1),
    0 10px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

#win-overlay-modal .modal-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

#win-overlay-prize-image, #upgrade-result-image-container { 
  width: 100%; 
  min-height: 120px; 
  margin: 0 auto 25px; 
  border-radius: 16px; 
  background: linear-gradient(135deg,
    rgba(40, 40, 70, 0.6) 0%, 
    rgba(30, 30, 50, 0.7) 100%);
  border: 2px solid rgba(255, 215, 0, 0.4);
  display:flex; 
  align-items:center; 
  justify-content:center; 
  overflow:hidden; 
  flex-wrap: wrap; 
  gap: 15px; 
  padding: 20px;
  box-shadow: 
    inset 0 2px 10px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(255, 215, 0, 0.2);
  position: relative;
  z-index: 1;
}

#win-overlay-prize-image img, #upgrade-result-image-container img { 
  max-width:80px; 
  max-height:80px; 
  object-fit:contain; 
  border-radius: 12px; 
  background: rgba(0, 0, 0, 0.3); 
  padding: 8px; 
  border: 2px solid rgba(255, 215, 0, 0.3);
  filter: drop-shadow(0 4px 15px rgba(255, 215, 0, 0.4));
  transition: all 0.3s ease;
}

#win-overlay-prize-image img:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 6px 20px rgba(255, 215, 0, 0.6));
}

#win-overlay-prize-name, #upgrade-result-title { 
  font-size: 1.8em; 
  font-weight: 800; 
  margin-bottom: 15px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}

#win-overlay-prize-name { 
  color: #ffd700;
  text-shadow: 
    0 0 20px rgba(255, 215, 0, 0.8),
    0 0 40px rgba(255, 215, 0, 0.6),
    0 4px 8px rgba(0, 0, 0, 0.8);
}

#win-overlay-prize-details, #upgrade-result-message { 
  font-size: 1em; 
  color: rgba(255, 215, 0, 0.9); 
  margin-bottom: 25px; 
  max-height: 80px; 
  overflow-y: auto; 
  text-align: center;
  padding: 0 15px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  position: relative;
  z-index: 1;
}

.win-overlay-actions button { 
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
/* ===== КРАСИВАЯ КНОПКА SPIN ===== */
#roulette-modal #spin-button {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
  border: 2px solid #ffed4e;
  color: #000;
  font-weight: 800;
  font-size: 1.1em;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 16px 40px;
  box-shadow: 
    0 4px 15px rgba(255, 215, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

#roulette-modal #spin-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.3) 50%, 
    transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

#roulette-modal #spin-button:hover::before {
  transform: translateX(100%);
}

#roulette-modal #spin-button:hover {
  background: linear-gradient(135deg, #ffed4e 0%, #ffd700 50%, #ffed4e 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(255, 215, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

#roulette-modal #spin-button:active {
  transform: translateY(0px);
  box-shadow: 
    0 2px 10px rgba(255, 215, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#roulette-modal #spin-button:disabled {
  background: linear-gradient(135deg, #666 0%, #555 100%);
  border-color: #555;
  color: #999;
  box-shadow: none;
  cursor: not-allowed;
}

/* ===== РАЗДЕЛИТЕЛЬ И ЗАГОЛОВОК ПРИЗОВ ===== */
#roulette-modal hr { 
  border: none; 
  border-top: 2px solid rgba(255, 215, 0, 0.2); 
  margin: 25px 0 20px; 
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(255, 215, 0, 0.1);
}

#roulette-modal h4 { 
  font-size: 1.1em; 
  color: #ffd700; 
  margin-bottom: 15px; 
  font-weight: 700; 
  flex-shrink: 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 
    0 0 10px rgba(255, 215, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.8);
}
#slot-machine-modal .modal-content { max-width: 480px; }
#withdraw-modal .modal-step { display: none; } #withdraw-modal .modal-step.active { display: block; } #withdraw-modal p { color: var(--text-secondary); margin-bottom: 18px; line-height: 1.55;} #withdraw-modal strong { color: var(--text-primary); font-weight: 600; } #withdraw-modal a.button { margin-bottom: 12px; text-decoration: none; }
.loader { border: 4px solid var(--surface-hover-color); border-top: 4px solid var(--primary-color); border-radius: 50%; width: 45px; height: 45px; animation: spin 1s linear infinite; margin: 22px auto; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
input[type="text"], input[type="number"], select { width: 100%; padding: 13px 15px; margin-bottom: 14px; border-radius: var(--button-border-radius); background-color: var(--surface-hover-color); color: var(--text-primary); border: 1px solid var(--border-color); font-size: 1em; font-weight: 500; box-sizing: border-box; transition: border-color 0.2s, box-shadow 0.2s; } input[type="text"]::placeholder, input[type="number"]::placeholder { color: var(--text-placeholder); } input[type="text"]:focus, input[type="number"]:focus, select:focus { outline: none; border-color: var(--border-highlight); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2); }
.profile-header { text-align: center; margin-bottom: 28px; padding-top: 12px;} .profile-avatar-placeholder { width: 88px; height: 88px; border-radius: 50%; background-color: var(--surface-hover-color); display: flex; align-items: center; justify-content: center; font-size: 2.8em; font-weight: 600; color: var(--text-secondary); margin: 0 auto 14px auto; border: 3px solid var(--border-color); box-shadow: 0 2px 6px rgba(0,0,0,0.1); overflow: hidden; } .profile-avatar-placeholder img { width: 100%; height: 100%; object-fit: cover; } .profile-info .username { font-size: 1.5em; font-weight: 600; margin-bottom: 5px;} .profile-info .userid { font-size: 0.9em; color: var(--text-secondary); }
#profile-wallet-address { display: block; text-align: left; word-break: break-all; margin-bottom: 10px; }
.inventory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: 12px; } .inventory-item { background-color: var(--surface-hover-color); border-radius: var(--button-border-radius); padding: 12px; text-align: center; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--border-color); transition: transform 0.2s, box-shadow 0.2s; } .inventory-item:hover { transform: translateY(-3px); box-shadow: 0 3px 10px rgba(0,0,0,0.15); } .inventory-item .item-image-display { width: 65px; height: 65px; margin: 0 auto 10px auto; background-color: transparent; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; position:relative; } .inventory-item .item-image-display img { display: block; width: 100%; height: 100%; object-fit: contain; position:relative; z-index: 1;}
.inventory-item-name { font-size: 0.88em; font-weight: 500; margin-bottom: 5px; line-height: 1.35; } .inventory-item-value { font-size: 0.78em; color: var(--primary-color); font-weight: 500; margin-bottom: 10px;} .inventory-item-actions { display: flex; flex-direction: column; gap: 6px; margin-top: auto; } .inventory-item-actions .button { font-size: 0.78em; padding: 6px 9px; margin: 0; width: 100%; }
#sell-all-button { margin-top: 18px; background-color: var(--danger-color); color: white; background-image: none; box-shadow: 0 3px 8px rgba(255, 59, 48, 0.35); } #sell-all-button:hover { filter: brightness(1.15); background-color: var(--danger-color); box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4); } #sell-all-button:active { filter: brightness(0.9); transform: scale(0.97); }
#upgrade-selection-area { 
  display: flex; 
  justify-content: space-around; 
  align-items: center; 
  margin-bottom: 30px; 
  gap: 15px;
  position: relative;
  z-index: 1;
}

.upgrade-item-slot { 
  flex: 1; 
  max-width: calc(50% - 25px); 
  height: 170px; 
  background: linear-gradient(135deg, 
    rgba(40, 40, 70, 0.6) 0%, 
    rgba(30, 30, 50, 0.7) 100%);
  border-radius: 16px; 
  border: 2px solid rgba(255, 215, 0, 0.3); 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  cursor: pointer; 
  transition: all 0.3s ease;
  padding: 12px; 
  text-align: center;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 2px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.upgrade-item-slot::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, 
    rgba(255, 215, 0, 0.4), 
    rgba(255, 107, 107, 0.4), 
    rgba(107, 255, 107, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.upgrade-item-slot:hover { 
  border-color: rgba(255, 215, 0, 0.6); 
  transform: translateY(-3px);
  box-shadow: 
    0 8px 25px rgba(255, 215, 0, 0.3),
    inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.upgrade-item-slot:hover::before {
  opacity: 1;
}

.upgrade-item-slot .slot-placeholder { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  color: rgba(255, 215, 0, 0.7);
}

.upgrade-item-slot .slot-placeholder .plus-icon { 
  width: 50px; 
  height: 50px; 
  margin-bottom: 10px; 
  fill: rgba(255, 215, 0, 0.5);
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

.upgrade-item-slot .slot-placeholder span { 
  font-size: 0.95em; 
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.upgrade-item-slot .slot-item-display img { 
  width: 70px; 
  height: 70px; 
  object-fit: contain; 
  margin-bottom: 10px; 
  border-radius: 12px;
  filter: drop-shadow(0 4px 15px rgba(255, 215, 0, 0.3));
  transition: transform 0.3s ease;
}

.upgrade-item-slot:hover .slot-item-display img {
  transform: scale(1.1);
  filter: drop-shadow(0 6px 20px rgba(255, 215, 0, 0.5));
}

.upgrade-item-slot .slot-item-display .slot-item-name { 
  font-size: 0.9em; 
  font-weight: 600; 
  color: #ffd700; 
  line-height: 1.3; 
  margin-bottom: 5px; 
  max-height: 2.6em; 
  overflow: hidden; 
  text-overflow: ellipsis;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.upgrade-item-slot .slot-item-display .slot-item-value { 
  font-size: 0.8em; 
  font-weight: 700; 
  color: rgba(255, 215, 0, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.upgrade-arrow-connector { 
  width: 40px; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  flex-shrink: 0;
}

.upgrade-arrow-connector svg { 
  width: 36px; 
  height: 36px; 
  fill: #ffd700;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
  animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}
/* Область выбора предметов для апгрейда */
#upgrade-picker-container { 
  margin-top: 25px; 
  padding: 20px; 
  background: linear-gradient(135deg, 
    rgba(40, 40, 70, 0.5) 0%, 
    rgba(30, 30, 50, 0.6) 100%);
  border-radius: 16px;
  border: 2px solid rgba(255, 215, 0, 0.2);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 2px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

#upgrade-picker-container h4 { 
  color: #ffd700; 
  font-size: 1.2em; 
  font-weight: 700;
  margin-bottom: 18px; 
  text-align: center;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.6),
               0 2px 4px rgba(0, 0, 0, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#upgrade-items-grid { 
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); 
  gap: 12px; 
  padding-right: 5px;
}

#upgrade-items-grid .inventory-item { 
  padding: 12px; 
  min-height: 140px;
  background: linear-gradient(135deg, 
    rgba(40, 40, 70, 0.6) 0%, 
    rgba(30, 30, 50, 0.7) 100%);
  border: 2px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
  transition: all 0.3s ease;
}

#upgrade-items-grid .inventory-item:hover {
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

#upgrade-items-grid .inventory-item .item-image-display { 
  width: 55px; 
  height: 55px; 
  margin-bottom: 10px;
}

#upgrade-items-grid .inventory-item .item-image-display img {
  filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.2));
}

#upgrade-items-grid .inventory-item .inventory-item-name { 
  font-size: 0.85em;
  color: rgba(255, 215, 0, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

#upgrade-items-grid .inventory-item .inventory-item-value { 
  font-size: 0.75em; 
  margin-bottom: 10px;
  color: #ffd700;
  font-weight: 600;
}

/* Кнопка апгрейда */
#do-upgrade-button {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
  border: 2px solid #ffed4e;
  color: #000;
  font-size: 1.2em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 16px 32px;
  margin-top: 30px;
  box-shadow: 
    0 6px 20px rgba(255, 215, 0, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 5px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

#do-upgrade-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

#do-upgrade-button:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 8px 30px rgba(255, 215, 0, 0.6),
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 5px rgba(0, 0, 0, 0.2);
}

#do-upgrade-button:hover:not(:disabled)::before {
  left: 100%;
}

#do-upgrade-button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  box-shadow: 
    0 4px 15px rgba(255, 215, 0, 0.4),
    inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

#do-upgrade-button:disabled {
  background: linear-gradient(135deg, 
    rgba(100, 100, 120, 0.3) 0%, 
    rgba(80, 80, 100, 0.3) 100%);
  border-color: rgba(150, 150, 170, 0.3);
  color: rgba(150, 150, 170, 0.5);
  cursor: not-allowed;
  box-shadow: none;
  text-shadow: none;
}
#upgrade-items-grid .inventory-item .button { font-size: 0.75em; padding: 5px 8px;}
#upgrade-chance-circle { display: none !important; }
#upgrade-chance-pointer { display: none !important; }
#upgrade-chance-pointer.spinning { display: none !important; }
#upgrade-chance-text-overlay { display: none !important; }
#upgrade-calculated-multiplier { display: none !important; }
#upgrade-calculated-chance { display: none !important; }
#multiplier-buttons { display: none; }
#upgrade-inventory-select { display: none; }
#upgrade-page .content-card p:first-of-type { display: none; }
#upgrade-page .content-card #upgrade-result { display: none; }
.stats-box { display: flex; justify-content: space-around; margin: 24px 0; gap: 14px; } .stat-item { background-color: var(--surface-hover-color); padding: 14px; border-radius: var(--button-border-radius); flex: 1; text-align: center; border: 1px solid var(--border-color); } .stat-item .value { font-size: 1.6em; font-weight: 600; color: var(--primary-color); } .stat-item .label { font-size: 0.8em; color: var(--text-secondary); margin-top: 5px; } .invited-users-list div { padding: 10px 0; border-bottom: 1px solid var(--border-color); font-size: 0.9em;} .invited-users-list div:last-child { border-bottom: none; }
.leaderboard-list { padding-left: 0; padding-right: 0; } .leaderboard-list .leader-entry { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border-color); transition: all 0.25s ease-out; position: relative; } .leaderboard-list .leader-entry:hover { background-color: rgba(255,255,255,0.04); transform: translateX(3px); } .leaderboard-list .leader-entry:last-child { border-bottom: none; } .leader-entry .rank { font-weight: 700; font-size: 1.05em; min-width: 40px; text-align: left; color: var(--text-secondary); margin-right: 15px; } .leader-entry .avatar-placeholder { width: 44px; height: 44px; border-radius: 50%; background-color: var(--surface-hover-color); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; font-size: 1.2em; font-weight: 600; margin: 0 16px 0 0; border: 2px solid var(--border-color); } .leader-entry .info { flex-grow: 1; } .leader-entry .info .name { font-weight: 600; font-size: 1.1em; color: var(--text-primary); margin-bottom: 3px; } .leader-entry .info .details { font-size: 0.85em; color: var(--text-secondary); line-height: 1.3; } .leader-entry .score { margin-left: auto; font-weight: 700; font-size: 1.05em; color: var(--primary-color); padding-left: 15px; text-align: right; } .leader-entry.current-user-entry { background-color: rgba(255, 255, 255, 0.08); border-left: 3px solid var(--primary-color); padding-left: 17px;} .leader-entry.current-user-entry .rank { color: var(--primary-color); } .leader-entry.current-user-entry .info .name { color: var(--primary-gradient-end); font-weight: 700; } .leader-entry.current-user-entry .score { color: var(--primary-color); font-weight: 800; } .leader-entry.current-user-entry .avatar-placeholder { border-color: var(--primary-color); }

/* Специальные стили для топ-3 лидеров */
.leader-entry:nth-child(1) { background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%); border-left: 4px solid #FFD700; padding-left: 16px; }
.leader-entry:nth-child(1) .rank { color: #FFD700; font-size: 1.3em; }
.leader-entry:nth-child(1) .avatar-placeholder { border-color: #FFD700; box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
.leader-entry:nth-child(1) .info .name { font-size: 1.2em; font-weight: 700; }
.leader-entry:nth-child(1):hover { transform: translateX(5px) scale(1.01); }

.leader-entry:nth-child(2) { background: linear-gradient(90deg, rgba(192, 192, 192, 0.15) 0%, rgba(192, 192, 192, 0.05) 100%); border-left: 4px solid #C0C0C0; padding-left: 16px; }
.leader-entry:nth-child(2) .rank { color: #C0C0C0; font-size: 1.2em; }
.leader-entry:nth-child(2) .avatar-placeholder { border-color: #C0C0C0; box-shadow: 0 0 12px rgba(192, 192, 192, 0.3); }
.leader-entry:nth-child(2):hover { transform: translateX(5px) scale(1.01); }

.leader-entry:nth-child(3) { background: linear-gradient(90deg, rgba(205, 127, 50, 0.15) 0%, rgba(205, 127, 50, 0.05) 100%); border-left: 4px solid #CD7F32; padding-left: 16px; }
.leader-entry:nth-child(3) .rank { color: #CD7F32; font-size: 1.15em; }
.leader-entry:nth-child(3) .avatar-placeholder { border-color: #CD7F32; box-shadow: 0 0 10px rgba(205, 127, 50, 0.3); }
.leader-entry:nth-child(3):hover { transform: translateX(5px) scale(1.01); }
#deposit-instructions-modal .modal-body p { color: var(--text-secondary); font-size: 0.95em; line-height: 1.6; margin-bottom: 18px; } #deposit-instructions-modal .modal-body strong { color: var(--text-primary); font-weight: 600; } #deposit-instructions-modal #ton-transfer-link { margin-top: 10px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 8px; } #deposit-instructions-modal #ton-transfer-link svg { width: 20px; height: 20px; fill: currentColor; } #deposit-status-message, #deposit-expiry-info { text-align: center; }
.promocode-input-group { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; } .promocode-input-group input { flex-grow: 1; margin-bottom: 0; } .promocode-input-group button { flex-shrink: 0; padding: 13px 18px; width: auto; }
#loading-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #0D101B; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; color: var(--text-primary); font-family: var(--font-family); transition: opacity 0.5s ease-out, visibility 0.5s ease-out; overflow: hidden; }
#loading-screen::before { content: ''; position: absolute; top: 50%; left: 50%; width: 100vmin; height: 100vmin; background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 60%); animation: backgroundDrift 20s ease-in-out infinite; z-index: 0; }
#loading-screen > * { position: relative; z-index: 1; }
#loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-logo { width: 150px; height: 150px; border-radius: 0; margin-bottom: 10px; box-shadow: none; object-fit: contain; }
.loading-title { font-family: 'Inter', var(--font-family); font-size: 2.8em; font-weight: 800; margin-bottom: 30px; letter-spacing: 2px; color: #ffffff; text-shadow: none; font-style: italic; text-transform: uppercase; background: none; -webkit-background-clip: unset; -webkit-text-fill-color: unset; }
#loading-screen .loader { width: 40px; height: 40px; margin-top: 25px; margin-bottom: 25px; border-width: 4px; box-shadow: none; border-top-color: #ffffff; border-left-color: transparent; border-right-color: transparent; border-bottom-color: transparent; }
.loading-status-text { font-size: 1em; font-weight: 400; color: #AEB4C0; margin-bottom: 40px; }
.channel-link-container a { background-color: rgba(255, 255, 255, 0.1); color: #ffffff; font-weight: 500; font-size: 1em; padding: 10px 20px; border-radius: 10px; transition: background-color 0.2s, color 0.2s; }
.channel-link-container a:hover { background-color: rgba(255, 255, 255, 0.2); color: var(--text-primary); }
.balance-icon { width: 20px; height: 20px; margin-right: 6px; vertical-align: middle; }
/* Старые стили перенесены в основной блок case-card ниже */
.emoji-as-image { font-size: 48px; line-height: 1; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
/* ===== КРАСИВАЯ ШАПКА МОДАЛЬНОГО ОКНА КЕЙСОВ ===== */
#roulette-modal .modal-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 25px; 
  padding: 20px;
  background: linear-gradient(135deg, 
    rgba(30, 30, 60, 0.95) 0%, 
    rgba(50, 30, 80, 0.95) 100%);
  border-radius: 16px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 215, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

#roulette-modal .modal-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  animation: headerGlow 4s ease-in-out infinite;
}

@keyframes headerGlow {
  0%, 100% {
    opacity: 0.3;
    transform: translate(0, 0) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translate(20px, 20px) scale(1.1);
  }
}

#roulette-modal .modal-header h3 { 
  margin: 0; 
  padding: 0; 
  text-align: center; 
  flex-grow: 1;
  font-size: 1.6em;
  font-weight: 800;
  color: #fff;
  text-shadow: 
    0 0 15px rgba(255, 215, 0, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 0 25px rgba(255, 107, 107, 0.3);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  word-break: break-word;
  hyphens: auto;
  background: transparent;
}

#roulette-modal .modal-header h3[data-long-name="true"] {
  font-size: 1.3em;
  line-height: 1.2;
  max-height: 3.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

#roulette-modal-balance-display { 
  text-align: right; 
  line-height: 1; 
  flex-shrink: 0; 
  margin-left: auto;
  margin-right: 45px;
  padding: 8px 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

#roulette-modal-balance-display .balance-value-line { 
  display: flex; 
  align-items: center; 
  justify-content: flex-end; 
  gap: 6px; 
  font-size: 1.3em; 
  font-weight: 700; 
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

#roulette-modal-balance-display .balance-value-line .balance-icon { 
  width: 22px; 
  height: 22px;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8));
}

/* Крестик закрытия модального окна */
#close-roulette-modal-x {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-align: center;
  z-index: 10;
}

#close-roulette-modal-x:hover {
  color: #ffd700;
  transform: translateY(-50%) rotate(90deg) scale(1.15);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

#close-roulette-modal-x:active {
  transform: translateY(-50%) rotate(90deg) scale(0.95);
}
.banner-carousel { position: relative; width: 100%; margin-bottom: 28px; overflow: hidden; border-radius: var(--main-border-radius); box-shadow: var(--soft-shadow); -webkit-transform: translate3d(0, 0, 0); }
.banner-slides { display: flex; transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); }
.banner-slide { flex-shrink: 0; width: 100%; position: relative; }
.banner-slide a, .banner-slide img { display: block; width: 100%; height: auto; border-radius: var(--main-border-radius); }
.banner-pagination { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background-color: rgba(255, 255, 255, 0.3); cursor: pointer; transition: background-color 0.3s, transform 0.3s; }
.banner-dot.active { background-color: rgba(255, 255, 255, 0.9); transform: scale(1.2); }
.item-variant-badge { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); background-color: rgba(0, 0, 0, 0.7); color: #fff; padding: 2px 6px; font-size: 0.65em; font-weight: 600; border-radius: 4px; line-height: 1.2; z-index: 2; }
.black-glow-bg { background: radial-gradient(circle, rgba(0, 0, 0, 0.85) 30%, transparent 80%); }
.item-image-display img, .prize-card-image-placeholder img, .roulette-item img { position: relative; z-index: 1; }
.case-card-title { font-weight: 600; font-size: 1.05em; color: var(--text-primary); line-height: 1.3; padding: 12px 10px 10px 10px; min-height: 50px; display: flex; align-items: center; justify-content: center; text-align: center; flex-shrink: 0; }
.case-animation-display { width: 100%; padding-bottom: 100%; position: relative; }
.case-animation-display > div { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: scale(0.7); }
.case-animation-display > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: scale(0.8); }
.case-card .case-price { margin-top: 0; flex-shrink: 0; }
/* ===== КРАСИВАЯ СТРАНИЦА АПГРЕЙДА ===== */
#upgrade-page.active { 
  background-image: none; 
  margin: -24px -18px; 
  padding: 24px 18px;
  position: relative;
}

#upgrade-page .content-card { 
  background: linear-gradient(135deg, 
    rgba(30, 30, 60, 0.95) 0%, 
    rgba(50, 30, 80, 0.95) 100%);
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(255, 215, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 25px;
  position: relative;
  overflow: hidden;
}

#upgrade-page .content-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  animation: upgradeGlow 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes upgradeGlow {
  0%, 100% {
    opacity: 0.3;
    transform: translate(0, 0) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translate(20px, 20px) scale(1.1);
  }
}

/* Заголовок страницы с крестиком */
.page-header-with-close {
  position: relative;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-header-with-close h2 {
  margin: 0;
  flex: 1;
}

.page-close-x {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-align: center;
}

.page-close-x:hover {
  color: #ffd700;
  transform: translateY(-50%) rotate(90deg) scale(1.15);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.page-close-x:active {
  transform: translateY(-50%) rotate(90deg) scale(0.95);
}
#upgrade-chance-display-container { display: none !important; }

#upgrade-chance-display-container-new { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 12px; 
  margin: 40px auto; 
  width: 100%; 
  max-width: 360px;
  position: relative;
  z-index: 1;
}

.chance-display-text { 
  font-size: 1.8em; 
  font-weight: 800; 
  color: #ffd700; 
  flex: 0 0 auto;
  text-align: center;
  text-shadow: 
    0 0 15px rgba(255, 215, 0, 0.8),
    0 0 30px rgba(255, 215, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.8);
  animation: chanceTextGlow 2s ease-in-out infinite;
}

@keyframes chanceTextGlow {
  0%, 100% {
    text-shadow: 
      0 0 15px rgba(255, 215, 0, 0.8),
      0 0 30px rgba(255, 215, 0, 0.5),
      0 2px 4px rgba(0, 0, 0, 0.8);
  }
  50% {
    text-shadow: 
      0 0 25px rgba(255, 215, 0, 1),
      0 0 50px rgba(255, 215, 0, 0.7),
      0 2px 4px rgba(0, 0, 0, 0.8);
  }
}

#upgrade-chance-circle-new { 
  position: relative; 
  width: 170px; 
  height: 170px; 
  border-radius: 50%; 
  background: conic-gradient( 
    #ffd700 0deg var(--upgrade-win-segment-angle, 0deg), 
    #f44336 var(--upgrade-win-segment-angle, 0deg) 360deg 
  ); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  box-shadow: 
    0 0 35px rgba(255, 215, 0, 0.4),
    inset 0 0 30px rgba(0,0,0,0.6); 
  flex-shrink: 0;
  border: none;
  z-index: 10;
  isolation: isolate;
}

#upgrade-chance-circle-new::before { 
  content: ''; 
  position: absolute; 
  width: calc(100% - 20px); 
  height: calc(100% - 20px); 
  background: linear-gradient(135deg, 
    rgba(30, 30, 50, 0.95) 0%, 
    rgba(50, 30, 70, 0.95) 100%);
  border-radius: 50%; 
  z-index: 1;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.upgrade-mascot-image { 
  width: 75%; 
  height: 75%; 
  object-fit: contain; 
  position: relative; 
  z-index: 2;
  filter: drop-shadow(0 4px 15px rgba(255, 215, 0, 0.3));
  animation: mascotFloat 3s ease-in-out infinite;
}

@keyframes mascotFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.05);
  }
}

#upgrade-chance-pointer-new { 
  width: 0; 
  height: 0; 
  border-left: 12px solid transparent; 
  border-right: 12px solid transparent; 
  border-bottom: 22px solid #ffd700; 
  position: absolute; 
  top: -3px; 
  left: 50%; 
  transform: translateX(-50%); 
  transform-origin: 50% 87px; 
  z-index: 20; 
  filter: drop-shadow(0px 3px 6px rgba(0,0,0,0.6)) drop-shadow(0 0 10px rgba(255, 215, 0, 0.8)); 
  transition: transform 5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.banner-carousel { position: relative; width: auto; margin: 0 -18px 28px -18px; overflow: hidden; border-radius: 0; box-shadow: none; -webkit-transform: translate3d(0, 0, 0); }
.banner-slides { display: flex; transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); }
.banner-slide { flex-shrink: 0; width: 100%; position: relative; }
.banner-slide a, .banner-slide img { display: block; width: 100%; height: auto; border-radius: 0; }

.header-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--surface-hover-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    overflow: hidden;
    flex-shrink: 0;
}
.header-avatar-placeholder img { width: 100%; height: 100%; object-fit: cover; }



/* ===== MAIN2 (Главная) ===== */

#main2-page{
  padding: 12px 12px 28px;
}
#main2-page h2{
  margin: 6px 0 12px;
}
#main2-page .section-heading{
  margin: 18px 0 12px;
  font-size: 16px;
  opacity: .9;
  letter-spacing: .2px;
}

/* Карточка-баннер (общая оболочка) */
#main2-page .feature-card{
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  color: #fff;
  margin: 14px 0 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  cursor: pointer;
  background: linear-gradient(135deg,#0f172a 0%,#0b1220 100%); /* фолбэк если без картинки */
}
#main2-page .feature-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  filter: brightness(1.02);
}

/* Вариант с фотографией (как у cases.jpg/roulete.jpg/battle.jpg/upgrade.jpg) */
#main2-page .feature-card.feature-image{
  padding: 0;          /* никаких внутренних отступов — чистый баннер */
  height: 170px;
}
@media (min-width: 480px){
  #main2-page .feature-card.feature-image{ height: 190px; }
}
@media (min-width: 768px){
  #main2-page .feature-card.feature-image{ height: 220px; }
}

#main2-page .feature-card.feature-image .cover{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;   /* заполняет и обрезает по контейнеру */
}

/* Лёгкое затемнение, чтобы бейдж читался на любом фото */
#main2-page .feature-card.feature-image::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.28));
  pointer-events: none;
}

/* Бейдж со счётчиком (в левом верхнем углу) */
#main2-page .card-badge{
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.32);
  color: #fff; font-weight: 700; font-size: 13px;
  backdrop-filter: blur(6px);
}
#main2-page .card-badge .dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.25);
}
#main2-page .card-badge .count{ position: relative; top: -1px; }

/* === ЗАМОЧЕК "SOON | Скоро" для карточек === */
.lock-overlay {
  position: absolute;
  inset: 0;
  display: none; /* По умолчанию скрыт */
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4); /* Легкое затемнение вместо сильного */
  backdrop-filter: blur(2px); /* Минимальное размытие */
  -webkit-backdrop-filter: blur(2px);
  z-index: 10;
  border-radius: 18px;
  pointer-events: auto;
  cursor: not-allowed;
}

/* Для включения замочка добавьте класс 'active' */
.lock-overlay.active {
  display: flex;
}

.lock-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: lockPulse 2s ease-in-out infinite;
}

.lock-icon {
  width: 56px;
  height: 56px;
  color: #ffffff;
  filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.3));
}

.lock-text {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

@keyframes lockPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

/* (опционально) текстовый вариант карточки, если будешь использовать */
#main2-page .feature-card .card-text{ position: relative; z-index: 1; max-width: 62%; }
#main2-page .feature-card .card-text .title{ font-weight: 800; font-size: 22px; letter-spacing: .2px; }
#main2-page .feature-card .card-text .subtitle{ margin-top: 4px; opacity: .9; font-size: 13.5px; }

/* (опционально) градиентные цвета, если вдруг пригодятся без фото */
#main2-page .card-green{ background: linear-gradient(135deg,#22c55e 0%,#16a34a 60%); }
#main2-page .card-red  { background: linear-gradient(135deg,#ef4444 0%,#f43f5e 60%); }



/* === КВАДРАТНАЯ КАРТОЧКА: ТЕКСТ ↑, ИЗОБРАЖЕНИЕ ●, ЗВЁЗДЫ ↓ === */
.case-card{
  /* Тюнинг через переменные */
  --pad:        8px;    /* внутренние отступы по краям */
  --title-h:    42px;   /* высота зоны заголовка */
  --price-h:    32px;   /* высота нижней плашки */
  --img-size:   80%;    /* масштаб изображения (70–90%) */
  --img-shift: -12px;   /* сдвиг зоны изображения вверх (отриц. — выше) */
  --title-fs:   11px;   /* размер шрифта заголовка (уменьшен для длинных слов) */

  /* База и форма */
  aspect-ratio: 1 / 1;
  position: relative;
  display: block;
  padding: 0 !important;
  overflow: hidden;

  background: linear-gradient(135deg, 
    rgba(30, 30, 60, 0.95) 0%, 
    rgba(50, 30, 80, 0.95) 50%, 
    rgba(30, 30, 60, 0.95) 100%);
  border-radius: 16px;
  border: 2px solid transparent;
  background-clip: padding-box;
  text-align: center;
  cursor: pointer;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Эффект свечения */
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 215, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  
  /* Анимированная обводка */
  position: relative;
}

.case-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: rgba(255, 215, 0, 0.1); /* Убрана цветная анимированная обводка */
  border-radius: 16px;
  z-index: -1;
  opacity: 0.3;
  filter: blur(4px);
}

.case-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  /* Упрощенный фон без ярких цветов */
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 3%),
    radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.02) 0%, transparent 2%),
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.03) 0%,
      rgba(255, 255, 255, 0.01) 50%,
      rgba(255, 255, 255, 0.02) 100%);
  background-size: 100% 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}


.case-card:hover{
  transform: translateY(-8px) scale(1.03);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 50px rgba(255, 215, 0, 0.4),
    0 0 30px rgba(255, 107, 107, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  filter: brightness(1.15) saturate(1.2);
}

.case-card:hover::before {
  opacity: 0.5;
  filter: blur(6px);
}

.case-card:hover::after {
  opacity: 1;
}


/* ── Заголовок (сверху) ───────────────────────────────────────────── */
/* Контейнер названия */
.case-card .case-name-container {
  position: absolute !important;
  bottom: var(--price-h) !important;
  left: 0;
  right: 0;
  height: var(--title-h);
  margin: 0 !important;
  padding: 0 8px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
}

/* Само название внутри контейнера */
.case-card .case-name-container .case-name {
  font: 700 var(--title-fs)/1.2 var(--font-family, inherit);
  color: #fff;
  text-shadow: 
    0 0 10px rgba(255, 215, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(255, 107, 107, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.case-card:hover .case-name-container .case-name {
  text-shadow: 
    0 0 15px rgba(255, 215, 0, 0.8),
    0 2px 6px rgba(0, 0, 0, 1),
    0 0 30px rgba(255, 215, 0, 0.5);
  transform: scale(1.05);
}

/* Старый селектор для совместимости */
.case-card :is(.case-card-title, .title, .name){
  position: absolute !important;
  top: var(--pad);
  left: var(--pad);
  right: var(--pad);
  height: var(--title-h);
  margin: 0 !important;
  padding: 0 8px !important;

  display: flex;
  align-items: center;
  justify-content: center;

  font: 700 var(--title-fs)/1.2 var(--font-family, inherit);
  color: #fff;
  text-shadow: 
    0 0 10px rgba(255, 215, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(255, 107, 107, 0.3);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 10;
  transition: all 0.3s ease;
}

/* ── Зона изображения (между заголовком и плашкой) ───────────────── */
.case-card .case-image-display{
  position: absolute !important;
  top: var(--pad);
  left: var(--pad);
  right: var(--pad);
  bottom: calc(var(--price-h) + var(--title-h) + 8px); /* +8px для зазора */
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;

  display: grid;
  place-items: center;
  background: transparent;
  z-index: 5;
}

.case-card .case-image-display::before {
  content: '';
  position: absolute;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, 
    rgba(255, 215, 0, 0.05) 0%, 
    rgba(255, 107, 107, 0.03) 30%,
    transparent 60%);
  /* Анимация убрана для улучшения производительности */
  z-index: 0;
}

.case-card .case-image-display :is(img, .overlay-image){
  position: static !important;
  transform: none !important;
  max-width: 75%;
  max-height: 85%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.40))
          drop-shadow(0 0 15px rgba(255, 215, 0, 0.3));
  transition: all 0.3s ease;
  z-index: 1;
  position: relative;
}

.case-card:hover .case-image-display :is(img, .overlay-image) {
  filter: drop-shadow(0 6px 20px rgba(0,0,0,.50))
          drop-shadow(0 0 30px rgba(255, 215, 0, 0.6))
          drop-shadow(0 0 15px rgba(255, 107, 107, 0.4));
  transform: scale(1.05) rotate(1deg);
}

/* Анимация imagePulse удалена для улучшения производительности */

/* ── Плашка со звёздами (внизу, по центру) ───────────────────────── */
.case-card :is(.case-price, .price, .stars, .stars-line, .case-bottom, [data-role="price"]){
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--price-h);
  margin: 0 !important;
  padding: 0 !important;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  color: #ffd700;
  font-weight: 800;
  font-size: 14px;
  text-shadow: 
    0 0 10px rgba(255, 215, 0, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.8);

  background: linear-gradient(180deg, 
    rgba(20, 20, 40, 0.9) 0%, 
    rgba(30, 30, 50, 0.95) 100%);
  border-radius: 0 0 14px 14px;
  box-shadow: 
    inset 0 1px 0 rgba(255, 215, 0, 0.2),
    0 -2px 10px rgba(255, 215, 0, 0.1);
  z-index: 11;
  transition: all 0.3s ease;
  border-top: 1px solid rgba(255, 215, 0, 0.3);
}

.case-card:hover :is(.case-price, .price, .stars, .stars-line, .case-bottom, [data-role="price"]) {
  background: linear-gradient(180deg, 
    rgba(30, 30, 50, 0.95) 0%, 
    rgba(40, 30, 60, 1) 100%);
  box-shadow: 
    inset 0 1px 0 rgba(255, 215, 0, 0.4),
    0 -2px 15px rgba(255, 215, 0, 0.3);
  text-shadow: 
    0 0 15px rgba(255, 215, 0, 0.9),
    0 2px 6px rgba(0, 0, 0, 1);
  color: #ffed4e;
  border-top-color: rgba(255, 215, 0, 0.5);
}

.case-card :is(.case-price, .price, .stars) > *{ margin: 0 !important; }
.case-card :is(.case-price .star-icon, .price img, .stars img){
  width: 18px; 
  height: 18px; 
  flex: 0 0 18px; 
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
  transition: all 0.3s ease;
}

.case-card:hover :is(.case-price .star-icon, .price img, .stars img) {
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
  transform: scale(1.1) rotate(10deg);
}

/* ── Адаптив ─────────────────────────────────────────────────────── */
@media (max-width: 360px){
  .case-card{
    --title-h: 38px;
    --price-h: 30px;
    --img-size: 84%;
    --img-shift: -8px;
    --title-fs: 10px;  /* уменьшен для маленьких экранов */
  }
  
  /* Уменьшим эффекты на маленьких экранах */
  .case-card::before {
    filter: blur(6px);
    opacity: 0.4;
  }
  
  .case-card:hover {
    transform: translateY(-6px) scale(1.02);
  }
  
  h2 {
    font-size: 1.8em;
    letter-spacing: 1px;
  }
  
  h3 {
    font-size: 1em;
  }
}

/* Адаптив для средних экранов */
@media (max-width: 768px) {
  .cases-grid, .slots-grid {
    gap: 18px;
  }
}

/* === ТЕКСТ СНИЗУ (над плашкой со звёздами) === */

/* при необходимости чуть больше места под 1–2 строки */
.case-card{ --title-h: 48px; } /* 44–56px по вкусу */

/* Стили перенесены выше - используем .case-name-container и правильное позиционирование изображения */


.case-card{ --img-top-gap: 6px; }   /* подстрой: 4–10px */

.case-image-display img,
.case-image-display .overlay-image{
  margin-top: var(--img-top-gap) !important;
}


/* Зазор уже учтен в основных стилях выше */
/* ── Необязательное: если нужны ДВЕ строки заголовка ─────────────── */
/*
.case-card :is(.case-name, .case-card-title, .title, .name){
  white-space: normal;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.case-card{ --title-h: 56px; }  // чуть больше места под 2 строки
*/



#main-page .main2-section{ padding:12px 12px 4px; }
#main-page .main2-section .main2-title{ margin:6px 0 12px; }
#main-page .main2-section .section-heading{ margin:18px 0 12px; font-size:16px; opacity:.9; letter-spacing:.2px; }

#main-page .main2-section .feature-card{
  position:relative; display:block; border-radius:18px; overflow:hidden; color:#fff;
  margin:14px 0 18px; box-shadow:0 10px 24px rgba(0,0,0,.25);
  transition:transform .2s, box-shadow .2s, filter .2s; cursor:pointer;
  background:linear-gradient(135deg,#0f172a 0%,#0b1220 100%);
}
#main-page .main2-section .feature-card:hover{ transform:translateY(-2px); box-shadow:0 12px 28px rgba(0,0,0,.28); filter:brightness(1.02); }
#main-page .main2-section .feature-card.feature-image{ padding:0; height:180px; }
@media (min-width:480px){ #main-page .main2-section .feature-card.feature-image{ height:190px; } }
@media (min-width:768px){ #main-page .main2-section .feature-card.feature-image{ height:220px; } }
#main-page .main2-section .feature-card.feature-image .cover{ width:100%; height:100%; object-fit:cover; display:block; }
#main-page .main2-section .feature-card.feature-image::after{ content:""; position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.06),rgba(0,0,0,.28)); pointer-events:none; }
#main-page .main2-section .card-badge{
  position:absolute; top:10px; left:10px; z-index:2; display:flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:999px; background:rgba(0,0,0,.32); color:#fff; font-weight:700; font-size:13px; backdrop-filter:blur(6px);
}
#main-page .main2-section .card-badge .dot{ width:8px; height:8px; border-radius:50%; background:#34d399; box-shadow:0 0 0 3px rgba(52,211,153,.25); }
#main-page .main2-section .card-badge .count{ position:relative; top:-1px; }

/* Применяем стили замочка и для main-page секции */
#main-page .main2-section .lock-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4); /* Легкое затемнение вместо сильного */
  backdrop-filter: blur(2px); /* Минимальное размытие */
  -webkit-backdrop-filter: blur(2px);
  z-index: 10;
  border-radius: 18px;
  pointer-events: auto;
  cursor: not-allowed;
}

#main-page .main2-section .lock-overlay.active {
  display: flex;
}



/* ===== Modal (Кейсы) — базовые стили ===== */
.modal{ position:fixed; inset:0; display:none; z-index:1200; }
.modal.open{ display:block; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.55); }
.modal-dialog{
  position:relative; margin:6vh auto 0; width:min(920px,96vw);
  background:var(--surface-color,#0b1220); color:var(--text-primary,#fff);
  border:1px solid var(--border-color,rgba(255,255,255,.08));
  border-radius:16px; box-shadow:0 20px 60px rgba(0,0,0,.45);
  max-height:88vh; display:flex; flex-direction:column; overflow:hidden;
}
.modal-header{ display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; border-bottom:1px solid rgba(255,255,255,.06); }
.modal-header h2{ margin:0; font-size:18px; }
.modal-close{ border:0; background:transparent; color:#fff; font-size:18px; cursor:pointer; }
.modal-body{ padding:14px; overflow:auto; }

/* ===== Конкретно для #cases-modal ===== */

/* Сетка карточек внутри модалки */
#cases-modal .cases-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(max(150px, calc(50% - 10px - 1px)), 1fr));
  gap:20px;
}

/* Мягкий полупрозрачный фон вокруг модалки */
#cases-modal .modal-backdrop{
  background: rgba(0,0,0,.18) !important;
}
@supports (backdrop-filter: blur(6px)){
  #cases-modal .modal-backdrop{
    background: rgba(0,0,0,.12) !important;
    backdrop-filter: blur(8px);
  }
}

/* Компактнее по высоте, ширину не трогаем */
#cases-modal .modal-dialog{
  margin: 12px auto !important;
  max-height: calc(100dvh - 24px);
  display:flex; flex-direction:column;
}
#cases-modal .modal-body{
  overflow:auto;
  max-height: calc(100dvh - 24px - var(--cases-modal-header, 64px));
}
#cases-modal .modal-header{ --cases-modal-header: 64px; }

/* Слой списка кейсов «под» рулеткой, но не закрыт */
#cases-modal.stacked{ opacity:0; pointer-events:none; }
#cases-modal.stacked .modal-backdrop{ display:none; }

/* Рулетка/кейс всегда выше списка в модалке */
#open-case-modal,
.case-open-modal,
#case-open-modal,
.modal.case-open,
#case-modal { z-index:1300 !important; }

/* Баннер-кнопка «Кейсы»: картинка не перехватывает клик */
#main-page .main2-section .feature-card.feature-image .cover{ pointer-events:none; }

/* (Опционально) на главной показать только кнопки, скрыть списки кейсов */
#main-page > h2,
#main-page > h3,
#main-page > .cases-grid {
  display:none !important;
  margin:0 !important;
  padding:0 !important;
}


/* Меньший шрифт для названий кейсов в попапе */
#cases-modal .case-card .case-name,
#cases-modal .case-card .title,
#cases-modal .case-card-title,
#cases-modal .case-card .name{
  font-size: 12px !important;
}

/* На очень узких экранах можно ещё уменьшить */
@media (max-width: 360px){
  #cases-modal .case-card .case-name,
  #cases-modal .case-card .title,
  #cases-modal .case-card-title,
  #cases-modal .case-card .name{
    font-size: 11.5px !important;
  }
}

/* Управляемый зазор между картинкой и названием внутри модалки */
#cases-modal .case-card{ --title-gap: 0px; } /* попробуй 0px, -4px, -8px */

/* Название опускаем ближе к плашке цены */
#cases-modal .case-card .case-name,
#cases-modal .case-card .title{
  bottom: calc(var(--price-h, 32px) + var(--title-gap)) !important;
}

/* Зону картинки ведём вслед за названием (чтобы не было лишнего воздуха) */
#cases-modal .case-card .case-image-display{
  bottom: calc(var(--price-h, 32px) + var(--title-h, 42px) + var(--title-gap)) !important;
}


/* === Шапка модалки кейса: компактный заголовок + новый чип баланса === */

/* ——— Ровная шапка кейса: title слева, balance-chip справа ——— */
#roulette-modal .modal-header{
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto; /* 1fr не выталкивает чип */
  align-items: center;                       /* чип по центру строки */
  gap: 8px 12px;                             /* [row col] */
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* Заголовок: переносим слова нормально, без обрезки, до 2 строк выглядит опрятно */
#roulette-modal .modal-header h3{
  margin: 0 !important;
  font-weight: 800;
  font-size: clamp(16px, 2.6vw, 19px);
  line-height: 1.15;
  white-space: normal;         /* разрешаем переносы */
  overflow: visible;           /* без троеточий */
  word-break: keep-all;        /* не рубим внутри слова */
  hyphens: auto;               /* аккуратно переносим по слогам, где можно */
}

/* Чип баланса — компактный, визуально по центру строки */
#roulette-modal-balance-display{
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 4px 18px rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  transform: translateY(1px);  /* оптическое выравнивание к бейзлайну */
}

#roulette-modal-balance-display .balance-label{
  font-size: 11px;
  opacity: .75;
  letter-spacing: .25px;
  margin-right: 2px;
}
#roulette-modal-balance-display .balance-value-line{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
}
#roulette-modal-balance-display .balance-icon{
  width: 14px; height: 14px; flex: 0 0 14px;
}

/* Очень узкие экраны — немного компактнее */
@media (max-width: 360px){
  #roulette-modal .modal-header{ gap: 6px 8px; padding: 10px 12px; }
  #roulette-modal-balance-display{ padding: 3px 8px; }
  #roulette-modal-balance-display .balance-value-line{ font-size: 13px; }
  #roulette-modal-balance-display .balance-icon{ width: 12px; height: 12px; }
}


/* (опционально) ультра-компактный вид — без слова “Balance”.
   ВКЛЮЧИТЬ можно одной строкой ниже (раскомментируй). */
/* #roulette-modal-balance-display .balance-label{ display:none; } */


/* === УЛУЧШЕННЫЕ СТИЛИ РУЛЕТКИ === */
#fortune-section { 
    position: relative;
    padding: 5px 20px 20px 20px; 
    background: linear-gradient(135deg, rgba(18, 19, 23, 0.95) 0%, rgba(25, 28, 38, 0.95) 100%); 
    border-radius: 16px; 
    margin: 5px 0 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.wheel-wrap { 
    position: relative; 
    width: 340px; 
    height: 340px; 
    margin: 20px auto;
    filter: drop-shadow(0 8px 24px rgba(255, 215, 0, 0.15));
}

/* Указатель с улучшенным дизайном */
.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 30px solid #ffd700;
    z-index: 100;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
    animation: pointerPulse 2s ease-in-out infinite;
}

@keyframes pointerPulse {
    0%, 100% { 
        transform: translateX(-50%) translateY(0px);
        filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
    }
    50% { 
        transform: translateX(-50%) translateY(-3px);
        filter: drop-shadow(0 6px 16px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 12px rgba(255, 215, 0, 1));
    }
}

.wheel { 
    position: absolute; 
    inset: 0; 
    border-radius: 50%; 
    box-shadow: 0 0 0 10px rgba(255, 215, 0, 0.1) inset, 
                0 0 0 12px rgba(0, 0, 0, 0.3) inset,
                0 0 30px rgba(255, 215, 0, 0.2);
    transition: transform 4.2s cubic-bezier(0.17, 0.67, 0.21, 1);
    border: 3px solid rgba(255, 215, 0, 0.3);
}

.wheel-center { 
    position: absolute; 
    inset: 0; 
    margin: auto; 
    width: 120px; 
    height: 120px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, #1a1c28 0%, #0e0f13 100%); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #ffd700; 
    font-weight: 900; 
    letter-spacing: 2px; 
    font-size: 16px;
    text-transform: uppercase;
    box-shadow: 0 0 0 8px rgba(255, 215, 0, 0.2), 
                0 0 0 10px #0b0c10,
                0 4px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 215, 0, 0.4);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: centerGlow 3s ease-in-out infinite;
}

@keyframes centerGlow {
    0%, 100% { 
        box-shadow: 0 0 0 8px rgba(255, 215, 0, 0.2), 
                    0 0 0 10px #0b0c10,
                    0 4px 20px rgba(0, 0, 0, 0.5);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(255, 215, 0, 0.4), 
                    0 0 0 10px #0b0c10,
                    0 4px 30px rgba(255, 215, 0, 0.3);
    }
}

.icons { 
    position: absolute; 
    inset: 0; 
    pointer-events: none;
}

.icons img { 
    position: absolute; 
    left: 50%; 
    top: 50%; 
    width: 42px; 
    height: 42px; 
    object-fit: contain; 
    transform-origin: center; 
    pointer-events: none; 
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.1));
}

.fortune-actions { 
    display: flex; 
    gap: 12px; 
    justify-content: center; 
    margin-top: 20px;
}

.fortune-actions .cta { 
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%); 
    color: #000; 
    padding: 15px 32px; 
    border-radius: 12px; 
    font-weight: 800; 
    border: 2px solid #ffed4e;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fortune-actions .cta:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 50%, #ffed4e 100%);
}

.fortune-actions .cta:active:not(:disabled) {
    transform: translateY(0px);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
}

.fortune-actions .cta:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mode-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.mode-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.mode-btn:disabled {
    cursor: not-allowed;
}

.fortune-slider { 
    margin: 12px auto 18px; 
    display: flex; 
    gap: 14px; 
    align-items: center; 
    justify-content: center; 
    color: #cfd3ff; 
}

.fortune-slider .btn { 
    width: 44px; 
    height: 44px; 
    border-radius: 12px; 
    background: #24262d; 
    color: #fff; 
    border: none; 
}

.price { 
    min-width: 180px; 
    text-align: center; 
}


/* колесо: старт сектора с 12:00 решим в JS (from -90deg),
   тут только вспомогательные классы */
#fortune-section .icons { position:absolute; inset:0; pointer-events:none; }

/* обёртка иконки: её (0,0) ставим в центр колеса, крутится вокруг центра */
#fortune-section .seg-icon {
  position:absolute; left:50%; top:50%;
  transform-origin: 0 0;   /* ВАЖНО: вращаем вокруг центра колеса */
}

/* сама картинка — держим вертикальной и центрируем относительно точки */
#fortune-section .seg-icon > img {
  position:absolute; left:0; top:0;
  width:42px; height:42px; object-fit:contain;
  transform: translate(-50%, -50%) var(--unrotate, rotate(0deg));
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.35));
}

/* toast */
#app-toast{
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(22,24,30,.94);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
  z-index: 9999;
}
#app-toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* иконки в колесе */
/* ===== Fortune Wheel layout ===== */
/* ===== Fortune Wheel layout ===== */

/* колесо и его слои не ловят клики */
/* ===== Fortune Wheel layout ===== */


/* колёсные слои не перехватывают клики */
/* размеры */
/* Колесо фортуны */
#fortune-section {
    position: relative;
    --wheel-size: 300px;
    --icon-size: 40px;
}

.wheel-wrap {
    position: relative;
    width: var(--wheel-size);
    height: var(--wheel-size);
    margin: 20px auto;
}

.wheel-rotor {
    position: absolute;
    inset: 0;
    transform-origin: center center;
}

.wheel {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 0 8px rgba(0,0,0,0.3);
}

.icons {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.seg-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: 0 0;
    width: var(--icon-size);
    height: var(--icon-size);
}

.seg-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    transform: translate(-50%, -50%);
}

/* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ: перевернутый указатель на 180° */
.pointer {
    position: absolute;
    left: 50%;
    bottom: -15px; /* Теперь снизу вместо top */
    transform: translateX(-50%) rotate(180deg); /* Поворачиваем на 180° */
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid #fff; /* border-top вместо border-bottom */
    border-bottom: none; /* Убираем нижнюю границу */
    z-index: 10;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.7));
}



/* Стили для попапа результата */
.sr {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sr__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.sr__card {
    position: relative;
    width: min(90vw, 320px);
    background: #121317;
    color: #fff;
    border-radius: 20px;
    padding: 24px 20px 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sr__title {
    margin: 0 0 16px 0;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.sr__img {
    display: block;
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin: 0 auto 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
}

.sr__name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #fff;
}

.sr__sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 20px 0;
}

.sr__btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    background: #FFD02A;
    color: #111;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sr__btn:hover {
    background: #ffdc5a;
    transform: translateY(-2px);
}

.sr__btn:active {
    transform: translateY(0);
}

.fortune-slider .btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #24262d;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
    font-size: 18px;
}

.fortune-slider .btn:hover:not(:disabled) {
    background: #2d3038;
    transform: translateY(-1px);
}

.fortune-slider .btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.fortune-slider .btn:active:not(:disabled) {
    transform: translateY(0);
}

.price {
    min-width: 180px;
    text-align: center;
    font-weight: 600;
    color: #cfd3ff;
}

.fortune-slider .btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #24262d;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fortune-slider .btn:hover:not(:disabled) {
    background: #2d3038;
    transform: translateY(-1px);
}

.fortune-slider .btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.fortune-actions {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.fortune-actions .cta {
    background: #ffd02a;
    color: #111;
    padding: 14px 24px;
    border-radius: 16px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    min-width: 180px;
}

.fortune-actions .cta:hover:not(:disabled) {
    background: #ffdc5a;
    transform: translateY(-2px);
}

.fortune-actions .cta:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.fortune-actions .cta:active:not(:disabled) {
    transform: translateY(0);
}

.fortune-price {
    text-align: center;
    margin: 12px auto 18px;
}

.fortune-price .price {
    color: #cfd3ff;
    font-weight: 600;
    font-size: 16px;
}

/* Стили для модалки колеса фортуны */
#fortune-modal .modal-dialog {
    margin: 12px auto !important;
    max-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    max-width: 400px;
}

#fortune-modal .modal-body {
    overflow: auto;
    max-height: calc(100dvh - 24px - 64px);
    padding: 0;
}

#fortune-modal .content-card {
    margin: 0;
    box-shadow: none;
    border: none;
}

/* Мягкий полупрозрачный фон */
#fortune-modal .modal-backdrop {
    background: rgba(0,0,0,.18) !important;
}

@supports (backdrop-filter: blur(6px)) {
    #fortune-modal .modal-backdrop {
        background: rgba(0,0,0,.12) !important;
        backdrop-filter: blur(8px);
    }
}

/* Стили только для контейнера модалки */
#fortune-modal .modal-dialog {
    margin: 12px auto !important;
    max-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    max-width: 400px;
}

#fortune-modal .modal-body {
    overflow: auto;
    max-height: calc(100dvh - 24px - 64px);
    padding: 0;
}

#fortune-modal .modal-backdrop {
    background: rgba(0,0,0,.18) !important;
}

@supports (backdrop-filter: blur(6px)) {
    #fortune-modal .modal-backdrop {
        background: rgba(0,0,0,.12) !important;
        backdrop-filter: blur(8px);
    }
}

#fortune-modal { display: none; /* или visibility:hidden */ }
#fortune-modal.open { display: flex; /* или block, как у тебя принято */ }


/* === СТИЛИ ДЛЯ СТРАНИЦЫ ЗАДАНИЙ === */

.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 20px;
}

.task-card {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: var(--main-border-radius);
    padding: 20px;
    position: relative;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0px 12px 32px rgba(0, 0, 0, 0.6);
}

.task-card.completed {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    opacity: 1;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.task-channel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    flex-shrink: 0;
}

.task-channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.task-reward {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    backdrop-filter: blur(10px);
}

.task-reward img {
    width: 24px;
    height: 24px;
}

.task-content {
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.task-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.task-actions {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.task-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--button-border-radius);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.task-button-subscribe {
    background: #fff;
    color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.task-button-subscribe:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.task-button-subscribe:active {
    transform: translateY(0);
}

.task-button-check {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
}

.task-button-check:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.task-button-check:active {
    transform: translateY(0);
}

.task-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.task-completed {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--button-border-radius);
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    backdrop-filter: blur(10px);
}

.task-completed svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.tasks-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.tasks-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.tasks-loading {
    text-align: center;
    padding: 40px 20px;
}

/* Анимация загрузки для страницы заданий */
@keyframes taskCardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-card {
    animation: taskCardAppear 0.4s ease-out;
}

.task-card:nth-child(1) { animation-delay: 0.05s; }
.task-card:nth-child(2) { animation-delay: 0.1s; }
.task-card:nth-child(3) { animation-delay: 0.15s; }
.task-card:nth-child(4) { animation-delay: 0.2s; }
.task-card:nth-child(5) { animation-delay: 0.25s; }

/* Адаптивность для маленьких экранов */
@media (max-width: 360px) {
    .task-card {
        padding: 16px;
    }
    
    .task-channel-avatar {
        width: 40px;
        height: 40px;
    }
    
    .task-title {
        font-size: 16px;
    }
    
    .task-button {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* ===== Обновление кода, полноэкранный режим для кейсов и фортуны 15.10.2025 ===== */
:is(#cases-modal, #fortune-modal){
  position: fixed;
  inset: 0;
  z-index: 1200;
}

:is(#cases-modal, #fortune-modal) .modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.18) !important; /* дефолт чуть мягче */
}
@supports (backdrop-filter: blur(6px)){
  :is(#cases-modal, #fortune-modal) .modal-backdrop{
    background: rgba(0,0,0,.12) !important;
    backdrop-filter: blur(8px);
  }
}

:is(#cases-modal, #fortune-modal) .modal-dialog{
  position: fixed;
  inset: 0;                  /* во всю ширину/высоту экрана */
  margin: 0 !important;
  width: 100vw;  max-width: 100vw;
  height: 100dvh; max-height: 100dvh;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  background: var(--card-bg, #14161b);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

:is(#cases-modal, #fortune-modal) .modal-header{
  flex: 0 0 auto;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

:is(#cases-modal, #fortune-modal) .modal-body{
  flex: 1 1 auto;
  overflow: auto;
  max-height: none;
}

/* ==== Кейсы: прокручиваемый список, стандартные отступы ==== */
#cases-modal .modal-body{
  padding: 12px 14px 16px;
}

/* ==== Рулетка: контент по центру, без внутренних отступов ==== */
#fortune-modal .modal-body{
  display: flex;
  align-items: center;   /* вертикаль */
  justify-content: center;/* горизонталь */
  padding: 0;
}

/* Рулетка: чистая «карточка» и гарантированный центр колеса */
#fortune-modal .content-card{
  margin: 0;
  box-shadow: none;
  border: none;
  background: transparent;
}
#fortune-modal .wheel-wrap{
  margin: 16px auto;
}

/* === DEV КНОПКА СБРОСА === */
#dev-reset-button {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 9999;
  padding: 12px 20px;
  background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
}

#dev-reset-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 68, 68, 0.6);
  background: linear-gradient(135deg, #ff5555 0%, #dd1111 100%);
}

#dev-reset-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(255, 68, 68, 0.4);
}

#dev-reset-button::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ff0000, #ff4444, #ff0000);
  border-radius: 12px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
  animation: devButtonPulse 2s ease-in-out infinite;
}

#dev-reset-button:hover::before {
  opacity: 0.7;
}

@keyframes devButtonPulse {
  0%, 100% {
    opacity: 0.3;
    filter: blur(8px);
  }
  50% {
    opacity: 0.5;
    filter: blur(12px);
  }
}

/* === ЛЕНТА С ЖИВЫМИ ВЫИГРЫШАМИ === */
.fortune-live-feed {
  position: relative;
  width: 100%;
  height: 90px;
  background: linear-gradient(135deg, 
    rgba(26, 28, 44, 0.98) 0%, 
    rgba(35, 38, 58, 0.98) 50%,
    rgba(26, 28, 44, 0.98) 100%
  );
  border-bottom: 2px solid rgba(255, 215, 0, 0.4);
  border-top: 1px solid rgba(255, 215, 0, 0.15);
  box-shadow: 
    0 4px 20px rgba(255, 215, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  align-items: center;
  backdrop-filter: blur(15px);
  flex-shrink: 0;
  animation: feedGlow 3s ease-in-out infinite;
}

@keyframes feedGlow {
  0%, 100% {
    box-shadow: 
      0 4px 20px rgba(255, 215, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 
      0 4px 25px rgba(255, 215, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  }
}

.live-badge {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(20, 20, 20, 0.7) 100%);
  border-radius: 25px;
  border: 2px solid rgba(0, 255, 0, 0.6);
  z-index: 10;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 0 15px rgba(0, 255, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #00ff00;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ff00;
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

.live-text {
  font-size: 12px;
  font-weight: 800;
  color: #00ff00;
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
  letter-spacing: 1px;
}

.live-feed-scroll {
  position: absolute;
  left: 100px;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: hidden;
}

.live-feed-track {
  display: flex;
  gap: 8px;
  height: 100%;
  align-items: center;
  padding: 0 20px;
}

.live-feed-item {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, 
    rgba(30, 35, 55, 0.9) 0%, 
    rgba(45, 50, 75, 0.9) 100%
  );
  border-radius: 14px;
  border: 2px solid transparent;
  background-image: 
    linear-gradient(135deg, rgba(30, 35, 55, 0.9) 0%, rgba(45, 50, 75, 0.9) 100%),
    linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 150, 0, 0.3));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 15px rgba(255, 215, 0, 0.1);
}

.live-feed-item:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 
    0 6px 20px rgba(255, 215, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 25px rgba(255, 215, 0, 0.3);
  z-index: 10;
}

/* Обычное появление подарка */
.live-feed-item.slide-in {
  animation: slideInNormal 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInNormal {
  0% {
    transform: translateX(-120px) scale(0.5);
    opacity: 0;
  }
  60% {
    transform: translateX(8px) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

/* Выигрыш пользователя - яркая анимация */
.live-feed-item.new-win {
  animation: slideInWinner 1s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid rgba(255, 215, 0, 1);
  box-shadow: 
    0 0 30px rgba(255, 215, 0, 0.8),
    0 0 60px rgba(255, 215, 0, 0.4),
    inset 0 0 20px rgba(255, 215, 0, 0.2);
}

@keyframes slideInWinner {
  0% {
    transform: translateX(-150px) scale(0.3) rotate(-15deg);
    opacity: 0;
    filter: blur(10px);
  }
  40% {
    transform: translateX(15px) scale(1.2) rotate(8deg);
    opacity: 1;
    filter: blur(0px);
  }
  60% {
    transform: translateX(-8px) scale(0.95) rotate(-3deg);
  }
  80% {
    transform: translateX(3px) scale(1.08) rotate(2deg);
  }
  100% {
    transform: translateX(0) scale(1) rotate(0deg);
    opacity: 1;
    filter: blur(0px);
  }
}

.live-feed-item img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  transition: all 0.3s ease;
}

.live-feed-item:hover img {
  transform: scale(1.15) rotate(8deg);
  filter: 
    drop-shadow(0 6px 12px rgba(255, 215, 0, 0.4))
    drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

.live-feed-item.new-win img {
  animation: prizeGlow 1s ease-out;
  filter: 
    drop-shadow(0 0 15px rgba(255, 215, 0, 0.8))
    drop-shadow(0 0 30px rgba(255, 215, 0, 0.4));
}

@keyframes prizeGlow {
  0%, 100% {
    filter: 
      drop-shadow(0 0 15px rgba(255, 215, 0, 0.8))
      drop-shadow(0 0 30px rgba(255, 215, 0, 0.4));
  }
  50% {
    filter: 
      drop-shadow(0 0 25px rgba(255, 215, 0, 1))
      drop-shadow(0 0 50px rgba(255, 215, 0, 0.6));
  }
}

.live-feed-item-name {
  display: none;
}

/* Счетчик звезд поверх картинки */
.live-feed-stars-count {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.9) 100%);
  color: #ffd700;
  font-size: 13px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 215, 0, 0.6);
  box-shadow: 
    0 0 10px rgba(255, 215, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
  letter-spacing: 0.5px;
  z-index: 2;
  pointer-events: none;
  animation: starsCountPulse 1.5s ease-in-out infinite;
}

@keyframes starsCountPulse {
  0%, 100% {
    box-shadow: 
      0 0 10px rgba(255, 215, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow: 
      0 0 15px rgba(255, 215, 0, 0.8),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
  .fortune-live-feed {
    height: 70px;
  }
  
  .live-feed-track {
    gap: 6px;
    padding: 0 15px;
  }
  
  .live-feed-item {
    width: 60px;
    height: 60px;
  }
  
  .live-badge {
    left: 8px;
    padding: 6px 12px;
    font-size: 11px;
  }
  
  .live-feed-scroll {
    left: 85px;
  }
  
  .live-feed-item img {
    width: 50px;
    height: 50px;
  }
  
  .live-feed-stars-count {
    font-size: 11px;
    padding: 2px 6px;
    bottom: 1px;
  }
  
  .live-feed-item-name {
    font-size: 12px;
    max-width: 100px;
  }
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ РЕФЕРАЛОВ В СТИЛЕ РУЛЕТКИ ===== */

#invite-page {
  position: relative;
  min-height: calc(100vh - 200px);
}

#invite-page::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  width: 80vw;
  height: 80vh;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, rgba(255, 215, 0, 0) 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
  animation: referralGlow 6s ease-in-out infinite;
}

@keyframes referralGlow {
  0%, 100% { 
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

#invite-page h2 {
  text-align: center;
  font-size: 2.4em;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 
    0 0 20px rgba(255, 215, 0, 0.6),
    0 4px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 30px;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% {
    text-shadow: 
      0 0 20px rgba(255, 215, 0, 0.6),
      0 4px 8px rgba(0, 0, 0, 0.5);
  }
  50% {
    text-shadow: 
      0 0 30px rgba(255, 215, 0, 0.9),
      0 4px 12px rgba(0, 0, 0, 0.6);
  }
}

/* Основные карточки рефералов */
#invite-page .content-card {
  background: linear-gradient(135deg, 
    rgba(26, 28, 44, 0.95) 0%, 
    rgba(35, 38, 58, 0.95) 50%,
    rgba(26, 28, 44, 0.95) 100%
  );
  border: 2px solid transparent;
  background-image: 
    linear-gradient(135deg, rgba(26, 28, 44, 0.95) 0%, rgba(35, 38, 58, 0.95) 50%, rgba(26, 28, 44, 0.95) 100%),
    linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 150, 0, 0.3));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 20px rgba(255, 215, 0, 0.15);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  animation: cardAppear 0.6s ease-out;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#invite-page .content-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 12px 40px rgba(255, 215, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 30px rgba(255, 215, 0, 0.25);
}

#invite-page .content-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 215, 0, 0) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#invite-page .content-card:hover::before {
  opacity: 1;
}

/* Описание */
#invite-page .content-card p {
  text-align: center;
  font-size: 1.1em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Реферальная ссылка */
#referral-link {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 215, 0, 0.5);
  color: #ffd700;
  font-weight: 700;
  font-size: 0.95em;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(255, 215, 0, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  letter-spacing: 0.5px;
}

#referral-link:hover,
#referral-link:focus {
  border-color: #ffd700;
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(255, 215, 0, 0.4);
  transform: scale(1.02);
}

/* Кнопка копирования */
#copy-ref-link-button {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
  color: #000;
  font-weight: 800;
  font-size: 1.1em;
  padding: 16px 32px;
  border: 2px solid #ffed4e;
  border-radius: 14px;
  box-shadow: 
    0 6px 20px rgba(255, 215, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: all 0.3s ease;
  margin-top: 15px;
  position: relative;
  overflow: hidden;
}

#copy-ref-link-button::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

#copy-ref-link-button:hover::before {
  left: 100%;
}

#copy-ref-link-button:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 8px 30px rgba(255, 215, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, #ffed4e 0%, #ffd700 50%, #ffed4e 100%);
}

#copy-ref-link-button:active {
  transform: translateY(0);
  box-shadow: 
    0 4px 15px rgba(255, 215, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Блок статистики */
#invite-page .stats-box {
  display: flex;
  gap: 18px;
  margin: 30px 0;
  justify-content: center;
}

#invite-page .stat-item {
  flex: 1;
  background: linear-gradient(135deg, 
    rgba(40, 42, 58, 0.9) 0%, 
    rgba(50, 52, 68, 0.9) 100%
  );
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 15px rgba(255, 215, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#invite-page .stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
  transition: left 0.6s ease;
}

#invite-page .stat-item:hover::before {
  left: 100%;
}

#invite-page .stat-item:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow: 
    0 8px 30px rgba(255, 215, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 25px rgba(255, 215, 0, 0.2);
}

#invite-page .stat-item .value {
  font-size: 2em;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 
    0 0 15px rgba(255, 215, 0, 0.8),
    0 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  animation: valueGlow 2s ease-in-out infinite;
}

@keyframes valueGlow {
  0%, 100% {
    text-shadow: 
      0 0 15px rgba(255, 215, 0, 0.8),
      0 2px 4px rgba(0, 0, 0, 0.5);
  }
  50% {
    text-shadow: 
      0 0 25px rgba(255, 215, 0, 1),
      0 2px 6px rgba(0, 0, 0, 0.6);
  }
}

#invite-page .stat-item .label {
  font-size: 0.9em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Кнопка вывода на баланс */
#withdraw-referral-button {
  background: linear-gradient(135deg, 
    rgba(76, 175, 80, 0.9) 0%, 
    rgba(56, 142, 60, 0.9) 100%
  );
  color: #fff;
  font-weight: 700;
  font-size: 1.05em;
  padding: 15px 28px;
  border: 2px solid rgba(139, 195, 74, 0.5);
  border-radius: 12px;
  box-shadow: 
    0 4px 20px rgba(76, 175, 80, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  margin-top: 15px;
}

#withdraw-referral-button:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, 
    rgba(56, 142, 60, 0.9) 0%, 
    rgba(76, 175, 80, 0.9) 100%
  );
  box-shadow: 
    0 6px 25px rgba(76, 175, 80, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(139, 195, 74, 0.8);
}

#withdraw-referral-button:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 12px rgba(76, 175, 80, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Список приглашенных друзей */
#invite-page h3 {
  text-align: center;
  font-size: 1.4em;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

#invited-users-list-display {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

#invited-users-list-display::-webkit-scrollbar {
  width: 8px;
}

#invited-users-list-display::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

#invited-users-list-display::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

#invited-users-list-display::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
}

.invited-users-list div {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  margin-bottom: 10px;
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.invited-users-list div:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 215, 0, 0.4);
  transform: translateX(5px);
  box-shadow: 
    0 4px 15px rgba(255, 215, 0, 0.2),
    inset 0 0 10px rgba(255, 215, 0, 0.05);
}

.invited-users-list div:last-child {
  margin-bottom: 0;
}

/* Пустой список */
.invited-users-list p {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  padding: 30px 20px;
  font-size: 1.05em;
}

/* Адаптивность */
@media (max-width: 480px) {
  #invite-page h2 {
    font-size: 2em;
  }
  
  #invite-page .stats-box {
    flex-direction: row;
    gap: 12px;
  }
  
  #invite-page .stat-item .value {
    font-size: 1.6em;
  }
  
  #copy-ref-link-button {
    font-size: 1em;
    padding: 14px 24px;
  }
}

/* ===== СОВРЕМЕННЫЙ КОМПАКТНЫЙ ПРОФИЛЬ ===== */

#profile-page {
  position: relative;
  min-height: calc(100vh - 200px);
}

#profile-page::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  width: 80vw;
  height: 80vh;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.06) 0%, rgba(255, 215, 0, 0) 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
  animation: profileGlow 8s ease-in-out infinite;
}

@keyframes profileGlow {
  0%, 100% { 
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* Центрированная шапка профиля */
.profile-header-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px 25px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, 
    rgba(26, 28, 44, 0.85) 0%, 
    rgba(35, 38, 58, 0.85) 50%,
    rgba(26, 28, 44, 0.85) 100%
  );
  border-radius: 16px;
  border: 2px solid transparent;
  background-image: 
    linear-gradient(135deg, rgba(26, 28, 44, 0.85) 0%, rgba(35, 38, 58, 0.85) 50%, rgba(26, 28, 44, 0.85) 100%),
    linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 150, 0, 0.25));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 
    0 6px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 20px rgba(255, 215, 0, 0.12);
  position: relative;
  overflow: hidden;
  animation: headerSlideIn 0.5s ease-out;
}

@keyframes headerSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-header-centered::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  animation: headerGlow 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes headerGlow {
  0%, 100% {
    opacity: 0.3;
    transform: translate(0, 0) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translate(10px, 10px) scale(1.1);
  }
}

/* Центрированный аватар */
.profile-avatar-placeholder {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: linear-gradient(135deg, 
    rgba(40, 42, 58, 0.9) 0%, 
    rgba(50, 52, 68, 0.9) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
  font-weight: 700;
  color: #ffd700;
  border: 4px solid transparent;
  background-image: 
    linear-gradient(135deg, rgba(40, 42, 58, 0.9) 0%, rgba(50, 52, 68, 0.9) 100%),
    linear-gradient(135deg, #ffd700, #ffed4e, #ffd700);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 
    0 8px 30px rgba(255, 215, 0, 0.5),
    inset 0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(255, 215, 0, 0.4);
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
  animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
  0%, 100% {
    box-shadow: 
      0 8px 30px rgba(255, 215, 0, 0.5),
      inset 0 2px 8px rgba(0, 0, 0, 0.3),
      0 0 40px rgba(255, 215, 0, 0.4);
  }
  50% {
    box-shadow: 
      0 10px 40px rgba(255, 215, 0, 0.7),
      inset 0 2px 8px rgba(0, 0, 0, 0.4),
      0 0 60px rgba(255, 215, 0, 0.6);
  }
}

.profile-avatar-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
}

/* Центрированная информация профиля */
.profile-info-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.profile-info-centered .username {
  font-size: 1.6em;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 
    0 0 20px rgba(255, 215, 0, 0.7),
    0 2px 6px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
  animation: usernameGlow 2.5s ease-in-out infinite;
}

@keyframes usernameGlow {
  0%, 100% {
    text-shadow: 
      0 0 20px rgba(255, 215, 0, 0.7),
      0 2px 6px rgba(0, 0, 0, 0.5);
  }
  50% {
    text-shadow: 
      0 0 30px rgba(255, 215, 0, 1),
      0 2px 8px rgba(0, 0, 0, 0.6);
  }
}

.profile-info-centered .userid {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Компактные карточки профиля */
#profile-page .content-card {
  background: linear-gradient(135deg, 
    rgba(26, 28, 44, 0.92) 0%, 
    rgba(35, 38, 58, 0.92) 50%,
    rgba(26, 28, 44, 0.92) 100%
  );
  border: 2px solid transparent;
  background-image: 
    linear-gradient(135deg, rgba(26, 28, 44, 0.92) 0%, rgba(35, 38, 58, 0.92) 50%, rgba(26, 28, 44, 0.92) 100%),
    linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 150, 0, 0.2));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 15px rgba(255, 215, 0, 0.1);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: cardSlideUp 0.4s ease-out backwards;
}

@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#profile-page .content-card:nth-child(2) { animation-delay: 0.05s; }
#profile-page .content-card:nth-child(3) { animation-delay: 0.1s; }
#profile-page .content-card:nth-child(4) { animation-delay: 0.15s; }

#profile-page .content-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 30px rgba(255, 215, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 25px rgba(255, 215, 0, 0.15);
}

#profile-page .content-card h3 {
  font-size: 1.1em;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Заголовок с кнопкой inline */
.card-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 8px;
}

.card-header-inline h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

/* Компактное поле ввода */
#deposit-amount-input {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 215, 0, 0.3);
  color: #fff;
  font-weight: 600;
  font-size: 0.95em;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.3),
    0 0 12px rgba(255, 215, 0, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 12px;
}

#deposit-amount-input:focus {
  border-color: #ffd700;
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(255, 215, 0, 0.25);
}

#deposit-amount-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* Компактные кнопки депозита в ряд */
.deposit-buttons-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.deposit-btn-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  font-size: 0.8em;
  font-weight: 700;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 2px solid;
  cursor: pointer;
  background: none;
}

.deposit-btn-compact .btn-icon-compact {
  width: 28px;
  height: 28px;
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.deposit-btn-compact .btn-text-compact {
  font-size: 0.85em;
  font-weight: 800;
}

.deposit-btn-compact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.deposit-btn-compact:hover::before {
  transform: translateX(100%);
}

/* Stars */
.deposit-btn-stars {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border-color: #ffed4e;
  color: #000;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.deposit-btn-stars:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

/* TON */
.deposit-btn-ton {
  background: linear-gradient(135deg, 
    rgba(80, 80, 100, 0.4) 0%, 
    rgba(60, 60, 80, 0.4) 100%
  );
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
  position: relative;
}

.deposit-btn-ton .btn-timer-compact {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 14px;
}

/* Gifts */
.deposit-btn-gifts {
  background: linear-gradient(135deg, 
    rgba(233, 30, 99, 0.85) 0%, 
    rgba(156, 39, 176, 0.85) 100%
  );
  border-color: rgba(233, 30, 99, 0.6);
  color: #fff;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.deposit-btn-gifts:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.5);
}

/* Улучшенный инвентарь */
#profile-page .inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.inventory-item {
  background: linear-gradient(135deg, 
    rgba(40, 42, 58, 0.8) 0%, 
    rgba(50, 52, 68, 0.8) 100%
  );
  border: 2px solid rgba(255, 215, 0, 0.2);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.inventory-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.inventory-item:hover::before {
  opacity: 1;
}

.inventory-item:hover {
  transform: translateY(-5px) scale(1.03);
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 
    0 8px 25px rgba(255, 215, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.inventory-item .item-image-display {
  width: 75px;
  height: 75px;
  margin: 0 auto 12px auto;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(255, 215, 0, 0.15);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.inventory-item .item-image-display img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.inventory-item-name {
  font-size: 0.9em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
  line-height: 1.3;
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inventory-item-value {
  font-size: 0.85em;
  color: #ffd700;
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.inventory-item-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.inventory-item-actions .button {
  font-size: 0.8em;
  padding: 8px 12px;
  margin: 0;
  width: 100%;
  border-radius: 8px;
  font-weight: 700;
}

/* Компактная кнопка продать все */
.sell-all-compact {
  background: linear-gradient(135deg, 
    rgba(244, 67, 54, 0.85) 0%, 
    rgba(198, 40, 40, 0.85) 100%
  );
  color: white;
  font-weight: 700;
  font-size: 0.8em;
  padding: 8px 14px;
  border: 2px solid rgba(244, 67, 54, 0.5);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  white-space: nowrap;
  margin: 0;
  width: auto;
}

.sell-all-compact:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, 
    rgba(198, 40, 40, 0.85) 0%, 
    rgba(244, 67, 54, 0.85) 100%
  );
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.5);
  border-color: rgba(244, 67, 54, 0.7);
}

.sell-all-compact:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(244, 67, 54, 0.3);
}

/* Две колонки для промокода и поддержки */
.profile-grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.compact-card {
  margin-bottom: 0;
}

.compact-card input {
  margin-bottom: 12px;
  font-size: 0.9em;
  padding: 10px;
}

.compact-btn {
  padding: 12px 20px;
  font-size: 0.9em;
  margin: 0;
}

.compact-text {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
  line-height: 1.4;
}

/* Кнопка поддержки */
#support-button {
  background: linear-gradient(135deg, 
    rgba(33, 150, 243, 0.85) 0%, 
    rgba(21, 101, 192, 0.85) 100%
  );
  color: #fff;
  font-weight: 700;
  border: 2px solid rgba(33, 150, 243, 0.5);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all 0.3s ease;
}

#support-button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, 
    rgba(21, 101, 192, 0.85) 0%, 
    rgba(33, 150, 243, 0.85) 100%
  );
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.5);
  border-color: rgba(33, 150, 243, 0.7);
}

#support-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(33, 150, 243, 0.3);
}

/* Красивый пустой инвентарь */
.empty-inventory-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  margin-top: 20px;
}

.empty-slot {
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, 
    rgba(40, 42, 58, 0.6) 0%, 
    rgba(50, 52, 68, 0.6) 100%
  );
  border: 3px dashed rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  animation: emptySlotPulse 3s ease-in-out infinite;
}

@keyframes emptySlotPulse {
  0%, 100% {
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 
      inset 0 0 20px rgba(255, 215, 0, 0.05),
      0 0 20px rgba(255, 215, 0, 0.1);
  }
  50% {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 
      inset 0 0 30px rgba(255, 215, 0, 0.1),
      0 0 30px rgba(255, 215, 0, 0.2);
  }
}

.empty-slot::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
  animation: emptySlotGlow 4s ease-in-out infinite;
}

@keyframes emptySlotGlow {
  0%, 100% {
    opacity: 0.3;
    transform: translate(0, 0) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translate(20px, 20px) scale(1.2);
  }
}

.empty-slot-icon {
  font-size: 4em;
  opacity: 0.7;
  position: relative;
  z-index: 1;
  animation: iconFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.empty-slot-text {
  font-size: 1.1em;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.empty-message {
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05em;
  line-height: 1.6;
  max-width: 320px;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.empty-message-main {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.88em;
  font-weight: 400;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  letter-spacing: 0.3px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Адаптивность для профиля */
@media (max-width: 480px) {
  .profile-header-centered {
    padding: 25px 16px 20px;
  }
  
  .profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    font-size: 2.5em;
    margin-bottom: 12px;
  }
  
  .profile-info-centered .username {
    font-size: 1.4em;
  }
  
  .profile-info-centered .userid {
    font-size: 0.85em;
  }
  
  #profile-page .content-card {
    padding: 16px;
  }
  
  #profile-page .content-card h3 {
    font-size: 1em;
    margin-bottom: 12px;
  }
  
  .deposit-buttons-compact {
    gap: 8px;
  }
  
  .deposit-btn-compact {
    padding: 12px 6px;
  }
  
  .deposit-btn-compact .btn-icon-compact {
    width: 24px;
    height: 24px;
    font-size: 24px;
  }
  
  .deposit-btn-compact .btn-text-compact {
    font-size: 0.75em;
  }
  
  .inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 10px;
  }
  
  .inventory-item {
    padding: 12px;
  }
  
  .inventory-item .item-image-display {
    width: 65px;
    height: 65px;
  }
  
  .inventory-item-name {
    font-size: 0.85em;
  }
  
  .card-header-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .sell-all-compact {
    font-size: 0.75em;
    padding: 6px 12px;
    align-self: stretch;
  }
  
  .profile-grid-two {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .empty-slot {
    width: 120px;
    height: 120px;
  }
  
  .empty-slot-icon {
    font-size: 3.5em;
  }
  
  .empty-inventory-placeholder {
    padding: 30px 15px;
  }
}

/* ===== Gift Deposit Modal Styles ===== */
.gift-deposit-modal-content {
  max-width: 480px;
}

.modal-header-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header-inline h3 {
  margin: 0;
  font-size: 1.4em;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-x {
  background: transparent;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.modal-close-x:hover {
  color: #ffd700;
  transform: rotate(90deg) scale(1.15);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.gift-deposit-body {
  margin-top: 0;
}

.gift-deposit-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 28px;
}

.gift-deposit-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.gift-deposit-step:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.step-icon-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-icon {
  font-size: 28px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.step-title {
  font-size: 1.05em;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.step-subtitle {
  font-size: 0.9em;
  color: var(--text-secondary);
  padding-left: 44px;
  line-height: 1.5;
}

.bot-link {
  color: #007AFF;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.bot-link:hover {
  color: #0051D5;
  text-decoration: underline;
}

.gift-prices-button {
  width: 100%;
  padding: 14px 20px;
  font-size: 1.05em;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.15), rgba(0, 122, 255, 0.08));
  border: 1px solid rgba(0, 122, 255, 0.4);
  color: #007AFF;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gift-prices-button:hover {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.25), rgba(0, 122, 255, 0.15));
  border-color: rgba(0, 122, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* ===== Gift Prices Modal Styles ===== */
.gift-prices-modal-content {
  max-width: 480px;
}

.gift-prices-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 0;
}

.gift-prices-list-scrollable {
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 8px;
  -webkit-overflow-scrolling: touch;
}

.gift-prices-list-scrollable::-webkit-scrollbar {
  width: 6px;
}

.gift-prices-list-scrollable::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.gift-prices-list-scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.gift-prices-list-scrollable::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.add-gift-button {
  width: 100%;
  padding: 14px 20px;
  font-size: 1.05em;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(52, 199, 89, 0.15), rgba(52, 199, 89, 0.08));
  border: 1px solid rgba(52, 199, 89, 0.4);
  color: #34C759;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
  text-align: center;
  margin-top: 12px;
}

.add-gift-button:hover {
  background: linear-gradient(135deg, rgba(52, 199, 89, 0.25), rgba(52, 199, 89, 0.15));
  border-color: rgba(52, 199, 89, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .gift-deposit-step {
    padding: 12px;
  }
  
  .step-icon {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  
  .step-icon img {
    width: 28px;
    height: 28px;
  }
  
  .step-title {
    font-size: 0.95em;
  }
  
  .step-subtitle {
    font-size: 0.85em;
    padding-left: 40px;
  }
}

/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ ЭФФЕКТЫ ДЛЯ КЕЙСОВ
   ============================================ */

/* Плавающие частицы вокруг секции кейсов */
.cases-grid::before,
.cases-grid::after {
  content: '✨';
  position: absolute;
  font-size: 20px;
  opacity: 0;
  animation: floatingParticle 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 10;
}

.cases-grid::before {
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.cases-grid::after {
  top: 30%;
  right: 5%;
  animation-delay: 2.5s;
}

@keyframes floatingParticle {
  0%, 100% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  10% {
    opacity: 0.8;
    transform: translateY(-10px) scale(1);
  }
  90% {
    opacity: 0.8;
    transform: translateY(-40px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(0.5);
  }
}

/* Эффект радужного сияния при загрузке страницы */
@keyframes rainbowGlow {
  0% {
    filter: hue-rotate(0deg) brightness(1);
  }
  50% {
    filter: hue-rotate(45deg) brightness(1.1);
  }
  100% {
    filter: hue-rotate(0deg) brightness(1);
  }
}

/* Дополнительный эффект для особых/редких кейсов */
.case-card.rare,
.case-card.legendary {
  animation: rareCardPulse 4s ease-in-out infinite;
}

@keyframes rareCardPulse {
  0%, 100% {
    box-shadow: 
      0 4px 15px rgba(0, 0, 0, 0.3),
      0 0 20px rgba(255, 215, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 
      0 4px 20px rgba(0, 0, 0, 0.4),
      0 0 40px rgba(255, 215, 0, 0.4),
      0 0 60px rgba(255, 107, 107, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

/* Эффект звездной пыли объединен с основным ::after выше */

/* Улучшенный эффект для grid контейнера */
.cases-grid {
  position: relative;
}

/* Добавляем небольшое смещение для визуального разнообразия */
.case-card:nth-child(3n+1) {
  animation-delay: 0s;
}

.case-card:nth-child(3n+2) {
  animation-delay: 0.1s;
}

.case-card:nth-child(3n+3) {
  animation-delay: 0.2s;
}

/* Эффект волны при загрузке */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.case-card {
  animation: fadeInUp 0.6s ease-out backwards;
}

/* Увеличение яркости при наведении на контейнер */
.cases-grid:hover .case-card:not(:hover) {
  opacity: 0.7;
  filter: brightness(0.85);
  transition: all 0.3s ease;
}

.cases-grid .case-card {
  opacity: 1;
  transition: all 0.3s ease;
}

/* Дополнительный блик на иконке звезды */
@keyframes starShine {
  0%, 100% {
    opacity: 0.6;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.9));
  }
}

.case-card:hover :is(.case-price .star-icon, .price img, .stars img) {
  animation: starShine 1.5s ease-in-out infinite;
}

/* Эффект световой дорожки */
.case-card .light-trail {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.05) 30%,
    rgba(255, 255, 255, 0.15) 50%, 
    rgba(255, 255, 255, 0.05) 70%,
    transparent 100%);
  transform: skewX(-25deg);
  animation: lightTrail 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 10;
}

@keyframes lightTrail {
  0%, 90% {
    left: -100%;
  }
  95%, 100% {
    left: 150%;
  }
}
