@charset "utf-8";
/* CSS Document */

@font-face {
    font-family: 'Gilroy-Regular';
    src: url('fonts/Gilroy-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    /* Цвета для тёмной темы */
    --dark-bg: #111111;
    --dark-card: #2D2D2D;
    --dark-zard: #79A3C3;
    --dark-tex: #e8e9ec;
    --dark-text: #e8e9ec;
    --dark-accent: #b3a57e;
    --dark-secondary: #DE9828;
    --dark-border: #3d3f4a;
    --dark-link: #4d9b6c;
    --dark-shadow: rgba(0, 0, 0, 0.2);
    --dark-section: #222222;
    --dark-section2: #181B20;
    --dark-update: #AAA;
    --dark-alphabet: #2a2d38;
    --dark-season: #2c2530;
    --dark-season-active: #ff9e46;
    --theme-card-bg: var(--dark-card);
    --theme-update-featured: #3a3a3a;
    
    /* Цвета для светлой темы */
    --light-bg: #F7F2E6;
    --light-card: #F9F9F9;
    --light-zard: #79A3C3;
    --light-tex: #e8e9ec;
    --light-text: #333330;
    --light-accent: #8a7e5d;
    --light-secondary: #b3a57e;
    --light-border: #d1d5db;
    --light-link: #2e7d52;
    --light-shadow: rgba(0, 0, 0, 0.1);
    --light-section: #f0f2f5;
    --light-update: #f5f7fa;
    --light-alphabet: #f0f2f5;
    --light-season: #f5f7fa;
    --light-season-active: #e67e22;
    
    /* Общие переменные (по умолчанию - тёмная тема) */
    --theme-bg: var(--dark-bg);
    --theme-card: var(--dark-card);
    --theme-zard: var(--dark-zard);
    --theme-tex: var(--dark-tex);
    --theme-text: var(--dark-text);
    --theme-accent: var(--dark-accent);
    --theme-secondary: var(--dark-secondary);
    --theme-border: var(--dark-border);
    --theme-link: var(--dark-link);
    --theme-shadow: var(--dark-shadow);
    --theme-section-bg: var(--dark-section);
    --theme-section-bg2: var(--dark-section2);
    --theme-update-item: var(--dark-update);
    --theme-alphabet-bg: var(--dark-alphabet);
    --theme-alphabet-border: var(--dark-border);
    --theme-alphabet-title: var(--dark-accent);
    --theme-alphabet-letter: var(--dark-text);
    --theme-season-card: var(--dark-season);
    --theme-season-active: var(--dark-season-active);
}

.light-theme {
    --theme-card: var(--light-card);
    --theme-bg: var(--light-bg);
    --theme-zard: var(--light-zard);
    --theme-tex: var(--light-tex);
    --theme-text: var(--light-text);
    --theme-accent: var(--light-accent);
    --theme-secondary: var(--light-secondary);
    --theme-border: var(--light-border);
    --theme-link: var(--light-link);
    --theme-shadow: var(--light-shadow);
    --theme-section-bg: var(--light-section);
    --theme-section-bg2: var(--light-section);
    --theme-update-item: var(--light-update);
    --theme-update-featured: #f8e9df;
    --theme-alphabet-bg: var(--light-alphabet);
    --theme-alphabet-border: var(--light-border);
    --theme-alphabet-title: var(--light-accent);
    --theme-alphabet-letter: var(--light-text);
    --theme-season-card: var(--light-season);
    --theme-season-active: var(--light-season-active);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--theme-text);
    background-color: var(--theme-bg);
    line-height: 1.6;
}

iframe { 
    border-color: var(--theme-border); 
}

a {
    text-decoration: none;
    color: var(--theme-accent);
}

a:hover {
    color: var(--dark-zard);
}

/* ========== СТИЛИ ДЛЯ HEADER ========== */
header {
    background-color: var(--theme-card);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    color: var(--theme-text);
    border: 1px solid var(--theme-border);
    overflow: visible;
    width: 100%;
    max-width: 1270px;
    margin: 0 auto;
}

/* Левое фоновое изображение */
header::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 94px;
    height: 70px;
    background: url(../../img/hbl.webp) no-repeat 0% 50%;
    background-size: contain;
    z-index: 0;
}

/* Правое фоновое изображение */
header::after {
    content: "";
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 88px;
    height: 70px;
    background: url(../../img/hb.webp) no-repeat 100% 50%;
    background-size: contain;
    z-index: 0;
}

/* Фиксация header */
header.fixed {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1270px;
    z-index: 1100;
    background: var(--theme-card);
    box-shadow: 0 5px 15px var(--theme-shadow);
    animation: slideDown 0.4s ease;
    margin: 0;
}

@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-100%); }
    to { transform: translateX(-50%) translateY(0); }
}

.header-content {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-menu {
    flex: 1;
    margin: 0 20px;
    position: relative;
}

.header-menu nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 15px;
}

.header-menu nav li {
    position: relative;
}

.header-menu nav a {
    text-transform: uppercase;
    display: block;
    padding: 5px 20px;
    border: 1px solid var(--theme-border);
    background: var(--theme-accent);
    color: var(--theme-border);
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s;
    text-align: center;
}

.header-menu nav a:hover {
    background: var(--theme-link);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--theme-shadow);
}

.game-block {
    width: 100%;
    margin-top: 15px;
    max-width: 900px;
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--theme-shadow);
    overflow: hidden;
}

.game-frame {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 600px; 
    background: #000;
}

.game-frame:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
}

.game-frame iframe,
.game-frame embed,
.game-frame object {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.fullscreen-button {
    background: var(--theme-accent);
    color: white;
    font-size: 10px;    
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    margin-bottom: 10px;
    transition: background 0.3s;
    text-transform: uppercase;
}

.fullscreen-button:hover {
    background: var(--theme-link);
}

.game-info {
    padding: 18px;
    text-align: left;
    color: var(--theme-text);
}

.game-info h2 {
    margin: 0 0 8px; 
    color: var(--theme-accent);
    text-transform: uppercase; 
    font-size: 14px;
    font-weight: 400;
}

.game-info li {
    padding: 5px;
    line-height: 1.4;
}

.game-info p {
    margin: 0;
    font-size: 1em;
    line-height: 1.4;
}

/* Выпадающие меню */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 355px;
    background: var(--theme-card);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--theme-shadow);
    z-index: 1200;
    display: none;
    padding: 10px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    margin: 5px 0;
    background: var(--theme-section-bg);
    border-radius: 5px;
    color: var(--theme-text);
    font-size: 14px;
    text-align: left;
}

.dropdown-menu a:hover {
    background: var(--theme-link);
    color: #fff;
}


body.menu-open {
    overflow: hidden;
}

.dropdown-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    left: 100%;
    top: 0;
    width: 220px;
    background: var(--theme-card);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--theme-shadow);
    display: none;
    padding: 10px;
}

.dropdown-submenu:hover .submenu {
    display: block;
}

.vpn-highlight {
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    animation: gradient-shift 3s linear infinite;
    filter: drop-shadow(0 0 8px rgba(255, 0, 255, 0.6)) drop-shadow(0 0 15px rgba(0, 255, 255, 0.4));
    display: inline-block;
}

@keyframes gradient-shift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.hr-line {
    width: 50%;
    margin: 5px 25% 15px 25%;
    padding: 0;
    height: 0;
    border: none;
    border-top: 1px solid #4C4C4C;
}

.season {
    display: flex;
    font-size: 18px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    margin: 10px 10px 0 10px;
}

.season p {
    color: #000;
    padding: 1px 7px;
    margin: 0 5px 8px 5px;
    box-sizing: border-box;
    background-color: #ffe391;
    text-decoration: none;
    letter-spacing: 0.4px;
    display: inline-block;
    flex-shrink: 0;
    width: var(--itemSize);
    height: var(--itemSize);
    border: 2px solid hsla(0,0%,100%,.6);
    border-radius: 4px;
    opacity: .8;
    font-family: Gilroy-Regular, sans-serif;
    text-align: center;
    font-size: 15px;
    transition: all .1s linear;
}

.season p a {
    text-decoration: none;
    color: #000;
}

.season p:hover {
    opacity: 1;
    border: 2px solid hsla(0,0%,100%,.6);
}

.season-title {
    font-size: 12px;
    text-transform: uppercase;
    padding: 10px 10px 15px 0;
    border-bottom: 1px solid var(--border-color-1);
    color: var(--theme-alphabet-title);
}

/* ========== МОБИЛЬНОЕ МЕНЮ ========== */
.mobile-menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1500;
}

.mobile-menu-backdrop.active {
    display: block;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(100%);
    width: 320px;
    max-width: 100vw;
    height: 100%;
    background: var(--theme-card);
    z-index: 2000;
    transition: transform 0.4s ease;
    padding: 20px;
    overflow-y: auto;
    box-shadow: -5px 0 15px var(--theme-shadow);
    border-left: 1px solid var(--theme-border);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: var(--theme-text);
    cursor: pointer;
    z-index: 2001;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--theme-section-bg);
    transition: all 0.3s;
}

.mobile-menu-close:hover {
    background: var(--theme-accent);
    color: white;
}

.mobile-menu-close::before {
    content: "×";
    display: inline-block;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    margin-top: 40px;
}

.mobile-menu-section {
    margin-bottom: 25px;
}

.mobile-menu-title {
    color: var(--theme-accent);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--theme-border);
    padding-bottom: 8px;
}

.mobile-menu a {
    display: block;
    padding: 12px 15px;
    margin: 6px 0;
    background: var(--theme-section-bg);
    border-radius: 5px;
    color: var(--theme-text);
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    font-size: 13px;
    transition: all 0.3s;
    border: 1px solid var(--theme-border);
}

