/**
 * Name: Стиль Киного
 * Description: Шаблон онлайн кинотеатра
 * Author: kinq
 * Version: 0.1
 * Website: https://kinq.dev
 */
 .franchise-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}
.franchise-header-block {
    padding: 12px 15px 15px;
    border-bottom: 1px solid #111;
    border-left: 1px solid #404040;
    margin: 0;
}
.franchise-content-block {
    width: 100%;
}
.subtitle {
    margin-top: 5px;
}
.franchise-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
.search-container {
    flex: 1;
    position: relative;
}
#franchise-search {
        display: block;
        border: 0;
        background: #363636 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAI9JREFUKBVlkCEWg0AMRCORHAFZiayrLI7KOuqQKyt79M8bOtnHAmZJ5ieZJCIigB54A1/gByzATVr9DBWLIzAAswvuR/AFlJrwD/D0hG5POWjH/O101oYE5ekCSmyaAB9g8sT62Kua9NlR5pV4JGVIC66ZS1jbSlBBnmh1PJ9hmVd3Fe2bHs7Uwk2lA5+pbE82uCJXmgP1AAAAAElFTkSuQmCC) no-repeat 6px 50%;
        border-bottom: 1px solid #202020;
        padding: 0 10px 0 24px;
        width: 100%;
        height: 32px;
        color: #ddd;
        border-radius: 2px;
        outline: 0;
        box-sizing: border-box;
}
#franchise-search:focus {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}
.franchise-controls button[type=submit] {
    position: absolute;
    right: 4px;
    top: 3px;
    background: #242424;
    color: #aaa;
    font-size: 11px;
    cursor: pointer;
    padding: 8px;
    height: 25px;
    z-index: 3;
    border: 1px solid #404040;
    transition: 0.2s;
}
.franchise-controls button[type=submit]:hover {
     color: silver;
     background: #242424;
}
.search-status {
    text-align: center;
    padding: 15px;
    margin: 20px 0;
    color: #bbb;
    background: rgba(34, 34, 34, 0.7);
    border-radius: 8px;
    font-size: 16px;
    display: none;
}
.search-status.active {
    display: block;
}
.search-status .highlight {
    color: #ff9800;
    font-weight: bold;
}
.no-results-message {
    text-align: center;
    padding: 50px 20px;
    color: #bbb;
    background: rgba(34, 34, 34, 0.7);
    border-radius: 8px;
    font-size: 16px;
}
.search-active-notice {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(34, 34, 34, 0.7);
    padding: 10px 15px;
    color: #fff;
    border-top: 1px solid #404040;
    border-bottom: 1px solid #111;
    border-left: 1px solid #404040;
}
.search-active-notice .highlight {
    color: #ff9800;
    font-weight: bold;
}
.search-active-notice .reset-search {
    display: inline-block;
    background: #242424;
    border: 1px solid #404040;
    outline: 1px solid #111;
    text-decoration: none;
    color: silver;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 16px;
    cursor: pointer;
    border-radius: 1px;
    transition: .1s;
}
.search-active-notice .reset-search:hover {
        background-color: #404040;
    text-decoration: none;
}
.search-loader {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
}
.search-loader span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5722;
    margin: 0 2px;
    animation: search-loader 0.8s infinite ease-in-out;
}
.search-loader span:nth-child(2) {
    animation-delay: 0.2s;
}
.search-loader span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes search-loader {
    0%, 100% {
        transform: scale(0.3);
    }
    50% {
        transform: scale(1);
    }
}
.view-toggle {
    display: flex;
    gap: 10px;
    margin-left: 12px;
}
.franchise-controls.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.franchise-controls.disabled .search-container,
.franchise-controls.disabled .view-toggle {
    cursor: not-allowed;
}

