:root {
	--bg: #09090b;
	--bg-elevated: #111216;
	--panel: rgba(16, 17, 21, 0.78);
	--panel-strong: #15161c;
	--text: #f4f4f5;
	--muted: #b3b3bd;
	--accent: #e50914;
	--accent-soft: #ff5353;
	--border: rgba(255, 255, 255, 0.12);
	--success: #17c964;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	min-height: 100%;
	font-family: "Segoe UI", "SF Pro Text", "Helvetica Neue", sans-serif;
	color: var(--text);
	background: radial-gradient(circle at 12% 16%, #2a1217 0%, #0c0c11 42%, #050507 100%);
}

body {
	line-height: 1.5;
	overflow-x: hidden;
}

a {
	color: inherit;
	text-decoration: none;
}

.app-shell {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.hero {
	position: relative;
	isolation: isolate;
	padding: 2rem clamp(1rem, 3.5vw, 4rem) 4rem;
	border-bottom: 1px solid var(--border);
	background:
		linear-gradient(140deg, rgba(10, 10, 14, 0.42), rgba(10, 10, 14, 0.7)),
		url("../../images/header-demo.jpg") center / cover no-repeat,
		radial-gradient(circle at 15% 20%, rgba(229, 9, 20, 0.35), rgba(229, 9, 20, 0) 40%),
		radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 35%),
		linear-gradient(160deg, #18181f 0%, #0c0c11 58%, #08080b 100%);
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg, rgba(229, 9, 20, 0.35), rgba(0, 0, 0, 0.4));
	z-index: -1;
}

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: clamp(2.5rem, 9vh, 7rem);
}

.topbar-actions {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
}

.user-menu {
	position: relative;
}

.user-menu summary {
	list-style: none;
	cursor: pointer;
	user-select: none;
}

.user-menu summary::-webkit-details-marker {
	display: none;
}

.user-menu-trigger {
	min-width: 2.4rem;
	text-align: center;
	font-size: 1.1rem;
	line-height: 1;
	padding: 0.55rem 0.75rem;
}

.user-menu-panel {
	position: absolute;
	top: calc(100% + 0.45rem);
	right: 0;
	min-width: 250px;
	z-index: 40;
	display: grid;
	gap: 0.55rem;
	padding: 0.7rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 10px;
	background: rgba(16, 17, 23, 0.98);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.user-menu-title {
	margin: 0;
	font-size: 0.92rem;
	font-weight: 700;
	color: #f0f0f4;
}

.user-menu-option {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 0.88rem;
	color: #e0e0e8;
}

.user-menu-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.45rem 0.65rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	font-size: 0.85rem;
	background: rgba(229, 9, 20, 0.18);
}

.debug-raw-wrap {
	display: grid;
	gap: 0.75rem;
	margin: 0.75rem 0 0.35rem;
}

.debug-raw-item {
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	background: rgba(7, 8, 12, 0.7);
	padding: 0.7rem;
}

.debug-raw-item h4 {
	margin: 0 0 0.45rem;
	font-size: 0.9rem;
}

.debug-raw-item pre {
	margin: 0;
	max-height: 320px;
	overflow: auto;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 0.78rem;
	line-height: 1.38;
	color: #d7d8e0;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	font-size: clamp(1.3rem, 1.1rem + 1vw, 2rem);
	text-transform: uppercase;
	color: var(--accent);
}

.chip {
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 0.55rem 1rem;
	font-size: 0.9rem;
	color: #fff;
	background: rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(2px);
}

.hero-grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1.1fr 0.9fr;
	align-items: start;
}

.hero-copy h1 {
	margin: 0;
	font-size: clamp(2rem, 1.5rem + 2.5vw, 4rem);
	line-height: 1.08;
	max-width: 14ch;
}

.hero-copy p {
	margin: 1rem 0 1.5rem;
	max-width: 58ch;
	color: #f0f0f4;
	font-size: clamp(1rem, 0.94rem + 0.35vw, 1.2rem);
}

.cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.btn {
	border: 0;
	border-radius: 10px;
	padding: 0.85rem 1.2rem;
	cursor: pointer;
	font-weight: 700;
	transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn:hover {
	transform: translateY(-1px);
}

.btn-primary {
	background: var(--accent);
	color: white;
}

.btn-primary:hover {
	background: var(--accent-soft);
}

.btn-ghost {
	color: white;
	background: rgba(109, 109, 110, 0.72);
}

.account-card {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 16px;
	backdrop-filter: blur(8px);
	padding: clamp(1rem, 1rem + 1vw, 1.5rem);
	width: min(420px, 100%);
	justify-self: end;
}

.account-head {
	margin-bottom: 1rem;
}

.account-head h2 {
	margin: 0;
	font-size: 1.3rem;
}

.account-head p {
	margin: 0.45rem 0 0;
	color: var(--muted);
	font-size: 0.95rem;
}

.tabs {
	display: flex;
	gap: 0.55rem;
	margin-bottom: 0.8rem;
}

.tab-btn {
	flex: 1;
	padding: 0.6rem 0.9rem;
	border-radius: 8px;
	border: 1px solid transparent;
	color: #ececf0;
	background: #22232b;
	cursor: pointer;
	font-weight: 700;
}

.tab-btn[aria-selected="true"] {
	background: var(--accent);
	border-color: rgba(255, 255, 255, 0.25);
}

.panel {
	display: none;
}

.panel.active {
	display: block;
	animation: fadeUp 0.3s ease both;
}

.field {
	display: grid;
	gap: 0.4rem;
	margin-bottom: 0.75rem;
}

.field label {
	font-size: 0.9rem;
	color: #e3e3ea;
}

.field input,
.field select,
.field textarea {
	width: 100%;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: #171821;
	color: #fff;
	padding: 0.7rem 0.75rem;
}

.field textarea {
	min-height: 90px;
	resize: vertical;
}

.main {
	position: relative;
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	padding: 1rem clamp(1rem, 3.5vw, 4rem) 2.5rem;
	animation: fadeUp 0.5s ease both;
}

.card {
	border: 1px solid var(--border);
	border-radius: 14px;
	background: linear-gradient(160deg, rgba(27, 28, 35, 0.94), rgba(18, 19, 24, 0.94));
	padding: 1rem;
}

.card h3 {
	margin: 0 0 0.7rem;
	font-size: 1.05rem;
}

.playlist-add-card {
	align-self: start;
	position: sticky;
	top: 1rem;
}

.muted {
	color: var(--muted);
	font-size: 0.92rem;
}

.col-4 {
	grid-column: span 4;
}

.col-6 {
	grid-column: span 6;
}

.col-8 {
	grid-column: span 8;
}

.col-12 {
	grid-column: span 12;
}

.list {
	display: grid;
	gap: 0.55rem;
	margin-top: 0.7rem;
}

.item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	padding: 0.65rem 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.02);
}

.item strong {
	font-size: 0.94rem;
}

.item-actions {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.item-actions .badge,
.item-actions .badge-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 30px;
	min-width: 30px;
	padding: 0 0.7rem;
}

.item-actions form {
	margin: 0;
}

.badge {
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	padding: 0.25rem 0.6rem;
	font-size: 0.78rem;
	color: #e8e8ef;
}

.badge-button {
	border: 1px solid rgba(255, 255, 255, 0.16);
	cursor: pointer;
	line-height: 1;
}

.badge-button:hover {
	background: rgba(229, 9, 20, 0.32);
	border-color: rgba(229, 9, 20, 0.62);
}

.status {
	margin-top: 0.7rem;
	color: var(--success);
	font-size: 0.92rem;
	display: none;
}

.status.show {
	display: block;
}

.notice {
	margin: 0.8rem 0;
	padding: 0.7rem 0.8rem;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 0.92rem;
}

.notice-success {
	background: rgba(23, 201, 100, 0.14);
	color: #d7ffe9;
	border-color: rgba(23, 201, 100, 0.45);
}

.notice-error {
	background: rgba(229, 9, 20, 0.12);
	color: #ffe2e5;
	border-color: rgba(229, 9, 20, 0.45);
}

.undo-form {
	margin: -0.35rem 0 0.8rem;
}

.playlist-edit-box {
	position: relative;
	margin: 0;
}

.playlist-edit-box summary {
	list-style: none;
	cursor: pointer;
}

.playlist-edit-box summary::-webkit-details-marker {
	display: none;
}

.playlist-edit-box[open] summary {
	background: rgba(229, 9, 20, 0.32);
	border-color: rgba(229, 9, 20, 0.62);
}