.mobile-menu a:hover {
    background: var(--theme-accent);
    color: white;
    transform: translateX(5px);
}

/* Стили для блока алфавита и кнопки доната внутри бургер-меню */
.mobile-menu .mobile-alphabet-box {
    margin: 15px 0;
    padding: 12px 8px 25px 8px;
}

.mobile-menu .mobile-alphabet-box .alphabet-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.mobile-menu .mobile-alphabet-box .letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    font-size: 14px;
    border-radius: 4px;
    background: var(--theme-section-bg);
}

.mobile-menu .mobile-alphabet-box .letter:hover {
    transform: translateY(-2px);
}

.mobile-menu .mobile-donate-wrap {
    margin-top: 20px;
    text-align: center;
}

.mobile-menu .mobile-donate-wrap .sidebar-button2 {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    border-radius: 50px;
    border: 3px solid #fff;
}

.mobile-menu .mobile-donate-wrap .sidebar-button2:hover {
    transform: scale(1.03);
}

.mobile-submenu {
    padding-left: 20px;
    display: none;
    margin-top: 8px;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu a {
    padding: 8px 12px;
    margin: 4px 0;
    font-size: 13px;
    background: var(--theme-alphabet-bg);
}

.mobile-menu .menu-item[data-submenu] > a {
    position: relative;
    padding-right: 25px !important;
}

.mobile-menu-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: transform 0.3s;
}

.menu-item {
    position: relative;
}

.com2com {
    border: solid 1px var(--theme-border);
    box-sizing: border-box;
    padding: 7px;
    width: 99%;
    margin-top: 1px;
    margin-bottom: 5px;
    background-color: var(--theme-card);
}

.translation-tabs {
    display: flex;
    margin: 10px 10px;   
    flex-wrap: wrap;
    gap: 2px;    
    max-width: 100%;
    overflow-x: auto;           
}

.translation-tabs button {
    padding: 10px 25px;
    background: var(--theme-card);
    border: 1px solid var(--theme-border);
    cursor: pointer;
    font-size: 16px;
    font-family: Gilroy-Regular, sans-serif;
    outline: none;
    transition: all 0.2s;
    color: var(--theme-text);
}

.translation-tabs > div {
    cursor: pointer;
    background: var(--theme-card);
    margin-right: 2px;
}

.translation-tabs > .active,
.translation-tabs button.active {
    background: var(--theme-accent);
    color: #fff; 
}

.translation-tabs > .active button {
    background: var(--theme-accent); 
    color: #fff;
}

.translation-tabs button:focus {
    box-shadow: 0 0 0 2px var(--theme-link);
}
 
.tabs {
    display: flex;
    margin: 10px 10px;
    flex-wrap: wrap;
    gap: 2px;
    max-width: 100%;
    overflow-x: auto;         
}

.tabs > div {
    cursor: pointer;
    background: var(--theme-card);
    margin-right: 2px;
}

.tabs > div.active {
    background: var(--theme-accent);
    font-weight: bold; 
}
 
.tabs button {
    padding: 10px 25px;
    background: var(--theme-card);
    border: 1px solid var(--theme-border);
    cursor: pointer;
    font-size: 16px;
    outline: none;
    transition: background 0.2s;
    color: var(--theme-text);
}

.tabs > div.active button {
    background: var(--theme-accent); 
    color: #fff;
}

.tabs button:focus {
    box-shadow: 0 0 0 2px var(--theme-link);
}

.video-player-container {
    border: 2px solid var(--theme-accent); 
    border-radius: 8px; 
    overflow: hidden;  
    margin: 5px 10px 20px 10px;
    box-shadow: 0 0 10px var(--theme-accent);
} 

.page-wrapper {
    width: 100%;
    min-width: 320px;
    max-width: 1270px;
    margin: 0 auto;
    position: relative;
    z-index: 200;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--theme-card);
    box-shadow: 0 0 15px var(--theme-shadow);
} 

.player, .player-hood {
    width: 100%;
    margin: 0;
    padding: 0;
}

.ifr, .video-iframe {
    width: 100%;
    height: 400px;
    display: block;
    border: none;
}

.movies-section {
    background: var(--theme-section-bg);
    border-radius: 8px;
    padding: 15px;
    margin: 30px 0;
    box-shadow: 0 4px 12px var(--theme-shadow);
    border: 1px solid var(--theme-border);
}

.section-header h2 {
    color: var(--theme-accent);
    font-size: 28px;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
}

.movies-category {
    margin-bottom: 40px;
}

.movies-category:last-child {
    margin-bottom: 0;
}

.movies-category h3 {
    color: var(--theme-secondary);
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--theme-border);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.movie-card {
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 5px;
    overflow: hidden;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--theme-shadow);
    border: 1px solid var(--theme-border);
}

.movie-poster {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 5px;
    border: 1px solid var(--theme-border);
}

