/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    text-decoration: inherit;
    font-weight: inherit;
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    box-sizing: border-box;
    font-style: inherit;
}

*:focus {
    outline: none;
    -moz-outline-style: none;
}

*::-moz-focus-inner {
    border: 0;
}

a {
    text-decoration: none;
    cursor: pointer;
}

p {
    text-align: justify;
}

b {
    font-weight: 600;
}

html {
    overflow-y: scroll;
}

.nowrap {
    white-space: nowrap;
}

.clear {
    clear: both;
}

/* Основные стили страницы */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #e6e6e6;
    min-height: 100vh;
}

/* Скрытие системных элементов DLE при необходимости */
.speedbar {
    background: #fff;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 13px;
}

/* Заголовок страницы */
.page-header {
    margin: 15px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1e1e1e;
    margin: 0;
    position: relative;
    padding-left: 12px;
}

.page-header h1:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: #2c75ff;
    border-radius: 2px;
}

/* Боковое меню (иконки справа) */
.side-menu {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 30, 30, 0.95);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.side-menu a,
.side-menu button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    color: #e6e6e6;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 18px;
}

.side-menu a:hover,
.side-menu button:hover {
    background: #2c75ff;
    color: #fff;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .side-menu {
        display: none;
    }
}

html {
    height: 100%;
    overflow-y: scroll;
    overflow-x: auto;
}

body {
    height: 1px;
    min-height: 100%;
    position: relative;
    font-weight: 400;
    text-decoration: none;
    font-family: 'Ubuntu', sans-serif;
    background-color: #000;
    color: #333;
    font-size: 13px;
}

/* Header Styles */
.site-header {
    background-color: #1e1e1e;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #2c75ff;
    text-decoration: none;
    text-transform: uppercase;
}

.logo a:hover {
    color: #1e5fd9;
}

/* Navigation Menu */
.main-nav {
    flex: 1;
    margin: 0 20px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: 5px 9px;
    color: #e6e6e6;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s;
    border-radius: 3px;
}

.nav-menu a:hover {
    background-color: #2c75ff;
    color: #fff;
}

/* Header Search */
.header-search {
    margin: 0 15px;
}

.header-search form {
    display: flex;
    align-items: center;
    background-color: #2a2a2a;
    border-radius: 20px;
    overflow: hidden;
}

.search-input {
    background: transparent;
    border: none;
    padding: 8px 15px;
    color: #e6e6e6;
    width: 200px;
    font-size: 13px;
}

.search-input::placeholder {
    color: #888;
}

.search-input:focus {
    outline: none;
}

.search-btn {
    background: transparent;
    border: none;
    padding: 8px 15px;
    color: #e6e6e6;
    cursor: pointer;
    font-size: 16px;
}

.search-btn:hover {
    color: #2c75ff;
}

/* Header User */
.header-user {
    margin-left: 15px;
}

.login-btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: #2c75ff;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #1e5fd9;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #e6e6e6;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 15px 30px;
    font-size: 13px;
    color: #888;
}

.breadcrumbs a {
    color: #2c75ff;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-popup-content {
        padding: 30px 20px;
        max-width: 100%;
    }

    .login-popup .login-form h2 {
        font-size: 24px;
    }

    .header-container {
        flex-wrap: wrap;
        padding: 10px 15px;
    }

    .container {
        padding: 0 10px;
    }

    .breadcrumbs {
        padding: 10px 0;
    }

    .main-nav {
        display: none;
        width: 100%;
        order: 3;
        margin: 10px 0 0 0;
    }

    .main-nav.active {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .nav-menu a {
        padding: 12px 15px;
        border-bottom: 1px solid #2a2a2a;
    }

    .header-search {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .logo a {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 5px;
    }

    .page-header {
        padding: 0 0 12px 0;
        margin-bottom: 15px;
    }

    .page-header h1 {
        font-size: 18px;
        padding-left: 10px;
    }

    .page-header h1:before {
        width: 3px;
        height: 20px;
    }

    .logo a {
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 3px;
    }
}

@media (max-width: 480px) {
    .search-input {
        width: 150px;
    }
}

/* Login Button */
.login-btn {
    padding: 8px 20px;
    background: #2c75ff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    background: #1e5fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 117, 255, 0.3);
}

/* Login Popup */
.login-popup {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    margin: 0 !important;
}

.login-popup.hidden {
    display: none !important;
}

.login-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(8px);
    z-index: 99998 !important;
    cursor: pointer;
}

.login-popup-content {
    position: relative !important;
    background: #fff !important;
    border-radius: 12px !important;
    padding: 40px !important;
    max-width: 480px !important;
    width: 100% !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    animation: popupShow 0.3s ease;
    z-index: 99999 !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    margin: 0 auto !important;
}

@keyframes popupShow {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.login-popup-close:hover {
    background: #e6e6e6;
    color: #333;
}

/* Login Form in Popup */
.login-popup .login-form h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1e1e1e;
    margin: 0 0 8px 0;
    text-align: center;
}

