.mg-gallery-container {
    max-width: 900px;
    margin: 30px auto;
    font-family: Arial, sans-serif;
}

.mg-tabs {
    text-align: center;
    margin-bottom: 15px;
}

.mg-tab-button {
    padding: 8px 20px;
    border: none;
    background: #ddd;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.mg-tab-button.active {
    background: #0073aa;
    color: white;
}

.mg-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.mg-gallery-item {
    width: 160px;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mg-thumb-wrapper img,
.mg-thumb-wrapper video {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: black;
}

.mg-buttons {
    display: flex;
    justify-content: space-around;
    width: 100%;
    padding: 8px 0;
    background: #f9f9f9;
}

.mg-preview-btn,
.mg-download-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.mg-modal {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.mg-modal-content {
    background: white;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    border-radius: 8px;
    position: relative;
}

.mg-modal-content img,
.mg-modal-content video {
    max-width: 100%;
    max-height: 80vh;
}

.mg-close {
    position: absolute;
    right: 12px;
    top: 8px;
    font-size: 28px;
    cursor: pointer;
}