.movie-info {
    padding: 10px 5px;
    text-align: center;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.movie-title {
    color: var(--theme-text);
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 3px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-height: 2.8em;
    line-height: 1.3;
}

.movie-year {
    color: var(--theme-secondary);
    font-size: 12px;
}

.logo { 
    text-transform: uppercase;
    font-size: 22px;  
    padding-left: 30px;
    color: var(--theme-text); 
    text-decoration: none; 
    display: inline-block; 
    z-index: 1;
}

.logo a {
    display: block; 
    width: 250px;
    height: 50px;
    background: url('../../img/logo.webp') no-repeat center;
    background-size: contain;
    text-indent: -9999px; 
    z-index: 2;
    text-shadow: 1px 1px 0 var(--theme-shadow), 1px -1px 0 var(--theme-shadow), -1px 1px 0 var(--theme-shadow), -1px -1px 0 var(--theme-shadow);
    color: var(--theme-accent);
}

.logo a:hover {
    color: var(--theme-link);
}

.search-block-with-bg {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    z-index: 1;
}

.search-block-with-bg::before {
    content: "";
    display: block;
    inset: 0; 
    position: absolute;
    left: 80%;
    top: -27px;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: url('../../img/search.webp') no-repeat center/contain;
    pointer-events: none;
    z-index: 2;
}

.random-block-with-bg { 
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.games-block {
    position: relative;
    margin-top: 50px;
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    z-index: 1;
}

.games-block::before,
.games-block::after {
    content: "";
    position: absolute;
    top: -27px;
    height: 88px;
    z-index: 2;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

}

.games-block::before {
    left: -50px; 
    width: 180px;
    background-image: url('../../img/gp0.webp'); 
}

.games-block::after {
    right: 20px; 
    width: 65px;
    background-image: url('../../img/gp2.webp'); 
}

.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none; 
    text-align: center;
}

.sidebar-buttons2 {
    margin: 70px 0px 0px 0px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none; 
    text-align: center;
}

.sidebar-buttons2::before {
    content: "";
    position: absolute; 
    left: 54%;
    transform: translateX(-88%) translateY(-100%);
    width: 100%;
    height: 100px;
    background: url("../../img/jin.webp") no-repeat center top;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}

.sidebar-button { 
    width: 100%;  
    flex: 1;
    text-align: center;
    padding: 10px;
    background: var(--theme-section-bg);
    border: 1px solid var(--theme-border);
    border-radius: 5px;
    color: var(--theme-text);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-button:hover {
    background: var(--theme-accent);
    color: white;
}

/* Мультяшная светящаяся кнопка в стиле Disney */
.sidebar-button2 {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(145deg, #ff9e46, #DE9828);
    color: #fff !important;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 50px;
    border: 3px solid #fff;
    box-shadow: 0 0 15px rgba(222, 152, 40, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
    animation: disney-pulse 2s infinite ease-in-out;
}

.sidebar-button2:hover {
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 0 0 30px rgba(255, 158, 70, 0.9);
    background: linear-gradient(145deg, #ffb36b, #ff9e46);
    color: #fff;
}

.sidebar-button2::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    transition: 0.5s;
    pointer-events: none;
}

.sidebar-button2:hover::after {
    left: 120%;
}

@keyframes disney-pulse {
    0% { box-shadow: 0 0 10px rgba(222, 152, 40, 0.5); }
    50% { box-shadow: 0 0 25px rgba(255, 158, 70, 0.8); }
    100% { box-shadow: 0 0 10px rgba(222, 152, 40, 0.5); }
}

.seasons-container {
    background: var(--theme-section-bg);
    border-radius: 8px;
    padding: 15px 20px 20px 20px;
    margin: 20px 0;
    box-shadow: rgba(142, 142, 142, 0.24) 0px 2px 4px 0px, rgba(142, 142, 142, 0.24) 0px 2px 16px 0px;
}

.seasons-header {
    color: var(--theme-accent); 
    font-weight: 400;
    margin-bottom: 15px;
    text-transform: uppercase;  
    font-size: 14px; 
    text-align: center; 
}

.seasons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.seasons-grid-item {
    white-space: nowrap;
}

.season-card {
    background: var(--theme-season-card); 
    padding: 5px 20px 7px 20px;
    text-align: center;
    border-radius: 6px;
    font-weight: 400;
    transition: all 0.3s;
    border: 1px solid var(--theme-border);
}

.season-card.active {
    background: var(--theme-season-active);
    color: #fff;
    font-weight: 400;
    border-color: var(--theme-accent);
}

.season-link:hover .season-card {
    background: var(--theme-border);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px var(--theme-shadow);
}

.sidebar-menu-box {
    margin-bottom: 20px;
}

.sidebar-menu-list {
    display: flex;
    flex-direction: column;
    gap: 8px; 
}

.sidebar2 .sidebar-btn {
    letter-spacing: -0.3px;
    text-transform: uppercase;
    display: block;
    padding: 8px 10px;
    border: 1px solid var(--theme-border);
    background: var(--theme-accent);
    color: var(--theme-border) !important;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.3s;
    text-align: center;
    cursor: pointer;
    list-style: none;
}

.sidebar2 .sidebar-btn:hover {
    background: var(--theme-link);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--theme-shadow);
    color: #fff !important;
}

.sidebar2 .summary-btn {
    position: relative;
}

.sidebar2 .sidebar-btn::-webkit-details-marker {
    display: none;
}

.sidebar2 .summary-btn::after {
    content: '+';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: inherit;
}

details[open] > .summary-btn::after {
    content: '−';
}

.sidebar-submenu {
    margin-top: 5px;
    background: var(--theme-card);
    border: 1px solid var(--theme-border);
    border-radius: 5px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar2 .sub-item {
    display: block;
    padding: 6px;
    text-align: center;
    text-decoration: none;
    color: var(--theme-text) !important;
    font-size: 13px;
    border-radius: 3px;
    background: transparent;
    border: none;
}

.sidebar2 .sub-item:hover {
    background: var(--theme-section-bg);
    color: var(--theme-accent) !important;
}

.uff {
    font-size: 14px;
    margin-bottom: 20px;
    padding: 8px 15px;
    background-color: var(--theme-card);
    border-radius: 4px;
    border: 1px solid var(--theme-border);
    color: var(--theme-text);
    font-family: "Gilroy-Regular", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.uff .yel {
    color: var(--theme-accent); 
    text-decoration: none; 
    transition: color 0.3s;
}

.uff .yel:hover {
    color: var(--theme-link); 
    text-decoration: underline;
}
 
.uff .divider {
    color: var(--theme-secondary);
    margin: 0 5px;
}

.uff span:last-child {
    color: var(--theme-text);
    font-weight: 500;
}

.uff a {
    color: var(--theme-link);
    text-decoration: none;
}

.uff a:hover {
    color: var(--theme-accent);
    text-decoration: underline;
}

.uff .sep {
    margin: 0 5px;
    color: var(--theme-secondary);
}

.uff h1 {
    display: inline;
    font-size: inherit;
    font-weight: 400;
    margin: 0;
    color: var(--theme-text);
}

.con-meta4 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 20px 20px 20px;
    padding: 10px;
    background: var(--theme-section-bg);
    border-radius: 8px;
    border: 1px solid var(--theme-border);
    color: var(--theme-secondary);
    font-size: 14px; 
}

.con-meta {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 8px;
    border: 1px solid var(--theme-border);
    padding: 5px 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.con-meta .meta-item:not(.age-badge):not(.status-badge) {
    background-color: transparent;
}

.con-meta .meta-item:not(.highlight-date):not(.accent) {
    color: #e8e9ec; 
}

/* --- Сворачивание описания и кнопка "Читать далее" --- */
.con-description {
    text-align: left;
    color: var(--theme-text); 
    margin: 20px 10px 10px 10px;    
    padding: 15px 25px 15px 25px; 
    font-family: "Gilroy-Regular", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    word-spacing: 3px;
    line-height: 1.4;
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-section-bg);
    box-shadow: 0 4px 12px var(--theme-shadow);
}

.con-description p {
    padding: 5px 0;
    text-indent: 20px;
}

.con-description .desc-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.con-description .desc-content p:not(:first-child) {
    display: none;
}

.con-description .desc-toggle:checked ~ .desc-content p {
    display: block;
}

.read-more-inline {
    display: inline-block;
    cursor: pointer;
    margin-left: 8px;
    white-space: nowrap;
    text-indent: 0;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid #A86E43;
    border-radius: 3px;
    padding: 4px 3px 4px 5px;
    background: transparent;
    color: #A86E43;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    font-size: 0;
    vertical-align: baseline;
}

.read-more-inline::before {
    content: "Читать далее";
    font-size: 9px;
    line-height: 1;
}

.read-more-inline:hover {
    background-color: #A86E43;
    border-color: #A86E43;
}

.read-more-inline:hover::before {
    color: #1b1e22;
}

.con-description .desc-toggle:checked ~ .desc-content p:first-child .read-more-inline::before {
    content: "Свернуть";
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    color: var(--theme-text);
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 4px;
    background: rgba(0,0,0,0.05);
}

.meta-item.accent {
    color: var(--theme-accent);
    font-weight: 600;
    padding-left: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 74 48' fill='black'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6 12.1248C6 10.399 7.38744 9 9.09981 9H64.9002C66.6122 9 68 10.3993 68 12.1248V35.8753C68 37.601 66.6126 39 64.9002 39H9.09981C7.38781 39 6 37.6008 6 35.8753V12.1248Z' fill='%23E1BE00'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M54.1049 14.9226V20.8376C54.4818 20.4016 54.902 20.0763 55.3655 19.862C55.8292 19.6477 56.525 19.5397 57.068 19.5397C57.6936 19.5397 58.2358 19.6367 58.6955 19.8314C59.1556 20.0257 59.506 20.2983 59.7473 20.6489C59.9884 20.9997 60.1331 21.3432 60.1825 21.6792C60.2313 22.0152 60.256 22.7319 60.256 23.8298V28.9317C60.256 30.0222 60.1825 30.8338 60.0355 31.368C59.8881 31.9019 59.5429 32.3654 59 32.7574C58.4568 33.149 57.8125 33.3452 57.0655 33.3452C56.5301 33.3452 55.8375 33.2291 55.3736 32.9964C54.9097 32.7636 54.4855 32.4142 54.101 31.9484L53.8067 33.107H49.5542V14.9227L54.1049 14.9226ZM14.6312 33.1075H19.355V14.9231H14.6312V33.1075ZM27.0923 14.9226C27.2724 16.0235 27.461 17.3157 27.6585 18.7982L28.3354 23.4179L29.4294 14.9229H35.6V33.1073H31.4757L31.4607 20.8335L29.8087 33.1073H26.8618L25.1204 21.1004L25.1055 33.1073H20.9681V14.9229L27.0923 14.9226ZM40.74 14.923C43.0263 14.923 44.3418 15.028 45.1475 15.2374C45.9534 15.4465 46.5666 15.7903 46.9862 16.2689C47.4061 16.7474 47.6684 17.2802 47.7734 17.8668C47.8782 18.4537 47.9454 19.607 47.9454 21.3268V27.713C47.9454 29.343 47.8541 30.433 47.7005 30.9824C47.5466 31.5324 47.2787 31.9622 46.8966 32.2723C46.5139 32.5824 46.0419 32.7993 45.4796 32.9225C44.9171 33.0461 44.0702 33.1077 42.9386 33.1077H37.2154V14.9233L40.74 14.923ZM55.6978 28.6953C55.6978 29.5753 55.6541 30.1313 55.5668 30.3626C55.4793 30.5941 55.099 30.7105 54.8106 30.7105C54.5293 30.7105 54.3418 30.5988 54.2468 30.3748C54.1519 30.151 54.1048 29.64 54.1048 28.8411V24.0354C54.1048 23.2069 54.1465 22.6905 54.2298 22.4849C54.3132 22.2801 54.4953 22.1771 54.7763 22.1771C55.0643 22.1771 55.451 22.2941 55.5498 22.5292C55.6483 22.7643 55.6977 23.2664 55.6977 24.0348L55.6978 28.6953ZM42.987 18.196C43.1736 18.304 43.2933 18.4746 43.3453 18.7058C43.3974 18.9376 43.4239 19.4644 43.4239 20.2864V27.3364C43.4239 28.5471 43.3453 29.2883 43.1885 29.5611C43.0316 29.8343 42.6135 29.9704 41.9347 29.9704V18.0335C42.4493 18.0335 42.8003 18.0876 42.987 18.196Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 35px auto;
}

.meta-item.age-badge {
    background: var(--theme-accent);
    color: white; 
    width: 30px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    font-size: 11px;
}

.con-genre { 
    display: flex;
    gap: 8px;
    justify-content: center; 
    flex-wrap: wrap;
}

.con-genre span {
    border: 1px solid var(--theme-accent);
    background: #A86E43;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 9px;
    color: var(--theme-text);
    text-transform: uppercase;
}

.con-genre span .a {
    border: 1px solid var(--theme-accent);
    background: var(--theme-section-bg);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    color: var(--theme-text);
    text-transform: uppercase;
}

.con-header h2 {
    color: var(--theme-text);
    font-size: 24px;
    font-weight: 400;
    margin: 0 0 10px 0;
    text-align: center;
}

.con-subtitle {
    color: var(--theme-secondary);
    font-size: 16px; 
    text-align: center;
    margin-bottom: 20px;
}

.con-spotlight { 
    margin: 30px auto;
    text-align: center;
    background: var(--theme-section-bg);
    border-radius: 8px;
    padding: 10px;
    box-shadow: rgba(142, 142, 142, 0.24) 0px 2px 4px 0px, rgba(142, 142, 142, 0.24) 0px 2px 16px 0px;
}

.con-poster {
    margin: 10px 10px 0 10px;
    position: relative;
    display: inline-block;
}

.con-poster img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid var(--theme-border);
    box-shadow: 0 2px 8px var(--theme-shadow);
    display: block;
}

/* Стили для блока "Последние поступления" */
.sidebar-recent {
    background: var(--theme-alphabet-bg);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 10px;
    margin: 25px 0;
    position: relative;
}

.recent-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.recent-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.recent-card {
    display: block;
    text-decoration: none;
    transition: transform 0.3s;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--theme-border);
}

.recent-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px var(--theme-shadow);
}

.recent-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.recent-title {
    padding: 8px 5px;
    color: var(--theme-text);
    font-size: 10px;
    font-weight: 400;
    text-align: center;
    background: var(--theme-card);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    line-height: 1.3;
    word-break: break-word;
}

/* Меню и фоновые иконки */
.sidebar a:visited,
.header-categories a:visited {
    color: var(--theme-text);
}

.header-categories a:nth-child(1) { background: var(--theme-section-bg) url('../../img/iconmenu01.webp') no-repeat 5px center/114px 53px; }
.header-categories a:nth-child(2) { background: var(--theme-card) url('../../img/iconmenu02.webp') no-repeat 0px center/101px 53px; }
.header-categories a:nth-child(3) { background: var(--theme-section-bg) url('../../img/iconmenu03.webp') no-repeat 0px center/105px 53px; }

.sidebar a:nth-child(1) { background: var(--theme-card) url('../../img/chapter01.webp') no-repeat 5px center/80px 55px; }
.sidebar a:nth-child(2) { background: var(--theme-card) url('../../img/chapter02.webp') no-repeat 5px center/97px 60px; }
.sidebar a:nth-child(3) { background: var(--theme-card) url('../../img/chapter03.webp') no-repeat 5px center/130px 35px; }
.sidebar a:nth-child(4) { background: var(--theme-card) url('../../img/chapter04.webp') no-repeat 5px center/92px 60px; }
.sidebar a:nth-child(5) { background: var(--theme-card) url('../../img/chapter05.webp') no-repeat 5px center/104px 55px; }
.sidebar a:nth-child(6) { background: var(--theme-card) url('../../img/chapter06.webp') no-repeat 5px center/66px 60px; }
.sidebar a:nth-child(7) { background: var(--theme-card) url('../../img/chapter07.webp') no-repeat 5px center/120px 66px; }
.sidebar a:nth-child(8) { background: var(--theme-card) url('../../img/chapter08.webp') no-repeat 5px center/69px 65px; }
.sidebar a:nth-child(9) { background: var(--theme-card) url('../../img/chapter09.webp') no-repeat 5px center/109px 50px; }
.sidebar a:nth-child(10) { background: var(--theme-card) url('../../img/chapter10.webp') no-repeat 5px center/82px 63px; }
.sidebar a:nth-child(11) { background: var(--theme-card) url('../../img/chapter11.webp') no-repeat 5px center/94px 63px; }

.sidebar2 nav a { background: var(--theme-alphabet-bg); }

.header-categories {
    display: flex;
    gap: 15px;
}

.header-categories a {
    background: var(--theme-section-bg);
    padding: 10px 20px;
    text-decoration: none;
    border: 1px solid var(--theme-border);
    border-radius: 5px;
    color: var(--theme-text);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    transition: all 0.3s;
    padding-left: 120px;  
}

.header-categories a:hover {
    background-color: var(--theme-accent);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px var(--theme-shadow);
}

/* Анимация солнца и луны при переключении темы */
.theme-icon-container {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
}

.theme-icon-container .icon {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Иконка солнца (по умолчанию скрыта) */
.icon-sun {
    opacity: 0;
    transform: rotate(-45deg) scale(0.5);
    color: #FF6A00;
}

/* Иконка луны (по умолчанию видна) */
.icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    color: #BDEAEF;
}

/* Состояния для светлой темы */
.light-theme .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.light-theme .icon-moon {
    opacity: 0;
    transform: rotate(45deg) scale(0.5);
}

.header-images {
    padding-right: 6.5%; 
    display: flex; 
    gap: 5px; 
}

.header-images img { 
    width: 30px;
    height: 30px;  
    margin-top: 5px;
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 7px; 
}

/* Бургер-меню */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    margin-left: 15px;
}