.franchise-controls.disabled .search-container input,
.franchise-controls.disabled .search-container button,
.franchise-controls.disabled .view-btn {
    cursor: not-allowed !important;
}
.view-btn {
    display: inline-block;
    background: #242424;
    border: 1px solid #404040;
    outline: 1px solid #111;
    text-decoration: none;
    color: silver;
    padding: 5px 12px;
    font-size: 12px;
    line-height: 0;
    cursor: pointer;
    border-radius: 1px;
    transition: .1s;
}
.view-btn svg {
    display: block;
}
.view-btn:hover {
    background: #3a3a3a;
    color: #fff;
}
.view-btn.active {
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
}
.franchise-list {
    display: grid;
    gap: 15px;
}
.view-list {
    grid-template-columns: 1fr !important;
    gap: 0;
}
.view-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 15px;
    border-top: 1px solid #404040;
    border-bottom: 1px solid #111;
    border-left: 1px solid #404040;
}
.franchise-item {
    display: flex;
    padding: 15px 15px 15px 15px;
    border-top: 1px solid #404040;
    border-bottom: 1px solid #111;
    border-left: 1px solid #404040;
    font: normal 13px Tahoma;
    min-height: 120px;
    text-decoration: none;
    position: relative;
    transition: 0.1s;
    gap: 20px;
}
.franchise-item:nth-child(2n) {
    background: rgba(255, 255, 255, 0.03);
}
.franchise-item:hover {
    background: rgba(0, 0, 0, 0.1);
}
.franchise-poster {
    flex: 0 0 130px;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #272727;
}
.franchise-item:hover .franchise-poster{
    background: #181818;
}
.parts-badge {
    z-index: 2;
    position: absolute;
    bottom: 0px;
    left: 0px;
    background: rgba(173, 22, 22, 0.78);
    line-height: 22px;
    padding-right: 8px;
    padding-left: 10px;
    font-size: 11px;
    color: #ddd;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.53);
    box-shadow: -2px 2px 3px rgba(0, 0, 0, 0.4);
}
.franchise-poster img {
    width: 100%;
    height: 100%;
    transition: 0.1s;
    object-fit: contain;
}
.franchise-item:hover .franchise-poster img {
    filter: grayscale(0.3) brightness(0.7);
}
.franchise-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.franchise-content h3 {
    font-size: 14px;
    line-height: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 1px 1px #111;
    color: #e0dfdc;
    text-overflow: ellipsis;
    flex: 1;
    max-height: 20px;
    overflow: hidden;
}
.franchise-content h3 a {
    text-decoration: none;
    transition: color 0.2s ease;
}
.franchise-content h3 a:hover {
    color: #ffb74d;
}
.franchise-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.franchise-meta-top {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 10px;
}
.meta-item {
    font-size: 13px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 5px;
}
.meta-item.views-count i {
    color: #64b5f6;
}
.meta-item.rating i {
    color: #ffd54f;
}
.franchise-descr {
    font-size: 13px;
    color: #a8a8a8;
    flex: 1;
    line-height: 18px;
    max-height: 132px;
    overflow: hidden;
}
.franchise-count {
    display: inline-block;
    background: rgba(0, 0, 0, 0.39);
    border: 1px solid #404040;
    text-decoration: none;
    color: silver;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 16px;
    border-radius: 1px;
    transition: .1s;
}
.watch-all {
    display: inline-block;
    background: #242424;
    border: 1px solid #404040;
    outline: 1px solid #111;
    text-decoration: none;
    color: silver;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 16px;
    cursor: pointer;
    border-radius: 1px;
    transition: .1s;
}
.watch-all:hover {
    background-color: #404040;
    color: #fff;
}
.pagination {
    padding: 20px 0 16px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-top: 1px solid #404040;
    border-bottom: 1px solid #111;
    border-left: 1px solid #404040;
}
.no-items {
    border-top: 1px solid #404040;
    border-bottom: 1px solid #111;
    border-left: 1px solid #404040;
    padding: 16px;
}
.pagination a, .pagination span {
    background: #242424;
    border: 1px solid #4d4c4c;
    color: #7e7d7d;
    padding: 2px 6px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 3px;
}
.pagination a:hover {
    background: #444;
}
.pagination span {
    background: #2b2b2b;
    border: 1px solid #3d3d3d;
    color: #464646;
    font-size: 12px;
    padding: 3px 6px;
}
.view-grid .franchise-item {
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid #404040;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    gap: 0;
}
.view-grid .franchise-item:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}
.view-grid .franchise-poster {
    flex: 0 0 auto;
    height: 284px;
    width: 100%;
    margin: 0;
}
.view-grid .franchise-content {
    background: rgb(0 0 0 / 8%);
    padding: 7px;
    border-top: 1px solid #404040;
    border-bottom: 1px solid #111;
}
.view-grid .franchise-content h3 {
    font-size: 16px;
    text-align: center;
    margin-bottom: 0px;
    max-height: none;
}
.view-grid .franchise-meta-top {
    justify-content: center;
}
.view-grid .franchise-descr {
    -webkit-line-clamp: 8;
    line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 132px;
    text-align: center;
    margin-bottom: 0px;
    display: none;
}
.view-grid .franchise-meta {
    flex-direction: column;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
}
.view-grid .franchise-count {
    text-align: center;
    margin-bottom: 5px;
}
.view-grid .watch-all {
    width: 80%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.franchise-detail {
    max-width: 1200px;
    margin: 0 auto;
    color: #ddd;
    font-family: Tahoma, Arial, sans-serif;
}
.franchise-detail-block {
    padding: 20px;
    box-shadow: 0 1px #404040;
    border-bottom: 1px solid #111;
    border-left: 1px solid #404040;
}

.franchise-detail-block:last-child {
    margin-bottom: 0;
}
.franchise-title-wrapper {
    display: flex;
    position: relative;
    margin-bottom: 20px;
    align-items: flex-start;
}
.back-button {
    display: inline-block;
    background: #242424;
    border: 1px solid #404040;
    outline: 1px solid #111;
    text-decoration: none;
    color: silver;
    font-size: 13px;
    line-height: 16px;
    cursor: pointer;
    border-radius: 1px;
    transition: .1s;
    margin-right: 12px;
    padding: 1px 12px 3px;
}
.back-button:hover {
    background-color: #404040;
    color: #fff;
}
.back-button:before {
    font-size: 20px;
}
.rating-display {
    display: flex;
    margin-left: auto;
}
.franchise-title-wrapper .rating {
    width: 170px;
    height: 17px;
    display: inline-block;
    position: relative;
}
.franchise-title-wrapper .unit-rating {
    width: 170px;
    height: 17px;
    position: relative;
    background: url(../../../img/rating.svg) repeat-x;
    list-style: none;
    margin: 0;
    padding: 0;
}
.franchise-title-wrapper .current-rating {
    background: url(../img/rating.svg) 0 -33px;
    display: block;
    height: 17px;
    position: absolute;
    text-indent: -9000px;
    z-index: 1;
    float: left;
    margin: 0;
    padding: 0;
}
.star {
    color: #666;
    font-size: 16px;
}
.star.filled {
    color: #ff9800;
}
.rating-value {
    font-size: .6875rem;
    line-height: 18px;
    width: 28px;
    text-align: center;
    background: #222;
    color: #000000;
    border-radius: 2px;
    text-shadow: 1px 1px #ffffff30;
}
.franchise-title {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 21px;
    margin: 0;
    position: relative;
}
.related-section h2.franchise-title {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 21px;
    margin: 0;
    position: relative;
    border-bottom: 1px solid #111;
    border-left: 1px solid #404040;
    padding: 15px 20px;
    box-shadow: 0 1px #404040;
}
.parts-count-badge {
    color: #aaa;
    font-size: 0.8em;
    margin-left: 10px;
    font-weight: normal;
    background: rgba(0, 0, 0, 0.25);
    padding: 3px 8px;
    border-radius: 3px;
    vertical-align: middle;
}
.franchise-detail .franchise-header {
    display: flex;
    gap: 20px;
}
.franchise-detail .franchise-poster {
    flex: 0 0 200px;
    height: 300px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background: #272727;
}
.franchise-item:hover .franchise-poster{
    background: #181818;
}
.franchise-detail .franchise-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.franchise-detail .franchise-meta {
    color: #bbb;
    display: block;
}
.franchise-detail .meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}
.franchise-detail .meta-label {
    color: #999;
    font-weight: normal;
}
.franchise-detail .meta-value {
    color: #ddd;
}
.franchise-meta {
    display: flex;
    justify-content: space-between;
}
.franchise-detail .parts-count {
    background: rgba(173, 22, 22, 0.7);
    padding: 3px 6px;
    border-radius: 3px;
    color: #fff;
    font-weight: bold;
}
.franchise-detail .franchise-description {
    line-height: 1.4;
    color: #aaa;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.franchise-detail .franchise-content {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.franchise-detail table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #404040;
}
.franchise-detail table th {
    background: rgba(0, 0, 0, 0.5);
    color: #ddd;
    text-align: left;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 1px solid #555;
}
.franchise-detail table td {
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    color: #bbb;
    font-size: 14px;
    vertical-align: middle;
}
.franchise-detail table tr:last-child td {
    border-bottom: none;
}
.franchise-detail table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}
.franchise-detail table tr:hover {
    background: rgba(0, 0, 0, 0.2);
}
.franchise-table-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.franchise-table-header {
    display: flex;
    background: rgba(0, 0, 0, 0.5);
    color: #ddd;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 1px solid #555;
}
.franchise-table-body {
    display: flex;
    flex-direction: column;
}
.franchise-table-row {
    display: flex;
    padding: 10px 20px 10px 0;
    border-left: 1px solid #404040;
    text-decoration: none;
    font-size: .8125rem;
    color: #e0dfdc;
    border-bottom: 1px solid #111;
    box-shadow: 0 1px #404040;
}
.franchise-table-row:last-child {
    border-bottom: none;
}
.franchise-table-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}
.franchise-table-row:hover {
    background: rgba(0, 0, 0, 0.2);
}
.table-cell {
    display: flex;
    align-items: center;
    position: relative;
}
.number-cell {
    flex: 0 0 45px;
    justify-content: center;
}
.poster-cell {
    flex: 0 0 80px;
    margin-right: 12px;
    height: 120px;
    background: #373737;
    border-radius: 3px;
}
.poster-cell img {
    max-width: 80px;
    height: 100%;
    display: block;
    border-radius: 3px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
.title-cell {
    flex: 1;
}
.title-cell a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.2s;
    margin-bottom: 4px;
}
.title-cell a:hover {
    color: #ff9800;
}
.title-cell .type_mini {
    display: block;
    font-size: 11px;
    color: #888;
    font-style: normal;
    margin-top: 4px;
}
.year-cell {
    flex: 0 0 60px;
    justify-content: end;
}
.rating-cell {
    flex: 0 0 70px;
    justify-content: end;
}
.type-cell {
    flex: 0 0 45px;
}
.player-cell {
    flex: 0 0 70px;
    justify-content: end;
}
.parts-count-badge-title {
    padding: 4px 10px;
    border: 1px solid #404040;
    outline: 1px solid #111;
    line-height: 16px;
    border-radius: 1px;
    transition: .1s;
    margin-left: 7px;
    font-size: 13px;
}

