/* 
Стили для поиска */
/* Стили для поиска */
.search-container {
    position: relative;
    margin: 0 15px;
    flex: 1;
    max-width: 500px;
    min-width: 200px;
    z-index: 100;
}

#search-input {
    width: 100%;
    padding: 12px 20px;
    padding-right: 40px;
    border-radius: 30px;
    border: 2px solid var(--primary-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#search-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(3, 218, 198, 0.2);
}

#search-input::placeholder {
    color: var(--text-color);
    opacity: 0.6;
}

.search-container::after {
    content: '🔍';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    pointer-events: none;
}

/* Стили для результатов поиска */
.search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    border: 1px solid var(--border-color);
}

.search-results-count {
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    background: rgba(187, 134, 252, 0.05);
}

.search-result-item {
    display: flex;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: rgba(187, 134, 252, 0.08);
}

.search-result-link {
    display: flex;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.search-result-item img {
    width: 60px;
    height: 85px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.search-result-item:hover img {
    transform: scale(1.03);
}

.search-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
    transition: color 0.2s;
}

.search-result-item:hover .search-result-title {
    color: var(--primary-color);
}

.search-result-original {
    font-size: 13px;
    opacity: 0.8;
    color: var(--secondary-color);
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-color);
}

.no-results div {
    margin-bottom: 5px;
    font-weight: 500;
}

.no-results small {
    opacity: 0.7;
    font-size: 13px;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-results {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .search-container {
        margin: 10px 0;
        order: 3;
        width: 100%;
        max-width: 100%;
    }
    
    #search-input {
        padding: 10px 15px;
        padding-right: 35px;
        font-size: 14px;
    }
    
    .search-result-item {
        padding: 10px;
    }
    
    .search-result-item img {
        width: 50px;
        height: 70px;
        margin-right: 10px;
    }
}

/* Полоса прокрутки для результатов */
.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 0 12px 12px 0;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Стили для пагинации меню */
.menu-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 10px 0;
    margin-top: 10px;
}

.menu-pagination button {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: var(--text-color);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.menu-pagination button:hover {
    background: rgba(255,255,255,0.2);
}

.menu-pagination button.active {
    background: var(--primary-color);
    color: white;
}

/* Стили для грид-меню */
.grid-menu {
    width: 90vw;
    max-width: 1200px;
    padding: 1rem;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    color: var(--text-color);
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
}

.menu-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.menu-container {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 1rem;
}


/* Адаптация для разных экранов */
@media (max-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .grid-menu {
        width: 95vw;
    }
    
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 480px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.5rem;
    }
    
    .menu-item {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* Полоса прокрутки */
.menu-container::-webkit-scrollbar {
    width: 8px;
}

.menu-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.menu-container::-webkit-scrollbar-track {
    background: transparent;
}
/* Стили для мега-меню */
/* Основные стили для меню */
.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1001; /* Важно: должен быть выше чем у футера */
}

.mega-menu {
    position: absolute;
    left: 0;
    top: 100%;
    width: 90vw;
    max-width: 600px;
    max-height: 70vh;
    background: var(--card-bg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 0 0 8px 8px;
    padding: 1rem;
    display: none;
    z-index: 1000; /* Важно: меньше чем у .main-menu */
    border-top: 3px solid var(--primary-color);
    overflow: hidden;
}

/* Добавьте это чтобы исправить позиционирование */
header {
    position: relative;
    z-index: 1002; /* Самый высокий z-index в header */
}

/* Убедитесь что футер имеет меньший z-index */
footer {
    position: relative;
    z-index: 10; /* Должен быть меньше чем у меню */
}

.dropdown:hover .mega-menu {
    display: flex;
    flex-direction: column;
}

.menu-container {
    overflow-y: auto;
    flex: 1;
    padding-right: 0.5rem;
}

.menu-scrollable {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0.5rem;
}

.menu-column {
    flex: 1;
    min-width: 200px;
}

.menu-column h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 1;
}

.menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-column li {
    margin-bottom: 0.5rem;
}

.menu-column a {
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.2s;
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
}

.menu-column a:hover {
    color: var(--primary-color);
    background: rgba(255,255,255,0.05);
    padding-left: 0.75rem;
}

.menu-view-all a {
    color: var(--primary-color);
    font-weight: 500;
    white-space: nowrap;
    padding: 0.5rem;
}

.menu-view-all a:hover {
    text-decoration: underline;
}

/* Полоса прокрутки */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .mega-menu {
        width: 100vw;
        left: 0;
        right: 0;
        max-height: 60vh;
    }
    
    .menu-scrollable {
        flex-direction: column;
        gap: 1rem;
    }
    
    .menu-column {
        min-width: 100%;
    }
}
:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --primary-color: #bb86fc;
    --secondary-color: #03dac6;
    --card-bg: #1e1e1e;
    --header-bg: #1f1f1f;
    --border-color: #333;
}
/* Стили для рейтинга */
.rating-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    border-left: 3px solid #FFC107;
}

