:root {
	--bg: #0f1113;
	--surface: #181b1e;
	--surface-2: #202428;
	--text: #e9ecef;
	--muted: #9aa3ab;
	--line: #2a2f34;
	--accent: #6ec535;
	--accent-ink: #0f2b06;
	--overlay: rgba(11, 13, 15, .9);
	--radius: 10px;
	--wrap: 1100px;
}

[data-theme="light"] {
	--bg: #f3f4f6;
	--surface: #fff;
	--surface-2: #f0f2f4;
	--text: #1d2125;
	--muted: #5f6a73;
	--line: #e2e5e9;
	--accent-ink: #234d0c;
	--overlay: rgba(243, 244, 246, .32);
}

html {
	background: var(--bg);
	-webkit-text-size-adjust: 100%;
}

body.lf-site {
	min-height: 100vh;
	margin: 0;
	background: transparent;
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	display: flex;
	flex-direction: column;
}

body.lf-site.admin-bar .lf-header {
	top: 32px;
}

body.lf-site a {
	color: var(--accent);
	text-decoration: none;
}

body.lf-site a:hover {
	text-decoration: underline;
}

body.lf-site img {
	display: block;
	max-width: 100%;
	height: auto;
}

.lf-ic {
	display: inline-block;
	vertical-align: middle;
}

.lf-bg {
	position: fixed;
	inset: 0;
	z-index: -2;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.lf-bg-overlay {
	position: fixed;
	inset: 0;
	z-index: -1;
	background: var(--overlay);
}

.lf-wrap {
	width: 100%;
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 16px;
}

.lf-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}

.lf-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 60px;
}

.lf-logo {
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--text);
	font-size: 20px;
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0;
}

.lf-logo:hover {
	text-decoration: none;
}

.lf-logo__mark {
	position: relative;
	width: 26px;
	height: 26px;
	border-radius: 6px;
	background: var(--accent);
	flex: 0 0 auto;
}

.lf-logo__mark:before,
.lf-logo__mark:after {
	content: "";
	position: absolute;
	left: 7px;
	width: 4px;
	height: 4px;
	border-radius: 1px;
	background: var(--accent-ink);
	box-shadow: 8px 0 var(--accent-ink), 0 8px var(--accent-ink), 8px 8px var(--accent-ink);
}

.lf-logo__mark:before {
	top: 6px;
}

.lf-logo__mark:after {
	top: 16px;
}

.lf-random {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 190px;
	color: var(--muted);
	font-weight: 700;
	font-size: 13px;
	line-height: 1.15;
	text-transform: uppercase;
}

.lf-random:hover {
	color: var(--accent);
	text-decoration: none;
}

.lf-random__hot {
	position: absolute;
	left: 0;
	top: 17px;
}

.lf-random__sub {
	font-size: 10px;
	font-weight: 500;
	text-transform: none;
}

.lf-search {
	flex: 0 1 340px;
	margin-left: auto;
	display: flex;
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}

.lf-search input {
	flex: 1;
	min-width: 0;
	height: 38px;
	padding: 0 12px;
	border: 0;
	background: transparent;
	color: var(--text);
	outline: none;
	font: inherit;
	font-size: 14px;
}

.lf-search button {
	border: 0;
	background: transparent;
	color: var(--accent);
	padding: 0 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
}

.lf-theme-toggle {
	position: relative;
	flex: 0 0 auto;
	width: 54px;
	height: 28px;
	padding: 0;
	border: 1px solid var(--line);
	background: var(--surface-2);
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
}

.lf-theme-toggle .lf-toggle__sun,
.lf-theme-toggle .lf-toggle__moon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin: 0 3px;
	color: var(--muted);
	z-index: 1;
}

.lf-toggle__knob {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--accent);
	transition: transform .2s ease;
}

[data-theme="dark"] .lf-toggle__knob {
	transform: translateX(26px);
}

.search-result {
	position: absolute;
	top: calc(100% + 6px);
	right: 86px;
	width: min(430px, calc(100vw - 32px));
	max-height: min(70vh, 520px);
	overflow: auto;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
	z-index: 40;
}

.search-result:empty {
	display: none;
}

.lf-main {
	width: 100%;
	flex: 1 0 auto;
	padding: 22px 16px 40px;
}

.lf-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin-bottom: 12px;
	color: var(--muted);
	font-size: 13px;
}

.lf-breadcrumbs a {
	color: var(--muted);
}

.lf-breadcrumbs a:hover {
	color: var(--accent);
	text-decoration: none;
}