.burger-line {
    height: 3px;
    width: 100%;
    background-color: var(--theme-text);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.burger-menu.active .burger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger-menu.active .burger-line:nth-child(2) { opacity: 0; }
.burger-menu.active .burger-line:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

/* Основной контент */
.container {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 350px;
    background-color: var(--theme-card);
    border: 1px solid var(--theme-border);
    padding: 20px; 
    transition: transform 0.3s ease;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
}

.sidebar a {
    background: var(--theme-section-bg);
    padding: 12px 15px;
    text-decoration: none;
    border: 1px solid var(--theme-border);
    border-radius: 5px;
    color: var(--theme-text);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    margin-bottom: 10px;
    transition: all 0.3s;
    padding-left: 145px;  
}

.sidebar a:hover {
    background-color: var(--theme-accent);
    color: white;
    transform: translateX(5px);
}

.sidebar-banner {
    margin-top: 30px;
    padding: 15px;
    background-color: var(--theme-card);
    border: 1px solid var(--theme-border);
    border-radius: 5px;
    text-align: center;
    position: relative; 
    background: var(--theme-card) url('../../img/sb.webp') no-repeat left bottom;
    background-size: 90px auto;
    min-height: 200px;
}

.sidebar2 {
    width: 285px;
    background-color: var(--theme-card);
    border: 1px solid var(--theme-border);
    padding: 20px; 
    transition: transform 0.3s ease;
}

.sidebar2 nav {
    display: flex;
    flex-direction: column;
}

.sidebar2 a {
    background: var(--theme-section-bg); 
    text-decoration: none;
    border: 1px solid var(--theme-accent);
    border-radius: 5px;
    color: var(--theme-text) !important;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    margin-bottom: 10px;
    transition: all 0.3s; 
}

.sidebar2 nav a {
    background: var(--theme-section-bg);
    padding: 12px 15px;
    text-decoration: none;
    border: 1px solid var(--theme-border);
    border-radius: 5px;
    color: var(--theme-text);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    margin-bottom: 10px;
    transition: all 0.3s;
    padding-left:  30px;  
}

.sidebar2 a:hover {
    background-color: var(--theme-accent);
    color: white;
    transform: translateX(5px);
}

.sidebar2 .letter {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    font-weight: 400; 
    text-align: center;
    color: var(--theme-text);
    text-decoration: none;
    font-size: 16px;
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    transition: all 0.2s;
}

.sidebar2 .letter:hover {
    background: var(--theme-accent);
    color: #fff;
    border-color: var(--theme-accent);
    transform: translateY(-2px);
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 20px;
    max-width: calc(100% - 285px);
    background-color: var(--theme-section-bg);
    border: 1px solid var(--theme-border);
}

.spa {
    background-color: var(--theme-card);
    padding: 15px;
    text-align: center;
    margin: 0;
}

.styled-link { 
    padding: 10px 20px;  
    font-family: sans-serif;   
}

/* Новые стили для блока "Новое на сайте" */
.sidebar-new {
    background: var(--theme-alphabet-bg);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 10px;
    margin: 25px 0;
    position: relative; 
}
 
.sidebar-new::before {
    content: "";
    position: absolute;
    top: 0;
    left: 44%;
    transform: translateX(-93%) translateY(-85%);
    width: 100%;
    height: 80px;
    background: url("../../img/random.webp") no-repeat center top;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
} 

.sidebar-title {
    text-transform: uppercase;
    color: var(--theme-accent);
    font-size: 12px;
    font-weight: 400;
    margin-bottom: 12px;
    text-align: center;
    position: relative;
    z-index: 1;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--theme-border);
}

.new-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}

.new-list li {
    border-bottom: 1px dashed var(--theme-border);
}

.new-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.new-list a {
    display: block;
    color: var(--theme-text);
    font-size: 13px;
    padding: 10px 0 0 0;
    transition: all 0.3s;
    background: none;
    border: none;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    border-radius: 4px;
    text-align: center;
    padding-left: 0;
    position: relative;
}

.new-list a:hover {
    color: var(--theme-link);
    background: rgba(var(--theme-accent-rgb), 0.1); 
}

/* Контейнер уведомлений */
.notice-bar {
    position: relative;
    background: #1f2a2a;
    border-left: 4px solid var(--theme-accent);
    border-radius: 4px;
    padding: 8px 15px 8px 50px;
    margin: 0 10px 25px 10px;
    box-shadow: 0 2px 8px var(--theme-shadow);
    overflow: visible;
    z-index: 1;
}

.notice-bar2 {
    position: relative;
    background: linear-gradient(135deg, #2a1a4a 0%, #3d2a5c 100%);
    border-left: 4px solid var(--theme-accent);
    border-radius: 4px;
    padding: 8px 15px 8px 10px;
    margin: 0 10px 10px 10px;
    box-shadow: 0 2px 8px var(--theme-shadow);
    overflow: visible;
    z-index: 1;
}

.notice-bar3 {
    position: relative;
    background: #1f3a52;
    border-left: 4px solid var(--theme-accent);
    border-radius: 4px;
    padding: 8px 15px 8px 50px;
    margin: 0 0 25px 0;
    box-shadow: 0 2px 8px var(--theme-shadow);
    overflow: visible;
    z-index: 1;
}

/* Градиентный эффект для фона */
.bg-gradient-effect {
    position: relative;
}

.bg-gradient-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 90px auto;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 20%, rgba(0, 0, 0, 0.3) 30%, rgba(0, 0, 0, 0.1) 60%);
    z-index: 1;
    pointer-events: none;
}

.bg-gradient-effect .updates-item-text {
    position: relative;
    z-index: 2;
}

.updates-item-text,
.updates-item-tex {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    max-width: 60%;
    padding: 20px;
}

/* Блок интересных фактов */
.facts-box {
    background: var(--theme-section-bg);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    box-shadow: 0 4px 12px var(--theme-shadow);
}

.facts-box::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateX(1220%) translateY(550%);
    width: 90px;
    height: 153px;
    background: url(../../img/gbl.webp) no-repeat 0% 50%;
    background-size: contain;
    z-index: 0;
}

