.ms-filter-bar {
    text-align: center;
    margin-bottom: 25px;
}

.ms-filter-btn {
    background: #f3f3f3;
    border: 1px solid #ccc;
    padding: 10px 18px;
    margin: 4px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    color: #333;
    transition: 0.3s;
}

.ms-filter-btn:hover {
    background: #0073aa;
    color: #fff;
}

.ms-filter-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.ms-template-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.ms-template-item {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.ms-template-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.ms-thumb img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.ms-template-item h3 {
    font-size: 17px;
    font-weight: 600;
    margin-top: 10px;
    color: #222;
}

/* DOWNLOAD BUTTON */
.ms-download,
.ms-download-btn {
    display: inline-block;
    background: #0073aa;
    margin-bottom: 10px;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.ms-download:hover,
.ms-download-btn:hover {
    background: #000000;
}

/* COPY BUTTON */
.ms-copy-json {
    display: inline-block;
    background: #28a745;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    margin-left: 8px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}

.ms-copy-json:hover {
    background: #1e7e34;
}

/* GROUP */
.ms-btn-group {
    margin-top: 12px;
}

.ms-loading,
.ms-error,
.no-more {
    text-align: center;
    color: #666;
    font-size: 15px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .ms-template-list {
        flex-direction: column;
        align-items: center;
    }

    .ms-template-item {
        width: 90%;
    }

    .ms-filter-btn {
        display: inline-block;
        margin: 5px 3px;
        padding: 8px 14px;
    }
}

/* Lightbox Scrollbar */
.mfp-image-holder .mfp-content {
    max-height: 90vh;
    overflow-y: auto;
}

.mfp-content::-webkit-scrollbar {
    width: 6px;
}
.mfp-content::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 10px;
}
.mfp-content::-webkit-scrollbar-thumb:hover {
    background: #666;
}

#ms-copy-popup {
    position: fixed;
    top: 120px;
    right: 120px;
    background: #4caf50;
    color: #fff;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 15px;
    display: none;
    z-index: 999999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* Error popup override */
#ms-copy-popup.error {
    background: #d9534f !important;
}