.play-button {
    display: inline-block;
    background: #242424;
    border: 1px solid #404040;
    outline: 1px solid #111;
    text-decoration: none;
    color: silver;
    font-size: 12px;
    line-height: 0;
    cursor: pointer;
    border-radius: 1px;
    transition: .1s;
    padding: 5px 12px;
    text-align: center;
}
.play-button:hover {
    background-color: #404040;
    color: #fff;
}
.play-button svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    vertical-align: middle;
}
.play-button.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}
.play-button.unavailable:hover {
    background-color: #242424;
    color: silver;
}
.play-button.unavailable:hover:after {
    content: "Недоступно";
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ddd;
    padding: 11px 6px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10000;
}
.no-player {
    font-size: 14px;
    color: #888;
    padding: 10px 0;
    text-align: center;
}
.player-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.player-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: #000;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}
.player-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 5px;
}
.player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.player-modal .close {
    position: absolute;
    top: -35px;
    right: -35px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}
.player-modal .close:hover {
    color: #ff5722;
}
.related-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #ddd;
}
.related-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}
.related-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #404040;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.related-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}
.related-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.related-item-title {
    padding: 10px;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.related-item-title a {
    color: #ddd;
    text-decoration: none;
}
.related-item-title a:hover {
    color: #ff9800;
}



.franchise-average-rating {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #404040;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 5px;
}
.average-rating-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.average-rating-value {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.average-rating-value .label {
    font-size: 16px;
    color: #aaa;
    margin-right: 10px;
}
.average-rating-value .value {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    margin-right: 15px;
}
.average-rating-value .rating {
    display: inline-block;
    width: 170px;
    height: 16px;
    position: relative;
    vertical-align: middle;
}
.average-rating-value .unit-rating {
    width: 170px;
    height: 16px;
    position: relative;
    background: url(../../../img/rating.svg) repeat-x;
    list-style: none;
    margin: 0;
    padding: 0;
}
.average-rating-value .current-rating {
    background: url(../../../img/rating.svg) left bottom repeat-x;
    position: absolute;
    height: 16px;
    display: block;
    text-indent: -9000px;
    z-index: 1;
}
.average-rating-votes {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
}
.no-rating-message {
    font-size: 14px;
    color: #888;
    padding: 10px 0;
    text-align: center;
}

.franchise-title-wrapper .rating-display .rating span {
    font-size: 9px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.source-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: white;
    vertical-align: middle;
    position: absolute;
    bottom: 0;
    left: 0;
}
.db-badge {
    background-color: #5cb85c;
}
.custom-badge {
    background-color:#8a560d;
}
.rating-value[style*="background-color: #ffff00"],
.rating-value[style*="background-color: #FFFF00"] {
    color: #000;
}
.breadcrumbs {
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid #404040;
    border-bottom: 1px solid #111;
    border-left: 1px solid #404040;
}
.breadcrumbs-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}
.breadcrumbs-item {
    display: inline-block;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.breadcrumbs-item a {
    color: #a3a3a3;
}
.breadcrumbs-item a:hover {
    text-decoration: underline;
    color:rgb(255, 255, 255);
}
.breadcrumbs-current {
    color: #666;
    font-weight: 500;
}
.breadcrumbs-separator {
    margin: 0 8px;
    color: #ccc;
}
.search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.search-btn {
    transition: opacity 0.3s;
}
.franchise-error-404 {
    text-align: center;
    padding: 50px 15px 50px 15px;
    margin: 0 auto;
    border-top: 1px solid #404040;
    border-bottom: 1px solid #111;
    border-left: 1px solid #404040;
}
.franchise-error-404 h1 {
    font-size: 32px;
    margin-bottom: 20px;
}
.button-error {
    display: inline-block;
    background: #242424;
    border: 1px solid #404040;
    outline: 1px solid #111;
    text-decoration: none;
    color: silver;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 16px;
    cursor: pointer;
    border-radius: 1px;
    transition: .1s;
    margin-top: 15px;
}
.franchise-error-grid a{
    height: 100%;
    position: relative;
    display: block;
    text-decoration: none;
}
.button-error:hover {
    background-color: #404040;
    color: #fff;
}
.recommended-error-franchises {
    margin-top: 50px;
    text-align: left;
}
.recommended-error-franchises h2 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
}
.franchise-error-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.franchise-error-card {
    overflow: hidden;
    transition: transform 0.3s;
}

.franchise-error-card img {
    width: 100%;
    object-fit: contain;
    border-radius: 3px;
}
.franchise-error-card-content {
    padding: 5px 2px 10px;
    text-decoration: none;
}
.franchise-error-card-content a {
    text-decoration: none;
}
.franchise-error-card a:hover h3 {
    color:#fff
}
.franchise-error-card h3 {
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.franchise-error-card .parts-count {
    color: #777;
    font-size: 11px;
    margin-top: 3px;
}

.franchise-detail .table-cell.player-cell {
    text-align: center;
}
.franchise-fullstory-widget {
    background: rgba(0, 0, 0, 0.2);
    padding: 0 0 10px;
}
.franchise-fullstory-header {
    justify-content: space-between;
    display: flex;
    align-items: center;
    color: #e0dfdc;
    padding: 10px 20px;
    font-size: 14px;
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
}
.franchise-fullstory-header h3 {
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    color: #fff;
}
.franchise-fullstory-header h3 a {
    color: #a4a4a4;
    text-decoration: none;
    transition: color 0.2s;
}
.franchise-fullstory-header h3 a:hover {
    color: #4a76a8;
}
.franchise-fullstory-navigation {
    display: flex;
    gap: 10px;
}
.franchise-fullstory-nav-button {
    display: inline-block;
    background: #242424;
    border: 1px solid #404040;
    outline: 1px solid #111;
    text-decoration: none;
    color: silver;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 16px;
    cursor: pointer;
    border-radius: 1px;
    transition: .1s;
}
.franchise-fullstory-nav-button:hover {
    background-color: #404040;
    color: #fff;
}
.franchise-fullstory-nav-button.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
.franchise-fullstory-table-row {
    display: flex;
    text-decoration: none;
    position: relative;
    align-items: center;
    line-height: 16px;
    min-height: 40px;
    padding: 8px 10px 8px 0;
    color: #ccc;
    background: #111;
    text-shadow: 0 1px 1px #0009;
    transition: background-color .2s;
    border-bottom: 1px solid #1e1e1e;
    border-top: 1px solid #00000000;
    border-left: 3px solid #7878781a;
}
.franchise-fullstory-table-row.current-item {
    background-color: #1a2332;
    border-left: 3px solid #4a76a8;
    color: #fff;
}
.franchise-fullstory-table-row.current-item:hover {
    background-color: #1a2332;
}
.franchise-fullstory-number-cell {
    flex: 0 0 40px;
    display: flex;
    justify-content: center;
}
.franchise-fullstory-poster-cell {
    position: relative;
    width: 50px;
    height: 75px;
    background: #3b3b3b73;
    display: flex;
}
.franchise-fullstory-table-cell a {
    text-decoration: none;
}
.franchise-fullstory-title-cell {
    flex: 1;
    text-align: left;
    margin-left: 20px;
}
.franchise-fullstory-poster-cell a {
    display: flex;
    align-items: center;
}
.franchise-fullstory-year-cell {
    flex: 0 0 60px;
    display: flex;
    justify-content: center;
}
.franchise-fullstory-rating-cell {
    flex: 0 0 80px;
    display: flex;
    justify-content: center;
}
.franchise-fullstory-player-cell {
    flex: 0 0 80px;
    display: flex;
    justify-content: center;
}
.franchise-fullstory-poster-cell img {
    height: auto;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    width: 100%;
}
.title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.title-wrapper .type_mini {
    font-size: 11px;
    color: #969696;
    margin-top: 2px;
    font-style: normal;
    border-radius: 3px;
    display: inline-block;
}
.franchise-fullstory-table-row:hover {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid #1e1e1e;
    border-top: 1px solid #1e1e1e00;
}
.franchise-fullstory-show-more {
    margin-top: 15px;
    text-align: center;
}
.franchise-fullstory-show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #242424;
    border: 1px solid #404040;
    outline: 1px solid #111;
    text-decoration: none;
    color: silver;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 16px;
    cursor: pointer;
    border-radius: 1px;
    transition: all 0.3s ease-in-out;
}
.franchise-fullstory-show-more-btn:hover {
    background-color: #404040;
    color: #fff;
}
.franchise-fullstory-show-more-btn .btn-arrow {
    transition: transform 0.15s ease-in-out;
    transform: rotate(0deg);
}
.franchise-fullstory-show-more-btn.active .btn-arrow {
    transform: rotate(180deg);
}
.source-badge {
    font-size: 9px;
}
.franchise-fullstory-item.hidden {
    display: none;
}

.franchise-fullstory-header h3 svg {
    width: 16px;
    margin-right: 10px;
    margin-top: 2px;
}
.link-icon {
    width: 12px;
    height: 12px;
    margin-left: 5px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    vertical-align: middle;
    fill: currentColor;
}
.franchise-fullstory-table-row:hover .link-icon {
    opacity: 1;
}
.franchise-fullstory-table-cell a:hover .link-icon {
    opacity: 1;
}
.franchise-sidebar-header {
    display: flex;
    padding: 7px 20px;
    color: #f3f3f3;
    font-size: 15px;
    font-weight: 700;
    text-shadow: 1px 1px #000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}
.franchise-sidebar-header a {
    margin-left: auto;
    font-size: 13px;
    font-weight: 400;
    text-shadow: none;
}
.franchise-sidebar-header a::after {
    content: '→';
    float: right;
    margin-left: 5px
}
.franchise-sidebar-content {
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}
.franchise-sidebar-item {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    transition: 0.2s;
}
.franchise-sidebar-item:hover {
    background: rgba(0, 0, 0, 0.2);
}
.franchise-sidebar-item:last-child {
    border-bottom: none;
}
.franchise-sidebar-poster {
    width: 60px;
    flex-shrink: 0;
    margin-right: 10px;
}
.franchise-sidebar-poster img {
    width: 100%;
    height: auto;
    border-radius: 3px;
}
.franchise-sidebar-info {
    flex-grow: 1;
    overflow: hidden;
}
.franchise-sidebar-title {
    font-weight: bold;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.franchise-sidebar-title a {
    color: #fff;
    text-decoration: none;
}
.franchise-sidebar-title a:hover {
    color: #ff9600;
}
.franchise-sidebar-stats {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 5px;
}
.franchise-sidebar-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #aaa;
}
.franchise-sidebar-stat-icon {
    font-size: 13px;
    width: 15px;
    text-align: center;
}

.empty-franchise-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #ccc;
    border-top: 1px solid #404040;
    border-bottom: 1px solid #111;
    border-left: 1px solid #404040;
}

.empty-franchise-message .sad-emoji {
    font-size: 64px;
    margin-bottom: 20px;
    filter: grayscale(0.3);
}

.empty-franchise-message .empty-text {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.empty-franchise-message .empty-subtitle {
    font-size: 16px;
    color: #bbb;
    max-width: 400px;
    line-height: 1.5;
}

.empty-franchise-message .empty-subtitle a {
    color: #ff9800;
    text-decoration: none;
    border-bottom: 1px dotted #ff9800;
    transition: color 0.2s ease;
}

.empty-franchise-message .empty-subtitle a:hover {
    color: #fff;
    text-decoration: none;
    border-bottom-color: #fff;
}

.empty-franchise-message.search-empty .sad-emoji {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-franchise-message.search-empty .empty-text {
    font-size: 20px;
    margin-bottom: 15px;
}

@media (max-width: 1200px) {
    .view-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .view-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .view-grid .franchise-poster {
        height: 280px;
    }
    .franchise-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    .back-button, .rating-display {
        margin: 10px 0;
    }
    .back-button {
        order: -1;
    }
    .franchise-title {
        font-size: 20px;
        width: 100%;
    }
    .rating-display {
        margin-left: 0;
        width: 100%;
    }
    .franchise-title-wrapper .rating {
        width: 170px;
        margin-top: 5px;
    }
    .franchise-detail .franchise-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .franchise-detail .franchise-poster {
        margin-bottom: 20px;
    }
    .franchise-detail .meta-item {
        justify-content: center;
    }


    .franchise-error-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .franchise-controls {
        flex-direction: column;
        gap: 15px;
    }
    .view-toggle {
        margin-left: 0;
        align-self: flex-end;
    }
    .view-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 10px;
        gap: 10px;
    }
    .view-grid .franchise-poster {
        height: 250px;
    }
    .view-grid .franchise-content {
        padding: 10px;
    }
    .view-grid .franchise-content h3 {
        font-size: 14px;
    }
    .franchise-table-header {
        display: none;
    }
    .franchise-table-row {
        flex-direction: column;
        padding: 15px;
        margin-bottom: 10px;
        border: 1px solid #404040;
    }
    .table-cell {
        padding: 8px 0;
        position: relative;
    }
    .table-cell:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 10px;
    }
    .poster-cell {
        text-align: center;
        flex: 0 0 auto;
    }
    .poster-cell img {
        max-width: 150px;
        margin: 0 auto;
    }
    .franchise-fullstory-header {
        flex-direction: column;
        gap: 10px;
    }
    .franchise-fullstory-table-row {
        flex-direction: column;
        padding: 10px 0;
    }
    .franchise-fullstory-table-cell {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 8px 15px;
    }
    .franchise-fullstory-table-cell:before {
        content: attr(data-label);
        font-weight: bold;
        text-align: left;
    }
    .franchise-fullstory-poster-cell {
        justify-content: center;
    }
    .franchise-fullstory-poster-cell img {
        max-width: 100px;
    }
    .empty-franchise-message {
        padding: 40px 15px;
    }
    .empty-franchise-message .sad-emoji {
        font-size: 48px;
    }
    .empty-franchise-message .empty-text {
        font-size: 20px;
    }
    .empty-franchise-message .empty-subtitle {
        font-size: 14px;
    }
}
@media (max-width: 576px) {
    .view-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 8px;
        padding: 8px;
    }
    .view-grid .franchise-poster {
        height: 220px;
    }
    .franchise-list.view-list .franchise-item {
        flex-direction: column;
        gap: 10px;
    }
    .franchise-list.view-list .franchise-poster {
        width: 100%;
        height: 220px;
        flex: 0 0 auto;
    }
    .franchise-meta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .watch-all {
        width: 100%;
        text-align: center;
    }
    .franchise-detail {
        padding: 10px;
    }
    .franchise-title {
        font-size: 22px;
    }
    .franchise-detail .franchise-header {
        padding: 15px;
    }
    .franchise-detail table th, 
    .franchise-detail table td {
        padding: 8px;
        font-size: 13px;
    }
    .related-items {
        grid-template-columns: repeat(2, 1fr);
    }
    .related-item img {
        height: 200px;
    }
    .franchise-average-rating {
        padding: 10px;
    }
    .average-rating-value {
        flex-direction: column;
        align-items: flex-start;
    }
    .average-rating-value .label {
        font-size: 14px;
        margin-bottom: 5px;
    }
    .average-rating-value .value {
        font-size: 18px;
        margin-right: 0;
        margin-bottom: 8px;
    }
    .average-rating-value .rating {
        margin-top: 5px;
    }
    .franchise-error-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 400px) {
    .view-grid {
        grid-template-columns: 1fr;
    }
    .view-grid .franchise-poster {
        height: 240px;
    }
    .related-items {
        grid-template-columns: 1fr;
    }
}

