/* Categories Section Styles */
.categories-container {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3a3a3a;
}

.categories-header h3 {
    color: #fff;
    font-size: 1.4em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.categories-header h3 i {
    color: #667eea;
}

.category-view-toggle {
    display: flex;
    gap: 10px;
}

.view-btn {
    background: #3a3a3a;
    border: none;
    color: #999;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

/* Category Groups */
.category-groups {
    display: grid;
    gap: 20px;
}

.category-group {
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #444;
    transition: all 0.3s ease;
}

.category-group:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.category-group-header {
    background: linear-gradient(135deg, #3a3a3a 0%, #444 100%);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-group-header:hover {
    background: linear-gradient(135deg, #444 0%, #4a4a4a 100%);
}

.category-group.expanded .category-group-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 600;
    font-size: 1.1em;
}

.category-group-icon {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.category-group-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #fff;
    font-weight: 500;
}

.expand-icon {
    color: #fff;
    transition: transform 0.3s ease;
}

.category-group.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Category Items */
.category-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #2a2a2a;
}

.category-group.expanded .category-items {
    max-height: 500px;
    overflow-y: auto;
}

.category-item {
    padding: 12px 20px;
    border-top: 1px solid #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-item:hover {
    background: #333;
    padding-left: 25px;
}

.category-item-name {
    color: #e0e0e0;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-item-count {
    color: #999;
    font-size: 0.85em;
    background: #333;
    padding: 3px 8px;
    border-radius: 12px;
}

/* Grid View for Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.category-card {
    background: #333;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.category-card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
}

.category-card-name {
    color: #fff;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.category-card-count {
    color: #999;
    font-size: 0.9em;
}

/* Search within categories */
.category-search {
    padding: 15px 20px;
    background: #2a2a2a;
    border-bottom: 1px solid #3a3a3a;
}

.category-search input {
    width: 100%;
    padding: 10px 15px;
    background: #333;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95em;
}

.category-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Popular Categories Badge */
.popular-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

/* Loading State */
.category-skeleton {
    background: #333;
    border-radius: 10px;
    height: 80px;
    position: relative;
    overflow: hidden;
}

.category-skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    100% {
        left: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .category-card {
        padding: 15px;
    }
    
    .category-card-icon {
        width: 45px;
        height: 45px;
        font-size: 1.4em;
    }
    
    .category-group.expanded .category-items {
        max-height: 300px;
    }
}