.login-popup .login-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
    text-align: center;
}

.login-popup .form-group {
    margin-bottom: 20px;
}

.login-popup .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.login-popup .form-group input[type="text"],
.login-popup .form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
}

.login-popup .form-group input:focus {
    outline: none;
    border-color: #2c75ff;
    box-shadow: 0 0 0 3px rgba(44, 117, 255, 0.1);
}

.login-popup .checkbox-group {
    display: flex;
    align-items: center;
}

.login-popup .checkbox-group label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.login-popup .checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.login-popup .button {
    width: 100%;
    padding: 14px;
    background: #2c75ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.login-popup .button:hover {
    background: #1e5fd8;
    box-shadow: 0 4px 12px rgba(44, 117, 255, 0.3);
}

.login-popup .login-links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.login-popup .login-links a {
    color: #2c75ff;
    text-decoration: none;
}

.login-popup .login-links a:hover {
    text-decoration: underline;
}

/* User Panel */
.user-panel {
    position: relative;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.user-avatar:hover {
    border-color: #2c75ff;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* User Menu Dropdown */
.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: all 0.3s;
    z-index: 1000;
}

.user-menu.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

.user-menu-header {
    padding: 15px;
    border-bottom: 1px solid #e6e6e6;
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-menu-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.user-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-info {
    flex: 1;
}

.user-menu-name {
    font-weight: 600;
    color: #1e1e1e;
    font-size: 14px;
    margin-bottom: 3px;
}

.user-menu-group {
    font-size: 12px;
    color: #666;
}

.user-menu-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.user-menu-list li {
    margin: 0;
}

.user-menu-list li.separator {
    height: 1px;
    background: #e6e6e6;
    margin: 8px 0;
}

.user-menu-list a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.user-menu-list a:hover {
    background: #f5f5f5;
    color: #2c75ff;
}

#body {
    background-position: center 0;
    background-repeat: no-repeat;
    background-size: 100%;
    height: 1px;
    min-height: 100%;
}

#page {
    width: 100%;
    max-width: 1140px;
    min-width: 288px;
    margin: 0 auto;
    background-color: #e6e6e6;
    min-height: 100%;
    box-shadow: 0 0 15px #111;
    position: relative;
    overflow: visible;
}

/* Футер */
#footer {
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    color: #e6e6e6;
    padding: 15px 0;
}

#footer .links a {
    opacity: 0.7;
}

#footer .links a:hover {
    opacity: 1;
}

/* Контейнер */
.content {
    width: 95%;
    max-width: 1000px;
    min-width: 288px;
    margin: 0 auto;
}

/* Заголовки H2 */
h2 {
    width: 95%;
    max-width: 1140px;
    min-width: 288px;
    margin: 0 auto;
    font-size: 40px;
    padding-bottom: 0.5em;
    color: #1e1e1e;
    position: relative;
    z-index: 1;
    overflow: hidden;
    text-align: center;
    line-height: 1.5em;
}

h2:before,
h2:after {
    content: '';
    display: inline-block;
    width: 100%;
    height: 2px;
    background: #2c75ff;
    z-index: -1;
    position: relative;
    top: -10px;
}

h2:before {
    right: 0.7em;
    margin: 0 0 0 -100%;
}

h2:after {
    left: 0.7em;
    margin: 0 -100% 0 0;
}

@media all and (max-width: 550px) {

    h2:before,
    h2:after {
        display: none;
    }
}

/* Стилизация плеера */
.player-container {
    position: relative;
    margin: 0px 0;
}

.player-image {
    width: 100%;
    max-width: auto;
    height: 500px;
    margin: 0 auto;
    border-radius: 0px;
    object-fit: cover;
}

.player-link {
    display: block;
    position: relative;
}

.video-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 соотношение */
    height: 0;
    overflow: hidden;
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.videoContainer {
    position: relative;
}

.playBtn {
    position: absolute;
    width: 96px;
    height: 96px;
    left: 50%;
    top: 50%;
    margin-left: -48px;
    margin-top: -48px;
    transition: transform 0.3s;
}

.playBtn:hover {
    transform: scale(1.1);
}

/* Мобильная адаптация плеера */
@media (max-width: 768px) {
    h1 {
        font-size: 32px;
    }

    .player-image {
        max-width: 100%;
        height: auto;
        margin: 0 auto;
        display: block;
        max-width: 800px;
    }

    .playBtn {
        width: 64px;
        height: 64px;
        margin-left: -32px;
        margin-top: -32px;
    }
}

/* Заголовок фильма */
.film-title {
    font-size: 42px;
    padding: 0.5em 0;
    padding: calc(0.3em + 12px) 0;
    color: #1e1e1e;
}

.film-title .name {
    font-size: 42px;
    font-weight: bold;
    display: block;
    line-height: 1.4em;
}

.film-title .subtitle {
    font-size: 22px;
    display: block;
    font-weight: lighter;
    padding-top: 0.1em;
    line-height: 1.4em;
}