/* === MOBILE LAYOUT FOR FRANCHISE ROWS === */
@media (max-width: 768px) {
  .franchise-fullstory-table-row{
    display:grid;
    grid-template-columns: 32px 72px 1fr 54px; /* № | постер | текст | рейтинг/плеер */
    grid-template-areas:
      "num poster title rating"
      "num poster meta  player";
    gap:10px 12px;
    padding:12px 10px;
    align-items:center;
    border:0; /* убираем тяжёлые рамки */
    background: transparent;
  }

  /* базовые ячейки */
  .franchise-fullstory-table-cell{
    padding:0;
    border:0;
    text-align:left;
  }
  /* отключаем служебные подписи/черты, если есть */
  .franchise-fullstory-table-cell:before,
  .franchise-fullstory-table-cell .label,
  .franchise-fullstory-table-cell hr{ display:none !important; content:none; }

  /* № */
  .franchise-fullstory-number-cell{ grid-area:num; font-weight:600; text-align:center; opacity:.9; }

  /* Постер */
  .franchise-fullstory-poster-cell{
    grid-area:poster; width:72px; height:108px; overflow:hidden; border-radius:6px;
  }
  .franchise-fullstory-poster-cell img{ width:100%; height:100%; object-fit:cover; display:block; }

  /* Заголовок */
  .franchise-fullstory-title-cell{ grid-area:title; align-self:end; margin:0; }
  .franchise-fullstory-title-cell a{
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  }
  .franchise-fullstory-title-cell .type_mini{ margin-top:4px; font-size:12px; opacity:.85; }

  /* Мета (год и т.п.) */
  .franchise-fullstory-year-cell{ grid-area:meta; font-size:12px; opacity:.9; }

  /* Рейтинг */
  .franchise-fullstory-rating-cell{ grid-area:rating; justify-self:end; }

  /* Плеер/кнопка */
  .franchise-fullstory-player-cell{ grid-area:player; justify-self:end; }

  /* на всякий — убираем лишние отступы у «бейджей» рядом с постером/тайтлом */
  .franchise-fullstory-title-cell .badge,
  .franchise-fullstory-poster-cell .badge{ margin-top:6px; }
}

