/* Стили из dictionary.php */


        body { background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); background-attachment: fixed; min-height: 100vh; padding-top: 70px; font-family: 'Segoe UI', sans-serif; }
        header { position: fixed; top: 0; left: 0; right: 0; background: rgba(30,30,46,0.95); backdrop-filter: blur(10px); color: white; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; z-index: 10000; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
        .logo { font-size: 24px; font-weight: bold; }
        nav { display: flex; gap: 20px; align-items: center; }
        nav a { color: #a0aec0; text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 8px; transition: 0.3s; }
        nav a:hover { color: #8b5cf6; background: rgba(139,92,246,0.15); }
        .container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }
        .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
        .page-title { font-size: 32px; font-weight: 800; color: white; text-shadow: 0 3px 15px rgba(0,0,0,0.3); display: flex; align-items: center; gap: 12px; }
        .back-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; background: rgba(255,255,255,0.95); color: #8b5cf6; text-decoration: none; border-radius: 12px; font-weight: 700; }
        .back-btn:hover { background: white; color: #7c3aed; transform: translateY(-3px); }
        .card { background: rgba(255,255,255,0.98); border-radius: 20px; padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
        .search-section { margin-bottom: 30px; }
        .search-form { display: flex; gap: 12px; flex-wrap: wrap; }
        .search-input { flex: 1; min-width: 250px; padding: 14px 20px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 15px; }
        .search-input:focus { outline: none; border-color: #8b5cf6; }
        .btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 12px; font-weight: 700; font-size: 15px; cursor: pointer; border: none; transition: all 0.3s; text-decoration: none; }
        .btn-primary { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; }
        .btn-outline { background: transparent; border: 2px solid #8b5cf6; color: #8b5cf6; }
        .btn:hover { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(0,0,0,0.2); }
        .alphabet-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 25px; padding: 20px; background: #f8fafc; border-radius: 14px; }
        .alphabet-nav a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: white; border: 2px solid #e2e8f0; border-radius: 8px; color: #64748b; font-weight: 700; text-decoration: none; font-size: 14px; transition: all 0.2s; }
        .alphabet-nav a:hover, .alphabet-nav a.active { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; border-color: #8b5cf6; transform: translateY(-2px); }
        .terms-list { list-style: none; }
        .term-card { background: white; border-radius: 14px; padding: 20px; margin-bottom: 15px; border: 2px solid #e2e8f0; transition: all 0.3s; }
        .term-card:hover { border-color: rgba(139,92,246,0.3); transform: translateX(5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
        .term-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; gap: 10px; }
        .term-title { font-size: 20px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 10px; }
        .term-category { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
        .term-definition { color: #475569; font-size: 15px; line-height: 1.7; }
        .term-meta { display: flex; gap: 15px; margin-top: 15px; padding-top: 15px; border-top: 1px solid #e2e8f0; font-size: 12px; color: #94a3b8; }
        .empty-state { text-align: center; padding: 60px 20px; }
        .empty-icon { font-size: 72px; margin-bottom: 20px; opacity: 0.5; }
        .empty-title { font-size: 24px; font-weight: 700; color: #1e293b; margin-bottom: 10px; }
        .empty-text { color: #64748b; margin-bottom: 25px; }
        .alert { padding: 16px 20px; border-radius: 12px; margin-bottom: 20px; border-left: 4px solid; font-weight: 600; }
        .alert-info { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #3730a3; border-color: #8b5cf6; }
        .stats { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 20px; }
        .stat-badge { background: #f1f5f9; padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: 600; color: #64748b; }
        .stat-badge.success { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #166534; }
        @media (max-width: 768px) { .page-header { flex-direction: column; align-items: flex-start; } .search-form { flex-direction: column; } .search-input { width: 100%; } .alphabet-nav a { width: 32px; height: 32px; font-size: 12px; } }
    /* Стили из open-lootbox.php */


        body {
            font-family: 'Segoe UI', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
            background-attachment: fixed;
            min-height: 100vh;
            padding-top: 70px;
        }
        .container { max-width: 800px; margin: 0 auto; padding: 40px 20px; }
        
        .page-header {
            text-align: center;
            margin-bottom: 30px;
        }
        .page-title {
            font-size: 36px;
            font-weight: 800;
            color: white;
            text-shadow: 0 3px 15px rgba(0,0,0,0.3);
            margin-bottom: 10px;
        }
        .balance-card {
            display: inline-block;
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            padding: 12px 24px;
            border-radius: 16px;
            box-shadow: 0 8px 25px rgba(251,191,36,0.4);
            font-size: 20px;
            font-weight: 800;
            color: #78350f;
        }
        
        .alert {
            padding: 16px 20px;
            border-radius: 12px;
            margin-bottom: 25px;
            font-weight: 600;
            text-align: center;
        }
        .alert-success { background: rgba(34,197,94,0.9); color: white; }
        .alert-error { background: rgba(239,68,68,0.9); color: white; }
        
        .lootbox-card {
            background: rgba(255,255,255,0.98);
            border-radius: 24px;
            padding: 40px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            text-align: center;
        }
        
        .lootbox-icon {
            font-size: 120px;
            margin-bottom: 20px;
            animation: float 3s ease-in-out infinite;
        }
        
        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-20px); }
        }
        
        .lootbox-title {
            font-size: 28px;
            font-weight: 800;
            color: #1e293b;
            margin-bottom: 15px;
        }
        
        .lootbox-desc {
            font-size: 16px;
            color: #64748b;
            margin-bottom: 30px;
            line-height: 1.6;
        }
        
        .chances-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            margin-bottom: 30px;
        }
        
        .chance-item {
            padding: 15px 10px;
            border-radius: 12px;
            text-align: center;
        }
        
        .chance-item.common { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); }
        .chance-item.uncommon { background: linear-gradient(135deg, #dcfce7, #bbf7d0); }
        .chance-item.rare { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
        .chance-item.epic { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); }
        .chance-item.legendary { background: linear-gradient(135deg, #fef3c7, #fde68a); }
        
        .chance-percent {
            font-size: 24px;
            font-weight: 800;
            margin-bottom: 5px;
        }
        
        .chance-label {
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .open-btn {
            display: inline-block;
            padding: 18px 48px;
            background: linear-gradient(135deg, #8b5cf6, #7c3aed);
            color: white;
            border: none;
            border-radius: 16px;
            font-size: 18px;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 12px 35px rgba(139,92,246,0.4);
        }
        
        .open-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 16px 45px rgba(139,92,246,0.5);
        }
        
        .open-btn:disabled {
            background: #cbd5e1;
            cursor: not-allowed;
            transform: none;
        }
        
        .won-item-card {
            margin-top: 30px;
            padding: 30px;
            border-radius: 20px;
            animation: revealItem 0.8s ease;
        }
        
        @keyframes revealItem {
            from {
                opacity: 0;
                transform: scale(0.5) rotate(-180deg);
            }
            to {
                opacity: 1;
                transform: scale(1) rotate(0);
            }
        }
        
        .won-item-card.common { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); border: 3px solid #64748b; }
        .won-item-card.uncommon { background: linear-gradient(135deg, #dcfce7, #bbf7d0); border: 3px solid #22c55e; }
        .won-item-card.rare { background: linear-gradient(135deg, #dbeafe, #bfdbfe); border: 3px solid #3b82f6; }
        .won-item-card.epic { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); border: 3px solid #a855f7; }
        .won-item-card.legendary { 
            background: linear-gradient(135deg, #fef3c7, #fde68a); 
            border: 3px solid #fbbf24;
            box-shadow: 0 0 40px rgba(251,191,36,0.6);
            animation: revealItem 0.8s ease, legendaryGlow 2s infinite;
        }
        
        @keyframes legendaryGlow {
            0%, 100% { box-shadow: 0 0 40px rgba(251,191,36,0.6); }
            50% { box-shadow: 0 0 60px rgba(251,191,36,0.9); }
        }
        
        .won-item-icon {
            font-size: 80px;
            margin-bottom: 15px;
        }
        
        .won-item-name {
            font-size: 24px;
            font-weight: 800;
            color: #1e293b;
            margin-bottom: 10px;
        }
        
        .won-item-rarity {
            display: inline-block;
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            margin-bottom: 15px;
        }
        
        .won-item-rarity.common { background: #64748b; color: white; }
        .won-item-rarity.uncommon { background: #22c55e; color: white; }
        .won-item-rarity.rare { background: #3b82f6; color: white; }
        .won-item-rarity.epic { background: #a855f7; color: white; }
        .won-item-rarity.legendary { background: #fbbf24; color: #78350f; }
        
        .won-item-desc {
            font-size: 14px;
            color: #475569;
            line-height: 1.6;
        }
        
        .back-btn {
            display: inline-block;
            margin-top: 25px;
            padding: 12px 24px;
            background: rgba(255,255,255,0.9);
            color: #8b5cf6;
            text-decoration: none;
            border-radius: 12px;
            font-weight: 700;
            transition: all 0.2s;
        }
        
        .back-btn:hover {
            background: white;
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }
        
        @media (max-width: 768px) {
            .chances-grid { grid-template-columns: repeat(2, 1fr); }
            .lootbox-icon { font-size: 80px; }
            .page-title { font-size: 28px; }
        }
    /* ==========================================
   📂 ЛЕВЫЙ САЙДБАР: Категории и Праздники
   ========================================== */

.categories-grid-full {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #FFFDF8;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    transition: all 0.2s;
    border: 1px solid #E8D5B5;
}

.category-link:hover {
    background: #F0DCC0;
    border-color: #D4A574;
    transform: translateX(4px);
}

.category-icon { font-size: 20px; flex-shrink: 0; }
.category-name { flex: 1; font-size: 14px; font-weight: 600; color: #2C1810; }
.category-count {
    font-size: 12px; color: #795548; background: #F0DCC0;
    padding: 2px 8px; border-radius: 10px; font-weight: 700;
}

.show-all-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: #FFFDF8;
    border: 1px dashed #C4A882;
    border-radius: 10px;
    color: #6F4E37;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}
.show-all-btn:hover { background: #F0DCC0; border-style: solid; }
.arrow-icon { transition: transform 0.3s; font-size: 12px; }

/* Блок праздничного меню */
.holiday-menu-card {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 2px solid #F59E0B;
}

.holiday-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.holiday-item {
    width: 100%;
    padding: 12px;
    background: white;
    border: 1px solid #FCD34D;
    border-radius: 10px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #78350F;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.holiday-item:hover {
    background: #F59E0B;
    color: white;
    border-color: #D97706;
    transform: translateX(4px);
}

/* Мини-профиль */
.user-mini-profile {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 2px solid #F59E0B;
}
.user-mini-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.user-mini-avatar {
    width: 50px; height: 50px; border-radius: 50%;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: white; overflow: hidden; flex-shrink: 0;
}
.user-mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-mini-info { flex: 1; }
.user-mini-name { font-size: 16px; font-weight: 700; color: #78350F; margin-bottom: 4px; }
.user-mini-level { font-size: 13px; color: #92400E; font-weight: 600; }
.user-mini-stats { display: flex; gap: 12px; margin-bottom: 16px; }
.user-mini-stat {
    flex: 1; background: white; padding: 10px; border-radius: 10px;
    text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.stat-icon { font-size: 18px; }
.stat-value { font-size: 16px; font-weight: 800; color: #78350F; }
.user-mini-btn {
    display: block; width: 100%; padding: 12px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white; text-align: center; text-decoration: none;
    border-radius: 10px; font-weight: 700; transition: all 0.2s;
}
.user-mini-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4); }

/* ==========================================
   🪟 МОДАЛЬНЫЕ ОКНА (ИСПРАВЛЕНО: display: none)
   ========================================== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(44, 24, 16, 0.7); backdrop-filter: blur(5px);
    display: none; /* <-- ИСПРАВЛЕНО: теперь скрыто по умолчанию! */
    align-items: center; justify-content: center;
    z-index: 100000; padding: 20px;
}

.modal-content {
    background: #FFFBF2; border-radius: 20px; padding: 30px;
    max-width: 450px; width: 100%; position: relative;
    border: 2px solid #D4A574; box-shadow: 0 20px 60px rgba(44, 24, 16, 0.3);
    text-align: center;
}

.modal-close {
    position: absolute; top: 15px; right: 15px; background: none;
    border: none; font-size: 24px; color: #795548; cursor: pointer;
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #F0DCC0; color: #2C1810; }

.modal-title { font-size: 22px; font-weight: 800; color: #2C1810; margin: 0 0 12px 0; }
.modal-desc { font-size: 14px; color: #795548; margin-bottom: 20px; line-height: 1.5; }

.holiday-modal-placeholder {
    background: #FFF8F0; padding: 20px; border-radius: 12px;
    border: 2px dashed #D4A574; margin-bottom: 20px; color: #795548;
}

.modal-submit-btn {
    padding: 12px; background: linear-gradient(135deg, #D4A574, #E8B88A);
    color: #2C1810; border: 2px solid #C9955B; border-radius: 10px;
    font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.modal-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(160, 114, 45, 0.3); }
/* ==========================================
   📂 СТРАНИЦА ВСЕХ КАТЕГОРИЙ
   ========================================== */

.categories-overview {
    max-width: 1200px;
    margin: 0 auto;
}

.letter-section {
    margin-bottom: 40px;
}

.letter-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--border-warm);
}

.categories-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    border: 2px solid var(--border-warm);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.category-card:hover {
    border-color: var(--accent-caramel);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--shadow-hover);
}

.category-card-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.category-card-info {
    flex: 1;
    min-width: 0;
}

.category-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.category-card-desc {
    font-size: 14px;
    color: var(--text-medium);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.category-card-count {
    margin-top: auto;
}

.count-badge {
    display: inline-block;
    background: var(--bg-warm);
    color: var(--accent-caramel);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.show-all-btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-caramel), var(--bg-deep));
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.show-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(160, 114, 45, 0.3);
}

.arrow-icon {
    font-size: 16px;
    transition: transform 0.2s;
}

.show-all-btn:hover .arrow-icon {
    transform: translateX(4px);
}

/* Адаптив */
@media (max-width: 768px) {
    .categories-cards-grid {
        grid-template-columns: 1fr;
    }
}