body {
    font-family: "Segoe UI", Helvetica, Arial, sans-serif;
    margin: 0;
    background: #111;
    color: #eee;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Хедер */
.site-header {
    background: #111;
    color: #fff;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: relative;
}

/* Логотип */
.logo a {
    font-size: 20px;
    font-weight: bold;
    color: #ff3c00;
    text-decoration: none;
}
.logo span { color: #fff; }

/* Главное меню */
.main-nav > ul {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.main-nav > ul > li > a {
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    transition: color 0.2s;
}

.main-nav > ul > li > a:hover {
    color: #ff3c00;
}

/* Стили для активного пункта меню */
.main-nav ul li.active > a {
    color: #ff3c00 !important;
}

/* Для выпадающих меню - подсветка родительского пункта */
.main-nav ul li.dropdown.active > a {
    color: #ff3c00 !important;
}

/* Активное состояние внутри выпадающего меню */
.main-nav .dropdown-menu li.active a {
    background: #ff3c00 !important;
    border-radius: 4px;
    color: #fff !important;
}



/* Выпадающее меню */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    list-style: none;
    z-index: 1000;
}

@media (min-width: 769px) {
    .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 8px 10px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .dropdown:hover > .dropdown-menu {
        display: grid;
    }
    .hover-padding {
        position: absolute;
        top: 42px;
        max-width: 100px;
        height: 20px;
        width: 100%;
    }
    .dropdown:hover > a {
        color: #ff3c00;
    }
}

.dropdown-menu li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 6px 10px;
    transition: background 0.2s;
}
.dropdown-menu li a:hover {
    background: #ff3c00;
    border-radius: 4px;
}

/* Бургер */
.menu-toggle {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* Адаптив */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
        background: #111;
        flex-direction: column;
        padding: 10px 0;
    }
    .main-nav.open {
        display: flex;
    }
    .main-nav > ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

	.main-nav > ul > li {
		margin: 0 10px 5px;
	}

	.main-nav > ul > li > a {
		font-size: 20px;
	}
	
	.dropdown-menu li a {
		margin-left: 20px;
	}
    
    .dropdown-menu {
        position: relative;
        max-height: 50vh;
        overflow-y: auto;
        display: none !important;
        grid-template-columns: 1fr !important;
        padding: 0;
		top: 10px;
    }
    .dropdown.open .dropdown-menu {
        display: block !important;
    }
    .menu-toggle {
        display: block;
    }
    .dropdown .hover-padding {
        display: none;
    }
}

.menu-toggle.active {
    color: #ff3c00;
}