@media (max-width: 480px){
  .franchise-fullstory-table-row{
    grid-template-columns: 28px 64px 1fr 44px;
    gap:8px 10px; padding:10px 8px;
  }
  .franchise-fullstory-poster-cell{ width:64px; height:96px; }
  .franchise-fullstory-title-cell a{ -webkit-line-clamp:3; }
}


/* === FIX: строки внутри "показать ещё" остаются мобильными === */
@media (max-width: 768px){
  /* Любая обёртка, которая СОДЕРЖИТ наши ячейки — станет гридом */
  :where(.franchise-fullstory, .fullstory, .content, body)
  :where(.franchise-fullstory-table-row, .franchise-row, .spoiler-body > div, .spoiler_text > div, .spoiler-content > div, .more-items > div, .js-more > div, li, article, div)
  :has(> .franchise-fullstory-title-cell){
    display: grid !important;
    grid-template-columns: 32px 72px 1fr 54px !important;
    grid-template-areas:
      "num poster title rating"
      "num poster meta  player" !important;
    gap: 10px 12px !important;
    padding: 12px 10px !important;
    align-items: center !important;
    border: 0 !important;
    background: transparent !important;
  }

  /* Ячейки — общие правила (не зависят от класса-обёртки) */
  :is(.franchise-fullstory-number-cell,
      .franchise-fullstory-poster-cell,
      .franchise-fullstory-title-cell,
      .franchise-fullstory-year-cell,
      .franchise-fullstory-rating-cell,
      .franchise-fullstory-player-cell){
    padding: 0 !important;
    border: 0 !important;
    text-align: left !important;
  }

  .franchise-fullstory-number-cell { grid-area: num !important; font-weight: 600; text-align: center; }
  .franchise-fullstory-poster-cell { grid-area: poster !important; width: 72px; height: 108px; overflow: hidden; border-radius: 6px; }
  .franchise-fullstory-poster-cell img { width: 100%; height: 100%; object-fit: cover; display:block; }

  .franchise-fullstory-title-cell { grid-area: title !important; margin: 0; }
  .franchise-fullstory-title-cell a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .franchise-fullstory-title-cell .type_mini { margin-top: 4px; font-size: 12px; opacity: .85; }

  .franchise-fullstory-year-cell    { grid-area: meta !important; font-size: 12px; opacity: .9; }
  .franchise-fullstory-rating-cell  { grid-area: rating !important; justify-self: end; }
  .franchise-fullstory-player-cell  { grid-area: player !important; justify-self: end; }

  /* Глушим подписи/линии, если шаблон их вставляет */
  .franchise-fullstory-table-cell:before,
  .franchise-fullstory-table-cell .label,
  .franchise-fullstory-table-cell hr { display: none !important; content: none !important; }
}

@media (max-width: 480px){
  :where(.franchise-fullstory, .fullstory, .content, body)
  :where(.franchise-fullstory-table-row, .franchise-row, .spoiler-body > div, .spoiler_text > div, .spoiler-content > div, .more-items > div, .js-more > div, li, article, div)
  :has(> .franchise-fullstory-title-cell){
    grid-template-columns: 28px 64px 1fr 44px !important;
    gap: 8px 10px !important; padding: 10px 8px !important;
  }
  .franchise-fullstory-poster-cell { width: 64px; height: 96px; }
  .franchise-fullstory-title-cell a { -webkit-line-clamp: 3; }
}

/* Mobile-only: раскрыть спойлер и скрыть кнопку; на десктопе без изменений */
@media (max-width: 768px) {
  /* скрыть кнопку "показать ещё" */
  .franchise-fullstory-show-more-btn { display: none !important; }

  /* держать содержимое спойлера раскрытым */
  .franchise-fullstory [hidden] { display: block !important; }

  .franchise-fullstory .spoiler-body,
  .franchise-fullstory .spoiler_text,
  .franchise-fullstory .spoiler-content,
  .franchise-fullstory .more-items,
  .franchise-fullstory .js-more {
    display: block !important;
    max-height: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
  }
}