.rating-label {
    font-weight: bold;
    color: #FFC107;
    font-size: 14px;
    text-transform: uppercase;
}

.rating-value {
    font-size: 18px;
    font-weight: bold;
    color: #FFF;
    min-width: 30px;
    font-family: arial;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-star {
    position: relative;
    width: 20px;
    height: 20px;
}

.rating-star::before {
    content: '★';
    position: absolute;
    color: #3a3a3a;
    font-size: 20px;
}

.rating-star.filled::before {
    color: #FFC107;
    text-shadow: 0 0 5px rgba(255, 193, 7, 0.7);
}

.rating-star.half::after {
    content: '★';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #FFC107;
    text-shadow: 0 0 5px rgba(255, 193, 7, 0.7);
}

/* Для светлой темы */
body.light-theme .rating-block {
    background: rgba(255, 193, 7, 0.15);
}

body.light-theme .rating-star::before {
}
.light-theme {
    --bg-color: #f5f5f5;
    --text-color: #333;
    --primary-color: #6200ee;
    --secondary-color: #018786;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --border-color: #ddd;
}

* {
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
}

/* Header Styles */
header {
    background-color: var(--header-bg);
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

#theme-toggle {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#theme-toggle:hover {
    background-color: var(--secondary-color);
}

/* Main Content */
main {
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.featured h2, 
.about h2, 
.show-detail h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Compact Show Cards */
.shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.show-card {
    background-color: var(--card-bg);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.show-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.show-card img {
    width: 100%;
    height: auto;
    display: block;
}

.show-card h3 {
    padding: 0.5rem;
    font-size: 0.95rem;
    margin: 0;
    color: var(--text-color);
    text-align: center;
}

.show-card p {
    padding: 0 0.5rem 0.5rem;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.8rem;
    margin: 0;
    display: none !important; /* Полностью отключаем отображение описания */
}

/* Удалите или закомментируйте этот блок полностью */
/*
.show-card:hover p {
    display: block;
}
*/

/* Show Detail Page */
.show-detail .show-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.show-detail .poster {
    max-width: 200px;
    border-radius: 6px;
}

.show-detail .meta-info {
    flex: 1;
    min-width: 250px;
}

.show-detail .meta-info p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.description {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.player-container {
    margin: 1.5rem 0;
    background-color: var(--card-bg);
    padding: 1rem;
    border-radius: 6px;
}

.player-container iframe {
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 0.5rem auto;
    display: block;
    border: none;
    border-radius: 4px;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--header-bg);
    margin-top: 1.5rem;
    font-size: 0.9rem;
}
/* Добавьте это правило для html и body */
html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Используем viewport height вместо % для лучшей поддержки */
}

/* Обновите main, чтобы он занимал всё доступное пространство */
main {
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex: 1 0 auto; /* Это заставит main занимать всё свободное пространство */
}

/* Обновите стили футера */
footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--header-bg);
    margin-top: auto; /* Это прибьёт футер к низу */
    font-size: 0.9rem;
    width: 100%;
    flex-shrink: 0; /* Предотвращает сжатие футера */
}
/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    nav ul li {
        margin: 0 0.75rem 0.5rem;
    }
    
    .show-detail .show-meta {
        flex-direction: column;
    }
    
    .show-detail .poster {
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    .shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .player-container iframe {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .show-card h3 {
        font-size: 0.85rem;
        padding: 0.3rem;
    }
    
    main {
        padding: 1rem;
    }
}


/* Стили для комментариев */
/* Стили для системы комментариев */
.comments-section {
    margin-top: 2rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.comments-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.comment {
    display: flex;
    padding: 1rem 0;
    position: relative;
}

.comment:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    margin-right: 1rem;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.comment-content {
    flex: 1;
    position: relative;
}

/* Стили для ответов */
.comment.is-reply {
    margin-left: 2rem;
    position: relative;
    padding-top: 1rem;
}

.comment.is-reply::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 2.5rem;
    width: 1.5rem;
    height: calc(100% - 2.5rem);
    border-left: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    border-bottom-left-radius: 8px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    align-items: center;
}

.comment-username {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
}

.comment-text {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    color: var(--text-color);
    opacity: 0.7;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.vote-btn svg {
    fill: currentColor;
}

.vote-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,0.05);
}