.main-nav {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 768px) {
    .main-nav {
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    .main-nav.open {
        opacity: 1;
        transform: translateY(0);
        display: flex;
    }
}

/* Контент */
.content { padding: 20px; }

/* Фильтры */
.filter-form {
    margin: 20px auto; 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px 20px; 
    color: #fff;
}

.filter-row { 
    display: flex; 
    flex-direction: column; 
}

.filter-row.two-thirds-width {
    grid-column: 1 / -2;
}

.filter-row.three-thirds-width {
    grid-column: 3 / -2;
    margin: 27px 0;
}

.filter-row label { 
    margin-bottom: 6px; 
    font-weight: bold; 
    color: #ffcc00; 
}

.filter-form select,
.filter-form input {
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #222;
    color: #fff;
    font-size: 1em;
    min-height: 24px;
}

.filter-form input:focus {
    border: 1px solid #444444;
    background: #151515;
	outline: none;
}

.filter-form button {
    padding: 13px 20px;
    border: none;
    border-radius: 5px;
    background: #ffcc00;
    color: #000;
    font-weight: bold;
    cursor: pointer;
}
.filter-form button:hover { 
    background: #e6b800; 
}

.name-button {
	margin-top: 27px;
}

.filter-form select:has(option[value=""]:checked) {
    color: #888;
}
.filter-form select option {
    color: #fff;
}
.filter-form select:focus {
    color: #fff;
    border-color: #444;
    background: #151515;
}

@media (max-width: 768px) {
    .filter-form { 
        grid-template-columns: 1fr; 
    }
    .filter-row.two-thirds-width {
        grid-column: 1 / -1;
    }
    .filter-row.three-thirds-width {
        grid-column: 1 / -1;
    }
}

.advanced-multiselect { 
    position: relative; 
    border: 1px solid #555; 
    border-radius: 6px; 
    cursor: pointer; 
    background: #222; 
    transition: background 0.2s ease;
}
.advanced-multiselect.open {
    background: #151515;
}

.selected-box { 
    padding: 6px; 
    display: flex; 
    flex-wrap: wrap;
    gap: 6px;
    align-items: center; 
    cursor: pointer;
    height: 28px;
}

.selected-box .arrow { 
    margin-left: auto;
}

.selected-tag {
    display: flex;
    align-items: center;
    background: #333;
    border: 1px solid #666;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.9em;
    color: #fff;
}
.selected-tag .remove {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
    color: #ff5555;
}
.selected-tag .remove:hover {
    color: #ff0000;
}

.options-container { 
    display: none; 
    position: absolute; 
    top: calc(100% - 3px);
    left: -1px;
    width: 100%;
    border: 1px solid #555; 
    border-top: none; 
    max-height: 250px; 
    overflow-y: auto; 
    background: #151515;
    z-index: 10; 
    box-shadow: 0 3px 6px rgba(0,0,0,0.3); 
    border-bottom-right-radius: 6px; 
    border-bottom-left-radius: 6px; 
}
.options-container.open { 
    display: block; 
}

.options-list { 
    display: flex; 
    flex-wrap: wrap; 
    padding: 8px; 
    gap: 6px; 
}
.option-tile { 
    border: 1px solid #666; 
    border-radius: 4px; 
    padding: 5px 10px; 
    background: #333; 
    display: flex; 
    align-items: center; 
    cursor: pointer; 
    color: #fff;
}
.option-tile input { 
    margin-right: 5px; 
}
.option-tile:hover { 
    background: #444; 
    border-color: #ffcc00; 
    color: #ffcc00; 
}
.selected-tile {
    border: 1px solid #666;
    border-radius: 4px;
    padding: 4px 8px;
    background: #333;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}
.selected-tile .remove {
    cursor: pointer;
    font-weight: bold;
    color: #ff6666;
}
.selected-tile .remove:hover {
    color: #ff0000;
}
.placeholder {
    color: #888;
    pointer-events: none;
}

.single-select {
    position: relative;
    border: 1px solid #444;
    border-radius: 5px;
    background: #222;
    cursor: pointer;
    user-select: none;
}
.single-select .selected-box {
    min-height: 28px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.single-select .selected-tile {
    border: 1px solid #666;
    border-radius: 4px;
    padding: 3px 8px;
    background: #333;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}
.single-select .selected-tile .remove {
    cursor: pointer;
    font-weight: bold;
    color: #ff6666;
}
.single-select .selected-tile .remove:hover { color: #ff0000; }
.single-select .placeholder {
    color: #888;
}
.single-select .options-container {
    display: none;
    position: absolute;
    top: calc(100% - 3px);
    left: -1px;
    width: 100%;
    border: 1px solid #444;
    border-top: none;
    background: #151515;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}
.single-select.open .options-container { display: block; }
.single-select .option-tile {
    display: block;
    padding: 8px 10px;
    cursor: pointer;
    color: #ffcc00;
}
.single-select.open {
	background: #151515;
	
}
.single-select .option-tile:hover {
    background: #444;
    color: #ffcc00;
}

/* Стили для чекбоксов внутри filter-row */
.filter-row .checkbox-row {
    margin: 5px 0 0 0;
    padding: 0;
    grid-column: 1 / -1;
}

.filter-row .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 11px;
    color: #888;
    transition: color 0.2s ease;
    position: relative;
    padding-left: 18px;
    margin: 0;
    line-height: 1.3;
}

.filter-row .checkbox-label:hover {
    color: #aaa;
}

.filter-row .checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.filter-row .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 12px;
    width: 12px;
    background-color: #222;
    border: 1px solid #555;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.filter-row .checkbox-label:hover .checkmark {
    border-color: #777;
}

.filter-row .checkbox-label input:checked ~ .checkmark {
    background-color: #ffcc00;
    border-color: #ffcc00;
}

.filter-row .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 2px;
    width: 3px;
    height: 6px;
    border: solid #000;
    border-width: 0 1px 1px 0;
    transform: rotate(45deg);
}

.filter-row .checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

/* Адаптивность для чекбоксов */
@media (max-width: 768px) {
    .filter-row .checkbox-label {
        font-size: 10px;
        padding-left: 20px;
    }
    
    .filter-row .checkmark {
        height: 12px;
        width: 12px;
    }
    
    .filter-row .checkmark:after {
        left: 3px;
        top: 0;
        width: 2px;
        height: 5px;
    }
}

/* Фильмы */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}
.persons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}
.movie-card, .actor-card {
    background: #1c1c1c;
    border-radius: 8px;
    overflow: hidden;
    color: #fff;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}
.movie-card:hover, .actor-card:hover { transform: scale(1.03); }
.movie-card img {
    width: 100%;
    height: 410px;
    object-fit: cover;
}
.actor-card img {
    width: 100%;
    height: 335px;
    object-fit: cover;
}
@media (max-width: 768px) {
    .movie-card img, .actor-card img {
        height: auto;
    }
}
.movie-card .info, .actor-card .info {
    flex: 1;
    line-height: 1.2;
    padding: 17px;
}
.movie-card h3, .actor-card h3 {
    font-size: 16px;
    margin: 0 0 15px 0;
    padding: 0;
}
.movie-card p, .actor-card p {
    margin: 7px 0;
    font-size: 13px;
    color: #888888;
}
.movie-card p span, .actor-card p span {
    margin: 7px 0;
    font-size: 12px;
    color: #999999;
}
.movie-card a, .actor-card a { color: #fff; text-decoration: none; }
.movie-card p a, .actor-card p a { color: #ccc; text-decoration: none; }
.movie-card a:hover, .actor-card a:hover { text-decoration: underline; }

/**/
.movie-card .film-title {
	margin: 0 0 5px 0;
}
.movie-card h3.film-title {
	font-size: 21px;
}
.movie-card .film-meta {
	margin-bottom: 20px;
}
.movie-card .film-tags {
	justify-content: left;
	border: 1px solid #292929;
	border-radius: 5px;
	padding: 10px;
	background: #1c1c1c;
	/*box-shadow: 4px 4px 36px rgba(0,0,0,0.5);*/
}
.movie-card .film-tags .tag {
	font-size: 12px;
}
.movie-card .quality-badge {
	margin: 20px auto;
	font-size: 13px;
	font-weight: normal;
	padding: 0px 8px 3px;
	background: #e8a70b;
}
.movie-card p {
	margin: 20px 0 0;
}
.movie-card p span {
	color: #bbb;
}
.movie-card a:hover {
	text-decoration: none;
}

/**/

/* ===== Ничего не найдено ===== */
.no-results {
    text-align: center;
    padding: 30px 20px;
    background: var(--card-bg, #1a1a1a);
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--border-color, #333);
}

.no-results h3 {
    color: var(--text-color, #fff);
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: 600;
}

.no-results p {
    color: var(--text-secondary, #ccc);
    margin-bottom: 25px;
    font-size: 1.1em;
    line-height: 1.4;
}

.reset-filters-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-color, #ff4141);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.reset-filters-btn:hover {
    background: var(--accent-hover, #f40612);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

/* ===== Ничего не найдено (фильмы) ===== */
.no-results {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg, #1a1a1a);
    border-radius: 8px;
    margin: 30px 0;
    border: 1px solid var(--border-color, #333);
}

.no-results h3 {
    color: var(--text-color, #fff);
    margin-bottom: 15px;
    font-size: 1.5em;
    font-weight: 600;
}

.no-results p {
    color: var(--text-secondary, #ccc);
    margin-bottom: 25px;
    font-size: 1.1em;
    line-height: 1.4;
}

.suggestions {
    margin: 25px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.suggestions p {
    margin-bottom: 15px;
    font-weight: 600;
}

.suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestions li {
    margin: 8px 0;
}

.suggestions a {
	text-decoration: none;
	transition: color 0.3s;
	font-weight: bold;
	color: #ffcc00;
	font-size: 1.4em;
}

.suggestions a:hover {
    color: #e6b800;
    text-decoration: underline;
}

.reset-filters-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-color, #ff4141);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.reset-filters-btn:hover {
    background: var(--accent-hover, #f40612);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}


/* ===== КАРТОЧКА АКТЁРА ===== */
.person-page {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    color: #eee;
}

.person-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
}

.person-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,204,0,0.1) 0%, transparent 70%);
}

.person-photo {
    flex-shrink: 0;
    width: 300px;
}

.person-photo img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    transition: transform 0.3s ease;
}

.person-photo img:hover {
    transform: scale(1.02);
}

.person-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.person-main h1 {
    font-size: 36px;
    margin: 0 0 15px 0;
    color: #ffcc00;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.person-career {
    display: inline-block;
    background: rgba(255,204,0,0.2);
    color: #ffcc00;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1px solid rgba(255,204,0,0.3);
}

.person-details {
    display: grid;
    gap: 12px;
    margin-bottom: 25px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.detail-icon {
    width: 20px;
    text-align: center;
    color: #ffcc00;
    font-size: 18px;
}

.detail-label {
    font-weight: 600;
    color: #aaa;
    min-width: 140px;
}

.detail-value {
    color: #fff;
    flex: 1;
}

/* Фильмография */
.person-films {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.person-films h2 {
    font-size: 24px;
    margin: 0 0 25px 0;
    color: #ffcc00;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.person-films h2::before {
    content: '🎬';
    font-size: 20px;
}

.films-list {
    display: grid;
    gap: 12px;
}

.film-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.film-item:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: #ffcc00;
    transform: translateX(5px);
}

.film-info {
    flex: 1;
}

.film-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.film-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.film-title a:hover {
    color: #ffcc00;
}

.film-meta {
    display: flex;
    gap: 15px;
    color: #888;
    font-size: 14px;
}

.film-year {
    color: #ffcc00;
    font-weight: 500;
}

.film-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 20px;
}

.role-badge {
    background: rgba(255,204,0,0.15);
    color: #ffcc00;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(255,204,0,0.3);
    white-space: nowrap;
}

/* Кнопка назад */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ffcc00 0%, #ff9900 100%);
    color: #000;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 20px;
	border: none;
    cursor: pointer;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,204,0,0.3);
}

/* Статистика */
.person-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #333;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #ffcc00;
    margin-bottom: 8px;
}

.stat-label {
    color: #aaa;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .person-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }
    
    .person-photo {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .person-photo img {
        height: 400px;
    }
    
    .person-main h1 {
        font-size: 28px;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .detail-label {
        min-width: auto;
    }
    
    .film-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .film-roles {
        margin-left: 0;
        justify-content: center;
    }
    
    .person-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .person-page {
        padding: 0 10px;
    }
    
    .person-header {
        padding: 15px;
    }
    
    .person-main h1 {
        font-size: 24px;
    }
    
    .film-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* Стили для тегов в фильмографии актёра */
.film-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

/* Яркий текст с приглушённой подложкой */
.film-tags .tag {
    opacity: 0.9;
    transition: all 0.2s ease;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

/* Текст как в основном дизайне, подложка приглушённая */
.film-tags .tag.type {
    background: rgba(204, 204, 204, 0.15);
    color: #ccc; /* Как в основном дизайне */
    border: 1px solid rgba(204, 204, 204, 0.25);
}

.film-tags .tag.genre {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107; /* Как в основном дизайне */
    border: 1px solid rgba(255, 193, 7, 0.25);
}

.film-tags .tag.country {
    background: rgba(41, 182, 246, 0.15);
    color: #29b6f6; /* Как в основном дизайне */
    border: 1px solid rgba(41, 182, 246, 0.25);
}

.film-tags .tag.role {
    background: rgba(156, 39, 176, 0.2);
    color: #e1bee7; /* Светлый фиолетовый */
    border: 1px solid rgba(156, 39, 176, 0.3);
}



/* Пагинация */
.pagination {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}
.pagination a,
.pagination span {
    padding: 8px 12px;
    border-radius: 5px;
    background: #222;
    color: #eee;
    text-decoration: none;
    font-weight: bold;
}
.pagination a:hover { background: #444; color: #ffcc00; }
.pagination .current { background: #ffcc00; color: #000; }
.pagination .dots { padding: 8px; color: #888; }

/* ===== СТРАНИЦА ФИЛЬМА ===== */
.movie-page {
    /*max-width: 1000px;*/
    margin: 20px auto;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    color: #eee;
}

.movie-page h1 {
    font-size: 28px;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.movie-top {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.movie-poster {
    text-align: center;
    margin-bottom: 20px;
	width: min-content;
}

.movie-poster img {
    width: 300px;
    max-height: auto;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.movie-title-en {
    font-size: 18px;
    font-weight: 400;
    margin: 10px 0 5px 0;
    color: #cccccc;
}

.slogan {
    font-style: italic;
    color: #999;
    margin: 5px 0 20px 0;
    font-size: 14px;
}

.movie-info {
    flex: 1;
    font-size: 16px;
    line-height: 1.2;
    padding: 0 7px 17px;
}

.movie-info p {
    margin: 6px 0;
}

.movie-info a {
    color: #ffcc00;
    text-decoration: none;
    font-weight: bold;
}
.movie-info a:hover {
    text-decoration: underline;
}

/* Панели информации */
.info-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffcc00;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.panel-content .info-item,
.panel-content .rating-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.panel-content .rating-item img {
    width: 25px;
}

.panel-content .info-item:last-child,
.panel-content .rating-item:last-child {
    margin-bottom: 0;
}

.info-item .icon {
    margin-right: 10px;
    font-size: 16px;
    opacity: 0.8;
    width: 20px;
    text-align: center;
}

.info-item .label {
    flex: 0 0 140px;
    color: #aaa;
    font-weight: 500;
    font-size: 14px;
}

.info-item .value {
    flex: 1;
    color: #fff;
    font-size: 14px;
}

.age-limit {
    background: #e53935;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
}

.quality-badge {
    background: #ffb300;
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
}

/* Теги */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 6px 12px 8px;
    border-radius: 16px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag.type {
    background: linear-gradient(135deg, #ccc 0%, #cacaca 100%);
    color: #000;
}

.tag.genre {
    background: linear-gradient(135deg, #ffc107 0%, #ffa000 100%);
    color: #000;
}

.tag.country {
    background: linear-gradient(135deg, #29b6f6 0%, #0288d1 100%);
    color: #000;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Рейтинги */
.rating-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.rating-item .icon {
    margin-right: 10px;
}

.rating-item .value {
    font-size: 18px;
    font-weight: bold;
    margin-right: 8px;
    margin-bottom: 3px;
}

.rating-item.imdb .value {
    color: #f5c518;
}

.rating-item.kp .value {
    color: #4caf50;
}

.rating-item .count {
    font-size: 12px;
    color: #bbb;
    margin-left: auto;
}

/* Адаптивность для панелей */
@media (max-width: 768px) {
    .info-panels {
        grid-template-columns: 1fr;
    }
    
    .info-item .label {
        flex: 0 0 120px;
    }
}

@media (max-width: 480px) {
    .panel {
        padding: 15px;
    }
    
    .info-item {
        align-items: flex-start;
        gap: 5px;
    }
    
    .info-item .label {
        flex: none;
    }
    
    .rating-item {
        text-align: center;
        gap: 5px;
    }
    
    .rating-item .count {
        margin-left: 0;
    }
}

.movie-description {
    margin: 25px 0;
}

.movie-description h2 {
    font-size: 22px;
    margin-bottom: 10px;
    border-left: 4px solid #ffcc00;
    padding-left: 8px;
}

/* Контейнер для видео */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Стили для переключения между трейлером и фильмом */
.video-tabs {
    display: flex;
    margin: 25px 0 0;
    border-bottom: 1px solid #333;
}

.video-tab {
    padding: 12px 20px;
    cursor: pointer;
    background: #222;
    border: 1px solid #333;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.video-tab.active {
    background: #ffcc00;
    color: #000;
}

.video-tab:hover:not(.active) {
    background: #444;
}

.video-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-content.active {
    display: block;
    opacity: 1;
}

/* Индикатор загрузки для фильма */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 5px;
    display: none;
}

/* ===== КОМАНДА (актеры, режиссеры и т.д.) ===== */
.movie-team {
    margin: 25px 0;
}

.movie-team h3 {
    font-size: 20px;
    margin-bottom: 10px;
    border-left: 4px solid #4caf50;
    padding-left: 8px;
}

.persons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.person {
    background: #222;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: transform 0.2s ease;
}

.person:hover {
    transform: translateY(-5px);
}

.person img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.person span {
    font-size: 14px;
    color: #ddd;
}

.person a {
    text-decoration: none;
}

/* ===== ТРЕЙЛЕР ===== */
.movie-trailer {
    margin: 30px 0;
}

.movie-trailer video {
    width: 100%;
    max-height: 450px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* ===== Похожие фильмы ===== */
.similar-movies {
    margin-top: 10px;
    padding-top: 10px;
	/*border-top: 2px solid #333;*/	
}
.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;

}
.similar-grid .movie-card h3.film-title {
    font-size: 18px;
}
.similar-grid .movie-card img {
    height: 315px;
}
.similar-grid .info {
    padding: 5px 17px 0px;
}

.similar-card {
    transition: transform 0.3s ease;
}

.similar-card:hover {
    transform: translateY(-5px);
}

.similar-movies h4 {
	font-size: 20px;
	margin-bottom: 10px;
	border-left: 4px solid #e53935;
	padding-left: 8px;
}

@media (max-width: 768px) {
    .similar-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

/* Стили для комментариев в темной теме */
.movie-comments {
    margin-top: 10px;
    padding-top: 10px;
}

.movie-comments h4 {
	font-size: 20px;
	margin-bottom: 10px;
	border-left: 4px solid #03a9f4;
	padding-left: 8px;
}

.comment-form {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #333;
}

.comment-form h3 {
    margin-top: 0;
    color: #ffcc00;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #ccc;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background: #222;
    color: #fff;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #ffcc00;
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    background: linear-gradient(135deg, #ffcc00 0%, #ff9900 100%);
    color: #000;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.4);
}

.submit-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Анимации для комментариев */
.comments-list,
.no-comments {
    transition: all 0.4s ease;
}

.comment {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.comment:hover {
    border-color: #444;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}



.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.comment-author {
    font-size: 16px;
}

.comment-author strong {
    color: #ffcc00;
}

.comment-email {
    font-size: 12px;
    color: #888;
    margin-left: 8px;
}

.comment-date {
    font-size: 12px;
    color: #888;
}

.comment-text {
    line-height: 1.5;
    color: #ccc;
}

/* Пагинация комментариев */
.comments-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.page-link {
    padding: 8px 12px;
    border: 1px solid #444;
    border-radius: 4px;
    text-decoration: none;
    color: #ccc;
    background: #222;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.page-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 204, 0, 0.2), transparent);
    transition: left 0.6s ease;
}

.page-link:hover::before {
    left: 100%;
}

.page-link:hover {
    background: #333;
    color: #ffcc00;
    border-color: #ffcc00;
    transform: translateY(-2px);
}

.page-link.active {
    background: #ffcc00;
    color: #000;
    border-color: #ffcc00;
    transform: scale(1.05);
}

/* Анимации загрузки */
.comments-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    background: rgba(26, 26, 26, 0.9);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #333;
}

.loader-spinner {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.spinner-ring {
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 8px solid #ffcc00;
    border-radius: 50%;
    animation: spinner 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: #ffcc00 transparent transparent transparent;
}

.spinner-ring:nth-child(1) { animation-delay: -0.45s; }
.spinner-ring:nth-child(2) { animation-delay: -0.3s; }
.spinner-ring:nth-child(3) { animation-delay: -0.15s; }

@keyframes spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Сообщения */
#ajax-messages {
    margin-bottom: 20px;
}

.comment-message {
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 10px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid;
    position: relative;
    overflow: hidden;
}

.comment-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.comment-message.success {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
    color: #4caf50;
}

.comment-message.success::before {
    background: #4caf50;
}

.comment-message.error {
    background: rgba(244, 67, 54, 0.1);
    border-color: #f44336;
    color: #f44336;
}

.comment-message.error::before {
    background: #f44336;
}

.no-comments {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
}

/* Адаптивность */
@media (max-width: 768px) {
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .comment-date {
        align-self: flex-start;
    }
    
    .comments-pagination {
        flex-wrap: wrap;
    }
    
    .comment-form {
        padding: 15px;
    }
    
    .comments-loader {
        padding: 20px;
    }
    
    .loader-spinner {
        width: 60px;
        height: 60px;
    }
    
    .spinner-ring {
        width: 48px;
        height: 48px;
        border-width: 6px;
    }
}

/* Футер */
.site-footer {
    background: #222;
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    font-size: 14px;
    color: #aaa;
}
.site-footer a {
    color: #ffcc00;
}

/* Адаптивность для страницы фильма */
@media (max-width: 768px) {
    .movie-top {
        flex-direction: column;
    }
    
    .movie-poster {
        align-self: center;
        margin-bottom: 20px;
		width: auto;
    }
    
    .movie-poster img {
        width: 100%;
        max-width: 300px;
    }
    
    .video-tabs {
        flex-direction: column;
    }
    
    .video-tab {
        border-radius: 0;
        margin-right: 0;
        border-bottom: 1px solid #333;
    }
}