.playlist-edit-form {
	position: absolute;
	top: calc(100% + 0.4rem);
	right: 0;
	z-index: 20;
	margin-top: 0;
	display: grid;
	gap: 0.4rem;
	width: min(320px, 80vw);
	padding: 0.65rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	background: rgba(16, 17, 23, 0.98);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.playlist-edit-row {
	display: grid;
	gap: 0.25rem;
}

.playlist-edit-row label {
	font-size: 0.8rem;
	color: #cacad3;
}

.playlist-edit-row input,
.playlist-edit-row select {
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	background: #171821;
	color: #fff;
	padding: 0.5rem 0.55rem;
}

.video-wrap {
	border-radius: 10px;
	border: 1px solid var(--border);
	overflow: hidden;
	background:
		linear-gradient(140deg, rgba(229, 9, 20, 0.2), rgba(229, 9, 20, 0) 40%),
		#000;
}

video {
	width: 100%;
	display: block;
	aspect-ratio: 16 / 9;
	background: #000;
}

.epg-grid {
	display: grid;
	grid-template-columns: 90px 1fr;
	gap: 0.4rem 0.8rem;
	margin-top: 0.5rem;
}

.epg-grid span {
	padding: 0.45rem 0.55rem;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
	font-size: 0.88rem;
}

.stream-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 0.6rem;
}

.stream-grid.thumb-size-large .stream-thumb-item {
	flex: 0 0 300px;
}

.stream-grid.thumb-size-small .stream-thumb-item {
	flex: 0 0 200px;
}

.group-grid {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin-top: 0.9rem;
}

.group-item {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 0.75rem;
	padding: 0.9rem;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.09);
	background: rgba(255, 255, 255, 0.02);
	color: var(--text);
	cursor: pointer;
	text-align: left;
	transition: border-color 0.2s ease, transform 0.15s ease;
}

.group-item strong {
	position: relative;
	z-index: 2;
	flex: 1 1 auto;
	min-width: 0;
	white-space: normal;
	overflow-wrap: anywhere;
}

.group-count-ghost {
	margin-left: auto;
	flex: 0 0 auto;
	font-size: 0.76rem;
	font-weight: 700;
	line-height: 1;
	padding: 0.28rem 0.45rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.07);
	color: rgba(255, 255, 255, 0.92);
	position: relative;
	z-index: 2;
}

.stream-grid.stream-list-mode {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 0.55rem;
}

.stream-grid.stream-list-mode .group-item {
	width: 100%;
}

.group-item:hover {
	border-color: rgba(229, 9, 20, 0.55);
	transform: translateY(-1px);
}

.stream-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: 0.9rem;
}

.stream-toolbar-nav {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	cursor: pointer;
}

.stream-item {
	display: grid;
	gap: 0.65rem;
	padding: 0.9rem;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.09);
	background: rgba(255, 255, 255, 0.02);
}

.stream-item h4 {
	margin: 0;
	font-size: 1rem;
}

.stream-main {
	display: flex;
	gap: 0.8rem;
	align-items: flex-start;
}

.stream-thumb-item {
	flex: 0 0 300px;
	padding: 0;
	border: 0;
	background: transparent;
}

