.mgl-plugin-wrapper * {
margin: 0;
padding: 0;
box-sizing: border-box;
}

/* We apply the original body styles to our wrapper for a self-contained look /
.mgl-plugin-wrapper {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f1f1f1;
padding: 20px;
border-radius: 5px; / Optional: adds a nice touch */
}

.mgl-plugin-wrapper .container {
max-width: 1200px;
margin: 0 auto;
}
.mgl-plugin-wrapper .filter-buttons {
display: flex;
justify-content: center;
gap: 10px;
margin-bottom: 2rem;
flex-wrap: wrap;
}

.mgl-plugin-wrapper .filter-btn {
padding: 12px 24px;
border: none;
background: #333;
color: white;
border-radius: 25px;
cursor: pointer;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
font-weight: 500;
}

.mgl-plugin-wrapper .filter-btn:hover,
.mgl-plugin-wrapper .filter-btn.active {
background: rgb(51, 51, 40)
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.mgl-plugin-wrapper .gallery {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
margin-bottom: 2rem;
}

.mgl-plugin-wrapper .media-item {
position: relative;
border-radius: 15px;
overflow: hidden;
cursor: pointer;
transition: all 0.3s ease;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.mgl-plugin-wrapper .media-item:hover {
transform: translateY(-10px) scale(1.02);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.mgl-plugin-wrapper .media-item img,
.mgl-plugin-wrapper .media-item .video-thumbnail {
width: 100%;
height: 250px;
object-fit: cover;
transition: transform 0.3s ease;
}

.mgl-plugin-wrapper .media-item:hover img,
.mgl-plugin-wrapper .media-item:hover .video-thumbnail {
transform: scale(1.1);
}

.mgl-plugin-wrapper .media-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
display: flex;
align-items: flex-end;
padding: 20px;
opacity: 0;
transition: opacity 0.3s ease;
}

.mgl-plugin-wrapper .media-item:hover .media-overlay {
opacity: 1;
}

.mgl-plugin-wrapper .media-title {
color: white;
font-size: 1.1rem;
font-weight: 600;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.mgl-plugin-wrapper .play-button {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 80px;
height: 80px;
background: rgba(255, 255, 255, 0.9);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 2rem;
color: #333;
transition: all 0.3s ease;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mgl-plugin-wrapper .play-button:before {
content: '▶';
margin-left: 4px;
}

.mgl-plugin-wrapper .media-item:hover .play-button {
transform: translate(-50%, -50%) scale(1.1);
background: white;
}

Lightbox Styles 
.mgl-plugin-wrapper .lightbox {
display: none;
position: fixed;
top: 0;
left: 0;
right:0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.95);
z-index: 99999; 
backdrop-filter: blur(5px);
align-items: center;
justify-content: center;
}

.mgl-plugin-wrapper .lightbox.active {
display: flex;
animation: mgl-fadeIn 0.3s ease;
}

@keyframes mgl-fadeIn {
/* Renamed keyframe */
from {
opacity: 0;
}
to {
opacity: 1;
}
}

.mgl-plugin-wrapper .lightbox-inner {
position: relative;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

.mgl-plugin-wrapper .lightbox-content {
position: relative;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
animation: mgl-scaleIn 0.3s ease;
}

@keyframes mgl-scaleIn {
/* Renamed keyframe */
from {
transform: scale(0.8);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}
}

.mgl-plugin-wrapper .lightbox img {
max-width: 100%;
max-height: 100%;
border-radius: 10px;
box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.mgl-plugin-wrapper .lightbox iframe {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
border-radius: 0;
box-shadow: none;
border: none;
}

.mgl-plugin-wrapper .lightbox-close {
position: fixed;
top: 20px;
right: 20px;
background: transparent;
border: none;
color: white;
font-size: 2.5rem;
cursor: pointer;
transition: color 0.3s ease;
}

.mgl-plugin-wrapper .lightbox-close:hover {
color: #ccc;
}

.mgl-plugin-wrapper .lightbox-nav {
position: fixed;
top: 50%;
transform: translateY(-50%);
background: transparent;
border: none;
color: white;
font-size: 3rem;
cursor: pointer;
transition: color 0.3s ease;
}

.mgl-plugin-wrapper .lightbox-nav:hover {
color: #ccc;
}

.mgl-plugin-wrapper .lightbox-prev {
left: 20px;
}

.mgl-plugin-wrapper .lightbox-next {
right: 20px;
}

.mgl-plugin-wrapper .lightbox-info {
position: fixed;
bottom: 20px;
color: white;
font-size: 1.1rem;
font-weight: 500;
text-align: center;
}

/* Media Type Indicators */
.mgl-plugin-wrapper .media-type {
position: absolute;
top: 10px;
right: 10px;
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 5px 10px;
border-radius: 15px;
font-size: 0.8rem;
font-weight: 600;
}

.mgl-plugin-wrapper .media-type.video {
background: rgba(220, 53, 69, 0.9);
}

.mgl-plugin-wrapper .media-type.image {
background: rgba(40, 167, 69, 0.9);
}

/* Responsive Design */
@media (max-width: 768px) {
.mgl-plugin-wrapper .gallery {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 15px;
}

.mgl-plugin-wrapper h1 {
font-size: 2rem;
}

.mgl-plugin-wrapper .lightbox-prev {
left: 10px;
}

.mgl-plugin-wrapper .lightbox-next {
right: 10px;
}

.mgl-plugin-wrapper .lightbox-close {
top: 10px;
right: 10px;
}
}

.mgl-plugin-wrapper .hidden {
display: none !important;
}