.facts-header {
    color: var(--theme-accent);
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 15px;
    text-align: center;
}

.facts-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.facts-item {
    background: var(--theme-card);
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    padding: 15px;
    color: var(--theme-text);
    transition: transform 0.3s;
}

.facts-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px var(--theme-shadow);
}

.facts-text {
    font-size: 14px;
    line-height: 1.5;
    text-align: justify;
}

/* Стили для статуса (полностью сохранены) */
.status-ongoing {
    background-color: #4CAF50;
}

.status-completed {
    background-color: #A1264C;
}

.status-info {
    width: 100%; 
    padding: 0 20px 0 20px;
}

.status-announcement {
    background-color: rgba(106, 133, 65, 0.2);
    color: #6A8541;
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400; 
    margin-bottom: 10px;
    border-left: 3px solid #6A8541;
}

.status-announcement.closed {
    background-color: rgba(173, 20, 87, 0.2);
    color: #e8e9ec;
    border-left: 3px solid #ad1457;
}

.status-announcement.air { 
    background-color: #4d9b6c;
    color: #e8e9ec;
    margin: 0 auto;   
}

.highlight-date {
    color: #5692B7;
    font-weight: 500;
}

.highlight-date a {
    color: #5692B7;
    font-weight: 500;
}

.highlight-date a:hover {
    color: #ad1457;
    font-weight: 500;
}
 
/* Блок алфавита */
.alphabet-box {
    position: relative;
    padding-top: 80px;
    padding-bottom: 110px;
    background: var(--theme-alphabet-bg);
    border: 1px solid var(--theme-alphabet-border);
    border-radius: 6px;
    margin: 15px 0 35px 0;
    padding: 10px; 
}

.alphabet-box > .letten {
    display: block;
    text-align: center;
    margin: 5px auto 0;
    color: var(--theme-alphabet-letter);
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    transition: all 0.2s;
    width: fit-content;
    padding: 8px 15px;
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    background: var(--theme-section-bg);
}

.alphabet-box > .letten:hover {
    background: var(--theme-accent);
    color: #fff;
    border-color: var(--theme-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--theme-shadow);
}

.alphabet-box2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-93%);
    width: 100%;
    height: 80px;
    background: url("../../img/top-bg.webp") no-repeat center top;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}

.alphabet-box::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 8.4%;
    transform: translateX(-50%) translateY(-30%);
    width: 100%;
    height: 56px;
    background: url("../../img/bottom-bg.webp") no-repeat center bottom;
    background-size: contain;
    pointer-events: none;
    z-index: 2;
}

.alphabet-box > * {
    position: relative;
    z-index: 1;
}

.alphabet-title {
    text-transform: uppercase;
    color: var(--theme-alphabet-title);
    font-size: 12px;
    margin: 10px 0px 15px 0px;
    text-align: center;
    font-weight: 400;
}

.alphabet-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 2px;
    column-gap: 4px;
}

.letter {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    color: var(--theme-alphabet-letter);
    text-decoration: none;
    font-size: 14px;
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    transition: all 0.2s;
}

.letter:hover {
    background: var(--theme-accent);
    color: #fff;
    border-color: var(--theme-accent);
    transform: translateY(-2px);
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--theme-text);
    font-size: 15px;
}

.notice-content2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--theme-text);
    font-size: 10px;
}
 
.notice-icon {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 47px;
    background: url('../../img/casper.webp') no-repeat center;
    background-size: contain;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.notice-icon2 {
    position: absolute;
    left: 30px;
    top: 47%;
    transform: translateY(-64%);
    width: 79px;
    height: 48px;
    background: url('../../img/bgtj.webp') no-repeat center;
    background-size: contain;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.notice-icon3 {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 63px;
    height: 60px;
    background: url('../../img/dld.webp') no-repeat center;
    background-size: contain;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.notice-link {
    background: #697F7D;
    color: var(--theme-text);
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s;
    padding: 2px 6px 3px 6px;
    margin: 3px 5px;
    border-radius: 3px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.notice-link:hover {
    color: var(--theme-text);
    background: var(--theme-accent);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4), inset 0 -3px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* ========================================= */
/* СТИЛИ ДЛЯ ВЕРХНЕГО БЛОКА (ЛЕНТА)          */
/* ========================================= */
.top-new-wrapper {
    max-width: 1270px;
    margin: 20px 0 15px 0;
    padding: 0 20px;
    position: relative;
    overflow: hidden;
}

.top-new-header {
    font-size: 16px;
    text-transform: uppercase;
    color: var(--theme-accent);
    margin-bottom: 15px;
    font-weight: 600;
    padding-left: 5px;
    border-left: 3px solid var(--theme-accent);
    line-height: 1;
}

.top-new-scroll-area {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-accent) var(--theme-section-bg);
}

.top-new-scroll-area::-webkit-scrollbar {
    height: 6px;
}

.top-new-scroll-area::-webkit-scrollbar-track {
    background: var(--theme-section-bg);
    border-radius: 3px;
}

.top-new-scroll-area::-webkit-scrollbar-thumb {
    background-color: var(--theme-accent);
    border-radius: 3px;
}

.top-new-card {
    flex: 0 0 auto;
    width: 123px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.top-new-card:hover {
    transform: translateY(-5px);
}

.top-new-img-wrap {
    position: relative;
    width: 100%;
    height: 185px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--theme-border);
    box-shadow: 0 4px 8px var(--theme-shadow);
}

.top-new-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.top-new-card:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

.top-new-label {
    position: absolute;
    top: 5px;
    right: 50%;
    transform: translateX(50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(179, 165, 126, 1.0);
}

.top-new-label.new {
    background: var(--theme-accent);
    font-weight: bold;
}

/* Оригинальные правила .top-new-title сохранены 1-в-1 */
.top-new-title {
    margin-top: 8px;
    font-weight: 400;
    font-size: 10px;
    line-height: 1.3;
    color: var(--theme-text);
    text-align: center;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.6em;
}

.top-new-card:hover .top-new-title {
    color: var(--theme-accent);
}

/* ========================================= */
/* СТИЛИ ДЛЯ ВЕРХНЕГО БЛОКА ПОИСКА           */
/* ========================================= */
.top-search-wrapper {
    max-width: 1270px;
    margin: 0 10px 15px 10px;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

.top-search-inner {
    background: var(--theme-section-bg);
    border: 1px solid var(--theme-accent);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px var(--theme-shadow);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ========================================= */
/* СТИЛИ ДЛЯ ВЫДАЧИ ПОИСКА (PAGEFIND)        */
/* ========================================= */
:root {
    --pagefind-ui-text: var(--theme-text);
    --pagefind-ui-background: var(--theme-bg);
    --pagefind-ui-border: var(--theme-border);
    --pagefind-ui-primary: var(--theme-accent);
}

.pagefind-ui__result-title,
.pagefind-ui__result-link {
    color: var(--theme-accent) !important;
    font-weight: 400;
    font-size: 18px;
    text-decoration: none;
}

.pagefind-ui__result-link:hover {
    color: var(--theme-text) !important;
}

.pagefind-ui__result-excerpt {
    color: var(--theme-text) !important;
    opacity: 0.8;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 10px !important;
}

.pagefind-ui__message {
    color: var(--theme-secondary) !important; 
    font-weight: 500;
    padding-bottom: 15px;
}

.pagefind-ui__result-excerpt mark {
    background-color: transparent !important;
    color: var(--theme-secondary) !important;
    font-weight: bold;
    text-decoration: underline;
}

.pagefind-ui__result {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    align-items: stretch !important;
    padding-bottom: 25px !important;
    margin-bottom: 25px !important;
}

.pagefind-ui__result-thumb {
    width: 200px !important;
    flex-shrink: 0 !important;
    margin: 0 !important; 
    display: block !important;
}

.pagefind-ui__result-image {
    width: 100% !important;
    height: 100% !important;
    border-radius: 6px !important;
    border: 1px solid var(--theme-border) !important;
    object-fit: cover !important;
    display: block !important;
}

.pagefind-ui__result-inner {
    flex: 1 1 auto !important;
    margin-top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.top-search-inner::after {
    content: "";
    position: absolute;
    right: 45px;
    top: 60%;
    transform: translateY(-50%);
    width: 53px;
    height: 70px;
    background: url('../../img/pr.webp') no-repeat center/contain;
    opacity: 1;
    pointer-events: none;
}

.top-search-inner::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-40%);
    width: 121px;
    height: 90px;
    background: url('../../img/pl.webp') no-repeat center/contain;
    opacity: 1;
    pointer-events: none;
}

.top-search-inner form {
    border: 1px solid var(--theme-accent);
    border-radius: 7px;
    left: 15px;
    display: flex;
    width: 100%;
    max-width: 900px;
    position: relative;
    z-index: 2;
}

.top-search-inner input {
    flex: 1;
    padding: 10px 20px;
    border: 1px solid var(--theme-border);
    border-right: none;
    border-radius: 6px 0 0 6px;
    background: var(--theme-card);
    font-family: "Gilroy-Regular", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--theme-text);
    font-size: 16px;
    outline: none;
    transition: background 0.3s;
    -webkit-appearance: none; 
}

.top-search-inner input:focus {
    background: var(--theme-bg);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}

.top-search-inner button {
    background: var(--theme-accent);
    color: #fff;
    border: none;
    padding: 0 30px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 16px;
    font-family: "Gilroy-Regular", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: background 0.3s, transform 0.2s;
    -webkit-appearance: none;
}

.top-search-inner button:hover {
    background: var(--theme-link);
}

.notice-text {
    margin-left: 5%;
    flex: 1;
}

/* Voice Block */
.voice-block {
    display: flex;
    flex-direction: column;
    background: var(--theme-card);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
}

.voice-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--theme-shadow);
}

.voice-poster {
    width: 100%;
    height: 200px; 
    border-bottom: 1px solid var(--theme-border);
}

.voice-details {
    padding: 15px;
}

.voice-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.voice-title {
    color: var(--theme-accent);
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
}

.voice-badge {
    background: rgba(106, 133, 65, 0.2);
    color: #6A8541;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    border-left: 3px solid #6A8541;
}

.voice-social a {
    color: var(--theme-link);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s;
}

.voice-social a:hover {
    color: var(--theme-accent);
}

.voice-genres {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center; 
    flex-wrap: wrap;
}

.voice-genre span {
    border: 1px solid var(--theme-accent);
    background: var(--theme-section-bg);
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 11px;
    color: var(--theme-text);
    text-transform: uppercase;
    transition: all 0.3s;
}

.voice-genre:hover span {
    background: var(--theme-accent);
    color: white;
}
 
/* Стили для игровых карточек */
.game-grid2 {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.game-card {
    display: flex;
    flex-direction: column;
    background: var(--theme-card);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--theme-shadow);
}

.game-image {
    width: 100%;
    height: 220px;
    background-size: contain;
    background-position: center;
    border-bottom: 1px solid var(--theme-border);
}

.game-content {
    padding: 15px;
}

.game-title {
    color: var(--theme-accent);
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.game-description {
    color: var(--theme-text);
    font-size: 14px;
    line-height: 1.4;
}
 
/* Updates Block Styles */
.updates-container {
    background: var(--theme-section-bg);
    border-radius: 8px;
    padding: 15px;
    margin: 30px 0;
    color: var(--theme-text);
    box-shadow: rgba(142, 142, 142, 0.24) 0px 2px 4px 0px, rgba(142, 142, 142, 0.24) 0px 2px 16px 0px;
}

.updates-section h2, .updates-section h3 {
    color: var(--theme-accent);
    margin: 35px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--theme-border);
    position: relative;
    padding-left: 25px;
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
} 

.updates-header {
    text-align: center;
    margin-bottom: 20px;
}

.updates-header h1, .updates-header h2 {
    color: var(--theme-accent);
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.updates-subtitle {
    color: var(--theme-secondary);
    font-size: 16px;
    margin-bottom: 10px;
}

.updates-highlight {
    color: var(--theme-text);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.updates-description {
    text-align: center;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--theme-secondary);
    margin-bottom: 20px;
}

.updates-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--theme-secondary), transparent);
    margin: 25px 0;
}

