/* Main Container */
.mb-upload-container,
.mb-gallery-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Navigation Links */
.mb-navigation-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.mb-nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mb-nav-link:hover {
    color: #0073aa;
}

.mb-nav-primary {
    background: #0073aa;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.1);
}

.mb-nav-primary:hover {
    background: #005177;
    transform: translateY(-1px);
}

/* Upload Form */
#mb-upload-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.mb-form-group {
    margin-bottom: 20px;
}

.mb-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.mb-form-group input[type="text"],
.mb-form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

.mb-submit-btn {
    background: #0073aa;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 115, 170, 0.2);
}

.mb-submit-btn:hover {
    background: #005177;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 115, 170, 0.3);
}

.mb-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Progress Bar */
.mb-form-progress {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.mb-progress-bar {
    height: 100%;
    background: #4caf50;
    width: 0%;
    transition: width 0.3s ease;
}

/* Gallery Layout */
.mb-gallery-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.mb-gallery-search {
    display: flex;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.mb-gallery-search input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.mb-gallery-search input:focus {
    border-color: #0073aa;
    outline: none;
}

.mb-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.mb-search-btn:hover {
    background: #005177;
}

.mb-gallery-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.mb-filter-btn {
    background: #f5f5f5;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mb-filter-btn.active,
.mb-filter-btn:hover {
    background: #0073aa;
    color: #fff;
}

.mb-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.mb-active-filter-status {
    text-align: center;
    margin-bottom: 20px;
    background: #e3f2fd;
    padding: 8px 15px;
    border-radius: 50px;
    display: inline-block;
    font-size: 14px;
    color: #1976d2;
    border: 1px solid #bbdefb;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.mb-clear-filter {
    margin-left: 10px;
    cursor: pointer;
    font-weight: bold;
    color: #d32f2f;
    font-size: 18px;
    vertical-align: middle;
    line-height: 1;
}

.mb-clear-filter:hover {
    color: #b71c1c;
}

@media (max-width: 768px) {
    .mb-gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.mb-gallery-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mb-gallery-item:hover {
    transform: translateY(-5px);
}

.mb-media-container {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mb-media-container img,
.mb-media-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.mb-play-icon {
    position: absolute;
    font-size: 40px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mb-item-info {
    padding: 12px;
}

.mb-pseudo {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.mb-user-link {
    color: #0073aa;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
}

.mb-user-link:hover {
    color: #005177;
}

/* Load More */
.mb-load-more {
    display: block;
    margin: 30px auto;
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.mb-load-more:hover {
    background: #eee;
}

/* Lightbox */
.mb-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mb-lightbox-content {
    max-width: 90%;
    max-height: 90%;
}

.mb-lightbox-content img,
.mb-lightbox-content video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.mb-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}

/* Success/Error Message */
#mb-upload-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
    display: none;
}

.mb-msg-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    animation: mbSlideIn 0.5s ease forwards;
}

.mb-msg-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    animation: mbShake 0.4s ease;
}

@keyframes mbSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mbShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}