body {
	font-family: Calibri, sans-serif;
	font-size: 1.2em;
}

table {
	font-size: 1em;
}

td.img {width:32%; vertical-align:top;}
a {text-decoration: none;} 
a:link {color: black;}
a:visited {color: black;}
a:hover {text-decoration: underline; color: blue;}
.best {border-style: solid;border-width: medium;border-collapse: collapse; text-align: center; padding:4px;}
.area {margin-right:10px}
table.menu {padding:5px; background-color:LightSteelBlue; width:100%}
td.menu {width:20%}
p.menu {background-color:LightSteelBlue}
.abs {position:absolute; right:10px; top:10px; font-weight: bold}


ul.menu {list-style: none; padding:0;}
ul.menu > li {float: left; padding-right:20px;}
ul.menu > li > a {display: inline;}
ul.submenu {list-style: none; margin:0px; padding:0px; background-color: #fff; display: none; position: absolute; left: 10px}
ul.submenu > li {display: inline; float: left; padding-right:20px;}
ul.submenu > li > a {display: inline; float: left;}
ul.menu > li:hover > ul.submenu {display: inline;}

.movie-container {
	display: flex;
	flex-wrap: wrap;
	margin: 10px;
}

.movie-poster {
    width: 30%;
    height: auto;
	margin-right: 20px;
	position: sticky;
	top: 20px;
	align-self: flex-start;
}

.movie-info {
	flex: 1;
	min-width: 300px;
	margin-right: 20px;
}

.movie-title {    
	margin-top: 0;
	margin-bottom: 10px;
	padding-right: 120px;
}

.original-title {
	margin-top: 0;
	color: #555;
	margin-bottom: 10px;
}

.year-container {
    display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 20px;
	max-width: 1800px;
	margin: 0 auto;
}

.year-header {
    margin: 30px 0 15px 20px;
    font-size: 1.5em;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

.year-movie-card {
	background: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	transition: transform 0.3s ease;
}
        
.year-movie-card:hover {
	transform: translateY(-5px);
}
        
.year-movie-poster {
	width: 100%;
	display: block;
}
        
.year-movie-title {
	padding: 12px;
	text-align: center;
	font-weight: bold;
	<!--font-size: 14px;-->
	color: #333;
	display: flex;
	align-items: center;
	justify-content: center;
	word-wrap: break-word;
    overflow-wrap: break-word;
	flex-grow: 1;	
}

.all-years-container {
    display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: 20px;
	max-width: 1800px;
	margin: 0 auto;
	font-size: 1.5em;
}

.compact-navigation {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.nav-arrow {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 50%;
    border: 1px solid #ddd;
    font-size: 16px;
    transition: all 0.2s ease;
}

.nav-arrow:hover {
    background-color: #e0e0e0;
    transform: scale(1.1);
	text-decoration: none;
}

.episodes-table {    
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.95em;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
}

.episodes-table th {
    background-color: #f5f5f5;
    text-align: left;
    padding: 10px 20px;
    border-bottom: 2px solid #ddd;
    font-weight: bold;
}

.episodes-table td {
    padding: 8px 20px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.episodes-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.episodes-table tr:hover {
    background-color: #f1f1f1;
}

.original {
	color: #555;
}

.series-movie-title {
	padding: 12px;
	text-align: center;
	font-weight: bold;
	font-size: 18px;
	color: #333;
	display: flex;
	align-items: center;
	justify-content: center;
	word-wrap: break-word;
    overflow-wrap: break-word;
	flex-grow: 1;	
}

.auto-numbered {
    counter-reset: movie-counter;
}

.auto-numbered tr td:first-child:before {
    counter-increment: movie-counter;
    content: counter(movie-counter) ". ";
}

.cast-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.cast-popup.show {
    display: block;
}

.cast-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.cast-popup-header h3 {
    margin: 0;
}

.close-popup-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-popup-btn:hover {
    color: #333;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.popup-overlay.show {
    display: block;
}

.cast-full-list {
    width: 100%;
    border-collapse: collapse;
}

.cast-full-list td {
    padding: 8px 38px 8px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
	white-space: nowrap;
}

.cast-full-list tr:hover {
    background-color: #f9f9f9;
}

.show-cast-btn {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 50%;
    border: 1px solid #ddd;
    font-size: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0;
}

.show-cast-btn:hover {
    background-color: #e0e0e0;
    color: blue;
    transform: scale(1.1);
    text-decoration: none;
}

.cast-full-list td:last-child {
    color: #666;
    font-style: italic;
}

/* Адаптация под мобильные */
@media (max-width: 600px) {
    .cast-popup {
        width: 95%;
        padding: 15px;
    }
}
<!--
.cast-section {
	margin-bottom: 10px;
}

.cast-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.show-all-btn {
	background-color: #f5f5f5;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 2px 8px;
	font-size: 0.9em;
	cursor: pointer;
	color: #333;
	margin-left: 10px;
	transition: all 0.2s ease;
}

.show-all-btn:hover {
	background-color: #e0e0e0;
	color: #000;
}

.show-all-btn.active {
	background-color: #d0e0f0;
	border-color: #a0c0e0;
}
-->

/* Скрытый элемент */
.hidden {
	display: none;
}

@media (max-width: 1500px) {
    .year-container {
        grid-template-columns: repeat(5, 1fr);
    }
	
	.all-years-container {
        grid-template-columns: repeat(9, 1fr);
    }
}

@media (max-width: 1400px) {
	.all-years-container {
        grid-template-columns: repeat(8, 1fr);
    }
}
		
@media (max-width: 1200px) {
	.year-container {
		grid-template-columns: repeat(4, 1fr);
	}
	
	.all-years-container {
        grid-template-columns: repeat(7, 1fr);
    }
}

@media (max-width: 1100px) {
	.all-years-container {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 900px) {
	.year-container {
		grid-template-columns: repeat(3, 1fr);
	}
	
	.all-years-container {
        grid-template-columns: repeat(5, 1fr);
    }
}
		
@media (max-width: 768px) {
	.movie-poster {
		width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
        position: static;
    }
    .movie-info {
        min-width: 100%;
    }
	
	.all-years-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
	.year-container {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.all-years-container {
        grid-template-columns: repeat(3, 1fr);
    }
}