:root {
	--bg: #eef3f7;
	--surface: #ffffff;
	--surface-soft: #f5f8fa;
	--line: #d8e1e8;
	--text: #111820;
	--text-soft: #30404d;
	--muted: #61707e;
	--accent: #c4302b;
	--blue: #1484c6;
	--blue-soft: #e7f3fa;
	--green: #157548;
	--amber: #a66a00;
	--red: #973d3d;
	--shadow: 0 4px 15px rgba(15, 35, 55, 0.09);
	--radius: 6px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color-scheme: light;
}

html[data-theme="dark"] {
	--bg: #111820;
	--surface: #19232c;
	--surface-soft: #202c36;
	--line: #34424d;
	--text: #edf4f8;
	--text-soft: #c4d0d8;
	--muted: #9cabb6;
	--accent: #ff5a52;
	--blue: #54b4ee;
	--blue-soft: #163c54;
	--green: #4cc48a;
	--amber: #e0a43a;
	--red: #e07a7a;
	--shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	html[data-theme="system"] {
		--bg: #111820;
		--surface: #19232c;
		--surface-soft: #202c36;
		--line: #34424d;
		--text: #edf4f8;
		--text-soft: #c4d0d8;
		--muted: #9cabb6;
		--accent: #ff5a52;
		--blue: #54b4ee;
		--blue-soft: #163c54;
		--green: #4cc48a;
		--amber: #e0a43a;
		--red: #e07a7a;
		--shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
		color-scheme: dark;
	}
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 15px/1.45 var(--font);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-size: 0.92em; }

/* Kopfbereich */
.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	box-shadow: var(--shadow);
}

.header-inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 10px 20px;
	display: flex;
	align-items: center;
	gap: 18px;
}

.brand {
	font-size: 1.45rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--text);
	margin: 0;
}

.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }

.tabs {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	flex: 1;
	scrollbar-width: none;
}

.tab {
	white-space: nowrap;
	padding: 7px 12px;
	border-radius: 999px;
	color: var(--text-soft);
	font-weight: 600;
	font-size: 0.92rem;
}

.tab:hover { background: var(--surface-soft); text-decoration: none; }
.tab.active { background: var(--text); color: var(--surface); }

.count {
	font-weight: 400;
	opacity: 0.7;
	font-size: 0.85em;
}

.icon-link {
	font: inherit;
	font-size: 1.3rem;
	line-height: 1;
	color: var(--muted);
	padding: 4px 8px;
	background: none;
	border: 0;
	cursor: pointer;
}

.icon-link:hover { color: var(--text); text-decoration: none; }

/* Inhalt */
.page {
	max-width: 1400px;
	margin: 0 auto;
	padding: 18px 20px 40px;
}

.page.narrow { max-width: 860px; }

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 18px;
}

.chip {
	padding: 4px 11px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text-soft);
	font-size: 0.88rem;
}

.chip:hover { text-decoration: none; border-color: var(--blue); }
.chip.active { background: var(--blue-soft); border-color: var(--blue); color: var(--text); }

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 18px;
}

.card {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: opacity 0.2s;
}

.card.is-hidden, .card.is-low { opacity: 0.55; }
.card.is-seen .thumb img { filter: grayscale(0.6); }

.player {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
}

.player iframe, .thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.thumb {
	padding: 0;
	cursor: pointer;
	background: #000;
}

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

.duration {
	position: absolute;
	right: 8px;
	bottom: 8px;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 600;
	padding: 1px 6px;
	border-radius: 4px;
}

.play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 64px;
	height: 44px;
	margin: -22px 0 0 -32px;
	background: rgba(20, 20, 20, 0.75);
	border-radius: 12px;
	transition: background 0.15s;
}

.play::after {
	content: "";
	position: absolute;
	left: 26px;
	top: 12px;
	border-style: solid;
	border-width: 10px 0 10px 17px;
	border-color: transparent transparent transparent #fff;
}