.updates-section-subtitle {
    color: var(--theme-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.updates-item {
    position: relative;
    margin-bottom: 10px;
    height: 80px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 15px;
    border-radius: 5px;
    transition: 0.3s;
}

.updates-item:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 8px var(--theme-shadow);
}

.updates-item-title {
    font-size: 15px;
    color: var(--theme-text);
    font-weight: 400; 
}
 
.updates-item-subtitle {
    font-size: 11px;
    color: var(--theme-accent);
    margin-bottom: 3px;
}

.updates-item-info {
    font-size: 13px;
    color: #95B6D0;
}

.updates-item.featured {
    background: var(--theme-season-card);
}

.updates-item.featpr {
    background: var(--theme-card);
    border-left: 8px solid #F93838;
}

.updates-item.featfin {
    background: var(--theme-update-item);
    border-left: 8px solid #669;
}

.updates-item.featnew {
    border-left: 8px solid #6A8541;
}

.updates-item-text {
    flex: 1;
    position: relative;
}

.updates-item-image {
    width: 230px;
    height: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.updates-item-image img {
    width: 100%; 
    height: 100%; 
    border: 1px solid var(--theme-border);
    border-radius: 5px;
    object-fit: cover;
}

.circle-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--theme-secondary);
    border-radius: 50%;
    margin: 0 10px;
    vertical-align: middle;
}

.dot-separator { padding: 0 5px; }

.updates-featured-tag {
    position: absolute;
    top: 30%;
    right: 5%;
    background: var(--theme-accent);
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px; 
    align-items: center;
}

.updates-dub {
    position: absolute; 
    bottom: 25%;
    right: 0;
    background: rgba(var(--theme-accent-rgb), 0.2);
    color: var(--theme-accent); 
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
    margin-top: 20px;    
}

.updates-grid-item { 
    justify-content: space-between;  
    background: var(--theme-update-item);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--theme-border);  
}

.updates-category {
    font-size: 12px;
    color: var(--theme-accent);
    margin-bottom: 8px;
}

.updates-title {
    font-size: 16px;
    color: var(--theme-text);
    margin-bottom: 3px;
}

.updates-subtitle {
    font-size: 13px;
    color: var(--theme-accent);
    margin-bottom: 8px;
}

.updates-info {
    font-size: 12px;
    color: var(--theme-secondary);
    margin-bottom: 5px;
}

.ads {
    background-color: var(--theme-bg);
    padding: 15px;
    text-align: center; 
}

.updates-featured-title {
    font-size: 16px; 
}

.updates-featured-subtitle {
    font-size: 12px;
    color: var(--theme-accent); 
}

.updates-featured {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--theme-update-featured);
    padding: 5px 0 0 20px;
    border-radius: 5px;
    margin: 5px 0 7px 0;
    border-left: 4px solid var(--theme-accent);
    text-align: center;  
} 

.updates-featured-content {
    flex: 1;
    text-align: left;
}

.updates-featured-image {
    width: 300px;
    flex-shrink: 0;
}

.updates-featured-image img {
    width: 80%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--theme-border);
}

.updates-grid-content {
    flex: 1;
}

.updates-grid-image {
    width: 80px;
    flex-shrink: 0;
}

.updates-grid-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--theme-border);
}
 
/* ========================================= */
/* СЕРИАЛЫ ПО АЛФАВИТУ (КАТАЛОГ tas_*.html)  */
/* ========================================= */
.series-container {
    background: var(--theme-section-bg);
    border-radius: 8px;  
    padding: 15px 10px;
    margin: 30px 0;
    box-shadow: 0 4px 12px var(--theme-shadow);
}

.series-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.series-header h2 {
    color: var(--theme-accent);
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 15px;
}

.series-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.series-sort span {
    color: var(--theme-secondary);
    font-size: 14px;
}

.sort-btn {
    background: var(--theme-card);
    color: var(--theme-secondary);
    border: 1px solid var(--theme-border);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.sort-btn:hover, .sort-btn.active {
    background: var(--theme-accent);
    color: #fff;
}

.series-table {
    width: 100%;
    border-collapse: collapse;
}

.series-table-header {
    display: grid;
    grid-template-columns: 30% 30% 6% 9% 9% 16%;
    gap: 10px;
    align-items: start;
    background: var(--theme-card);
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 5px;
}

.series-th {
    flex: none;
    width: auto;
    color: var(--theme-accent);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 5px;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
    hyphens: auto;
}

.series-th:hover {
    color: var(--theme-text);
}

.series-th::after {
    content: "↕";
    margin-left: 5px;
    opacity: 0.3;
}

.series-table-body {
    display: flex;
    flex-direction: column;
}

.series-row {
    display: grid;
    grid-template-columns: 30% 30% 6% 9% 9% 16%;
    gap: 10px;
    align-items: center;
    background: var(--theme-card);
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 5px;
    text-decoration: none;
    transition: all 0.3s;
}

.series-row:hover {
    background: var(--theme-section-bg);
    transform: translateX(3px);
}

.series-td {
    flex: none;
    width: auto;
    color: var(--theme-text);
    font-size: 14px;
    padding: 8px 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
    hyphens: auto;
}

.series-td[data-title="Рейтинг"] {
    color: var(--theme-accent);
    font-weight: 500;
}

.series-td[data-title="Статус"] {
    min-width: 90px;
    font-size: 13px;
}

.series-td[data-title="Название"], 
.series-td[data-title="Оригинал"] {
    line-height: 1.4;
}

.status-badge {
    text-transform: uppercase; 
    border-radius: 4px;
    font-weight: 400; 
    color: white; 
    display: inline-block;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%; 
    padding: 2px 6px; 
    font-size: 9px; 
}

.status-badge.finished {
    background: rgba(102, 102, 153, 0.2);
    color: #669;
    border: 1px solid #669;
}

.status-badge.airing {
    background: rgba(106, 133, 65, 0.2);
    color: #6A8541;
    border: 1px solid #6A8541;
}

.status-badge.paused {
    background: rgba(var(--theme-accent-rgb), 0.2);
    color: var(--theme-accent);
    border: 1px solid var(--theme-accent);
}

.hover-img {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.hover-img .hover-img-preview {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    padding: 4px;
    background: var(--theme-card);
    border: 1px solid var(--theme-border);
    box-shadow: 0 2px 8px var(--theme-shadow);
    z-index: 100;
    white-space: nowrap;
}

.hover-img .hover-img-preview img {
    display: block;
    max-width: 620px;
    height: auto;
}

.hover-img:hover .hover-img-preview {
    display: block;
}

/* Стили для страницы 404 */
.error-container {
    background: var(--theme-section-bg);
    border-radius: 8px;
    padding: 40px 20px;
    margin: 30px 0;
    text-align: center;
    box-shadow: 0 4px 12px var(--theme-shadow);
    border: 1px solid var(--theme-border);
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-image {
    margin-bottom: 30px;
}

.error-image img {
    max-width: 600px;
    height: auto;
}

.error-container h1 {
    color: var(--theme-accent);
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 400;
}

.error-message {
    color: var(--theme-text);
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.error-button {
    background: var(--theme-card);
    color: var(--theme-accent);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s;
    border: 1px solid var(--theme-border);
}

.error-button:hover {
    background: var(--theme-accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--theme-shadow);
}

.error-search {
    margin-top: 30px;
}

.error-search p {
    color: var(--theme-secondary);
    margin-bottom: 15px;
}

.error-search form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
}

.error-search input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--theme-border);
    border-radius: 5px 0 0 5px;
    background: var(--theme-card);
    color: var(--theme-text);
    font-size: 16px;
    outline: none;
}

.error-search button {
    background: var(--theme-accent);
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.error-search button:hover {
    background: var(--theme-link);
}

.mobile-submenu .mobile-submenu {
    padding-left: 25px;
    border-left: 2px solid var(--theme-accent);
    margin-top: 5px;
    margin-bottom: 5px;
}

.mobile-submenu .menu-item[data-submenu] > a {
    padding-left: 35px;
    background-position: 10px center;
}

.mobile-submenu .menu-item a {
    font-size: 13px;
    padding: 10px 15px;
    background-color: rgba(0,0,0,0.05);
}

/* Стили для блока рандомных мультсериалов */
.random-series {
    background: var(--theme-section-bg2);
    border-radius: 8px;
    padding: 20px;
    margin: 15px 15px 10px 15px; 
    box-shadow: 0 4px 12px var(--theme-shadow);
    border: 1px solid var(--theme-border);
}

.random-series-header {
    color: var(--theme-accent);
    text-transform: uppercase;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 400;
}

.random-series-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
}

.random-series-item {
    background: var(--theme-alphabet-bg);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--theme-border);
    transition: all 0.3s;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    height: auto;
    text-decoration: none;
    color: inherit;
}

