/* Extracted from category.php. Keep selectors stable to preserve the legacy design. */

.category-page-card,
.category-pagination-card {
    background: linear-gradient(180deg, #1f232b 0%, #181c23 100%);
    border: 1px solid rgba(120, 170, 255, .10);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0,0,0,.28);
}

.category-page-head {
    padding: 14px 16px;
    background: linear-gradient(90deg, #213a5a 0%, #2e5b8f 50%, #24456b 100%);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.category-page-head h1 {
    margin: 0;
    color: #fff;
    line-height: 1.35;
    font-size: 26px;
    font-weight: 800;
    text-shadow: 0 1px 0 rgba(0,0,0,.2);
}

.category-description-box {
    position: relative;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
    color: #e6edf8;
}

.category-description-box h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
}

.category-description-content {
    color: rgba(255,255,255,.88);
    font-size: 15px;
    line-height: 1.8;
}

.category-description-excerpt,
.category-description-rest {
    max-width: 100%;
}

.category-description-content p:last-child {
    margin-bottom: 0;
}

.category-description-rest {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(120, 170, 255, .10);
}

.category-description-rest.is-open {
    display: block;
}

.category-readmore-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.category-readmore-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(120, 170, 255, .26);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(46, 91, 143, .96), rgba(78, 134, 214, .90));
    box-shadow: 0 10px 22px rgba(0,0,0,.22);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.category-readmore-btn:hover,
.category-readmore-btn:focus {
    background: linear-gradient(90deg, rgba(56, 111, 176, .98), rgba(94, 153, 231, .94));
    border-color: rgba(157, 203, 255, .40);
    box-shadow: 0 14px 28px rgba(0,0,0,.28);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    outline: none;
}

.category-readmore-btn::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .18s ease;
}

.category-readmore-btn[aria-expanded="true"]::after {
    transform: translateY(2px) rotate(225deg);
}

.category-page-body {
    padding: 12px;
}

.movie-grid {
    display: flex;
    flex-wrap: wrap;
    margin-right: -6px;
    margin-left: -6px;
}

.movie-col {
    padding-right: 6px;
    padding-left: 6px;
    margin-bottom: 12px;
}

.movie-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(180deg, #2b313d 0%, #202631 100%);
    border: 1px solid rgba(123, 170, 255, .10);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,.22);
}

.movie-card:hover,
.movie-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(0,0,0,.35);
    border-color: rgba(111, 175, 255, .35);
}

.movie-thumb-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.movie-thumb {
    position: relative;
    overflow: hidden;
    background: #161a20;
    aspect-ratio: 2 / 3;
}

.movie-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s ease;
}

.movie-card:hover .movie-thumb img,
.movie-card:focus-within .movie-thumb img {
    transform: scale(1.04);
}

.movie-overlay {
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0,0,0,.60), rgba(0,0,0,0));
    pointer-events: none;
}

.movie-badge-imdb,
.movie-badge-sound,
.movie-badge-resolution {
    position: absolute;
    z-index: 2;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    border-radius: 999px;
    padding: 8px 10px;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

.movie-badge-imdb {
    top: 8px;
    left: 8px;
    background: #e8c547;
    color: #111827;
}

.movie-badge-sound {
    top: 8px;
    right: 8px;
    background: #4467f2;
}

.movie-badge-resolution {
    left: 8px;
    bottom: 8px;
    background: rgba(10, 15, 25, .88);
    border: 1px solid rgba(255,255,255,.08);
}

.movie-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: center;
    padding: 12px 10px 14px;
}

.movie-year {
    display: block !important;
    width: 100% !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    text-align: center !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.movie-year a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 72px !important;
    padding: 8px 18px !important;
    margin: 0 auto !important;
    border-radius: 999px !important;
    background: rgba(78, 134, 214, .18) !important;
    border: 1px solid rgba(78, 134, 214, .18) !important;
    color: #9ec9ff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.movie-year a:hover,
.movie-year a:focus {
    background: rgba(78, 134, 214, .30) !important;
    color: #fff !important;
    text-decoration: none !important;
}

.movie-title {
    width: 100%;
    margin: 0;
    text-align: center;
    line-height: 1.45;
    font-size: 15px;
    min-height: calc(1.45em * 2);
}

.movie-title a {
    color: #fff;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.movie-title a:hover,
.movie-title a:focus {
    color: #8cc6ff;
    text-decoration: none;
}

.empty-state {
    width: 100%;
    text-align: center;
    color: #ff9d9d;
    padding: 18px 8px;
    font-size: 15px;
}

.category-pagination-card {
    margin-top: 12px;
    padding: 14px 10px;
}

.category-pagination-card .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.category-pagination-card .page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #222a35;
    border: 1px solid rgba(255,255,255,.06);
    color: #fff;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.category-pagination-card .page-numbers.current,
.category-pagination-card .page-numbers:hover,
.category-pagination-card .page-numbers:focus {
    background: #3d6ea8;
    border-color: #3d6ea8;
    color: #fff;
}

@media (max-width: 767.98px) {
    .category-page-head h1 {
        font-size: 21px;
    }

    .category-description-box h2 {
        font-size: 18px;
    }

    .category-description-content {
        font-size: 14px;
        line-height: 1.7;
    }

    .category-readmore-btn {
        width: 100%;
        max-width: 220px;
        min-height: 40px;
    }

    .movie-title {
        font-size: 14px;
    }

    .movie-content {
        padding: 10px 8px 12px;
    }

    .movie-year {
        margin-bottom: 8px !important;
    }

    .movie-year a {
        min-width: 68px !important;
        padding: 7px 16px !important;
        font-size: 12px !important;
    }

    .movie-badge-imdb,
    .movie-badge-sound,
    .movie-badge-resolution {
        font-size: 11px;
        padding: 6px 8px;
    }
}

@media (max-width: 575.98px) {
    .movie-thumb {
        aspect-ratio: 2 / 3.2;
    }

    .movie-badge-imdb,
    .movie-badge-sound,
    .movie-badge-resolution {
        font-size: 11px;
        padding: 6px 8px;
    }

    .movie-title {
        font-size: 13px;
        line-height: 1.4;
        min-height: calc(1.4em * 2);
    }

    .movie-content {
        padding: 8px 8px 10px;
    }

    .movie-meta {
        margin-bottom: 7px;
    }

    .movie-year-link {
        min-width: 56px;
        padding: 6px 12px;
        font-size: 12px;
        line-height: 1.2;
    }
}