.stream-thumb-btn {
	border: 0;
	background: transparent;
	padding: 0.1rem;
	width: 100%;
	aspect-ratio: 1 / 1;
	cursor: pointer;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	display: block;
	transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.stream-thumb-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.stream-thumb-item.stream-thumb-live {
	flex: 0 0 100%;
	width: 100%;
}

.stream-grid.thumb-size-large .stream-thumb-item.stream-thumb-live,
.stream-grid.thumb-size-small .stream-thumb-item.stream-thumb-live {
	flex: 0 0 100%;
	width: 100%;
}

.stream-live-row {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	width: 100%;
	padding: 0.55rem 0.65rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.03);
	color: var(--text);
	cursor: pointer;
	text-align: left;
	box-sizing: border-box;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.stream-live-row:hover {
	border-color: rgba(229, 9, 20, 0.55);
	background: rgba(255, 255, 255, 0.06);
}

.stream-live-logo {
	width: 72px;
	height: 36px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	overflow: hidden;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.stream-live-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.stream-live-logo-placeholder {
	font-size: 0.85rem;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.9);
}

.stream-live-title {
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.25;
	color: rgba(255, 255, 255, 0.95);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.stream-favorite-badge-live {
	position: static;
	margin-left: auto;
	box-shadow: none;
	min-width: 1.4rem;
	height: 1.4rem;
	line-height: 1.35rem;
	font-size: 0.82rem;
}

.stream-artwork-large {
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 12px;
	flex: none;
}

.thumb-size-toggle {
	display: inline-flex;
	gap: 0.45rem;
	align-items: center;
	flex-wrap: wrap;
}

.movie-search-wrap {
	display: grid;
	gap: 0.35rem;
	min-width: min(360px, 100%);
	flex: 1 1 300px;
}

.movie-search-label {
	font-size: 0.82rem;
	color: #d5d5dd;
}

.movie-search-input {
	width: 100%;
	padding: 0.55rem 0.75rem;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: rgba(12, 13, 18, 0.78);
	color: #f5f5fa;
	outline: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.movie-search-input:focus {
	border-color: rgba(229, 9, 20, 0.75);
	box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
}

.movie-search-count {
	font-size: 0.82rem;
}

.thumb-size-toggle .chip {
	cursor: pointer;
}

.thumb-size-toggle .chip.is-active {
	border-color: rgba(229, 9, 20, 0.8);
	background: rgba(229, 9, 20, 0.35);
}

.stream-artwork {
	width: 100%;
	height: 100%;
	flex: none;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.04);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.stream-artwork img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.stream-favorite-badge {
	position: absolute;
	top: 0.45rem;
	right: 0.45rem;
	min-width: 1.55rem;
	height: 1.55rem;
	padding: 0 0.35rem;
	border-radius: 999px;
	border: 1px solid rgba(26, 16, 0, 0.8);
	background: linear-gradient(160deg, #ffd44d, #f1a50b);
	color: #211200;
	font-size: 0.95rem;
	font-weight: 800;
	line-height: 1.5rem;
	text-align: center;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
	pointer-events: none;
	z-index: 3;
}

.stream-artwork-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 1rem;
	color: #f3f3f7;
	background: linear-gradient(145deg, rgba(229, 9, 20, 0.45), rgba(255, 255, 255, 0.08));
}

.stream-meta {
	display: flex;
	gap: 0.6rem;
	align-items: center;
	flex-wrap: wrap;
}

.stream-url {
	margin: 0;
	padding: 0.6rem 0.7rem;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.08);
	word-break: break-all;
	font-size: 0.86rem;
	color: #d9d9e0;
}

.mini-player {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	width: min(360px, calc(100vw - 1.5rem));
	z-index: 1000;
	padding: 0.7rem;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: rgba(12, 12, 17, 0.95);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(6px);
}

.mini-player.is-expanded {
	width: min(760px, calc(100vw - 1.5rem));
}

.mini-player-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	margin-bottom: 0.55rem;
}

.mini-player-head strong {
	font-size: 0.9rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mini-player-actions {
	display: flex;
	gap: 0.45rem;
	align-items: center;
}

.mini-player-audio,
.mini-player-subtitle {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.mini-player-track-icon {
	width: 1.4rem;
	height: 1.4rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	background: rgba(17, 18, 24, 0.95);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
}

.mini-player-audio select,
.mini-player-subtitle select {
	max-width: 170px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	background: rgba(17, 18, 24, 0.95);
	color: #fff;
	padding: 0.3rem 0.45rem;
	font-size: 0.78rem;
}

.mini-player-actions .chip {
	cursor: pointer;
	padding: 0.35rem 0.65rem;
	font-size: 0.8rem;
}

.mini-player-favorite {
	font-size: 0.95rem;
	line-height: 1;
}

.mini-player-favorite.is-active {
	color: #1a1a1a;
	background: #ffd34d;
	border-color: rgba(255, 211, 77, 0.85);
}

.mini-player-video-wrap video {
	aspect-ratio: 16 / 9;
}

.mini-player-video-wrap {
	position: relative;
}

.mini-player-debug {
	margin-top: 0.5rem;
	padding: 0.45rem 0.55rem;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(14, 15, 21, 0.78);
}

.mini-player-debug p {
	margin: 0;
	font-size: 0.8rem;
	line-height: 1.35;
}

.mini-player-splash {
	position: absolute;
	top: 0.55rem;
	left: 0.55rem;
	right: auto;
	bottom: auto;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.55rem;
	padding: 0.35rem 0.45rem;
	border-radius: 10px;
	background: rgba(10, 10, 14, 0.68);
	backdrop-filter: blur(3px);
	pointer-events: none;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity 0.24s ease, transform 0.24s ease;
}

.mini-player-splash.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.mini-player-splash[hidden] {
	display: none !important;
}

.mini-player-splash-art {
	width: 56px;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	overflow: hidden;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
	background: rgba(14, 14, 20, 0.7);
}

.mini-player-splash-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mini-player-splash-fallback {
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	font-weight: 800;
	font-size: 2rem;
	color: #fff;
	background: linear-gradient(145deg, rgba(229, 9, 20, 0.65), rgba(255, 255, 255, 0.14));
}

.mini-player-splash-title {
	margin: 0;
	max-width: min(62vw, 340px);
	font-size: 0.86rem;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.mini-player-down {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	text-align: center;
	padding: 1rem;
	background: linear-gradient(180deg, rgba(10, 10, 14, 0.88), rgba(10, 10, 14, 0.96));
	color: #fff;
}

.mini-player-down[hidden] {
	display: none !important;
}

.mini-player-down-art {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 1.9rem;
	font-weight: 800;
	margin-bottom: 0.6rem;
	background: radial-gradient(circle at 30% 30%, #ff5b5b 0%, #e50914 55%, #7a0b10 100%);
	border: 2px solid rgba(255, 255, 255, 0.3);
}

.mini-player-down p {
	margin: 0;
	font-size: 0.9rem;
	color: #f1f1f5;
}

footer {
	margin-top: auto;
	padding: 1.4rem clamp(1rem, 3.5vw, 4rem);
	border-top: 1px solid var(--border);
	color: #a8a8b0;
	font-size: 0.88rem;
}

@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 1000px) {
	.hero-grid {
		grid-template-columns: 1fr;
	}

	.account-card {
		justify-self: start;
	}

	.col-4,
	.col-6,
	.col-8 {
		grid-column: span 12;
	}

	.playlist-add-card {
		position: static;
	}
}

@media (max-width: 640px) {
	.topbar {
		margin-bottom: 2rem;
	}

	.chip {
		font-size: 0.8rem;
		padding: 0.45rem 0.75rem;
	}

	.tabs {
		flex-direction: column;
	}

	.btn {
		width: 100%;
	}

	.cta-row {
		display: grid;
		width: 100%;
	}

	.epg-grid {
		grid-template-columns: 1fr;
	}

	.stream-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.movie-search-wrap {
		min-width: 0;
	}

	.stream-grid.thumb-size-large .stream-thumb-item,
	.stream-grid.thumb-size-small .stream-thumb-item {
		flex: 0 0 calc(50% - 0.275rem);
	}

	.mini-player {
		right: 0.75rem;
		bottom: 0.75rem;
		width: calc(100vw - 1.5rem);
	}
}

/* Loading Screen */
.page-loader {
	position: absolute;
	inset: 0;
	z-index: 999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
	background: linear-gradient(135deg, rgba(9, 9, 11, 0.98), rgba(12, 12, 17, 0.95));
	backdrop-filter: blur(4px);
	border-radius: 0;
}

.page-loader[hidden] {
	display: none !important;
}

.loader-spinner {
	width: 48px;
	height: 48px;
	border: 3px solid rgba(255, 255, 255, 0.15);
	border-top-color: #e50914;
	border-right-color: #e50914;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

.page-loader p {
	margin: 0;
	font-size: 0.95rem;
	color: #b3b3bd;
	text-align: center;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* ── Poster cards (VOD / series) ── */
.stream-thumb-poster {
	flex: 0 0 300px;
}

.stream-grid.thumb-size-large .stream-thumb-poster {
	flex: 0 0 300px;
}

.stream-grid.thumb-size-small .stream-thumb-poster {
	flex: 0 0 300px;
}

.stream-thumb-poster .stream-thumb-btn {
	aspect-ratio: 2 / 3;
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	height: auto;
}

.media-poster-art {
	width: 100%;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.06);
	display: flex;
	align-items: center;
	justify-content: center;
}

.media-poster-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.media-poster-title {
	display: -webkit-box;
	line-clamp: 2;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 0.3rem;
	font-size: 0.68rem;
	line-height: 1.25;
	text-align: center;
	color: var(--text);
}

/* ── Detail / info modal ── */
.media-detail-view {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	overflow-y: auto;
}

.media-detail-view[hidden] {
	display: none !important;
}

.media-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(3px);
}

.media-modal {
	position: relative;
	width: min(920px, 92vw);
	max-height: min(720px, 88vh);
	overflow: hidden;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.media-modal-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(2px) saturate(0.95);
	transform: scale(1.05);
	opacity: 0.48;
}

.media-modal-bg-fallback {
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 20% 20%, rgba(229, 9, 20, 0.28), transparent 50%), linear-gradient(135deg, rgba(22, 22, 30, 0.98), rgba(14, 14, 20, 0.98));
}

.media-modal-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, rgba(8, 8, 12, 0.88) 0%, rgba(8, 8, 12, 0.62) 46%, rgba(8, 8, 12, 0.9) 100%);
}

.media-modal-close {
	position: absolute;
	top: 0.55rem;
	right: 0.65rem;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
}

.media-detail {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: min(200px, 29%) 1fr;
	gap: 1.4rem;
	align-items: start;
	padding: 1.5rem;
	max-height: min(720px, 88vh);
	overflow: auto;
}

.media-detail-cover {
	width: 100%;
	max-width: 210px;
}

.media-detail-poster {
	width: 100%;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 10px;
	display: block;
	background: rgba(255, 255, 255, 0.08);
}

.media-detail-poster-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.35);
}