.random-series-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--theme-shadow);
}

.random-series-image {
    flex-shrink: 0;
    width: 100px;
    height: 150px;
    overflow: hidden;
    border-radius: 4px;
}

.random-series-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

.random-series-content {
    display: flex;
    padding: 0 7px 0 0;
    flex-direction: column;
    justify-content: center;
}

.random-series-title {
    color: var(--theme-accent);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
}

.random-series-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.random-series-title a:hover {
    color: var(--theme-accent);
}

.random-series-description {
    color: var(--theme-update);
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    flex: 1;
}

/* ======================================================== */
/* УПРОЩЕННЫЙ БЛОК "СМОТРЕТЬ ЕЩЁ МУЛЬТСЕРИАЛЫ" (6 ПОСТЕРОВ) */
/* ======================================================== */
.random-series-simple {
    background: var(--theme-section-bg2);
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    box-shadow: 0 4px 12px var(--theme-shadow);
    border: 1px solid var(--theme-border);
}

.random-series-simple-header {
    color: var(--theme-accent);
    text-transform: uppercase;
    font-size: 14px;
    margin-bottom: 18px;
    text-align: center;
    font-weight: 400;
}

/* DESKTOP: 6 В РЯД (1 полный ряд) */
.random-series-simple-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    width: 100%;
}

.random-series-simple-item {
    background: var(--theme-alphabet-bg);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--theme-border);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: auto;
    text-decoration: none;
    color: inherit;
}

.random-series-simple-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px var(--theme-shadow);
}

.random-series-simple-image {
    width: 100%; 
    overflow: hidden;
}

.random-series-simple-image img {
    width: 100%; 
    object-fit: contain;
    display: block;
    background: var(--theme-section-bg);
}

.random-series-simple-content {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Оригинальные правила .random-series-simple-title сохранены 1-в-1 */
.random-series-simple-title {
    color: var(--theme-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    text-align: center;
    margin: 0;
}

/* ========================================= */
/* ГАЛЕРЕЯ ВНУТРИ САЙДБАРА И В ФУТЕРЕ        */
/* ========================================= */
.sidebar .gallery-block,
.sidebar2 .gallery-block {
    padding: 12px;
    margin: 20px 0;
    box-shadow: none;
    background: transparent;
}

.sidebar .gallery-header,
.sidebar2 .gallery-header {
    font-size: 13px;
    margin-bottom: 12px;
}

.sidebar .gallery-grid,
.sidebar2 .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.sidebar .gallery-title,
.sidebar2 .gallery-title {
    font-size: 10px;
    padding: 15px 2px 5px;
    letter-spacing: 0;
}

.sidebar .gallery-item:hover .gallery-title,
.sidebar2 .gallery-item:hover .gallery-title {
    padding-bottom: 10px;
}

.gallery-block {
    background: var(--theme-section-bg2);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 20px;
    margin: 10px 15px 15px 15px;
    box-shadow: 0 4px 12px var(--theme-shadow);
}

.gallery-header {
    color: var(--theme-accent);
    text-transform: uppercase;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 400;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 10px;
    width: 100%;
}

.gallery-item {
    display: block;
    position: relative;
    background: var(--theme-card);
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    aspect-ratio: 1 / 1; 
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--theme-shadow);
    border-color: var(--theme-accent);
    background: var(--theme-section-bg);
}

.gallery-item img {
    width: 100%;
    height: 200%; 
    object-fit: contain; 
    transform: translateY(0); 
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); 
    display: block;
}

.gallery-item:hover img {
    transform: translateY(-50%);
}

.gallery-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px 10px 10px;
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    color: var(--theme-accent);
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    z-index: 2;
    transition: color 0.3s ease, padding-bottom 0.3s ease;
}

.gallery-item:hover .gallery-title {
    color: #fff;
    padding-bottom: 15px; 
}

/* Футер */
footer {
    border: 1px solid var(--theme-border);
    background-color: var(--theme-card);
    color: var(--theme-text);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    overflow: hidden; 
    gap: 30px;
}

.footer-left {
    position: relative;
    flex: 1 1 32%;
    color: var(--theme-accent);
    font-size: 13px;
    font-weight: 400;
    min-width: 220px;
    display: flex;
    align-items: flex-start;
    padding-left: 85px;
}

.footer-center {
    color: var(--theme-text);
    font-size: 13px; 
    font-weight: 400;
    position: relative;
    flex: 1 1 34%;
    min-width: 220px;
    display: flex;
    align-items: flex-start;
    padding-left: 75px;
    flex-direction: column;
    justify-content: center;
    text-align: center;          
}

.footer-left::before,
.footer-center::before {
    content: "";
    position: absolute;
    left: 0;
    background-size: cover;
    background-position: center left;
    background-repeat: no-repeat;
}

.footer-left::before {
    width: 69px;
    height: 48px;
    background-image: url("../../img/iconfl.webp");
}

.footer-center::before {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background-image: url("../../img/iconfc.webp");
}

.footer-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-right img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: transform 0.2s;
}

.footer-right img:hover {
    transform: scale(1.07);
}

.footer-content {
    flex: 1;
    text-align: center;
    z-index: 2;
}

.footer-title {
    font-size: 18px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.footer-links {
    font-size: 12px; 
    color: var(--theme-secondary);
}

.footer-copyright {
    font-size: 12px;
    color: var(--theme-secondary);
}

.footer-partner {
    z-index: 2;
}

.footer-partner img {
    height: 40px;
    transition: transform 0.3s;
}

.footer-partner img:hover {
    transform: scale(1.05);
}

/* Переключатель темы */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--theme-border);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--theme-accent);
}

input:checked + .slider:before {
    transform: translateX(26px);
}


/* ========================================================================= */
/* ЕДИНЫЙ БЛОК АДАПТИВНОСТИ (IPAD, ANDROID, IPHONE & SMART TV)               */
/* ========================================================================= */

/* Отключаем сдвиг спрайта на тач-экранах (показываем только персонажа без анимации) */
@media (hover: none) {
    .gallery-item:hover img {
        transform: translateY(0);
    }
    .gallery-item:hover {
        transform: none;
    }
}

/* --- iPad в горизонтальном положении и небольшие ноутбуки (до 1200px) --- */
@media (max-width: 1200px) {
    .top-new-card { width: 112px; }
    .top-new-img-wrap { height: 165px; }

    /* 5 в ряд: скрываем 6-й элемент, чтобы был ровно ОДИН ряд без пустых мест во втором! */
    .random-series-simple-container {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }
    .random-series-simple-container > .random-series-simple-item:nth-child(n+6) {
        display: none;
    }
}