.like-btn.active {
    color: #4CAF50;
    opacity: 1;
}

.dislike-btn.active {
    color: #F44336;
    opacity: 1;
}

.reply-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.reply-btn:hover {
    text-decoration: underline;
}

.reply-indicator {
    background: rgba(187, 134, 252, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.cancel-reply {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 0.3rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.cancel-reply:hover {
    opacity: 1;
}

.no-comments, .error-message {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-color);
    opacity: 0.7;
}

.alert {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    background: var(--card-bg);
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    transition: opacity 0.3s;
}

.alert-info {
    background: var(--primary-color);
}

.alert-error {
    background: #F44336;
}

@media (max-width: 768px) {
    .comment {
        padding: 0.75rem 0;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-right: 0.75rem;
    }
    
    .comment.is-reply {
        margin-left: 1rem;
    }
    
    .comment.is-reply::before {
        left: -0.75rem;
        width: 0.75rem;
    }
    
    .comment-actions {
        gap: 0.5rem;
    }
}


.comments-section {
    margin-top: 2rem;
    background-color: var(--card-bg);
    padding: 1.25rem;
    border-radius: 6px;
}

#comments-list {
    margin-bottom: 1.5rem;
}

.comment {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.comment-text {
    line-height: 1.5;
    font-size: 0.9rem;
}

#comment-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

#comment-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
    font-size: 0.9rem;
}

#comment-form button:hover {
    background-color: var(--secondary-color);
}