.film-title .season {
    padding-right: 0.4em;
}

/* Постер и информация о фильме */
.film .poster {
    float: left;
    width: 23%;
    height: 0;
    padding-bottom: 34.5%;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    margin-top: 20px;
}

.film .film-info {
    float: right;
    position: relative;
    width: 72%;
    font-size: 15px;
    font-weight: lighter;
    line-height: 1.6em;
    padding-top: 25px;
    margin-top: 20px;
}

.film .film-info::before {
    content: '';
    display: block;
    position: absolute;
    width: 25%;
    height: 5px;
    background: #2c75ff;
    left: 0;
    top: 0;
}

.film .info-table {
    margin-top: 20px;
    display: table;
}

.film .film-info .info-table .row {
    display: table-row;
}

.film .film-info .info-table .row div {
    display: table-cell;
    padding-bottom: 12px;
    vertical-align: top;
}

.film .film-info .info-table .label {
    font-weight: normal;
    white-space: nowrap;
    color: #1e1e1e;
    padding-right: 30px;
}

@media all and (max-width: 750px) {
    .film .poster {
        display: none;
    }

    .film .film-info {
        width: auto;
        float: none;
    }
}

@media all and (max-width: 520px) {

    .film .film-info .info-table,
    .film .film-info .info-table .row,
    .film .film-info .info-table .row .label,
    .film .film-info .info-table .row .value {
        display: block;
    }

    .film .film-info .info-table .row .label {
        padding: 0 0 4px 0;
    }

    .film .film-info .info-table .row .value {
        padding: 0 0 12px 0;
        border: none;
    }

    .film .film-info .info-table .row:last-child .value {
        padding: 0;
    }
}

/* Список серий */
.series-list {
    padding-bottom: 20px;
}

.series-list .title {
    font-weight: normal;
    color: #1e1e1e;
    padding-bottom: 3px;
    font-size: 14px;
}

.series-list a {
    display: inline-block;
    min-width: 1.4em;
    padding: 0 0.3em;
    line-height: 1.5em;
    text-align: center;
    color: #199cff;
    border-bottom: 1px dashed;
    margin: 0 0.5em 0.5em 0;
    font-size: 15px;
    cursor: pointer;
}

.series-list a.selected {
    color: #1e1e1e;
    border-bottom: none;
}

.series-list .seasons {
    padding-bottom: 10px;
}

.series-list .episodes-list {
    display: none;
}

.series-list .episodes-list.selected {
    display: block;
}

/* Комментарии */
.comments {
    padding: 20px 0;
}

.comment {
    padding-bottom: 22px;
    padding-left: 92px;
    position: relative;
}

.comment .avatar {
    position: absolute;
    width: 70px;
    height: 70px;
    left: 0;
    top: 0;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
}

.comment .data {
    min-height: 70px;
    padding: 0 0 0 15px;
    border-left: 1px solid #2c75ff;
}

.comment .user-name {
    text-transform: uppercase;
    font-size: 15px;
    color: #1e1e1e;
}

.comment .date {
    font-size: 12px;
    color: #888;
    padding: 2px 0;
    font-weight: lighter;
}

.comment .text {
    font-size: 15px;
    padding: 5px 0 0 0;
    font-weight: lighter;
    line-height: 1.3em;
}

.comments .avatar.no-image {
    border-radius: 0;
    background-color: #ccc;
}

@media all and (max-width: 550px) {
    .comment {
        padding-left: 0;
        padding-bottom: 10px;
    }

    .comment .avatar {
        display: none;
    }

    .comment .data {
        min-height: 0;
        padding: 0 0 10px 0;
        border-left: none;
        border-bottom: 1px solid #2c75ff;
    }

    .comments .comment:last-child .data {
        border: none;
    }
}

/* Форма добавления комментария */
.comment-add {
    display: block;
    width: 100%;
    padding-top: 15px;
}

.comment-add textarea {
    font-size: 15px;
    display: block;
    width: 100%;
    padding: 15px;
    color: #e6e6e6;
    background-color: #303030;
    height: 120px;
    min-height: 50px;
    max-height: 120px;
}

.comment-add textarea::-webkit-input-placeholder {
    color: #e6e6e6;
    text-overflow: ellipsis;
}

.comment-add textarea:focus::-webkit-input-placeholder {
    color: transparent;
}

.comment-add textarea::-moz-placeholder {
    color: #e6e6e6;
    text-overflow: ellipsis;
}

.comment-add textarea:focus::-moz-placeholder {
    color: transparent;
}

.comment-add .buttons {
    text-align: right;
    padding-top: 15px;
}

.comment-add .button {
    background-color: #2c75ff;
    border-radius: 3px;
    line-height: 46px;
    white-space: nowrap;
    padding: 0 35px;
    color: #121212;
    font-size: 16px;
    cursor: pointer;
}

/* Адаптивные баннеры */
.adaptive-banner img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}