/* --- Планшеты вертикально и iPad Air/Mini (до 1024px) --- */
@media (max-width: 1024px) {
    header::before, header::after { display: none; }
    .header-menu { display: none; }
    .header-images { padding-right: 0; margin-left: auto; }
    .burger-menu { display: flex; }

    /* Прячем оба варианта сайдбара на планшетах, освобождая 100% ширины контенту */
    .sidebar,
    .sidebar2 {
        display: none;
    }

    .main-content {
        max-width: 100%;
        width: 100%;
        padding: 16px;
    }

    .top-search-inner::before,
    .top-search-inner::after {
        display: none;
    }
    .top-search-inner form {
        left: 0;
    }

    .random-series-container { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    
    /* 4 в ряд на iPad: скрываем 5-й и 6-й постеры, чтобы был ровно ОДИН красивый ряд без дыр! */
    .random-series-simple-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    .random-series-simple-container > .random-series-simple-item:nth-child(n+5) {
        display: none;
    }

    .gallery-grid { grid-template-columns: repeat(6, 1fr); }

    /* Таблица каталога на планшетах */
    .series-table-header, .series-row {
        grid-template-columns: 28% 28% 8% 10% 10% 16%;
        gap: 8px;
        padding: 10px 12px;
    }
}

/* --- Переходный размер для футера (до 900px) --- */
@media (max-width: 900px) {
    footer { flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 0; padding: 16px 12px; text-align: center; }
    .footer-left, .footer-center, .footer-right { min-width: 0; width: 100%; padding-left: 0 !important; justify-content: center; align-items: center; text-align: center; margin-bottom: 14px; }
    .footer-left, .footer-center { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 14px; position: relative; min-height: 48px; padding: 0; }
    .footer-left::before, .footer-center::before { position: static; width: 56px; height: 39px; margin-right: 10px; margin-left: 0; flex-shrink: 0; display: inline-block; }
    .footer-center { flex-direction: row; }
    .footer-right { justify-content: center; margin: 6px 0 0 0; gap: 14px; }
}

/* --- Мобильные телефоны и компактные планшеты (до 768px) --- */
@media (max-width: 768px) {
    header { padding: 8px 12px; }
    .logo { padding-left: 0; }
    .logo a { width: 195px; height: 42px; }
    .header-images > a { display: none; } /* Оставляем переключатель темы в шапке */
    .theme-toggle { margin-left: auto; }
    .burger-menu { margin-left: 12px; display: flex; }
    .mobile-menu { width: min(310px, 88vw); }
    
    .main-content { max-width: 100%; padding: 12px 10px; }

    /* Сетка фильмов и галерея */
    .movies-section { padding: 12px 10px; margin: 15px 0; }
    .movies-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .gallery-block { padding: 14px 10px; margin: 12px 0; }
    .seasons-grid { gap: 10px; justify-content: center; }
    
    .section-header h2 { font-size: 20px; margin-bottom: 18px; }
    .movies-category h3 { font-size: 16px; }
    .movie-title { font-size: 12.5px; }
    .con-header h2 { font-size: 22px; }
    .con-subtitle { font-size: 15px; margin-bottom: 12px; }
    .season-card { padding: 8px 14px; font-size: 14px; }

    /* Уведомления */
    .notice-bar, .notice-bar2 { margin: 0 0 12px 0; padding: 8px 10px 8px 48px; }
    .notice-icon { left: 6px; width: 38px; height: 35px; }
    .notice-icon2 { left: 4px; width: 48px; height: 35px; }
    .notice-text { margin-left: 4px; }

    /* Главная: список серий */
    .updates-container { padding: 12px 10px; margin: 15px 0; }
    .updates-header h1, .updates-header h2 { font-size: 17px; }
    .updates-item { height: auto; min-height: 95px; background-position: center right !important; padding: 12px; }
    .updates-item-text { max-width: 100%; background: rgba(0, 0, 0, 0.55); padding: 10px 12px; border-radius: 5px; }
    .bg-gradient-effect::before { background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0.15) 100%); }

    /* Плеер и игры */
    .video-player-container { margin: 8px 0 16px 0; }
    .translation-tabs, .tabs { flex-wrap: nowrap; overflow-x: auto; margin: 8px; gap: 5px; padding-bottom: 4px; }
    .translation-tabs button, .tabs button { padding: 8px 14px; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
    .game-frame { height: 300px; }
    .ifr, .video-iframe { height: 260px; }
    .game-grid { grid-template-columns: 1fr; }

    /* Рекомендации */
    .random-series { padding: 14px 10px; margin: 15px 0; }
    .random-series-container { grid-template-columns: 1fr; gap: 10px; }
    .random-series-image { width: 95px; height: 135px; }
    .random-series-content { padding: 10px; }

    /* Блок "Смотреть ещё мультсериалы": 3 в ряд (2 полных ряда по 3 = 6 без пустых мест) */
    .random-series-simple { padding: 14px 10px; margin: 15px 0; }
    .random-series-simple-container { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .random-series-simple-container > .random-series-simple-item:nth-child(n+5) {
        display: flex; /* Возвращаем все 6 элементов, так как 6 делится на 3 без остатка */
    }

    /* ========================================================= */
    /* АДАПТИВ КАТАЛОГА (tas_p.html и др.) ПОД МОБИЛЬНЫЕ ЭКРАНЫ  */
    /* ========================================================= */
    .series-container { padding: 12px 8px; margin: 15px 0; }
    .series-header { margin-bottom: 12px; }
    .series-sort {
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 6px;
        gap: 6px;
        -webkit-overflow-scrolling: touch;
    }
    .series-sort span { display: none; }
    .sort-btn { flex-shrink: 0; padding: 6px 12px; font-size: 12.5px; }

    .series-table-header { display: none; }
    .series-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 10px 12px;
        margin-bottom: 8px;
        gap: 4px 8px;
        border: 1px solid var(--theme-border);
        border-radius: 6px;
    }
    .series-td {
        padding: 0;
        margin: 0;
        font-size: 12.5px;
    }
    .series-td[data-title="Название"] {
        flex: 0 0 100%;
        font-weight: 600;
        font-size: 15px;
        color: var(--theme-accent);
    }
    .series-td[data-title="Оригинал"] {
        flex: 0 0 100%;
        font-size: 12px;
        color: var(--theme-update);
        margin-bottom: 6px;
        padding-bottom: 6px;
        border-bottom: 1px dashed var(--theme-border);
    }
    .series-td[data-title="Год"],
    .series-td[data-title="Рейтинг"],
    .series-td[data-title="Сезоны"],
    .series-td[data-title="Статус"] {
        flex: 0 0 auto;
        min-width: 0;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
    .series-td[data-title="Год"]::before { content: "Год:"; color: var(--theme-secondary); font-size: 11px; }
    .series-td[data-title="Рейтинг"]::before { content: "★"; color: var(--theme-secondary); font-size: 12px; }
    .series-td[data-title="Сезоны"]::before { content: "Сез:"; color: var(--theme-secondary); font-size: 11px; }

    /* Pagefind поиск на мобильных */
    .pagefind-ui__result { flex-direction: column !important; gap: 12px !important; }
    .pagefind-ui__result-thumb { width: 100% !important; max-width: 220px !important; margin: 0 auto !important; }
}

/* ========================================================================= */
/* АДАПТИВ .con-meta ОТ 600px И МЕНЬШЕ (СТРОГО В 1–2 РЯДА)                   */
/* ========================================================================= */
@media (max-width: 600px) {
    .con-poster {
        display: flex;
        flex-direction: column;
        margin: 6px 0 10px 0;
    }

    .con-meta {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 6px;
        padding: 6px 8px;
        background: rgba(0, 0, 0, 0.75);
        border-radius: 6px;
    }

    .con-meta .meta-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 4px 8px;
        width: 100%;
    }

    .con-meta .meta-item {
        font-size: 11.5px;
        padding: 2px 5px;
        line-height: 1.2;
    }

    .con-meta .meta-item.accent {
        padding-left: 30px;
        background-size: 26px auto;
        font-size: 12px;
    }

    .con-meta .con-genre {
        gap: 4px;
        padding: 0;
    }

    .con-meta .con-genre span {
        font-size: 8.5px;
        padding: 2px 5px;
    }

    .con-meta .meta-item.age-badge {
        width: auto;
        min-width: 24px;
        height: 18px;
        padding: 0 5px;
        font-size: 10px;
    }

    .con-meta .status-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* --- Мелкие телефоны (iPhone SE / Mini / базовые смартфоны — до 480px) --- */
@media (max-width: 480px) {
    .logo a { width: 165px; height: 38px; }
    .mobile-menu { width: min(285px, 90vw); padding: 15px; }
    
    .movies-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .spa { padding: 10px; font-size: 14px; }

    .top-search-wrapper { padding: 0 8px; margin: 0 0 12px 0; }
    .top-search-inner { padding: 6px; }
    .top-search-inner input { padding: 8px 12px; font-size: 16px; }
    .top-search-inner button { padding: 0 16px; font-size: 13px; }

    .top-new-wrapper { padding: 0; margin: 10px 0; }
    .top-new-scroll-area { padding: 0 10px 10px 10px; gap: 10px; }
    .top-new-card { width: 100px; }
    .top-new-img-wrap { height: 145px; }

    /* 2 в ряд на узких смартфонах (3 полных ряда по 2 = 6) */
    .random-series-simple-container { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .random-series-simple-content { padding: 8px; }
    .random-series-simple-title { font-size: 12px; }

    .con-description { margin: 12px 0; padding: 12px 14px; font-size: 14px; }
    .ifr, .video-iframe { height: 220px; }

    footer { padding: 15px 10px; }
}

/* --- Самые узкие экраны (iPhone 5s / SE 1-го поколения — до 340px) --- */
@media (max-width: 340px) {
    .top-search-inner button { padding: 0 10px; font-size: 12px; }
    .con-meta .meta-item { font-size: 10.5px; padding: 1px 4px; }
}

/* ========================================================================= */
/* ВЕРСИЯ ДЛЯ ТЕЛЕВИЗОРОВ (SMART TV / ANDROID TV / TIZEN / WEBOS)            */
/* Обычные мониторы остаются строго 1270px!                                  */
/* ========================================================================= */
body.tv-mode .page-wrapper,
body.tv-mode header,
body.tv-mode header.fixed,
body.tv-mode .top-new-wrapper,
body.tv-mode .top-search-wrapper {
    max-width: 1720px;
}

/* Подсветка элементов при управлении пультом ДУ (D-Pad навигация) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--dark-secondary) !important;
    outline-offset: 2px;
    box-shadow: 0 0 15px rgba(222, 152, 40, 0.85) !important;
}

body.tv-mode .movie-card:focus,
body.tv-mode .top-new-card:focus,
body.tv-mode .updates-item:focus,
body.tv-mode .series-row:focus,
body.tv-mode .gallery-item:focus {
    outline: 4px solid #ff9e46 !important;
    transform: scale(1.04);
    box-shadow: 0 0 25px rgba(255, 158, 70, 0.9) !important;
    z-index: 50;
}