/* Movie Grid Display - Professional Movie Style */
.mgd-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #ffffff;
}

.mgd-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.mgd-main-title {
    font-size: 3.2rem;
    font-weight: 800;
    background: linear-gradient(45deg, #FF6B35, #FFD166);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 15px 0;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.mgd-main-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #FF6B35, #FFD166);
    border-radius: 2px;
}

.mgd-subtitle {
    font-size: 1.3rem;
    color: #a0a0a0;
    font-weight: 300;
    margin: 25px 0 0 0;
    letter-spacing: 1px;
}

/* Grid Layout - 4 columns by default */
.mgd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* 3 columns layout */
.mgd-grid.mgd-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* 2 columns layout */
.mgd-grid.mgd-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Movie Card */
.mgd-card {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.mgd-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.3);
}

.mgd-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Image Container */
.mgd-image-container {
    position: relative;
    padding-top: 150%; /* 2:3 Aspect Ratio for movie posters */
    overflow: hidden;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
}

.mgd-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.mgd-card:hover .mgd-thumbnail {
    transform: scale(1.08);
}

/* Play Button Overlay */
.mgd-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(255,107,53,0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.mgd-card:hover .mgd-play-overlay {
    opacity: 1;
}

.mgd-play-overlay svg {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.mgd-card:hover .mgd-play-overlay svg {
    transform: scale(1);
}

/* Category Badge */
.mgd-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #FF6B35, #FFD166);
    color: #000;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 2;
}

/* Content */
.mgd-content {
    padding: 20px;
    background: linear-gradient(to top, #1e1e1e, #2a2a2a);
}

.mgd-post-title {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 600;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
}

.mgd-post-title:hover {
    color: #FFD166;
}

.mgd-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #a0a0a0;
}

.mgd-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mgd-date:before {
    content: '🎬';
    font-size: 0.9em;
}

/* Categories Info */
.mgd-categories-info {
    text-align: center;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mgd-categories-info p {
    margin: 0;
    color: #a0a0a0;
    font-size: 1rem;
}

.mgd-categories-info a {
    color: #FFD166;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mgd-categories-info a:hover {
    color: #FF6B35;
    text-decoration: underline;
}

/* Empty State */
.mgd-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: #a0a0a0;
    font-size: 1.1rem;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.mgd-empty p {
    margin: 10px 0;
}

/* Loading Animation */
@keyframes mgd-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.mgd-loading .mgd-image-container,
.mgd-loading .mgd-content {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: mgd-shimmer 1.5s infinite;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .mgd-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .mgd-container {
        padding: 30px 15px;
    }
    
    .mgd-main-title {
        font-size: 2.5rem;
    }
    
    .mgd-subtitle {
        font-size: 1.1rem;
    }
    
    .mgd-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .mgd-main-title {
        font-size: 2rem;
    }
    
    .mgd-header {
        margin-bottom: 30px;
    }
    
    .mgd-grid {
        gap: 15px;
    }
    
    .mgd-content {
        padding: 15px;
    }
    
    .mgd-post-title {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .mgd-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .mgd-main-title {
        font-size: 1.8rem;
    }
    
    .mgd-subtitle {
        font-size: 1rem;
    }
}

/* Performance Optimizations */
.mgd-thumbnail {
    will-change: transform;
}

/* Print Styles */
@media print {
    .mgd-container {
        background: white !important;
        color: black !important;
    }
    
    .mgd-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
    
    .mgd-play-overlay {
        display: none !important;
    }
    
    .mgd-categories-info {
        display: none !important;
    }
}