/* Modern Home Lists Redesign */

.home-lists-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .home-lists-grid {
        grid-template-columns: 1fr;
    }
}

.list-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    height: 100%;
}

.list-header {
    background: linear-gradient(135deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
    color: white;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    border-bottom: 3px solid #0d3d75;
}

.list-header i {
    margin-right: 10px;
    font-size: 18px;
}

.list-header a {
    color: white;
    text-decoration: none;
}

.modern-list-container {
    padding: 10px;
}

/* List Items */
.modern-list-item {
    display: flex;
    align-items: flex-start;
    /* Changed from center to align top */
    padding: 8px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease, transform 0.2s ease;
}

.modern-list-item:last-child {
    border-bottom: none;
}

.modern-list-item:hover {
    transform: translateY(-2px);
    /* Reduced movement */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: #f9f9f9;
}

.item-poster {
    position: relative !important;
    overflow: hidden !important;
    width: 60px;
    /* Fixed width for consistency */
    height: 85px;
    /* Fixed height for consistency */
    flex-shrink: 0;
    margin-right: 15px;
    border-radius: 4px;
    background: #eee;
}

.item-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensure image covers the area */
    display: block;
    transition: all 0.3s ease;
}

.item-desc {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9) !important;
    color: #fff !important;
    padding: 10px;
    font-size: 11px;
    line-height: 1.3;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10 !important;
    display: none !important;
    /* Hidden because thumbnails are too small (60x85) for text overlay */
}

/* Description hidden */
.modern-list-item:hover .item-desc {
    display: none !important;
}


.modern-list-item:hover .item-poster img {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}

.item-content {
    flex-grow: 1;
    min-width: 0;
    /* Prevent flex overflow */
}

.item-title {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    margin-bottom: 5px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-title:hover {
    color: #e74c3c;
}

.item-meta {
    font-size: 11px;
    color: #777;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.meta-quality {
    color: #fff;
    font-weight: bold;
    background: #27ae60;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

.meta-lang {
    color: #fff;
    font-weight: bold;
    background: #2980b9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

.meta-year {
    color: #7f8c8d;
    background: #ecf0f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

/* Scrollbar styling for the list if desired */
.modern-list-container {
    /* max-height: 400px; overflow-y: auto; */
    /* Or just show simple list */
}

/* See More Button */
.list-footer {
    text-align: right;
    padding: 8px 15px;
    background: #f4f4f4;
    font-size: 12px;
    border-top: 1px solid #eee;
}

.list-footer a {
    color: #555;
    font-weight: bold;
    text-decoration: none;
}

.list-footer a:hover {
    color: #333;
}

/* =====================================================
   SECTION UNIFIÉE DERNIERS AJOUTS
   ===================================================== */
.latest-releases-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin: 24px 0;
    border: 1px solid #e2e8f0;
}

.latest-releases-header {
    background: #0f172a;
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid #1e293b;
}

.latest-header-left h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.latest-releases-subtitle {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 3px;
    display: block;
}

.latest-filter-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 41, 59, 0.6);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-tab {
    background: transparent;
    color: #94a3b8;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.filter-tab.active {
    background: #334155;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
    .latest-releases-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .latest-filter-tabs {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
    }
}

.latest-releases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 16px;
    padding: 18px;
    background: #f8fafc;
}

@media (max-width: 576px) {
    .latest-releases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }
}

.latest-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.latest-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #cbd5e1;
}

.latest-poster-wrap {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    background: #1e293b;
}

.latest-poster-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.latest-card:hover .latest-poster-img {
    transform: scale(1.06);
}

.latest-cat-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
    color: #38bdf8;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 5px;
    max-width: 125px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 2;
    display: inline-block;
}

.latest-cat-badge a {
    color: #38bdf8 !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.latest-year-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #e11d48;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    z-index: 2;
}

.latest-year-badge:empty {
    display: none !important;
}

.latest-time-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.latest-time-badge i {
    color: #ffffff;
    font-size: 10px;
}

.latest-quality-tag {
    background: #10b981;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-block;
    margin-left: auto;
}

.latest-quality-tag:empty,
.meta-lang:empty {
    display: none !important;
}

.meta-lang {
    background: #0284c7;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    white-space: nowrap;
}

.latest-card-title {
    margin: 0 0 6px 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.latest-card-title a {
    color: #0f172a;
    text-decoration: none;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    transition: color 0.2s ease;
}

.latest-card-title a:hover {
    color: #2563eb;
}

.latest-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #64748b;
    gap: 6px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
}