* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #0d0d12;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

body.snow-enabled::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: blizzard 8s ease-in-out infinite;
}

@keyframes blizzard {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

.header {
    background: linear-gradient(180deg, rgba(255,215,0,0.1) 0%, transparent 100%);
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,215,0,0.3);
    backdrop-filter: blur(10px);
    transition: all 0.5s ease;
}

body.winter-theme .header {
    background: linear-gradient(180deg, rgba(0,200,100,0.15) 0%, rgba(255,100,0,0.05) 100%);
    border-bottom: 2px solid rgba(0,200,100,0.4);
    box-shadow: 0 0 30px rgba(0,200,100,0.2);
}

.header h1 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #FFD700, #FFA500, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255,215,0,0.5);
    transition: all 0.5s ease;
}

body.winter-theme .header h1 {
    background: linear-gradient(135deg, #00FF88, #00FFCC, #FF6B9D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0,255,136,0.6);
}

.balance {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.3rem;
    background: rgba(0,0,0,0.5);
    padding: 12px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255,215,0,0.5);
    box-shadow: 0 0 20px rgba(255,215,0,0.2);
}

.currency-switcher {
    display: flex;
    gap: 5px;
    background: rgba(0,0,0,0.3);
    padding: 5px;
    border-radius: 20px;
}

.currency-btn {
    padding: 6px 12px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.6);
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: bold;
    transition: all 0.3s;
}

.currency-btn:hover {
    border-color: rgba(255,215,0,0.5);
    color: rgba(255,255,255,0.8);
}

.currency-btn.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    color: #000;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}

.balance span { color: #FFD700; font-weight: bold; }

.btn-add-money {
    padding: 10px 25px;
    background: linear-gradient(135deg, #00C853, #00E676);
    color: #000;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,200,83,0.4);
}

.btn-add-money:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(0,200,83,0.6); }

.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: rgba(0,0,0,0.3);
}

.tab {
    padding: 15px 35px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 30px;
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.tab:hover { border-color: rgba(255,215,0,0.5); color: white; }

.tab.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 25px rgba(255,215,0,0.5);
}