.thumb:hover .play, .thumb:focus-visible .play { background: #ff0000; }

a.thumb { display: block; }

.external {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	white-space: nowrap;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(20, 20, 20, 0.8);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	transition: background 0.15s;
}

.thumb:hover .external, .thumb:focus-visible .external { background: #ff0000; }

.card-body {
	padding: 12px 14px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.badges { display: flex; flex-wrap: wrap; gap: 5px; }

.badge {
	font-size: 0.75rem;
	padding: 1px 7px;
	border-radius: 4px;
	background: var(--surface-soft);
	color: var(--text-soft);
	border: 1px solid var(--line);
}

.badge.score { font-weight: 700; color: #fff; border: 0; }
.badge.score.high { background: var(--green); }
.badge.score.mid { background: var(--amber); }
.badge.score.low { background: var(--muted); }
.badge.sub { border-color: var(--blue); color: var(--blue); }
.badge.new { border-color: var(--green); color: var(--green); }
.badge.explore { border-color: var(--amber); color: var(--amber); }

.title {
	font-size: 1.02rem;
	line-height: 1.3;
	margin: 2px 0 0;
}

.title a { color: var(--text); }

.meta, .reason {
	margin: 0;
	font-size: 0.85rem;
	color: var(--muted);
}

.meta a { color: var(--text-soft); font-weight: 600; }
.reason { color: var(--text-soft); }

.actions {
	display: flex;
	gap: 6px;
	margin-top: auto;
	padding-top: 6px;
}

.action {
	font: inherit;
	font-size: 0.95rem;
	padding: 4px 10px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text-soft);
	cursor: pointer;
}

.action:hover { border-color: var(--blue); }
.action[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); }
.action.subtle { margin-left: auto; font-size: 0.8rem; color: var(--muted); }

.more { text-align: center; margin: 28px 0 0; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

.site-footer {
	margin-top: 30px;
	color: var(--muted);
	font-size: 0.82rem;
	text-align: center;
}

/* Formulare, Meldungen */
.button {
	display: inline-block;
	font: inherit;
	font-weight: 600;
	padding: 7px 14px;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
}

.button:hover { text-decoration: none; border-color: var(--blue); }
.button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.button.small { padding: 3px 10px; font-size: 0.85rem; }

.message {
	padding: 10px 14px;
	border-radius: var(--radius);
	background: var(--blue-soft);
	border-left: 4px solid var(--blue);
	margin: 0 0 16px;
}

.message.error { border-left-color: var(--red); }
.message.ok { border-left-color: var(--green); }

.panel {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 18px 20px;
	margin-bottom: 18px;
}

.panel h2 { margin: 0 0 12px; font-size: 1.15rem; }
.muted { color: var(--muted); font-weight: 400; }

.form-grid {
	display: grid;
	grid-template-columns: minmax(180px, 260px) 1fr;
	gap: 10px 16px;
	align-items: center;
}

input, select, textarea {
	font: inherit;
	color: var(--text);
	background: var(--surface-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 6px 9px;
	max-width: 100%;
}

textarea { width: 100%; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }
pre.code { white-space: pre-wrap; background: var(--surface-soft); padding: 10px; border-radius: var(--radius); overflow-x: auto; }
pre.small { font-size: 0.75rem; }

.checkbox { display: block; margin: 10px 0; }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	border-bottom: 1px solid var(--line);
}

.stats {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 18px;
	margin: 0 0 12px;
}

.stats dt { color: var(--muted); }
.stats dd { margin: 0; }

.login-page {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 20px;
}

.login-card { width: min(420px, 100%); }
.login-card label { display: block; font-weight: 600; margin: 12px 0 6px; }
.login-controls { display: flex; gap: 8px; }
.login-controls input { flex: 1; font-size: 1.2rem; letter-spacing: 0.2em; }

@media (max-width: 700px) {
	.header-inner { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
	.tabs { order: 3; flex-basis: 100%; }
	.page { padding: 12px 10px 30px; }
	.grid { grid-template-columns: 1fr; gap: 14px; }
	.form-grid { grid-template-columns: 1fr; }
}
