:root {
	--page-bg: #edf3f8;
	--page-bg-soft: #e4edf5;
	--panel-bg: rgba(255, 255, 255, 0.72);
	--card-bg: rgba(255, 255, 255, 0.88);
	--card-border: rgba(12, 25, 44, 0.08);
	--muted: #7486a1;
	--text: #132033;
	--accent: #0ed1aa;
	--accent-soft: rgba(14, 209, 170, 0.12);
	--accent-strong: #13f0c2;
	--shadow: 0 18px 40px rgba(20, 39, 68, 0.08);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background:
		radial-gradient(circle at 15% 15%, rgba(14, 209, 170, 0.08), transparent 22%),
		radial-gradient(circle at 85% 10%, rgba(21, 64, 122, 0.08), transparent 26%),
		linear-gradient(180deg, var(--page-bg) 0%, var(--page-bg-soft) 100%);
	color: var(--text);
	font-family: "SF Pro Display", "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
}

.shell {
	max-width: 1180px;
	margin: 0 auto;
	padding: 20px 16px 44px;
}

.topbar {
	position: sticky;
	top: 0;
	z-index: 10;
	backdrop-filter: blur(18px);
	background: #09182b;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 14px 16px 12px;
}

.topbar.is-collapsed .topbar-inner {
	padding-bottom: 10px;
}

.heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 12px;
}

.topbar.is-collapsed .heading {
	margin-bottom: 0;
}

.heading h1 {
	margin: 0;
	font-size: clamp(1.8rem, 3.5vw, 2.8rem);
	font-weight: 700;
	line-height: 0.95;
	letter-spacing: -0.05em;
}

.heading h1,
.heading p,
.status {
	margin: 0;
	color: #ffffff;
	font-size: 0.84rem;
}

.header-main {
	min-width: 0;
}

.header-summary {
	display: none;
	margin-top: 4px;
	font-size: 0.84rem;
	color: rgba(255, 255, 255, 0.88);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.header-toggle {
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	border-radius: 999px;
	padding: 7px 12px;
	font-size: 0.75rem;
	line-height: 1;
	cursor: pointer;
}

.header-toggle:hover,
.header-toggle:focus-visible {
	border-color: rgba(14, 209, 170, 0.5);
	outline: none;
}

.search-wrap {
	position: relative;
}

.topbar-panel {
	display: block;
}

.topbar.is-collapsed .topbar-panel {
	display: none;
}

.topbar.is-collapsed .heading p {
	display: none;
}

.topbar.is-collapsed .header-summary {
	display: block;
}

.filters {
	display: grid;
	gap: 10px;
	margin-top: 12px;
}

.filter-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.filter-label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
	margin-right: 2px;
}

.chip {
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	border-radius: 999px;
	padding: 7px 11px;
	font-size: 0.76rem;
	line-height: 1;
	cursor: pointer;
	transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.chip.is-active {
	background: rgba(14, 209, 170, 0.18);
	border-color: rgba(14, 209, 170, 0.5);
	color: #dffff8;
}

.search {
	width: 100%;
	border: 1px solid rgba(12, 25, 44, 0.08);
	border-radius: 18px;
	padding: 14px 16px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--text);
	font-size: 0.92rem;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.4),
		0 10px 24px rgba(20, 39, 68, 0.05);
}

.search::placeholder {
	color: #8fa0b7;
}

.search:focus {
	outline: 2px solid rgba(14, 209, 170, 0.16);
	border-color: rgba(14, 209, 170, 0.5);
}

.grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	padding-top: 8px;
}

.card {
	display: grid;
	grid-template-columns: 132px minmax(0, 1fr);
	gap: 14px;
	padding: 12px;
	border: 1px solid var(--card-border);
	border-radius: 12px;
	background: var(--card-bg);
	box-shadow: var(--shadow);
	overflow: hidden;
	position: relative;
	backdrop-filter: blur(10px);
}

.card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(14, 209, 170, 0.04), transparent 35%, transparent 70%, rgba(21, 64, 122, 0.04));
	pointer-events: none;
}

.poster {
	width: 100%;
	height: 100%;
	min-height: 248px;
	border-radius: 10px;
	overflow: hidden;
	background: linear-gradient(180deg, rgba(220, 231, 240, 0.9) 0%, rgba(197, 211, 224, 0.95) 100%);
	border: 1px solid rgba(12, 25, 44, 0.06);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

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

.poster-fallback {
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	padding: 12px;
	text-align: center;
	font-weight: 700;
	font-size: 0.86rem;
	line-height: 1.1;
	color: rgba(19, 32, 51, 0.62);
}

.content {
	min-width: 0;
	display: flex;
	flex-direction: column;
	position: relative;
	z-index: 1;
}

.title-row {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
}

.title {
	margin: 0;
	font-size: clamp(1.08rem, 2.4vw, 1.36rem);
	line-height: 1.05;
	letter-spacing: -0.04em;
}

.year {
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--muted);
}

.meta-line {
	margin-top: 4px;
	color: var(--muted);
	font-size: 0.82rem;
	line-height: 1.3;
}

.scoreboard {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 14px;
}

.score-block {
	background: linear-gradient(180deg, rgba(14, 209, 170, 0.05), rgba(255, 255, 255, 0.75));
	border: 1px solid rgba(12, 25, 44, 0.05);
	border-radius: 8px;
	padding: 10px 12px;
	min-height: 68px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.score-label {
	display: block;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}

.score-value {
	display: block;
	margin-top: 4px;
	font-size: clamp(1.4rem, 4vw, 2rem);
	line-height: 1;
	font-weight: 700;
	letter-spacing: -0.04em;
}

.synopsis {
	width: 100%;
	text-align: left;
	margin-top: 10px;
	color: #4f607a;
	font-size: 0.8rem;
	line-height: 1.42;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	cursor: pointer;
	user-select: none;
}

.synopsis.is-expanded {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
}

.links {
	margin-top: auto;
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding-top: 12px;
}

.logo-link {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 1px solid rgba(12, 25, 44, 0.06);
	background: linear-gradient(180deg, rgba(14, 209, 170, 0.08), rgba(255, 255, 255, 0.96));
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 16px rgba(20, 39, 68, 0.07);
	transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.logo-link:hover,
.logo-link:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 10px 18px rgba(20, 39, 68, 0.12);
	border-color: rgba(14, 209, 170, 0.44);
	outline: none;
}

.logo-link img {
	width: 20px;
	height: 20px;
	object-fit: contain;
	display: block;
}

.empty {
	padding: 28px;
	border: 1px dashed rgba(12, 25, 44, 0.12);
	border-radius: 12px;
	text-align: center;
	color: var(--muted);
	background: rgba(255, 255, 255, 0.72);
}

.version {
	margin-top: 18px;
	text-align: center;
	font-size: 0.76rem;
	color: var(--muted);
}

@media (min-width: 860px) {
	.grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 639px) {
	.heading {
		align-items: start;
		flex-direction: column;
	}

	.header-actions {
		width: 100%;
		justify-content: space-between;
	}

	.card {
		grid-template-columns: 104px minmax(0, 1fr);
		border-radius: 10px;
		padding: 10px;
		gap: 10px;
	}

	.poster {
		min-height: 212px;
	}

	.scoreboard {
		gap: 8px;
	}

	.synopsis {
		-webkit-line-clamp: 5;
	}

	.score-block {
		padding: 9px 10px;
		min-height: 62px;
	}

	.links {
		padding-top: 10px;
	}
}