.lf-bc-current {
	color: var(--text);
}

.lf-titlebar {
	margin-bottom: 16px;
}

.lf-title {
	margin: 0;
	color: var(--text);
	font-size: 27px;
	font-weight: 600;
	line-height: 1.2;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .28);
	letter-spacing: 0;
}

.lf-subtitle {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 15px;
}

.lf-ratings {
	display: flex;
	gap: 8px;
	margin-top: 12px;
	flex-wrap: wrap;
}

.lf-badge {
	font-size: 13px;
	font-weight: 600;
	padding: 4px 11px;
	border-radius: 8px;
}

.lf-badge--kp {
	background: #f5c518;
	color: #3a2c00;
}

.lf-badge--imdb {
	background: #2ea043;
	color: #04240e;
}

.lf-hero {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: stretch;
	margin-bottom: 20px;
	padding: 18px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.lf-poster {
	flex: 0 0 168px;
	aspect-ratio: 2 / 3;
	background: var(--surface-2);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lf-poster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lf-poster__empty {
	color: var(--muted);
}

.lf-desc-col {
	flex: 1 1 340px;
	min-width: 0;
}

.lf-desc-toggle {
	position: absolute;
	width: 0;
	height: 0;
	opacity: 0;
}

.lf-desc {
	position: relative;
	max-height: 250px;
	overflow: hidden;
}

.lf-desc:after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 60px;
	background: linear-gradient(transparent, var(--surface));
	pointer-events: none;
}

.lf-desc-toggle:checked ~ .lf-desc {
	max-height: none;
}

.lf-desc-toggle:checked ~ .lf-desc:after {
	display: none;
}

.lf-desc-more {
	display: inline-block;
	margin-top: 10px;
	color: var(--accent);
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	user-select: none;
}

.lf-desc-more:after {
	content: "Развернуть описание";
}

.lf-desc-toggle:checked ~ .lf-desc-more:after {
	content: "Свернуть описание";
}

.lf-desc-col.is-short .lf-desc {
	max-height: none;
}

.lf-desc-col.is-short .lf-desc:after,
.lf-desc-col.is-short .lf-desc-more {
	display: none;
}

.lf-facts {
	flex: 0 0 250px;
	border-left: 1px solid var(--line);
	padding-left: 18px;
}

.lf-facts dl {
	display: grid;
	gap: 7px;
	margin: 0;
}

.lf-facts__row {
	display: flex;
	gap: 10px;
	font-size: 14px;
}

.lf-facts__row dt {
	flex: 0 0 84px;
	margin: 0;
	color: var(--muted);
}

.lf-facts__row dd {
	margin: 0;
	color: var(--text);
	min-width: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.lf-player {
	margin: 0 0 20px;
	padding: 10px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}

.lf-player__empty,
.lazy-player-container {
	aspect-ratio: 16 / 9;
	background: #050607;
	border-radius: var(--radius);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	overflow: hidden;
}

.lazy-player-button {
	border: 0;
	background: var(--accent);
	color: var(--accent-ink);
	border-radius: 999px;
	padding: 14px 24px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.lazy-player-container iframe,
.lf-player iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: var(--radius);
}

.lf-tabs {
	margin: 0 0 20px;
}

.lf-tabs__bar {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.lf-tabs__btn {
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--text);
	font-size: 14px;
	padding: 9px 16px;
	cursor: pointer;
	white-space: nowrap;
	border-radius: var(--radius);
	transition: border-color .15s, background .15s;
}

.lf-tabs__btn:hover {
	border-color: var(--accent);
}

.lf-tabs__btn.is-active {
	background: var(--accent);
	color: var(--accent-ink);
	border-color: var(--accent);
	font-weight: 600;
}

.lf-tabs__panel {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 16px 18px;
}

.lf-tabs__panel[hidden] {
	display: none;
}

.lf-panel__heading,
.lf-section-title {
	color: var(--text);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 12px;
	letter-spacing: 0;
}

.lf-section-title {
	margin-top: 28px;
}

.lf-prose {
	color: var(--text);
	font-size: 16px;
	line-height: 1.75;
}

.lf-prose :first-child {
	margin-top: 0;
}

.lf-prose :last-child {
	margin-bottom: 0;
}

.lf-prose a {
	text-decoration: underline;
}

.lf-related {
	margin: 24px 0 0;
}

.lf-grid,
.lf-related .video-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 14px;
}

.lf-related .video-list .heading {
	grid-column: 1 / -1;
	margin: 0 0 2px;
	color: var(--text);
	font-size: 20px;
	font-weight: 600;
}

.lf-card,
.lf-related .video-list .item {
	display: block;
	position: relative;
	color: var(--text);
}

.lf-card:hover,
.lf-related .video-list .item:hover {
	text-decoration: none;
}

.lf-card__poster,
.lf-related .video-list .item > img {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	background: var(--surface-2);
	border: 1px solid transparent;
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 8px;
	transition: border-color .15s;
}

.lf-card:hover .lf-card__poster,
.lf-related .video-list .item:hover > img {
	border-color: var(--accent);
}

.lf-card__rating,
.lf-related .video-list .rating {
	position: absolute;
	top: 6px;
	left: 6px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.lf-card__rating,
.lf-related .video-list .rating > * {
	background: rgba(0, 0, 0, .72);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 6px;
}

.lf-card__title,
.lf-related .video-list .title {
	display: block;
	color: var(--text);
	font-size: 14px;
	line-height: 1.3;
}

.lf-card:hover .lf-card__title,
.lf-related .video-list .item:hover .title {
	color: var(--accent);
}

.lf-related .video-list .tags,
.lf-related .video-list .play-placeholder {
	display: none;
}

body.lf-site .video-list .item .rating {
	position: absolute;
	left: 8px;
	right: 8px;
	bottom: 8px;
	z-index: 4;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 6px;
	padding: 0 !important;
	pointer-events: none;
}

body.lf-site .video-list .item .rating > div {
	position: static !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	max-width: calc(50% - 3px);
	padding: 4px 7px;
	background: rgba(0, 0, 0, .76);
	border-radius: 6px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.lf-site .video-list .item .rating > div:before {
	content: none !important;
}

body.lf-site .video-list .item .rating .kp {
	color: #ffb35b;
}

body.lf-site .video-list .item .rating .imdb {
	color: #ffd84a;
}

body.lf-site .video-list .item .title {
	bottom: 42px;
}

.lf-home__head {
	margin: 0 0 18px;
}

.lf-home-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
}

.lf-home-card {
	display: block;
	color: var(--text);
	min-width: 0;
}

.lf-home-card:hover {
	text-decoration: none;
}

.lf-home-card__poster {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 2 / 3;
	margin-bottom: 8px;
	background: var(--surface-2);
	border: 1px solid transparent;
	border-radius: var(--radius);
	overflow: hidden;
	transition: border-color .15s ease, transform .15s ease;
}

.lf-home-card:hover .lf-home-card__poster {
	border-color: var(--accent);
	transform: translateY(-1px);
}

.lf-home-card__poster:after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 42%;
	background: linear-gradient(transparent, rgba(0, 0, 0, .78));
	pointer-events: none;
}

.lf-home-card__poster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lf-home-card__ratings {
	position: absolute;
	left: 8px;
	right: 8px;
	bottom: 8px;
	z-index: 2;
	display: flex;
	justify-content: space-between;
	gap: 6px;
	pointer-events: none;
}

.lf-home-card__ratings span {
	max-width: calc(50% - 3px);
	padding: 4px 7px;
	background: rgba(0, 0, 0, .78);
	border-radius: 6px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lf-home-card__ratings b {
	color: #ffd84a;
	font-weight: 800;
}

.lf-home-card__title {
	display: block;
	color: var(--text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.lf-home-card:hover .lf-home-card__title {
	color: var(--accent);
}

.lf-home-card__year {
	display: block;
	margin-top: 2px;
	color: var(--muted);
	font-size: 12px;
	line-height: 1.2;
}

.lf-comments {
	margin-top: 28px;
}

.lf-comments > #comments,
.commentpro {
	--main-color: var(--accent);
	--main-color-darker: #559e24;
	--text-color: var(--text);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 18px 20px 24px;
}

.commentpro,
.commentpro-text,
.commentpro-heading,
.commentpro-login-as,
.commentpro-sort,
.commentpro-sort_count,
.commentpro-open-replies,
.commentpro-karma {
	color: var(--text);
}

.commentpro-date {
	color: var(--muted);
}

.commentpro .ql-editor,
.commentpro-form_group [type="text"],
.commentpro-standalone-container textarea {
	color: #1d2125;
}

.lf-footer {
	flex-shrink: 0;
	background: var(--surface);
	border-top: 1px solid var(--line);
	padding: 24px 0;
	color: var(--muted);
	font-size: 13px;
}

.lf-footer__inner {
	display: flex;
	gap: 22px;
	align-items: flex-start;
	justify-content: space-between;
}

.lf-logo--footer {
	margin-top: 2px;
}

.lf-footer__copy {
	max-width: 760px;
	text-align: right;
}

.lf-footer p {
	margin: 0 0 6px;
}

.kinobalancer {
	--main-color: var(--accent);
	display: flex;
	flex-wrap: wrap;
	padding: 10px 10px 0;
	justify-content: space-between;
	align-items: flex-start;
	background: #101214;
	border-radius: var(--radius);
}

.kinobalancer.loading * {
	transition: none !important;
}

.kinobalancer-players {
	order: 1;
	display: flex;
	align-items: center;
	overflow: auto;
	max-width: calc(100% - 300px);
	gap: 12px;
	min-width: 300px;
}

.kinobalancer-controls {
	order: 2;
	width: 280px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	overflow: auto;
	gap: 12px;
}

.kinobalancer-frame {
	aspect-ratio: 16 / 9;
	width: calc(100% + 20px);
	order: 3;
	margin: 10px -10px;
	background: #0f0f0f;
	transition: all .2s ease;
}

.kinobalancer-films {
	order: 4;
	width: calc(100% - 300px);
	display: flex;
	align-items: center;
	overflow: auto;
	gap: 12px;
	transition: all .2s ease;
}

.kinobalancer-episodes {
	order: 5;
	display: flex;
	align-items: center;
	overflow: auto;
	gap: 12px;
	padding: 0 0 5px;
	margin: 0 0 5px;
}

.kinobalancer .btn {
	height: 40px;
	display: flex;
	justify-content: center;
	align-items: center;
	color: #f2f2f2;
	font-size: 14px;
	font-weight: 700;
	background: #4f4f4f;
	transition: all .2s ease;
	border: 2px solid transparent;
	border-radius: 6px;
	padding: 0 20px;
	cursor: pointer;
	gap: 10px;
	text-transform: uppercase;
	flex-shrink: 0;
}

.kinobalancer .btn:hover {
	color: var(--main-color);
}

.kinobalancer .btn.active {
	background: var(--main-color);
	color: #f2f2f2;
}

.kinobalancer .btn svg {
	width: 16px;
	height: 16px;
	fill: var(--main-color);
	transition: all .2s ease;
}

.kinobalancer .btn.active svg {
	fill: #f2f2f2;
}

.kinobalancer-frame iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
}

@media (max-width: 760px) {
	body.lf-site.admin-bar .lf-header {
		top: 46px;
	}

	.lf-header__inner {
		gap: 10px;
		min-height: auto;
		padding-top: 10px;
		padding-bottom: 10px;
		flex-wrap: wrap;
	}

	.lf-logo__text {
		display: none;
	}

	.lf-random {
		order: 3;
		width: 100%;
		min-width: 0;
		align-items: flex-start;
		padding-left: 22px;
	}

	.lf-random__hot {
		top: 1px;
	}

	.lf-search {
		flex: 1 1 170px;
		margin-left: 0;
	}

	.search-result {
		right: 16px;
		top: calc(100% + 4px);
	}

	.lf-main {
		padding-top: 18px;
	}

	.lf-title {
		font-size: 22px;
	}

	.lf-hero {
		flex-direction: column;
		align-items: stretch;
	}

	.lf-poster {
		align-self: center;
		width: 170px;
		flex: 0 0 auto;
	}

	.lf-desc-col,
	.lf-facts {
		flex: 1 1 auto;
		width: 100%;
	}

	.lf-facts {
		border-left: 0;
		border-top: 1px solid var(--line);
		padding-left: 0;
		padding-top: 14px;
	}

	.lf-footer__inner {
		display: block;
	}

	.lf-footer__copy {
		margin-top: 16px;
		text-align: left;
	}

	.kinobalancer-players,
	.kinobalancer-controls,
	.kinobalancer-films,
	.kinobalancer-episodes {
		width: 100%;
		max-width: none;
		min-width: 0;
		justify-content: flex-start;
	}

	.kinobalancer-controls {
		order: 6;
		margin-bottom: 10px;
	}
}

@media (max-width: 480px) {
	.lf-wrap {
		padding-left: 12px;
		padding-right: 12px;
	}

	.lf-tabs__btn {
		padding: 8px 12px;
	}

	.lf-grid,
	.lf-related .video-list,
	.lf-home-grid {
		grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
	}
}