.tab-content { display: none; padding: 40px; animation: fadeIn 0.3s; flex: 1; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.case-card {
    background: linear-gradient(145deg, rgba(30,30,50,0.9), rgba(20,20,35,0.9));
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 25px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.case-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: 0.5s;
}

.case-card:hover::before { left: 100%; }
.case-card:hover { transform: translateY(-10px); border-color: rgba(255,215,0,0.5); box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(255,215,0,0.2); }

.case-card.legendary-glow { border-color: rgba(211,44,230,0.5); box-shadow: 0 0 30px rgba(211,44,230,0.3); }
.case-card.gold-glow { border-color: rgba(255,215,0,0.5); box-shadow: 0 0 30px rgba(255,215,0,0.3); }
.case-card.pink-glow { border-color: rgba(255,105,180,0.5); box-shadow: 0 0 30px rgba(255,105,180,0.3); }

.case-badge {
    position: absolute;
    top: 15px; right: 15px;
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 5;
}

.case-badge.new { background: linear-gradient(135deg, #11998e, #38ef7d); }
.case-badge.hot { background: linear-gradient(135deg, #f953c6, #b91d73); }

.case-card img { width: 100%; height: 200px; object-fit: contain; margin-bottom: 15px; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5)); transition: transform 0.3s; }
.case-card:hover img { transform: scale(1.1) rotate(2deg); }

.case-card h3 { font-size: 1.4rem; margin-bottom: 8px; color: white; }
.case-desc { color: rgba(255,255,255,0.6); font-size: 0.95rem; margin: 10px 0; }
.case-price { font-size: 2rem; color: #00E676; font-weight: bold; margin: 15px 0; text-shadow: 0 0 20px rgba(0,230,118,0.5); }

.btn-preview {
    padding: 14px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(102,126,234,0.4);
    position: relative;
    overflow: hidden;
}

.btn-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-preview:hover::before {
    left: 100%;
}

.btn-preview:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 30px rgba(102,126,234,0.6);
}

.inventory-header { text-align: center; margin-bottom: 30px; }
.inventory-header h2 { font-size: 2rem; margin-bottom: 10px; background: linear-gradient(135deg, #FFD700, #FFA500); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.inventory-header p { margin-bottom: 20px; }

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.inventory-wrapper {
    display: flex;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.auto-sell-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 180px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.auto-sell-sidebar .btn-auto-sell {
    padding: 12px 15px;
    font-size: 0.9rem;
    width: 100%;
}

.inventory-item {
    background: linear-gradient(145deg, rgba(30,30,50,0.9), rgba(20,20,35,0.9));
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.inventory-item:hover { transform: translateY(-5px); border-color: rgba(255,215,0,0.5); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.inventory-item img { width: 100%; height: 130px; object-fit: contain; margin-bottom: 10px; }
.inventory-item h4 { font-size: 1rem; margin-bottom: 5px; color: white; }
.inventory-item .rarity { font-size: 0.85rem; margin-bottom: 5px; }
.inventory-item .price { color: #00E676; font-weight: bold; font-size: 1.1rem; }

.rarity-common { color: #B0C3D9; }
.rarity-uncommon { color: #5E98D9; }
.rarity-rare { color: #4B69FF; }
.rarity-mythical { color: #8847FF; }
.rarity-legendary { color: #D32CE6; }
.rarity-ancient { color: #EB4B4B; }
.rarity-immortal { color: #FFD700; text-shadow: 0 0 10px rgba(255,215,0,0.5); }

.btn-sell-inv {
    padding: 8px 20px;
    background: linear-gradient(135deg, #00C853, #00E676);
    color: #000;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-sell-inv:hover { transform: scale(1.05); }

/* Кнопка продать всё */
.inventory-actions {
    margin-top: 15px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.sort-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.sort-btn {
    padding: 10px 20px;
    background: rgba(255,215,0,0.1);
    border: 2px solid rgba(255,215,0,0.3);
    color: rgba(255,255,255,0.7);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: bold;
    transition: all 0.3s;
}

.sort-btn:hover {
    border-color: rgba(255,215,0,0.6);
    color: #FFD700;
    background: rgba(255,215,0,0.15);
}

.sort-btn.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    color: #000;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}

.btn-sell-all {
    padding: 12px 30px;
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(255,65,108,0.4);
}

.btn-sell-all:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(255,65,108,0.6);
}

.auto-sell-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-auto-sell {
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-auto-sell:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.2);
}

.btn-auto-sell.uncommon {
    border-color: rgba(94, 152, 217, 0.6);
    color: #5E98D9;
}

.btn-auto-sell.uncommon:hover {
    background: rgba(94, 152, 217, 0.2);
    box-shadow: 0 5px 15px rgba(94, 152, 217, 0.4);
}

.btn-auto-sell.rare {
    border-color: rgba(75, 105, 255, 0.6);
    color: #4B69FF;
}

.btn-auto-sell.rare:hover {
    background: rgba(75, 105, 255, 0.2);
    box-shadow: 0 5px 15px rgba(75, 105, 255, 0.4);
}

.btn-auto-sell.mythical {
    border-color: rgba(136, 71, 255, 0.6);
    color: #8847FF;
}

.btn-auto-sell.mythical:hover {
    background: rgba(136, 71, 255, 0.2);
    box-shadow: 0 5px 15px rgba(136, 71, 255, 0.4);
}

.btn-sell-all:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(255,65,108,0.6);
}

/* Избранное */
.btn-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.5);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 5;
}

.btn-favorite:hover {
    border-color: #FFD700;
    color: #FFD700;
    transform: scale(1.1);
}

.btn-favorite.active {
    background: rgba(255,215,0,0.2);
    border-color: #FFD700;
    color: #FFD700;
}

.inventory-item {
    position: relative;
}

.inventory-item.favorite {
    border-color: rgba(255,215,0,0.5);
    box-shadow: 0 0 20px rgba(255,215,0,0.3);
}

.inventory-item.favorite::after {
    content: '⭐';
    position: absolute;
    top: -8px;
    left: -8px;
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px rgba(255,215,0,0.8));
}

.item-count-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: linear-gradient(135deg, #FF6B00, #FF9500);
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 0 10px rgba(255,107,0,0.6);
    border: 2px solid rgba(255,255,255,0.3);
}

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

.sell-quantity-selector {
    margin: 15px 0;
    padding: 15px;
    background: rgba(0,50,100,0.3);
    border: 1px solid rgba(102,200,255,0.4);
    border-radius: 8px;
}

.sell-quantity-selector label {
    display: block;
    color: white;
    margin-bottom: 8px;
    font-weight: bold;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.quantity-input {
    flex: 1;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: 2px solid rgba(102,200,255,0.4);
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
}

.quantity-input:focus {
    outline: none;
    border-color: rgba(102,200,255,0.8);
    box-shadow: 0 0 10px rgba(102,200,255,0.3);
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input[type=number] {
    -moz-appearance: textfield;
}

.quantity-max {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    min-width: 50px;
}

.total-sell-price {
    color: #00E676;
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.modal.active { display: flex; }

.modal-content {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 30px;
    padding: 40px;
    max-width: 900px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 60px rgba(255,215,0,0.3);
    animation: modalIn 0.3s;
}

@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-content.small { max-width: 500px; }
.modal-content h2 { text-align: center; font-size: 2rem; margin-bottom: 30px; background: linear-gradient(135deg, #FFD700, #FFA500); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.btn-close {
    position: absolute;
    top: 15px; right: 15px;
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
    color: white;
    border: none;
    width: 45px; height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-close:hover { transform: rotate(90deg) scale(1.1); }

.preview-modal { max-width: 1000px; }
.preview-case-image { text-align: center; margin-bottom: 20px; }
.preview-case-image img { width: 180px; height: 180px; object-fit: contain; filter: drop-shadow(0 0 30px rgba(255,215,0,0.5)); }

.preview-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin: 20px 0;
    max-height: 350px;
    overflow-y: auto;
    padding: 10px;
}

.preview-items::-webkit-scrollbar { width: 8px; }
.preview-items::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); border-radius: 10px; }
.preview-items::-webkit-scrollbar-thumb { background: #FFD700; border-radius: 10px; }

.preview-item {
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s;
}

.preview-item:hover { transform: scale(1.05); }
.preview-item img { width: 100px; height: 100px; object-fit: contain; margin-bottom: 8px; }
.preview-item h4 { font-size: 0.9rem; margin-bottom: 5px; color: white; }
.preview-item .price { color: #00E676; font-weight: bold; }
.preview-item .drop-chance { color: rgba(255,255,255,0.5); font-size: 0.75rem; margin-top: 5px; }

.preview-buttons { display: flex; gap: 20px; justify-content: center; margin-top: 25px; }

.btn-open-big {
    padding: 18px 50px;
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 25px rgba(255,65,108,0.5);
    position: relative;
    overflow: hidden;
}

.btn-open-big::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;
}

.btn-open-big:hover::before {
    left: 100%;
}

.btn-open-big:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 40px rgba(255,65,108,0.7);
}

.btn-back-preview {
    padding: 18px 40px;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back-preview:hover { background: rgba(255,255,255,0.2); }

.roulette-container {
    position: relative;
    overflow: hidden;
    height: 220px;
    margin: 30px 0;
    border: 3px solid rgba(255,215,0,0.5);
    border-radius: 15px;
    background: rgba(0,0,0,0.5);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

.roulette-arrow {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #FF0000;
    z-index: 100;
    filter: drop-shadow(0 0 15px #FF0000);
}

.roulette-line {
    position: absolute;
    top: 0; left: 50%;
    width: 3px; height: 100%;
    background: linear-gradient(180deg, #FF0000, transparent);
    transform: translateX(-50%);
    z-index: 99;
}

.roulette {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.roulette-item {
    min-width: 180px;
    width: 180px;
    height: 100%;
    margin: 0;
    background: linear-gradient(145deg, rgba(30,30,50,0.9), rgba(20,20,35,0.9));
    border: 3px solid rgba(255,255,255,0.2);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    flex-shrink: 0;
}

.roulette-item img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    margin-bottom: 8px;
    image-rendering: auto;
}

.roulette-item p {
    font-size: 0.85rem;
    text-align: center;
    color: white;
}

/* Новая рулетка с 3 рядами */
.roulette-view {
    margin: 20px 0;
}

.roulette-rows {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.roulette-row {
    position: relative;
}

.roulette-row .roulette-container {
    height: 140px;
    margin: 0;
    border: 2px solid rgba(102,200,255,0.4);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(0,50,100,0.3), rgba(0,30,60,0.3));
    overflow: hidden;
}

.roulette-row .roulette {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.roulette-row .roulette-arrow {
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #00D4FF;
    filter: drop-shadow(0 0 10px #00D4FF);
}

.roulette-row .roulette-item {
    min-width: 140px;
    width: 140px;
    height: 140px;
    border: 2px solid rgba(255,255,255,0.15);
}

.roulette-row .roulette-item img {
    width: 80px;
    height: 80px;
    margin-bottom: 5px;
    image-rendering: auto;
}

.roulette-row .roulette-item p {
    font-size: 0.7rem;
}

/* Контролы рулетки */
.roulette-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
}

.btn-fast-roulette {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
    color: white;
    border: 2px solid rgba(255,65,108,0.5);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-fast-roulette::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.btn-fast-roulette:hover {
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(255,65,108,0.8);
}

.btn-fast-roulette.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    box-shadow: 0 0 30px rgba(255,215,0,0.6);
}

.result { text-align: center; margin-top: 30px; animation: fadeIn 0.5s; }
.result.hidden { display: none; }
.result h3 { font-size: 1.6rem; margin-bottom: 20px; color: #FFD700; }

.result-item {
    background: linear-gradient(145deg, rgba(255,215,0,0.1), rgba(255,165,0,0.05));
    border: 3px solid rgba(255,215,0,0.5);
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 0 40px rgba(255,215,0,0.3);
}

.result-item img { width: 200px; height: 200px; object-fit: contain; margin-bottom: 15px; filter: drop-shadow(0 0 30px rgba(255,215,0,0.5)); animation: float 2s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.result-item h4 { font-size: 1.6rem; margin-bottom: 10px; color: white; }
.result-item p { font-size: 1.1rem; margin: 5px 0; }

.result-buttons { display: flex; gap: 20px; justify-content: center; }

.btn-sell, .btn-keep {
    padding: 15px 40px;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-sell { background: linear-gradient(135deg, #00C853, #00E676); color: #000; }
.btn-sell:hover { transform: scale(1.05); box-shadow: 0 0 25px rgba(0,200,83,0.5); }
.btn-keep { background: linear-gradient(135deg, #2196F3, #00BCD4); color: white; }
.btn-keep:hover { transform: scale(1.05); box-shadow: 0 0 25px rgba(33,150,243,0.5); }

.btn-again {
    padding: 15px 40px;
    background: linear-gradient(135deg, #FF9800, #FF6F00);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-again:hover { transform: scale(1.05); box-shadow: 0 0 25px rgba(255,152,0,0.5); }

.sell-info { text-align: center; margin: 20px 0; }
.sell-info img { width: 180px; height: 180px; object-fit: contain; margin-bottom: 15px; }
.sell-info h3 { font-size: 1.4rem; margin-bottom: 10px; }
.sell-info p { font-size: 1.2rem; color: #00E676; }

.sell-buttons { display: flex; gap: 20px; justify-content: center; }

.btn-confirm, .btn-cancel {
    padding: 12px 35px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-confirm { background: linear-gradient(135deg, #00C853, #00E676); color: #000; }
.btn-confirm:hover { transform: scale(1.05); }
.btn-cancel { background: rgba(255,255,255,0.1); color: white; border: 2px solid rgba(255,255,255,0.3); }
.btn-cancel:hover { background: rgba(255,255,255,0.2); }

/* МИНИ-ИГРА */
.minigame-container { max-width: 650px; margin: 0 auto; text-align: center; }
.minigame-container h2 { font-size: 2.5rem; margin-bottom: 10px; background: linear-gradient(135deg, #FFD700, #FFA500); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.minigame-desc { color: rgba(255,255,255,0.6); font-size: 1.2rem; margin-bottom: 30px; }

.minigame-balance {
    background: linear-gradient(145deg, rgba(255,215,0,0.1), rgba(255,165,0,0.05));
    border: 2px solid rgba(255,215,0,0.5);
    border-radius: 20px;
    padding: 15px 35px;
    margin-bottom: 30px;
    display: inline-block;
}

.minigame-balance p { font-size: 1.4rem; color: #FFD700; }

.minigame-bet { margin-bottom: 30px; display: flex; justify-content: center; align-items: center; gap: 15px; }
.minigame-bet label { font-size: 1.2rem; color: rgba(255,255,255,0.8); }
.minigame-bet input {
    width: 130px; padding: 12px;
    font-size: 1.3rem;
    border: 2px solid rgba(255,215,0,0.5);
    border-radius: 15px;
    background: rgba(0,0,0,0.5);
    color: #FFD700;
    text-align: center;
}

.minigame-bet span { font-size: 1.2rem; color: #00E676; }

.minigame-numbers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 30px; }

.num-btn {
    padding: 20px;
    font-size: 1.6rem;
    font-weight: bold;
    background: linear-gradient(145deg, rgba(30,30,50,0.9), rgba(20,20,35,0.9));
    color: white;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.num-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(102,126,234,0.5);
}

.minigame-result { min-height: 80px; margin-bottom: 30px; }
.minigame-result .win { color: #00E676; font-size: 1.4rem; font-weight: bold; margin: 5px 0; text-shadow: 0 0 20px rgba(0,230,118,0.5); }
.minigame-result .lose { color: #FF4444; font-size: 1.4rem; font-weight: bold; margin: 5px 0; }

.minigame-free {
    background: linear-gradient(145deg, rgba(0,200,83,0.1), rgba(0,230,118,0.05));
    border: 2px solid rgba(0,200,83,0.5);
    border-radius: 25px;
    padding: 25px;
    margin-top: 30px;
}

.minigame-free h3 { color: #00E676; font-size: 1.4rem; margin-bottom: 10px; }
.minigame-free p { color: rgba(255,255,255,0.6); margin-bottom: 15px; }

.btn-free {
    padding: 15px 40px;
    background: linear-gradient(135deg, #00C853, #00E676);
    color: #000;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0,200,83,0.4);
}

.btn-free:hover:not(:disabled) { transform: scale(1.05); box-shadow: 0 8px 30px rgba(0,200,83,0.6); }
.btn-free:disabled { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); cursor: not-allowed; box-shadow: none; }

#freeTimer { color: #FFD700; font-size: 1rem; margin-top: 10px; }


/* Настройки */
.settings-container { max-width: 600px; margin: 0 auto; padding: 20px; }
.settings-container h2 { font-size: 2.5rem; margin-bottom: 30px; text-align: center; background: linear-gradient(135deg, #FFD700, #FFA500); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.settings-group {
    background: linear-gradient(145deg, rgba(30,30,50,0.9), rgba(20,20,35,0.9));
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(255,215,0,0.1);
}

.settings-group h3 { 
    color: #FFD700; 
    font-size: 1.3rem; 
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    cursor: pointer;
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    transition: all 0.3s;
    border-radius: 10px;
    margin-bottom: 8px;
}

.setting-item:hover { 
    color: white;
    background: rgba(255,215,0,0.1);
}

.setting-item input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #FFD700;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,215,0,0.1);
    transition: all 0.3s;
    flex-shrink: 0;
}

.setting-item input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFA500;
    box-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.setting-item input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: #000;
    font-weight: bold;
    font-size: 1.2rem;
}

.btn-reset-progress {
    padding: 12px 30px;
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-reset-progress:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(255,65,108,0.5); }

.settings-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-save-settings {
    flex: 1;
    padding: 15px 30px;
    background: linear-gradient(135deg, #00C853, #00E676);
    color: #000;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,200,83,0.3);
}

.btn-save-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,200,83,0.5);
}

/* Подтверждение */
#confirmModal {
    z-index: 2000;
}

.confirm-message { text-align: center; font-size: 1.2rem; color: rgba(255,255,255,0.8); margin: 20px 0 30px 0; }
.confirm-buttons { display: flex; gap: 20px; justify-content: center; }

/* Уведомления */
.notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #00C853, #00E676);
    color: #000;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 5px 25px rgba(0,200,83,0.5);
}

.notification.show { transform: translateX(-50%) translateY(0); opacity: 1; }


/* Донат */
.btn-donate {
    padding: 10px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

.btn-donate:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(102,126,234,0.6); }

.btn-chat {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #00C853, #00E676);
    color: #000;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,200,83,0.4);
    z-index: 1400;
}

.btn-chat:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 25px rgba(0,200,83,0.6); 
}

.donate-modal { max-width: 600px; }

.donate-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.donate-option {
    background: linear-gradient(145deg, rgba(30,30,50,0.9), rgba(20,20,35,0.9));
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.donate-option:hover {
    border-color: rgba(255,215,0,0.5);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.donate-option.popular {
    border-color: rgba(102,126,234,0.5);
    box-shadow: 0 0 20px rgba(102,126,234,0.3);
}

.donate-option.best {
    border-color: rgba(255,215,0,0.5);
    box-shadow: 0 0 20px rgba(255,215,0,0.3);
}

.popular-badge, .best-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
}

.popular-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.best-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.donate-amount {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 5px;
}

.donate-price {
    display: block;
    font-size: 1.2rem;
    color: rgba(255,255,255,0.7);
}

.donate-promo {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 25px;
}

.donate-promo h3 {
    color: #FFD700;
    margin-bottom: 15px;
    text-align: center;
}

.promo-input {
    display: flex;
    gap: 10px;
}

.promo-input input {
    flex: 1;
    padding: 12px 20px;
    font-size: 1.1rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    background: rgba(0,0,0,0.5);
    color: white;
    text-transform: uppercase;
}

.promo-input input::placeholder {
    color: rgba(255,255,255,0.4);
    text-transform: none;
}

.btn-promo {
    padding: 12px 25px;
    background: linear-gradient(135deg, #00C853, #00E676);
    color: #000;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-promo:hover { transform: scale(1.05); }

#promoResult {
    text-align: center;
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: bold;
}

#donateModal { z-index: 2000; }

.chat-modal {
    max-width: 500px;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 10px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
    animation: slideIn 0.3s ease;
}

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

.chat-message.own {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}

.chat-message.other {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    align-self: flex-start;
    border-bottom-left-radius: 3px;
    border: 1px solid rgba(255,255,255,0.2);
}

.chat-message .sender {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-bottom: 3px;
}

.chat-message .time {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 3px;
}

.chat-input-group {
    display: flex;
    gap: 10px;
}

.chat-input-group input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 15px;
    color: white;
    font-size: 0.95rem;
}

.chat-input-group input::placeholder {
    color: rgba(255,255,255,0.4);
}

.chat-input-group input:focus {
    outline: none;
    border-color: rgba(255,215,0,0.6);
    box-shadow: 0 0 10px rgba(255,215,0,0.2);
}

.btn-send-chat {
    padding: 12px 25px;
    background: linear-gradient(135deg, #00C853, #00E676);
    color: #000;
    border: none;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-send-chat:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0,200,83,0.5);
}

#chatModal { z-index: 2000; }

.chat-modal {
    max-width: 500px;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 10px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
    animation: slideIn 0.3s ease;
}

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

.chat-message.own {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}

.chat-message.other {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    align-self: flex-start;
    border-bottom-left-radius: 3px;
    border: 1px solid rgba(255,255,255,0.2);
}

.chat-message .sender {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-bottom: 3px;
}

.chat-message .time {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 3px;
}

.chat-input-group {
    display: flex;
    gap: 10px;
}

.chat-input-group input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 15px;
    color: white;
    font-size: 0.95rem;
}

.chat-input-group input::placeholder {
    color: rgba(255,255,255,0.4);
}

.chat-input-group input:focus {
    outline: none;
    border-color: rgba(255,215,0,0.6);
    box-shadow: 0 0 10px rgba(255,215,0,0.2);
}

.btn-send-chat {
    padding: 12px 25px;
    background: linear-gradient(135deg, #00C853, #00E676);
    color: #000;
    border: none;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-send-chat:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0,200,83,0.5);
}
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #FFD700;
    font-weight: bold;
    font-size: 0.95rem;
}

.form-group input {
    padding: 12px 15px;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255,215,0,0.6);
    box-shadow: 0 0 10px rgba(255,215,0,0.2);
}

.form-group input::placeholder {
    color: rgba(255,255,255,0.4);
}

.avatar-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.avatar-btn {
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,215,0,0.2);
    border-radius: 10px;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.avatar-btn:hover {
    border-color: rgba(255,215,0,0.5);
    background: rgba(255,215,0,0.1);
    transform: scale(1.1);
}

.avatar-btn.selected {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255,215,0,0.5);
}

.btn-register {
    padding: 12px 30px;
    background: linear-gradient(135deg, #00C853, #00E676);
    color: #000;
    border: none;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-register:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0,200,83,0.5);
}

/* Профиль игрока */
.player-profile-info {
    text-align: center;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    margin-bottom: 20px;
}

.player-profile-info .profile-avatar-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    font-size: 2.5rem;
}

.player-profile-info h3 {
    font-size: 1.5rem;
    color: #FFD700;
    margin-bottom: 5px;
}

.profile-id {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.player-profile-info hr {
    border: none;
    border-top: 1px solid rgba(255,215,0,0.2);
    margin: 15px 0;
}

.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255,215,0,0.05);
    border-radius: 8px;
}

.stat-label {
    color: rgba(255,255,255,0.7);
}

.stat-value {
    color: #FFD700;
    font-weight: bold;
}

/* Чат справа снизу */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 420px;
    height: 600px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    z-index: 1500;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    animation: slideUp 0.3s ease;
}

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

.chat-widget.hidden {
    display: none;
}

.chat-widget-header {
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: bold;
}

.chat-widget-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.chat-widget-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
}

.chat-widget-close:hover {
    transform: rotate(90deg);
}

.chat-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-widget-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-widget-messages::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

.chat-widget-messages::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 5px;
}

.chat-widget-message {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    cursor: pointer;
    transition: all 0.3s;
    max-width: 90%;
}

.chat-widget-message:hover {
    background: rgba(255,215,0,0.1);
}

.chat-widget-message.own {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    align-self: flex-end;
    max-width: 85%;
    word-break: break-word;
    overflow-wrap: break-word;
}

.chat-widget-message.other {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    align-self: flex-start;
    max-width: 85%;
    border: 1px solid rgba(255,255,255,0.2);
    word-break: break-word;
    overflow-wrap: break-word;
}

.chat-widget-message .sender {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-bottom: 2px;
    cursor: pointer;
    text-decoration: underline;
    display: flex;
    justify-content: space-between;
    align-items: center;
    word-break: break-word;
}

.chat-widget-message .time {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-left: 8px;
    white-space: nowrap;
}

.chat-widget-message .message-text {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.chat-widget-input-group {
    padding: 12px;
    border-top: 1px solid rgba(255,215,0,0.2);
    display: flex;
    gap: 8px;
}

.chat-widget-input-group input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
}

.chat-widget-input-group input::placeholder {
    color: rgba(255,255,255,0.3);
}

.chat-widget-input-group input:focus {
    outline: none;
    border-color: rgba(255,215,0,0.6);
}

.btn-send-widget {
    padding: 8px 15px;
    background: linear-gradient(135deg, #00C853, #00E676);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-send-widget:hover {
    transform: scale(1.05);
}

/* Профиль меню */
.profile-menu {
    position: relative;
}

.profile-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s;
}

.profile-btn:hover {
    transform: scale(1.1);
}

.profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 2px solid rgba(255,215,0,0.5);
    box-shadow: 0 0 15px rgba(102,126,234,0.3);
}

.profile-dropdown {
    display: none;
    position: fixed;
    top: 70px;
    right: 40px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 20px;
    padding: 15px;
    min-width: 220px;
    z-index: 3000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    animation: slideDown 0.3s;
}

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

.profile-dropdown.active {
    display: block;
}

.profile-info {
    text-align: center;
    margin-bottom: 15px;
}

.profile-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 10px;
    border: 2px solid rgba(255,215,0,0.5);
}

.profile-name {
    color: #FFD700;
    font-weight: bold;
    margin: 0;
}

.profile-id-small {
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    margin: 3px 0 0 0;
}

.profile-dropdown hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 10px 0;
}

.profile-dropdown button {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.profile-dropdown button:hover {
    background: rgba(255,215,0,0.1);
    color: #FFD700;
}

.profile-dropdown .close-btn {
    background: rgba(255,65,108,0.1);
    color: #FF416C;
}

.profile-dropdown .close-btn:hover {
    background: rgba(255,65,108,0.2);
}

.profile-dropdown .logout-btn {
    background: rgba(255,65,108,0.1);
    color: #FF416C;
}

.profile-dropdown .logout-btn:hover {
    background: rgba(255,65,108,0.2);
}

/* Выбор количества открытий */
.speed-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

.speed-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
}

.speed-selector input[type="radio"] {
    cursor: pointer;
    accent-color: #FFD700;
}

.quantity-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

/* Новый селектор количества */
.quantity-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.qty-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255,215,0,0.3);
    background: linear-gradient(145deg, rgba(30,30,50,0.9), rgba(20,20,35,0.9));
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.qty-option:hover {
    border-color: rgba(255,215,0,0.6);
    transform: scale(1.1);
}

.qty-option.selected {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    color: #000;
    box-shadow: 0 0 25px rgba(255,215,0,0.5);
}

.qty-number {
    display: block;
}

/* Контролы открытия */
.open-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.price-display {
    flex: 1;
    background: rgba(255,215,0,0.1);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 15px;
    padding: 12px 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFD700;
}

.btn-open-normal {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2196F3, #00BCD4);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-open-normal::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-open-normal:hover::before {
    left: 100%;
}

.btn-open-normal:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(33,150,243,0.6);
}

.btn-open-fast {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(255,65,108,0.4);
}

.btn-open-fast::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: pulse 2s infinite;
}

.btn-open-fast:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 30px rgba(255,65,108,0.7);
}

.qty-btn {
    padding: 15px 10px;
    background: linear-gradient(145deg, rgba(30,30,50,0.9), rgba(20,20,35,0.9));
    border: 2px solid rgba(255,215,0,0.3);
    color: white;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.qty-btn:hover {
    border-color: rgba(255,215,0,0.6);
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(102,126,234,0.4);
}

.qty-btn span {
    display: block;
    font-size: 0.8rem;
    color: #FFD700;
    margin-top: 3px;
}

/* Множественные результаты */
.multiple-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.result-item-small {
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 8px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.result-item-small:hover {
    border-color: rgba(255,215,0,0.5);
    transform: scale(1.05);
    background: rgba(255,215,0,0.05);
}

.result-item-small.selected {
    border-color: #FFD700;
    background: rgba(255,215,0,0.15);
    box-shadow: 0 0 15px rgba(255,215,0,0.3);
}

.result-item-small .item-checkbox {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #FFD700;
}

.result-item-small img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 3px;
}

.result-item-small .name {
    font-size: 0.7rem;
    color: white;
    margin: 2px 0;
    line-height: 1.2;
}

.result-item-small .price {
    font-size: 0.75rem;
    color: #FFD700;
    font-weight: bold;
}

.total-price {
    text-align: center;
    font-size: 1.3rem;
    color: #FFD700;
    font-weight: bold;
    margin: 15px 0;
}

/* Футер */
.footer {
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
    border-top: 1px solid rgba(255,215,0,0.2);
    padding: 40px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-main {
    margin-bottom: 25px;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.footer-brand span {
    font-size: 1rem;
    background: none;
    -webkit-text-fill-color: rgba(255,255,255,0.5);
}

.footer-disclaimer {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #FFD700;
}

.footer-copy {
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

.footer-copy p {
    margin: 5px 0;
}

.footer-age {
    display: inline-block;
    background: rgba(255,65,108,0.2);
    border: 1px solid rgba(255,65,108,0.5);
    padding: 5px 15px;
    border-radius: 20px;
    color: #FF416C;
    margin-top: 10px;
}

/* Текст соглашения */
.agreement-text {
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    margin-bottom: 20px;
}

.agreement-text p {
    margin: 10px 0;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}

.agreement-text strong {
    color: #FFD700;
}

/* Статистика */
.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.stats-header {
    text-align: center;
    margin-bottom: 40px;
}

.stats-header h2 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(145deg, rgba(30,30,50,0.9), rgba(20,20,35,0.9));
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: rgba(255,215,0,0.6);
    box-shadow: 0 0 30px rgba(255,215,0,0.2);
    transform: translateY(-5px);
}

.stat-card h3 {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Достижения */
.achievements-section {
    margin-bottom: 40px;
}

.achievements-section h3 {
    font-size: 1.8rem;
    color: #FFD700;
    margin-bottom: 20px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.achievement {
    background: linear-gradient(145deg, rgba(30,30,50,0.9), rgba(20,20,35,0.9));
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.achievement:hover {
    transform: scale(1.05);
}

.achievement.unlocked {
    border-color: rgba(255,215,0,0.5);
    box-shadow: 0 0 20px rgba(255,215,0,0.3);
}

.achievement.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.achievement-name {
    font-size: 0.9rem;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

.achievement-progress {
    font-size: 0.8rem;
    color: #FFD700;
    margin-top: 5px;
}

.achievement.unlocked .achievement-progress {
    color: #00E676;
}

/* История */
.history-section {
    margin-top: 40px;
}

.history-section h3 {
    font-size: 1.8rem;
    color: #FFD700;
    margin-bottom: 20px;
}

.history-controls {
    margin-bottom: 15px;
}

.btn-clear-history {
    padding: 10px 25px;
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-clear-history:hover {
    transform: scale(1.05);
}

.history-list {
    background: linear-gradient(145deg, rgba(30,30,50,0.9), rgba(20,20,35,0.9));
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.history-item {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.history-item:hover {
    background: rgba(255,215,0,0.05);
}

.history-item:last-child {
    border-bottom: none;
}

.history-item-info {
    flex: 1;
}

.history-item-name {
    font-weight: bold;
    color: white;
    margin-bottom: 3px;
}

.history-item-case {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.history-item-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #FFD700;
    margin-right: 15px;
}

.history-item-time {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}


/* Preview footer с выбором количества */
.preview-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,215,0,0.2);
}

.qty-selector-preview {
    display: flex;
    gap: 8px;
}

.qty-btn-preview {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(255,215,0,0.3);
    background: transparent;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.qty-btn-preview:hover {
    border-color: rgba(255,215,0,0.6);
    color: #FFD700;
}

.qty-btn-preview.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    color: #000;
    box-shadow: 0 0 20px rgba(255,215,0,0.5);
}

.preview-footer .btn-open-big {
    flex: 1;
}

.preview-footer .btn-back-preview {
    padding: 12px 25px;
}


.btn-fast-preview {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
    color: white;
    border: 2px solid rgba(255,65,108,0.5);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-fast-preview::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: pulse 2s infinite;
}

.btn-fast-preview:hover {
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(255,65,108,0.8);
}

.btn-fast-preview.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    box-shadow: 0 0 30px rgba(255,215,0,0.6);
}


/* Видео скины */
.roulette-video-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    pointer-events: none;
}

.preview-video {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.result-video {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 30px rgba(255,215,0,0.5));
    animation: float 2s ease-in-out infinite;
}

.result-video-small {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 3px;
}

#resultMediaContainer {
    display: flex;
    justify-content: center;
    align-items: center;
}

#resultMediaContainer img,
#resultMediaContainer video {
    max-width: 200px;
    max-height: 200px;
}

.roulette-row .roulette-video-preview {
    width: 80px;
    height: 80px;
}


.inventory-video {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}


.sell-video {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
}

#sellMediaContainer {
    display: flex;
    justify-content: center;
}


/* ============ НОВЫЙ МИНИМАЛИСТИЧНЫЙ ДИЗАЙН ============ */

/* Шестиугольные кнопки количества */
.qty-hexagon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(30,144,255,0.2), rgba(0,191,255,0.2));
    border: 2px solid rgba(30,144,255,0.5);
    border-radius: 8px;
    color: #1E90FF;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.qty-hexagon:hover {
    background: linear-gradient(135deg, rgba(30,144,255,0.4), rgba(0,191,255,0.4));
    border-color: rgba(30,144,255,0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(30,144,255,0.3);
}

.qty-hexagon.active {
    background: linear-gradient(135deg, #1E90FF, #00BFFF);
    border-color: #1E90FF;
    color: white;
    box-shadow: 0 0 20px rgba(30,144,255,0.6);
}

/* Синяя кнопка "Открыть" */
.btn-open-main {
    padding: 12px 40px;
    background: linear-gradient(135deg, #1E90FF, #00BFFF);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(30,144,255,0.4);
    position: relative;
    overflow: hidden;
}

.btn-open-main::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;
}

.btn-open-main:hover::before {
    left: 100%;
}

.btn-open-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(30,144,255,0.6);
}

.btn-open-main:active {
    transform: translateY(0);
}

/* Иконки справа в кружках */
.icon-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(30,144,255,0.2), rgba(0,191,255,0.2));
    border: 2px solid rgba(30,144,255,0.5);
    color: #1E90FF;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background: linear-gradient(135deg, rgba(30,144,255,0.4), rgba(0,191,255,0.4));
    border-color: rgba(30,144,255,0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30,144,255,0.3);
}

.icon-button.active {
    background: linear-gradient(135deg, #1E90FF, #00BFFF);
    border-color: #1E90FF;
    color: white;
    box-shadow: 0 0 15px rgba(30,144,255,0.6);
}

/* Контейнер управления */
.control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(10,10,15,0.8), rgba(10,10,15,0.6));
    border-radius: 15px;
    border: 1px solid rgba(30,144,255,0.2);
    margin: 20px 0;
}

.control-left, .control-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.control-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.price-badge {
    background: linear-gradient(135deg, #1E90FF, #00BFFF);
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(30,144,255,0.4);
}


/* Лента дропов */
.drops-ticker {
    background: linear-gradient(90deg, rgba(0,0,0,0.9), rgba(0,0,0,0.7), rgba(0,0,0,0.9));
    border-bottom: 2px solid rgba(255,215,0,0.3);
    padding: 12px 0;
    overflow: hidden;
    position: relative;
    z-index: 100;
}

.drops-ticker-content {
    display: flex;
    gap: 20px;
    animation: scrollTicker 30s linear infinite;
    padding: 0 20px;
}

@keyframes scrollTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.drops-ticker-content:hover {
    animation-play-state: paused;
}

.drop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,215,0,0.05);
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: 12px;
    padding: 8px 15px;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.drop-item:hover {
    background: rgba(255,215,0,0.15);
    border-color: rgba(255,215,0,0.5);
    box-shadow: 0 0 15px rgba(255,215,0,0.3);
}

.drop-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.drop-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.drop-item-player {
    font-size: 0.85rem;
    color: #FFD700;
    font-weight: bold;
}

.drop-item-skin {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
}

.drop-item-case {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
}

.drop-item-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.drop-item:hover .drop-item-image {
    transform: scale(1.1);
}

.drop-item-rarity {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.drop-item-rarity.uncommon { background: #5E98D9; }
.drop-item-rarity.rare { background: #4B69FF; }
.drop-item-rarity.mythical { background: #8847FF; }
.drop-item-rarity.legendary { background: #D32CE6; }
.drop-item-rarity.ancient { background: #EB4B4B; }
.drop-item-rarity.immortal { background: #FFD700; box-shadow: 0 0 8px #FFD700; }


/* ============ ЛИДЕРБОРД ============ */

.leaderboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.leaderboard-container h2 {
    text-align: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
}

.leaderboard-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.lb-btn {
    padding: 12px 25px;
    background: rgba(255,215,0,0.1);
    border: 2px solid rgba(255,215,0,0.3);
    color: rgba(255,255,255,0.7);
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s;
}

.lb-btn:hover {
    border-color: rgba(255,215,0,0.6);
    color: #FFD700;
    background: rgba(255,215,0,0.15);
}

.lb-btn.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    color: #000;
    box-shadow: 0 0 20px rgba(255,215,0,0.5);
}

.leaderboard-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: linear-gradient(145deg, rgba(30,30,50,0.9), rgba(20,20,35,0.9));
    border: 2px solid rgba(255,215,0,0.2);
    border-radius: 15px;
    transition: all 0.3s;
}

.leaderboard-row:hover {
    border-color: rgba(255,215,0,0.5);
    box-shadow: 0 0 20px rgba(255,215,0,0.2);
    transform: translateX(5px);
}

.leaderboard-row.highlight {
    background: linear-gradient(145deg, rgba(255,215,0,0.1), rgba(255,165,0,0.05));
    border-color: rgba(255,215,0,0.5);
    box-shadow: 0 0 30px rgba(255,215,0,0.3);
}

.lb-rank {
    font-size: 1.5rem;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.lb-player {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.lb-avatar {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.lb-info {
    text-align: left;
}

.lb-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
}

.lb-level {
    font-size: 0.85rem;
    color: rgba(255,215,0,0.7);
    margin-top: 3px;
}

.lb-stat {
    font-size: 1.2rem;
    font-weight: bold;
    color: #00E676;
    min-width: 150px;
    text-align: right;
}

/* Уровень в профиле */
.player-level {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    border-radius: 20px;
    font-weight: bold;
    margin: 10px 0;
    font-size: 1.1rem;
}

.level-progress {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
}

.level-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    transition: width 0.3s;
}


/* ============================= */
/*   VISUAL OVERHAUL v2.0        */
/*   Premium Glass / Neon UI     */
/* ============================= */

/* 🌌 1. ГЛОБАЛЬНЫЙ ФОН + ШРИФТ */
body {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(100,150,255,0.15), transparent),
        radial-gradient(800px 500px at 90% 10%, rgba(255,100,200,0.12), transparent),
        #08090f;
    color: #e9ecf1;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    letter-spacing: 0.2px;
}

/* 🧊 2. GLASS-КАРТОЧКИ (ВСЕ КАРТОЧКИ) */
.case-card, .inventory-item, .settings-group, .modal-content, .donate-option {
    background: rgba(20,22,35,0.65);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 15px 40px rgba(0,0,0,0.6),
        inset 0 0 0 1px rgba(255,255,255,0.03);
}

/* 💎 3. КЕЙСЫ — ДОРОГОЙ ВИД */
.case-card {
    border-radius: 26px;
    transition: transform .35s ease, box-shadow .35s ease;
}

.case-card:hover {
    transform: translateY(-12px) scale(1.015);
    box-shadow:
        0 30px 80px rgba(0,0,0,0.8),
        0 0 40px rgba(120,160,255,0.25);
}

.case-card img {
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.9));
}

/* 🌈 4. РЕДКОСТИ (АККУРАТНО, НЕ КИСЛО) */
.rarity-common     { color: #b6c0d1; }
.rarity-uncommon   { color: #6fa8ff; }
.rarity-rare       { color: #4c7dff; }
.rarity-mythical   { color: #9b6bff; }
.rarity-legendary  { color: #e2b84d; }
.rarity-ancient    { color: #ff6a6a; }
.rarity-immortal   {
    color: #ffd86b;
    text-shadow: 0 0 15px rgba(255,215,120,0.6);
}

/* 🔘 5. КНОПКИ — GAME FEEL */
button {
    border-radius: 18px;
    font-weight: 700;
}

button:hover {
    transform: translateY(-2px);
}

.btn-preview, .btn-open-big, .btn-sell, .btn-keep {
    background: linear-gradient(135deg, #5f7cff, #7f5bff);
    box-shadow: 0 10px 30px rgba(120,120,255,0.45);
}

.btn-preview:hover, .btn-open-big:hover {
    box-shadow: 0 15px 45px rgba(120,120,255,0.7);
}

/* 🎰 6. РУЛЕТКА — ЧИСТО И ДОРОГО */
.roulette-container {
    background: rgba(10,12,20,0.8);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 0 80px rgba(0,0,0,0.8);
}

.roulette-item {
    background: rgba(25,28,45,0.7);
    border: 1px solid rgba(255,255,255,0.1);
}

.roulette-arrow {
    border-top-color: #7fa2ff;
    filter: drop-shadow(0 0 20px #7fa2ff);
}

/* 🧾 7. МОДАЛКИ (БЕЗ КОЛХОЗА) */
.modal {
    background: rgba(5,7,12,0.85);
}

.modal-content {
    border-radius: 30px;
    animation: modalFade .35s ease;
}

@keyframes modalFade {
    from { opacity: 0; transform: scale(.94); }
    to   { opacity: 1; transform: scale(1); }
}

/* 💬 8. ЧАТ — КАК В СОВРЕМЕННЫХ ИГРАХ */
.chat-widget {
    background: rgba(15,18,30,0.75);
    backdrop-filter: blur(18px);
}

.chat-widget-message.own {
    background: linear-gradient(135deg, #5f7cff, #7f5bff);
}

.chat-widget-message.other {
    background: rgba(255,255,255,0.08);
}


/* ============================= */
/*   БАТЛЫ И МОБИЛЬНАЯ ВЕРСИЯ   */
/* ============================= */

/* ⚔️ БАТЛЫ */
.battles-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.battles-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
    min-height: 600px;
}

.battles-list-section {
    background: rgba(20,22,35,0.65);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 26px;
    padding: 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
}

.battles-list-header {
    margin-bottom: 20px;
}

.battles-list-header h2 {
    color: #e9ecf1;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.battles-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, #5f7cff, #7f5bff);
    border-color: #7f5bff;
    color: white;
    box-shadow: 0 0 20px rgba(127,91,255,0.4);
}

.battles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.battles-list::-webkit-scrollbar {
    width: 6px;
}

.battles-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.battles-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

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

.battle-card {
    background: rgba(30,35,50,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.battle-card:hover {
    background: rgba(40,45,65,0.9);
    border-color: rgba(255,255,255,0.2);
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.battle-card-avatars {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 80px;
}

.battle-card-avatar {
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.battle-card-vs {
    color: #FF6B6B;
    font-weight: bold;
    font-size: 0.9rem;
}

.battle-card-info {
    flex: 1;
}

.battle-card-names {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.battle-card-nickname {
    color: #e9ecf1;
    font-weight: 600;
    font-size: 0.95rem;
}

.battle-card-case {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.battle-card-price {
    color: #FFD700;
    font-weight: 700;
    font-size: 1rem;
}

.create-battle-card {
    background: rgba(20,22,35,0.65);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 26px;
    padding: 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    position: sticky;
    top: 20px;
    height: fit-content;
}

.battles-create-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.create-battle-card h3 {
    color: #e9ecf1;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.create-desc {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.battle-setup-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group-battle {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-battle label {
    color: rgba(255,255,255,0.8);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group-battle select {
    padding: 10px;
    background: rgba(30,35,50,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #e9ecf1;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group-battle select:hover {
    border-color: rgba(255,255,255,0.2);
}

.form-group-battle select:focus {
    outline: none;
    border-color: #5f7cff;
    box-shadow: 0 0 10px rgba(95,124,255,0.3);
}

.quantity-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.qty-btn {
    padding: 8px;
    background: rgba(30,35,50,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
}

.qty-btn:hover {
    background: rgba(40,45,65,0.9);
    border-color: rgba(255,255,255,0.2);
}

.qty-btn.active {
    background: linear-gradient(135deg, #5f7cff, #7f5bff);
    border-color: #7f5bff;
    color: white;
    box-shadow: 0 0 15px rgba(127,91,255,0.4);
}

.qty-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 8px;
}

.qty-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5f7cff, #7f5bff);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(127,91,255,0.5);
}

.qty-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5f7cff, #7f5bff);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(127,91,255,0.5);
}

.qty-display {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    text-align: center;
    margin: 0;
}

.battle-info-display {
    background: rgba(30,35,50,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.info-label {
    color: rgba(255,255,255,0.6);
}

.info-value {
    color: #FFD700;
    font-weight: 700;
}

.btn-create-battle {
    padding: 12px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E72);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255,107,107,0.4);
    font-size: 1rem;
}

.btn-create-battle:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 45px rgba(255,107,107,0.6);
}

.btn-create-battle:active {
    transform: translateY(0);
}

.btn-play-bot {
    padding: 12px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(76,175,80,0.4);
    font-size: 1rem;
}

.btn-play-bot:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 45px rgba(76,175,80,0.6);
}

.btn-play-bot:active {
    transform: translateY(0);
}

.battle-stats {
    background: rgba(30,35,50,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.battle-stats h4 {
    color: #e9ecf1;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row strong {
    color: #e9ecf1;
    font-weight: 700;
}

/* ⚔️ БАТЛЫ - МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 1024px) {
    .battles-layout {
        grid-template-columns: 1fr;
    }

    .create-battle-card {
        position: static;
    }

    .battles-list {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .battles-container {
        padding: 15px;
    }

    .battles-layout {
        gap: 15px;
    }

    .battles-list-section {
        padding: 15px;
        border-radius: 16px;
    }

    .battles-list-header h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .battles-filter {
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .battle-card {
        padding: 12px;
        gap: 10px;
    }

    .battle-card-avatars {
        min-width: 70px;
    }

    .battle-card-avatar {
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }

    .battle-card-nickname {
        font-size: 0.85rem;
    }

    .battle-card-case {
        font-size: 0.75rem;
    }

    .create-battle-card {
        padding: 15px;
        border-radius: 16px;
    }

    .create-battle-card h3 {
        font-size: 1rem;
    }

    .create-desc {
        font-size: 0.8rem;
    }

    .battle-setup-form {
        gap: 12px;
        margin-bottom: 15px;
    }

    .form-group-battle label {
        font-size: 0.85rem;
    }

    .form-group-battle select {
        padding: 8px;
        font-size: 0.85rem;
    }

    .battle-info-display {
        padding: 10px;
        gap: 6px;
    }

    .info-item {
        font-size: 0.8rem;
    }

    .btn-create-battle {
        padding: 10px;
        font-size: 0.9rem;
    }

    .battle-stats {
        padding: 12px;
        margin-top: 12px;
    }

    .battle-stats h4 {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .stat-row {
        padding: 4px 0;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .battles-container {
        padding: 10px;
    }

    .battles-layout {
        gap: 10px;
    }

    .battles-list-section {
        padding: 12px;
        border-radius: 12px;
    }

    .battles-list-header h2 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .battles-filter {
        gap: 6px;
    }

    .filter-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .battle-card {
        padding: 10px;
        gap: 8px;
    }

    .battle-card-avatars {
        min-width: 60px;
    }

    .battle-card-avatar {
        font-size: 1.2rem;
        width: 30px;
        height: 30px;
    }

    .battle-card-nickname {
        font-size: 0.75rem;
    }

    .battle-card-case {
        font-size: 0.7rem;
    }

    .create-battle-card {
        padding: 12px;
        border-radius: 12px;
    }

    .create-battle-card h3 {
        font-size: 0.9rem;
    }

    .create-desc {
        font-size: 0.75rem;
    }

    .battle-setup-form {
        gap: 10px;
        margin-bottom: 12px;
    }

    .form-group-battle label {
        font-size: 0.8rem;
    }

    .form-group-battle select {
        padding: 6px;
        font-size: 0.8rem;
    }

    .battle-info-display {
        padding: 8px;
        gap: 5px;
    }

    .info-item {
        font-size: 0.75rem;
    }

    .btn-create-battle {
        padding: 8px;
        font-size: 0.85rem;
    }

    .battle-stats {
        padding: 10px;
        margin-top: 10px;
    }

    .battle-stats h4 {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .stat-row {
        padding: 3px 0;
        font-size: 0.7rem;
    }
}

/* ⚔️ БАТЛ МОДАЛКА */
.battle-modal {
    max-width: 900px;
}

.battle-arena {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.battle-player {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.battle-player-info {
    margin-bottom: 20px;
}

.battle-avatar {
    font-size: 3rem;
    margin-bottom: 10px;
}

.battle-nickname {
    color: #e9ecf1;
    font-size: 1.2rem;
    font-weight: 600;
}

.battle-roulette {
    background: rgba(30,35,50,0.8);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 20px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.battle-item {
    font-size: 2rem;
    color: #e9ecf1;
    font-weight: bold;
    animation: battleSpin 0.5s ease-in-out;
}

@keyframes battleSpin {
    0% { transform: scale(0.5) rotateZ(0deg); opacity: 0; }
    50% { transform: scale(1.2) rotateZ(180deg); }
    100% { transform: scale(1) rotateZ(360deg); opacity: 1; }
}

.battle-vs {
    font-size: 2rem;
    font-weight: bold;
    color: #FF6B6B;
    text-shadow: 0 0 20px rgba(255,107,107,0.5);
}

.battle-result {
    background: rgba(30,35,50,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.battle-result.hidden {
    display: none;
}

.battle-result-title {
    color: #e9ecf1;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.battle-result-details {
    margin: 15px 0;
}

.battle-result-text {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
}

.battle-result-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.btn-close-battle {
    padding: 10px 25px;
    background: linear-gradient(135deg, #5f7cff, #7f5bff);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-battle:hover {
    transform: translateY(-2px);
}

/* 📱 МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 1024px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header-right {
        width: 100%;
        flex-direction: column;
    }

    .balance {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .tabs {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tab {
        flex: 1;
        min-width: 100px;
        font-size: 0.9rem;
        padding: 10px 8px;
    }

    .inventory-wrapper {
        flex-direction: column;
    }

    .auto-sell-sidebar {
        flex-direction: row;
        width: 100%;
        margin-top: 15px;
    }

    .btn-auto-sell {
        flex: 1;
    }

    .sort-controls {
        flex-direction: column;
        gap: 8px;
    }

    .sort-btn {
        width: 100%;
    }

    .battle-arena {
        gap: 15px;
    }

    .battle-vs {
        font-size: 1.5rem;
    }

    .minigame-numbers {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .num-btn {
        padding: 10px;
        font-size: 0.9rem;
    }

    .leaderboard-list {
        gap: 10px;
    }

    .leaderboard-item {
        padding: 12px;
    }

    .profile-dropdown {
        right: 10px;
        width: calc(100% - 20px);
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .header {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.2rem;
    }

    .header-right {
        gap: 10px;
    }

    .balance {
        font-size: 0.9rem;
        gap: 8px;
    }

    .btn-donate, .btn-add-money {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .profile-btn {
        width: 40px;
        height: 40px;
    }

    .cases-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .case-card {
        border-radius: 16px;
    }

    .case-card img {
        max-height: 200px;
    }

    .tabs {
        gap: 5px;
    }

    .tab {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    .tab-content {
        padding: 15px;
    }

    .inventory-header {
        flex-direction: column;
        gap: 12px;
    }

    .inventory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .inventory-item {
        border-radius: 12px;
    }

    .inventory-item-image {
        max-height: 120px;
    }

    .modal-content {
        border-radius: 20px;
        max-width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content.small {
        max-width: 90vw;
    }

    .modal-content.preview-modal {
        max-width: 95vw;
    }

    .preview-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .preview-item {
        padding: 10px;
        border-radius: 10px;
    }

    .preview-item-image {
        max-height: 100px;
    }

    .roulette-container {
        max-height: 300px;
    }

    .roulette-row {
        height: 80px;
    }

    .roulette-item {
        width: 80px;
        height: 80px;
        border-radius: 8px;
    }

    .roulette-item-image {
        max-height: 70px;
    }

    .result {
        padding: 15px;
    }

    .result-item {
        gap: 10px;
    }

    .result-item h4 {
        font-size: 1rem;
    }

    .result-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .result-buttons button {
        width: 100%;
        padding: 10px;
    }

    .minigame-container {
        padding: 15px;
    }

    .minigame-numbers {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .num-btn {
        padding: 8px;
        font-size: 0.85rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 15px;
        border-radius: 12px;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .achievement-item {
        padding: 12px;
        border-radius: 10px;
    }

    .achievement-icon {
        font-size: 2rem;
    }

    .leaderboard-item {
        padding: 10px;
        border-radius: 10px;
    }

    .leaderboard-medal {
        font-size: 1.2rem;
    }

    .leaderboard-avatar {
        font-size: 1.5rem;
    }

    .battle-arena {
        gap: 10px;
    }

    .battle-player {
        min-width: 150px;
    }

    .battle-avatar {
        font-size: 2rem;
    }

    .battle-nickname {
        font-size: 1rem;
    }

    .battle-roulette {
        min-height: 120px;
        padding: 15px;
    }

    .battle-item {
        font-size: 1.5rem;
    }

    .battle-vs {
        font-size: 1.2rem;
    }

    .battle-setup {
        flex-direction: column;
        gap: 12px;
    }

    .battle-case-select {
        min-width: auto;
        width: 100%;
    }

    .battle-info {
        min-width: auto;
        width: 100%;
    }

    .btn-start-battle {
        width: 100%;
    }

    .chat-widget {
        width: 90vw;
        max-width: 350px;
        bottom: 10px;
        right: 10px;
    }

    .chat-widget-messages {
        max-height: 250px;
    }

    .chat-widget-input {
        gap: 5px;
    }

    .chat-widget-input input {
        font-size: 0.9rem;
    }

    .chat-widget-input button {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .footer {
        padding: 15px;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
    }

    .footer-links {
        flex-direction: column;
        gap: 8px;
    }

    .footer-links a {
        font-size: 0.9rem;
    }

    .footer-copy p {
        font-size: 0.85rem;
    }

    .drops-ticker {
        font-size: 0.85rem;
    }

    .donate-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .donate-option {
        padding: 12px;
        border-radius: 10px;
    }

    .donate-amount {
        font-size: 1rem;
    }

    .donate-price {
        font-size: 0.85rem;
    }

    .settings-group {
        padding: 12px;
        border-radius: 10px;
    }

    .setting-item {
        padding: 8px 0;
    }

    .registration-form {
        gap: 12px;
    }

    .form-group {
        gap: 8px;
    }

    .form-group input {
        padding: 10px;
        font-size: 1rem;
    }

    .avatar-selector {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .avatar-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1rem;
    }

    .balance {
        font-size: 0.8rem;
    }

    .btn-donate, .btn-add-money {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .currency-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .cases-grid {
        grid-template-columns: 1fr;
    }

    .case-card {
        border-radius: 12px;
    }

    .case-card h3 {
        font-size: 1rem;
    }

    .case-card p {
        font-size: 0.85rem;
    }

    .case-price {
        font-size: 1rem;
    }

    .btn-preview {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .tabs {
        gap: 3px;
    }

    .tab {
        padding: 6px 4px;
        font-size: 0.7rem;
    }

    .tab-content {
        padding: 10px;
    }

    .inventory-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .inventory-item {
        border-radius: 10px;
    }

    .inventory-item-image {
        max-height: 100px;
    }

    .modal-content {
        border-radius: 16px;
        padding: 15px;
    }

    .modal-content h2 {
        font-size: 1.2rem;
    }

    .modal-content h3 {
        font-size: 1rem;
    }

    .preview-items {
        grid-template-columns: 1fr;
    }

    .roulette-row {
        height: 60px;
    }

    .roulette-item {
        width: 60px;
        height: 60px;
    }

    .result-item-image {
        max-height: 150px;
    }

    .minigame-numbers {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    .num-btn {
        padding: 6px;
        font-size: 0.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .achievement-item {
        padding: 10px;
    }

    .achievement-icon {
        font-size: 1.5rem;
    }

    .leaderboard-item {
        padding: 8px;
        font-size: 0.85rem;
    }

    .leaderboard-medal {
        font-size: 1rem;
    }

    .leaderboard-avatar {
        font-size: 1.2rem;
    }

    .battle-player {
        min-width: 120px;
    }

    .battle-avatar {
        font-size: 1.5rem;
    }

    .battle-nickname {
        font-size: 0.9rem;
    }

    .battle-roulette {
        min-height: 100px;
        padding: 10px;
    }

    .battle-item {
        font-size: 1.2rem;
    }

    .battle-vs {
        font-size: 1rem;
    }

    .chat-widget {
        width: 95vw;
        max-width: 300px;
        bottom: 5px;
        right: 5px;
    }

    .chat-widget-messages {
        max-height: 200px;
    }

    .footer-brand {
        font-size: 0.9rem;
    }

    .footer-disclaimer {
        font-size: 0.8rem;
    }

    .donate-options {
        grid-template-columns: 1fr;
    }

    .avatar-selector {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .avatar-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}


/* Селектор кейсов для батлов */
.cases-selector-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 12px;
    scroll-behavior: smooth;
}

.cases-selector-scroll::-webkit-scrollbar {
    height: 6px;
}

.cases-selector-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.cases-selector-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.cases-selector-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

.case-selector-item {
    background: rgba(30,35,50,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px;
    min-width: 140px;
    flex-shrink: 0;
}

.case-selector-item label {
    display: block;
    color: #e9ecf1;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.case-price-small {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    margin: 0 0 8px 0;
}

.case-qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.qty-minus, .qty-plus {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #5f7cff, #7f5bff);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-minus:hover, .qty-plus:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(127,91,255,0.5);
}

.qty-minus:active, .qty-plus:active {
    transform: scale(0.95);
}

.case-qty-controls .qty-display {
    min-width: 35px;
    text-align: center;
    color: #FFD700;
    font-weight: 700;
    font-size: 1rem;
}

.total-cases-display {
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    margin: 10px 0 0 0;
}

.total-cases-display span {
    color: #FFD700;
    font-weight: 700;
}


/* ⚔️ МОДАЛКА СОЗДАНИЯ БАТЛА */
.battle-create-modal {
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.battle-create-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.battle-create-header h2 {
    color: #e9ecf1;
    font-size: 1.5rem;
    margin: 0;
}

.battle-create-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.battle-create-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    flex: 1;
    overflow-y: auto;
}

.battle-create-card {
    background: rgba(30,35,50,0.8);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.battle-create-card:hover {
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.battle-create-card.selected {
    border-color: #5f7cff;
    background: rgba(95,124,255,0.15);
    box-shadow: 0 0 20px rgba(95,124,255,0.4);
}

.battle-create-image {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 8px;
}

.battle-create-name {
    color: #e9ecf1;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.battle-create-price {
    color: #FFD700;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
}

.battle-create-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.battle-create-btn {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #5f7cff, #7f5bff);
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.battle-create-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(127,91,255,0.5);
}

.battle-create-qty {
    min-width: 30px;
    text-align: center;
    color: #FFD700;
    font-weight: 700;
}

.battle-create-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.battle-create-summary {
    display: flex;
    gap: 20px;
}

@media (max-width: 1024px) {
    .battle-create-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .battle-create-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-confirm-cases {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .battle-create-modal {
        max-height: 95vh;
    }

    .battle-create-header h2 {
        font-size: 1.2rem;
    }

    .battle-create-controls {
        flex-direction: column;
    }

    .search-box {
        min-width: auto;
    }

    .filter-tabs {
        width: 100%;
        justify-content: space-between;
    }

    .filter-tab {
        flex: 1;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .battle-create-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .battle-create-summary {
        gap: 15px;
        width: 100%;
    }

    .summary-item {
        gap: 2px;
    }

    .summary-item span {
        font-size: 0.75rem;
    }

    .summary-item strong {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .battle-create-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .battle-create-card {
        padding: 8px;
    }

    .battle-create-image {
        height: 80px;
    }

    .battle-create-name {
        font-size: 0.7rem;
    }

    .battle-create-price {
        font-size: 0.8rem;
    }

    .battle-create-btn {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
    }

    .battle-create-qty {
        font-size: 0.85rem;
    }
}


/* ⚔️ МОДАЛКА ВЫБОРА КЕЙСОВ ДЛЯ БАТЛА */
.battle-cases-modal {
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.battle-cases-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.battle-cases-header h2 {
    color: #e9ecf1;
    font-size: 1.5rem;
    margin: 0;
}

.battle-cases-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    background: rgba(30,35,50,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #e9ecf1;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: #5f7cff;
    box-shadow: 0 0 15px rgba(95,124,255,0.3);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-tab {
    padding: 10px 20px;
    background: rgba(30,35,50,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.filter-tab:hover {
    background: rgba(40,45,65,0.9);
    border-color: rgba(255,255,255,0.2);
}

.filter-tab.active {
    background: linear-gradient(135deg, #5f7cff, #7f5bff);
    border-color: #7f5bff;
    color: white;
    box-shadow: 0 0 15px rgba(127,91,255,0.4);
}

.battle-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.battle-cases-grid::-webkit-scrollbar {
    width: 6px;
}

.battle-cases-grid::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.battle-cases-grid::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.battle-case-card {
    background: rgba(30,35,50,0.8);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.battle-case-card:hover {
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.battle-case-card.selected {
    border-color: #5f7cff;
    background: rgba(95,124,255,0.15);
    box-shadow: 0 0 20px rgba(95,124,255,0.4);
}

.battle-case-image {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 8px;
}

.battle-case-name {
    color: #e9ecf1;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.battle-case-price {
    color: #FFD700;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
}

.battle-case-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.battle-case-btn {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #5f7cff, #7f5bff);
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.battle-case-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(127,91,255,0.5);
}

.battle-case-qty {
    min-width: 30px;
    text-align: center;
    color: #FFD700;
    font-weight: 700;
}

.battle-cases-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
    gap: 15px;
}

.battle-cases-summary {
    display: flex;
    gap: 20px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-item span {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

.summary-item strong {
    color: #FFD700;
    font-size: 1.1rem;
}

.btn-confirm-cases {
    padding: 12px 30px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E72);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255,107,107,0.4);
    font-size: 1rem;
}

.btn-confirm-cases:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 45px rgba(255,107,107,0.6);
}

@media (max-width: 1024px) {
    .battle-cases-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .battle-cases-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-confirm-cases {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .battle-cases-modal {
        max-height: 95vh;
    }

    .battle-cases-header h2 {
        font-size: 1.2rem;
    }

    .battle-cases-controls {
        flex-direction: column;
    }

    .search-box {
        min-width: auto;
    }

    .filter-tabs {
        width: 100%;
        justify-content: space-between;
    }

    .filter-tab {
        flex: 1;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .battle-cases-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .battle-case-card {
        padding: 10px;
    }

    .battle-case-image {
        height: 100px;
        margin-bottom: 6px;
    }

    .battle-case-name {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    .battle-case-price {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .battle-cases-summary {
        gap: 15px;
        width: 100%;
        justify-content: space-around;
    }

    .summary-item {
        gap: 2px;
    }

    .summary-item span {
        font-size: 0.75rem;
    }

    .summary-item strong {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .battle-cases-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .battle-case-card {
        padding: 8px;
    }

    .battle-case-image {
        height: 80px;
    }

    .battle-case-name {
        font-size: 0.7rem;
    }

    .battle-case-price {
        font-size: 0.8rem;
    }

    .battle-case-btn {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
    }

    .battle-case-qty {
        font-size: 0.85rem;
    }
}


/* ============ АДМИН ВИДЖЕТ ============ */

.admin-widget {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 320px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 2px solid #FFD700;
    border-radius: 15px;
    z-index: 1400;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    animation: slideUp 0.3s ease;
}

.admin-widget.hidden {
    display: none;
}

.admin-widget-header {
    padding: 12px 15px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 13px 13px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: black;
    font-weight: bold;
}

.admin-widget-header h3 {
    margin: 0;
    font-size: 1rem;
}

.admin-widget-close {
    background: none;
    border: none;
    color: black;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-widget-close:hover {
    transform: rotate(90deg);
}

.admin-widget-content {
    padding: 15px;
    color: white;
}




/* ======================================================
   MODERN DARK GLASSMORPHISM (Современное тёмное стекло)
   ====================================================== */
body {
    background: #050507 !important;
    background-image: 
        radial-gradient(ellipse at 15% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, rgba(255, 255, 255, 0.015) 0%, transparent 50%) !important;
    color: #e0e0e0;
    background-attachment: fixed !important;
}

/* Эффект матового стекла (blur + полупрозрачность) */
.header, .footer, .case-card, .battle-card, .battle-create-card, 
.leaderboard-item, .inventory-item, .modal-content, .chat-widget, 
.stats-grid, .auth-box, #ppAdminSection, .profile-dropdown {
    background: rgba(20, 20, 25, 0.35) !important;
    backdrop-filter: blur(24px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(150%) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6) !important;
    border-radius: 16px !important;
}

/* ФИКС СЛОЕВ: Шапка и выпадающее меню */
.header {
    border-radius: 0 0 20px 20px !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    position: relative !important;
    z-index: 10000 !important; 
}
.profile-dropdown {
    z-index: 10001 !important; /* Строго поверх всего */
}

.footer {
    border-radius: 20px 20px 0 0 !important;
    border-bottom: none !important;
}

/* Лента дропов чуть темнее для контраста */
.drops-ticker {
    background: rgba(10, 10, 15, 0.5) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
    position: relative !important;
    z-index: 100 !important; /* Под шапкой */
}

/* Инпуты, селекты и кнопки тоже стеклянные */
input, select, button, .auth-btn, .currency-btn {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
}

/* У кнопок приятный ховер с осветлением */
button:hover, .auth-btn:hover, .currency-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
}

/* Строгий белый логотип с легким свечением */
.header h1 {
    color: #fff !important;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1) !important;
    background: none !important;
    -webkit-text-fill-color: #fff !important;
    letter-spacing: 1px;
}

/* Ховер карточек: карточка приподнимается и светлеет */
.case-card:hover, .battle-card:hover, .inventory-item:hover, .leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(255, 255, 255, 0.02) !important;
}

/* Фон модальных окон затемняет страницу и блюрит её */
.modal {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(8px) !important;
}

/* Скроллбар тоже стеклянный */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2) !important; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15) !important; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3) !important; }

/* Красивая анимация выигрышного скина */
@keyframes rouletteWinnerPulse {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.08); filter: brightness(1.25); box-shadow: 0 0 25px rgba(255, 215, 0, 0.4); }
    100% { transform: scale(1); filter: brightness(1); }
}
.winner-item {
    animation: rouletteWinnerPulse 1.5s ease-out infinite;
    border-color: #ffd700 !important;
    z-index: 10;
    position: relative;
}
