/* ===================================
   Unified Card Grid System
   Based on Uganda TV Channels Style
   Used for Movies, Series, VJs pages
   =================================== */

/* Hero Section */
.page-hero {
    background: linear-gradient(135deg, rgba(124, 252, 0, 0.08), rgba(0, 217, 255, 0.08), rgba(157, 78, 221, 0.05));
    padding: 50px 20px;
    text-align: center;
    border-radius: 24px;
    margin-bottom: 40px;
    border: 1px solid rgba(124, 252, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7CFC00, #00D9FF, transparent);
}

.page-hero h1 {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #7CFC00 0%, #00D9FF 50%, #9D4EDD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(124, 252, 0, 0.3);
}

.page-hero p {
    font-size: 16px;
    color: #a0a0a0;
    max-width: 600px;
    margin: 0 auto;
}

/* Section Title */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(124, 252, 0, 0.15);
}

.section-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.section-title h2 svg {
    flex-shrink: 0;
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color, #7CFC00);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #fff;
    transform: translateX(4px);
}

.view-all-link svg {
    transition: transform 0.3s ease;
}

.view-all-link:hover svg {
    transform: translateX(4px);
}

/* Item Count Badge */
.item-count {
    background: linear-gradient(135deg, #7CFC00, #00D9FF);
    color: #000;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-left: auto;
    box-shadow: 0 2px 10px rgba(124, 252, 0, 0.3);
}

/* ===== CARD GRID ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* ===== OPTIONAL: MUNO-STYLE POSTER GRID (movies.html) ===== */
.card-grid.muno-style {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 26px;
}

.card-grid.muno-style .content-card {
    border-radius: 10px;
    border: none;
    background: transparent;
    box-shadow: none;
}

.card-grid.muno-style .content-card:hover {
    transform: translateY(-4px);
    box-shadow: none;
    border-color: transparent;
}

.card-grid.muno-style .content-card::before {
    content: none;
}

.card-grid.muno-style .card-poster {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
}

.card-grid.muno-style .card-info {
    display: none;
}

.card-grid.muno-style .card-meta {
    display: none;
}

.card-grid.muno-style .card-rating {
    display: none;
}

.card-grid.muno-style .card-badges {
    left: 0;
    right: 0;
    top: 12px;
    justify-content: center;
}

.card-grid.muno-style .badge-quality {
    display: none;
}

.card-grid.muno-style .badge-vj {
    background: #66cc00;
    color: #06110a;
    font-size: 12px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
    border-radius: 6px;
    padding: 6px 12px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

@media (max-width: 480px) {
    .card-grid.muno-style {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }
}

/* ===== MOVIE/SERIES CARD ===== */
.content-card {
    background: linear-gradient(145deg, #1a1a2e, #12121a);
    border: 1px solid rgba(124, 252, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    text-decoration: none;
    display: block;
}

.content-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(124, 252, 0, 0.25), 0 0 20px rgba(124, 252, 0, 0.15);
    border-color: rgba(124, 252, 0, 0.5);
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.content-card:hover::before {
    opacity: 1;
}

/* Poster/Thumbnail */
.card-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    background-size: cover;
    background-position: center;
    background-color: rgba(30, 30, 30, 0.5);
    overflow: hidden;
}

.card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.content-card:hover .card-poster img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Trending Rank Badge */
.trending-rank {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FF6B6B 0%, #ee5a24 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 12px 0;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Badges */
.card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 5;
}

.card-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-quality {
    background: linear-gradient(135deg, #7CFC00, #32CD32);
    color: #000;
}

.badge-vj {
    background: rgba(0, 0, 0, 0.85);
    color: #7CFC00;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.badge-year {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Card Rating */
.card-rating {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 5;
}

.card-rating svg {
    fill: currentColor;
}

.card-badge.quality {
    right: 10px;
    background: linear-gradient(135deg, #7CFC00, #32CD32);
    color: #000;
}

.card-badge.vj {
    left: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: #7CFC00;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.card-badge.year {
    left: 10px;
    bottom: 10px;
    top: auto;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.card-badge.rating {
    right: 10px;
    bottom: 10px;
    top: auto;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-badge.rating svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #7CFC00, #00D9FF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(124, 252, 0, 0.5);
}

.play-overlay svg {
    width: 24px;
    height: 24px;
    fill: #000;
    margin-left: 3px;
}

.content-card:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 8px 30px rgba(124, 252, 0, 0.6);
}

/* Card Info */
.card-info {
    padding: 15px;
    position: relative;
    z-index: 2;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.card-meta {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-meta svg {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

/* ===== FILTER SECTION ===== */
.filter-section {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(20, 20, 20, 0.98) 100%);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(124, 252, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #7CFC00;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(124, 252, 0, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237CFC00' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.filter-select:hover {
    border-color: rgba(124, 252, 0, 0.4);
}

.filter-select:focus {
    outline: none;
    border-color: #7CFC00;
    box-shadow: 0 0 0 3px rgba(124, 252, 0, 0.15);
}

.filter-group-style {
    min-width: 170px;
}

.filter-button {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(124, 252, 0, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.filter-button:hover {
    border-color: rgba(124, 252, 0, 0.4);
}

.filter-button:focus {
    outline: none;
    border-color: #7CFC00;
    box-shadow: 0 0 0 3px rgba(124, 252, 0, 0.15);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 16px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(124, 252, 0, 0.2);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.page-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #7CFC00, #00D9FF);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 252, 0, 0.3);
}

.page-btn.active {
    background: linear-gradient(135deg, #7CFC00, #00D9FF);
    color: #000;
    font-weight: 700;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== LOADING STATE ===== */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(124, 252, 0, 0.2);
    border-top-color: #7CFC00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    stroke: #444;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 20px;
}

.empty-state p {
    color: #888;
    font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 30px 15px;
        border-radius: 16px;
        margin-bottom: 25px;
    }
    
    .page-hero h1 {
        font-size: 24px;
    }
    
    .page-hero p {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    
    .content-card {
        border-radius: 12px;
    }
    
    .card-badge {
        font-size: 8px;
        padding: 3px 6px;
    }
    
    .card-info {
        padding: 10px;
    }
    
    .card-title {
        font-size: 12px;
    }
    
    .card-meta {
        font-size: 10px;
    }
    
    .play-overlay {
        width: 45px;
        height: 45px;
    }
    
    .play-overlay svg {
        width: 18px;
        height: 18px;
    }
    
    .filter-section {
        padding: 15px;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .filter-select {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .pagination {
        gap: 6px;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin: 0;
        padding: 0;
    }
    
    .movie-section {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .section-header {
        padding: 0 8px;
        margin-bottom: 12px;
    }
    
    .card-title {
        font-size: 11px;
    }
    
    .card-meta {
        font-size: 9px;
    }
    
    .content-card {
        border-radius: 10px;
    }
    
    .card-info {
        padding: 8px;