.media-detail-info {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
}

.media-detail-title {
	margin: 0;
	font-size: 1.45rem;
	line-height: 1.2;
}

.media-detail-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.media-detail-meta-pill {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 20px;
	font-size: 0.8rem;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
}

.media-detail-plot {
	margin: 0;
	font-size: 0.93rem;
	line-height: 1.62;
	color: #ddd;
}

.media-detail-crew {
	margin: 0;
	font-size: 0.85rem;
	color: #d0d0d7;
}

.btn-play-detail {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.65rem 1.4rem;
	border: 0;
	border-radius: 8px;
	background: #e50914;
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
	margin-top: 0.5rem;
	align-self: flex-start;
}

.btn-play-detail:hover {
	background: #f40612;
	transform: translateY(-1px);
}

.media-detail-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 0.5rem;
}

.media-detail-actions .btn-play-detail {
	margin-top: 0;
}

.btn-favorite-detail {
	background: #3a3a3a;
}

.btn-favorite-detail:hover {
	background: #4a4a4a;
}

.btn-favorite-detail.is-active {
	background: #f5c518;
	color: #1b1b1b;
}

.media-detail-no-play {
	margin: 0.5rem 0 0;
}

.media-detail-section-title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.3;
}

.media-series-block {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 0.35rem;
}