/* pizda */
    .player-options-row {
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .player-options-row span {
        font-weight: 500;
        margin-right: 5px;
    }

    .translation-btn, .quality-btn {
        padding: 5px 10px;
        border: 1px solid var(--primary-color);
        background: transparent;
        color: var(--primary-color);
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 14px;
    }

    .translation-btn:hover, .quality-btn:hover {
        background: rgba(187, 134, 252, 0.1);
    }

    .translation-btn.active, .quality-btn.active {
        background: var(--primary-color);
        color: white;
    }

    /* Адаптация для мобильных */
    @media (max-width: 768px) {
        .player-options-row {
            flex-direction: column;
            align-items: flex-start;
        }
        
        .player-options-row span {
            margin-bottom: 5px;
            width: 100%;
        }
        
        .translation-btn {
            width: 100%;
            text-align: left;
            padding: 8px 12px;
        }
    }
.player-options-row {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.player-options-row span {
    font-weight: 500;
    margin-right: 5px;
}

.translation-btn, .quality-btn {
    padding: 5px 10px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.translation-btn:hover, .quality-btn:hover {
    background: rgba(187, 134, 252, 0.1);
}

.translation-btn.active, .quality-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .player-options-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .player-options-row span {
        margin-bottom: 5px;
        width: 100%;
    }
    
    .translation-btn {
        width: 100%;
        text-align: left;
        padding: 8px 12px;
    }
}
.show-card {
    position: relative;
}

.poster-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.poster-container img {
    width: 100%;
    height: auto;
    display: block;
}

.rating-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 10px;
}

.rating {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    min-width: 60px;
    text-align: center;
    backdrop-filter: blur(4px);
}

.kp-rating {
    background: linear-gradient(135deg, rgba(255, 87, 34, 0.9), rgba(255, 152, 0, 0.9));
    color: white;
    font-size: 18px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 2px solid #ff5722;
}

.imdb-rating {
    background: linear-gradient(135deg, rgba(245, 197, 24, 0.9), rgba(230, 180, 20, 0.9));
    color: #000;
    font-size: 20px;
    font-weight: 900;
    border: 2px solid #f5c518;
}

.rating-value {
    display: block;
    font-size: 24px;
    line-height: 1;
    margin-bottom: 2px;
}

.kp-rating::before {
    content: "КП";
    font-size: 12px;
    opacity: 0.9;
    display: block;
}

.imdb-rating::before {
    content: "IMDB";
    font-size: 12px;
    font-weight: bold;
    color: #000;
    opacity: 0.9;
    display: block;
}

h3 {
    margin-top: 10px;
    font-size: 16px;
    text-align: center;
}









/* Стили для страницы фильма */
.movie-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Контейнер для постера и информации в ряд */
.movie-header-container {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.movie-poster-side {
    flex: 0 0 300px;
}
.movie-poster-side img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.movie-info-side {
    flex: 1;
    min-width: 300px;
}

.original-title {
    color: #a0aec0;
    font-size: 0.8em;
}
.movie-meta {
    color: #a0aec0;
    margin: 20px 0;
    line-height: 1.6;
}
.meta-label {
    color: #718096;
}

/* Стили для значков рейтингов */
.ratings-badges {
    display: flex;
    gap: 20px;
    margin: 25px 0;
}
.rating-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
}
.kp-rating {
    background: #ff5722; /* Оранжевый Кинопоиск */
    color: white;
}
.imdb-rating {
    background: #f5c518; /* Желтый IMDb */
    color: black;
}
.rating-icon {
    font-weight: 900;
    margin-right: 8px;
}

/* Стили для плеера (как были) */
.player-section { margin: 30px 0; }
.player-wrapper {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    min-height: 500px;
    position: relative;
}
#player-iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: none;
}
.translation-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 8px;
}
.translation-btn {
    padding: 10px 20px;
    background: #2d3748;
    color: #cbd5e0;
    border: 1px solid #4a5568;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}
.translation-btn:hover { background: #4a5568; }
.translation-btn.active {
    background: #00aaff;
    color: white;
    border-color: #00aaff;
    font-weight: bold;
}

/* Информация и комментарии (как были) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 30px 0;
}
.info-block {
    background: rgba(255,255,255,0.03);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #00aaff;
}
.comments-section { margin: 50px 0; }
.comment-form { margin-bottom: 30px; }
.form-group { margin-bottom: 15px; }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 5px;
    color: white;
}
.submit-btn {
    background: #00aaff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}
.comments-list { margin-top: 30px; }

@media (max-width: 768px) {
    .movie-header-container { flex-direction: column; }
    .movie-poster-side { max-width: 250px; margin: 0 auto; }
    .translation-buttons { justify-content: flex-start; }
}















/* Убираем ::before у рейтингов */
.rating-badge::before {
    content: none !important;
}

/* Альтернативный вариант: делаем рейтинги чистыми блоками */
.kp-rating, .imdb-rating {
    position: relative;
    padding-left: 20px;
}

/* Или если хочешь иконки как в оригинале */
.kp-rating::before {
    /* Если хочешь кастомную иконку Кинопоиска */
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('/images/kp-icon.svg') no-repeat center;
    background-size: contain;
    margin-right: 8px;
    vertical-align: middle;
}

.imdb-rating::before {
    /* Иконка IMDb */
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('/images/imdb-icon.svg') no-repeat center;
    background-size: contain;
    margin-right: 8px;
    vertical-align: middle;
}

/* Если нет иконок, просто скрываем */
.rating-icon {
    display: none; /* Скрываем "KP" и "IMDb" текст */
}

/* Вместо этого показываем логотипы */
.kp-rating .rating-value::after {
    content: 'Кинопоиск';
    font-size: 12px;
    opacity: 0.8;
    display: block;
}

.imdb-rating .rating-value::after {
    content: 'IMDb';
    font-size: 12px;
    opacity: 0.8;
    display: block;
}

















/* Стили для сетки карточек на главных страницах категорий */
main {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: left;
    font-size: 2.5rem;
}

.featured {
    margin-top: 20px;
}

/* Сетка карточек */
.shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin: 0 auto;
    padding: 20px 0;
    justify-items: center;
}

.show-card {
    width: 200px;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.show-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.poster-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.poster-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.show-card:hover .poster-container img {
    transform: scale(1.05);
}

/* Наложение рейтингов */
.rating-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 8px 10px;
}

/* Стили для отдельных рейтингов */
.rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 65px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: bold;
    backdrop-filter: blur(4px);
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.kp-rating {
    background: rgba(255, 87, 34, 0.9); /* Оранжевый Кинопоиск */
    border-color: #ff5722;
}

.imdb-rating {
    background: rgba(245, 197, 24, 0.9); /* Желтый IMDb */
    border-color: #f5c518;
}

.rating-value {
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.kp-rating .rating-value {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.imdb-rating .rating-value {
    color: #000;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Подписи рейтингов */
.rating::before {
    content: '';
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.95;
}

.kp-rating::before {
    content: 'КП';
    color: white;
}

.imdb-rating::before {
    content: 'IMDb';
    color: #000;
    font-weight: 800;
}

/* Заголовок карточки */
.show-card h3 {
    padding: 15px 12px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    color: var(--text-color);
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Эффект при наведении на заголовок */
.show-card:hover h3 {
    color: var(--primary-color);
}

/* Адаптация для разных экранов */
@media (max-width: 1200px) {
    .shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }
    
    .show-card {
        width: 180px;
    }
    
    .poster-container {
        height: 270px;
    }
}

@media (max-width: 768px) {
    main {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .show-card {
        width: 160px;
    }
    
    .poster-container {
        height: 240px;
    }
    
    .show-card h3 {
        font-size: 13px;
        padding: 12px 10px;
    }
    
    .rating {
        min-width: 55px;
        padding: 3px 6px;
    }
    
    .rating-value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
        padding: 10px;
    }
    
    .show-card {
        width: 140px;
    }
    
    .poster-container {
        height: 210px;
    }
    
    .show-card h3 {
        font-size: 12px;
        padding: 10px 8px;
        min-height: 55px;
    }
    
    .rating {
        min-width: 50px;
        padding: 2px 5px;
    }
    
    .rating-value {
        font-size: 14px;
    }
    
    .rating::before {
        font-size: 9px;
    }
}

/* Для очень больших экранов */
@media (min-width: 1600px) {
    .shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 30px;
    }
    
    .show-card {
        width: 220px;
    }
    
    .poster-container {
        height: 330px;
    }
    
    .show-card h3 {
        font-size: 15px;
        padding: 18px 15px;
    }
}

/* Анимация появления карточек */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Анимация появления карточек */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.show-card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

/* Задержка анимации для каждой карточки */
.show-card:nth-child(1) { animation-delay: 0.1s; }
.show-card:nth-child(2) { animation-delay: 0.2s; }
.show-card:nth-child(3) { animation-delay: 0.3s; }
.show-card:nth-child(4) { animation-delay: 0.4s; }
.show-card:nth-child(5) { animation-delay: 0.5s; }
.show-card:nth-child(6) { animation-delay: 0.6s; }
.show-card:nth-child(7) { animation-delay: 0.7s; }
.show-card:nth-child(8) { animation-delay: 0.8s; }
.show-card:nth-child(9) { animation-delay: 0.9s; }
.show-card:nth-child(10) { animation-delay: 1.0s; }

/* ===== СТИЛИ ДЛЯ ПЛЕЕРА - ПРАВИЛЬНЫЕ ПРОПОРЦИИ 16:9 ===== */

.player-section {
    margin: 30px 0;
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-header {
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
}

.player-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.player-btn {
    padding: 10px 20px;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.player-btn:hover {
    background: rgba(187, 134, 252, 0.1);
}

.player-btn.active {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    border-color: var(--primary-color);
}

.players-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    padding: 0;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.player-wrapper {
    display: none;
    width: 100%;
    max-width: 800px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin: 0;
    padding: 0;
}

.player-wrapper.active {
    display: block;
}


/* Анимация появления карточек */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.show-card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

/* Задержка анимации для каждой карточки */
.show-card:nth-child(1) { animation-delay: 0.1s; }
.show-card:nth-child(2) { animation-delay: 0.2s; }
.show-card:nth-child(3) { animation-delay: 0.3s; }
.show-card:nth-child(4) { animation-delay: 0.4s; }
.show-card:nth-child(5) { animation-delay: 0.5s; }
.show-card:nth-child(6) { animation-delay: 0.6s; }
.show-card:nth-child(7) { animation-delay: 0.7s; }
.show-card:nth-child(8) { animation-delay: 0.8s; }
.show-card:nth-child(9) { animation-delay: 0.9s; }
.show-card:nth-child(10) { animation-delay: 1.0s; }

/* ===== СТИЛИ ДЛЯ ПЛЕЕРА - ПРАВИЛЬНЫЕ ПРОПОРЦИИ 16:9 ===== */

.player-section {
    margin: 30px 0;
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-header {
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    width: 100%;
    max-width: 1000px;
    box-sizing: border-box;
}

.player-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.player-btn {
    padding: 10px 20px;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.player-btn:hover {
    background: rgba(187, 134, 252, 0.1);
}

.player-btn.active {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    border-color: var(--primary-color);
}

.players-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    padding: 0;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    border-radius: 10px;
}

.player-wrapper {
    display: none;
    width: 100%;
    max-width: 800px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin: 0;
    padding: 0;
}

.player-wrapper.active {
    display: block;
}

/* ОСНОВНОЙ СПОСОБ 16:9 - ЧИСТЫЙ ASPECT-RATIO */
.player-wrapper {
    aspect-ratio: 16/9;
    width: 100%;
    height: auto;
    max-width: 1000px;
}

/* Фоллбек для старых браузеров */
@supports not (aspect-ratio: 16/9) {
    .player-wrapper {
        position: relative;
        width: 100%;
        height: 0;
        padding-bottom: 56.25%; /* 9/16 = 0.5625 */
    }
}

.player-wrapper iframe,
.player-wrapper ins {
    width: 100% !important;
    height: 100% !important;
    /*! border: none !important; */
    background: #000;
    /*! margin: 0 !important; */
    /*! padding: 0 !important; */
    /*! display: block !important; */
}

/* Для старых браузеров - позиционирование абсолютом */
@supports not (aspect-ratio: 16/9) {
    .player-wrapper iframe,
    .player-wrapper ins {
        position: absolute;
        top: 0;
        left: 0;
    }
}

/* Специфичные стили для Vibix плеера */
#vibix-player ins {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ===== */

/* Для всех мобилок до 768px */
@media (max-width: 768px) {
    .player-section {
        margin: 20px 0;
        padding: 0;
        width: 100%;
    }
    
    .player-header {
        margin: 0 0 15px 0;
        border-radius: 0;
        padding: 12px 15px;
        width: 100%;
        max-width: 100%;
        background: var(--card-bg);
    }
    
    /* Контейнер плеера на всю ширину */
    .players-container {
        max-width: 100%;
        width: 100%;
        padding: 0;
    }
    
    /* Плеер занимает всю доступную ширину */
    .player-wrapper {
        width: 100%;
        /*! max-width: 100%; */
        border-radius: 0;
        aspect-ratio: 16/9;
    }
    
    /* Фоллбек для мобильных без aspect-ratio */
    @supports not (aspect-ratio: 16/9) {
        .player-wrapper {
            padding-bottom: 56.25%;
            height: 0;
        }
    }
    
    .player-selector {
        justify-content: center;
    }
    
    .player-btn {
        padding: 8px 15px;
        font-size: 13px;
        flex: 1;
        min-width: 100px;
        text-align: center;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .player-selector {
        flex-direction: column;
    }
    
    .player-btn {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* УБЕРАЕМ ВСЕ ВОЗМОЖНЫЕ ВНУТРЕННИЕ ОТСТУПЫ */
.player-wrapper iframe,
.player-wrapper object,
.player-wrapper embed,
.player-wrapper ins {
    /*! padding: 0 !important; */
    /*! margin: 0 !important; */
    border: 0 !important;
    /*! display: block !important; */
}

/* ГЛОБАЛЬНЫЕ ФИКСЫ */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.movie-page {
    overflow-x: hidden;
}

/* СВЕТЛАЯ ТЕМА */
body.light-theme .player-header {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .player-btn {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

body.light-theme .player-btn:hover {
    background: #e0e0e0;
}

body.light-theme .player-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.movie-info-side h1 {
    margin-bottom: 5px;
    color: var(--primary-color);
    font-size: 2.2rem;
}

.movie-info-side .original-title {
    color: #a0aec0;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-style: italic;
    opacity: 0.8;
}