/* Category Pop-up Modal Styles */
.category-popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.category-popup-modal.show {
    opacity: 1;
    visibility: visible;
}

.category-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.category-popup-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    margin: 20px;
    z-index: 10000;
}

.category-popup-content {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.category-popup-modal.show .category-popup-content {
    transform: scale(1) translateY(0);
}

.category-popup-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.category-popup-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.5rem;
    font-weight: 400;
    color: #1a1a1a;
    margin: 0 0 10px;
    letter-spacing: 1px;
}

.category-popup-subtitle {
    font-size: 1rem;
    color: #666;
    margin: 0;
    font-weight: 400;
}

.category-popup-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-item {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-item-inner {
    background: #f8f8f8;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    height: 100%;
}

.category-item:hover .category-item-inner {
    border-color: #dc3545;
    background: #fff;
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.2);
}

.category-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-info {
    flex: 1;
    width: 100%;
}

.category-name {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.5rem;
    font-weight: 400;
    color: #1a1a1a;
    margin: 0 0 5px;
    letter-spacing: 0.5px;
}

.category-subcount {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
}

.category-select-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.category-item:hover .category-select-icon {
    opacity: 1;
    transform: scale(1);
}

.category-empty {
    text-align: center;
    padding: 40px 20px;
}

.category-popup-footer {
    padding: 20px 30px 30px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.btn-skip-category {
    background: transparent;
    border: 2px solid #ddd;
    color: #666;
    padding: 10px 30px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-skip-category:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .category-popup-container {
        max-width: 95%;
        margin: 10px;
    }

    .category-popup-header {
        padding: 20px 20px 15px;
    }

    .category-popup-title {
        font-size: 2rem;
    }

    .category-popup-body {
        padding: 20px;
    }

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

    .category-image {
        width: 80px;
        height: 80px;
    }

    .category-name {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-popup-title {
        font-size: 1.75rem;
    }

    .category-popup-subtitle {
        font-size: 0.9rem;
    }
}