.media-series-seasons {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.media-series-season {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 0.8rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
}

.media-series-episodes {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.media-episode-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.7rem 0.8rem;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.media-episode-main {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.media-episode-label {
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}

.media-episode-title {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.96);
}

.media-episode-plot {
	font-size: 0.84rem;
	line-height: 1.45;
	color: #d0d0d7;
}

.media-episode-play {
	align-self: center;
	border: 0;
	border-radius: 8px;
	padding: 0.55rem 0.85rem;
	background: #e50914;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s ease;
}

.media-episode-play:hover {
	background: #f40612;
}

.media-series-empty {
	margin: 0;
}

body.media-modal-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.media-detail {
		grid-template-columns: 1fr;
		padding: 1rem;
	}

	.media-detail-cover {
		max-width: 128px;
	}

	.stream-thumb-poster,
	.stream-grid.thumb-size-large .stream-thumb-poster,
	.stream-grid.thumb-size-small .stream-thumb-poster {
		flex: 0 0 calc(33.333% - 0.37rem);
	}
}

/* ── Filter Screen / Categorie Selectie ── */
.filter-screen {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 60vh;
	padding: 2rem;
	text-align: center;
}

.filter-title {
	font-size: 1.6rem;
	margin-bottom: 2.5rem;
	color: var(--text);
	font-weight: 600;
}

.filter-buttons {
	display: flex;
	gap: 2rem;
	flex-wrap: wrap;
	justify-content: center;
}

.filter-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 140px;
	height: 140px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.05);
	color: var(--text);
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	gap: 0.8rem;
}

.filter-btn:hover {
	border-color: #e50914;
	background: rgba(229, 9, 20, 0.15);
	transform: scale(1.05);
	box-shadow: 0 8px 24px rgba(229, 9, 20, 0.2);
}

.filter-btn:active {
	transform: scale(0.98);
}

.filter-icon {
	font-size: 3rem;
	line-height: 1;
}

.filter-label {
	font-size: 0.95rem;
	line-height: 1.3;
}

@media (max-width: 640px) {
	.filter-buttons {
		gap: 1rem;
		flex-direction: column;
	}

	.filter-btn {
		width: 100%;
		height: auto;
		padding: 1.5rem;
		aspect-ratio: auto;
	}

	.filter-icon {
		font-size: 2rem;
	}

	.filter-title {
		font-size: 1.3rem;
		margin-bottom: 1.5rem;
	}
}
