/*-------------------*/
/* !CSS-Variablen    */
/*-------------------*/
:root {
	--bg:           #0f172a;
	--surface:      #1e293b;
	--surface-2:    #2d3f55;
	--border:       rgba(255,255,255,0.1);
	--text:         #f1f5f9;
	--text-muted:   #64748b;
	--accent:       #22c55e;
	--danger:       #ef4444;
	--radius:       8px;
}
/*----------*/
/* !Reset   */
/*----------*/
*, *::before, *::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
body {
	background: var(--bg);
	color: var(--text);
	font-family: 'Jura', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-size: 15px;
	line-height: 1.5;
	min-height: 100vh;
}
a {
	color: var(--accent);
	text-decoration: none;
}
/*----------*/
/* !Nav     */
/*----------*/
.nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 24px;
	height: 60px;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 10;
}
.nav__brand {
	font-weight: 700;
	font-size: 16px;
	color: var(--text);
}
.nav__links {
	display: flex;
	gap: 20px;
}
.nav__links a {
	color: var(--text-muted);
	font-size: 14px;
	font-weight: 500;
	transition: color 0.15s;
}
.nav__links a:hover,
.nav__links a.active {
	color: var(--text);
}
/*----------*/
/* !Main    */
/*----------*/
.main {
	margin: 0 auto;
	padding: 24px;
	display: flex;
	justify-content: center;
	flex-direction: column;
	align-items: center;
}
.page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 28px;
	width: 100%;
}
.page-header h1 {
	font-size: 22px;
	font-weight: 700;
}
/*----------*/
/* !Buttons */
/*----------*/
.btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
	text-decoration: none;
}
.btn:hover {
	background: var(--surface-2);
}
.btn--primary {
	background: var(--accent);
	border-color: var(--accent);
	color: #000;
}
.btn--primary:hover {
	background: #16a34a;
	border-color: #16a34a;
}
.btn--accent {
	background: #1d4ed8;
	border-color: #1d4ed8;
	color: #fff;
}
.btn--accent:hover {
	background: #1e40af;
}
.btn--danger {
	background: transparent;
	border-color: var(--danger);
	color: var(--danger);
}
.btn--danger:hover {
	background: var(--danger);
	color: #fff;
}
.btn--sm {
	padding: 5px 10px;
	font-size: 13px;
}
/*----------*/
/* !Tabelle */
/*----------*/
.table {
	width: 100%;
	border-collapse: collapse;
	background: var(--surface);
	border-radius: var(--radius);
	overflow: hidden;
}
.table th {
	text-align: left;
	padding: 12px 16px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-muted);
	background: var(--surface-2);
	border-bottom: 1px solid var(--border);
}
.table tr {
	height: 64px;
}
.table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--border);
	vertical-align: middle;
}
.table tr:last-child td {
	border-bottom: none;
}
.table tr:hover td {
	background: rgba(255,255,255,0.02);
}
.table__logo {
	width: 28px;
	height: 28px;
	object-fit: contain;
	vertical-align: middle;
	margin: 0 4px;
	border-radius: 50%;
	transition: box-shadow 0.2s;
}
.table__logo--flag {
	border-radius: 3px;
	object-fit: cover;
}
.table__teams {
}
.table__actions {
	text-align: right;
}
.table__date {
	color: var(--text-muted);
	font-size: 13px;
	white-space: nowrap;
}
.table__score .score {
	font-weight: 700;
	font-size: 16px;
}
.vs {
	color: var(--text-muted);
	font-size: 13px;
	margin: 0 4px;
}
.text-muted {
	color: var(--text-muted);
}
/*----------*/
/* !Badge   */
/*----------*/
.badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
}
.badge--pending {
	background: rgba(234, 179, 8, 0.15);
	color: #eab308;
}
.badge--simulated {
	background: rgba(34, 197, 94, 0.15);
	color: var(--accent);
}
/*--------------*/
/* !Empty State */
/*--------------*/
.empty-state {
	text-align: center;
	padding: 80px 24px;
	color: var(--text-muted);
}
.empty-state__icon {
	display: block;
	font-size: 48px;
	margin-bottom: 16px;
}
.empty-state p {
	margin-bottom: 20px;
	font-size: 16px;
}
/*----------*/
/* !Formular */
/*----------*/
.form {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 28px;
	max-width: 820px;
}
.form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-bottom: 24px;
}
.form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-bottom: 24px;
}
.form__group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.form__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.form__input {
	width: 100%;
	padding: 10px 12px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	font-size: 15px;
	transition: border-color 0.15s;
}
.form__input:focus {
	outline: none;
	border-color: var(--accent);
}
.form__actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 8px;
}
/*-------------------*/
/* !Logo-Picker      */
/*-------------------*/
.logo-picker {
	position: relative;
}
.logo-picker__results {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	z-index: 100;
	max-height: 260px;
	overflow-y: auto;
}
.logo-picker__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	cursor: pointer;
	transition: background 0.1s;
}
.logo-picker__item:hover {
	background: rgba(255,255,255,0.06);
}
.logo-picker__item img {
	width: 32px;
	height: 32px;
	object-fit: contain;
}
.logo-picker__preview {
	margin-top: 10px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	width: fit-content;
	color: var(--text-muted);
	font-size: 12px;
}
.logo-picker__preview img {
	width: 56px;
	height: 56px;
	object-fit: contain;
}
.logo-wrapper {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.trikot-wrapper svg {
	width: 44px;
	height: 56px;
	display: block;
}
.trikot-wrapper .trikotfarbe {
	fill: var(--t-main, #445566);
}
.trikot-wrapper .trikot-schatten {
	fill: var(--t-shadow, #334455);
}
.trikot-wrapper .kragen-aussen {
	fill: var(--t-collar, #556677);
}
.trikot-wrapper .kragen-innen {
	fill: var(--t-collar-inner, #445566);
}
.trikot-wrapper .trikot-secondary {
	fill: var(--t-secondary, #ffffff);
}
.trikot-wrapper .trikot-trim {
	stroke: var(--t-main, #445566);
}
/*-------------------*/
/* !Wizard           */
/*-------------------*/
.wizard-step {
	max-width: 820px;
}
.wizard-subtitle {
	font-size: 18px;
	font-weight: 700;
	margin: 20px 0 16px;
}
.wizard-back {
	margin-bottom: 4px;
}
.mode-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.mode-card {
	background: var(--surface);
	border: 2px solid var(--border);
	border-radius: var(--radius);
	padding: 36px 24px;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.15s, background 0.15s;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	color: var(--text);
}
.mode-card:hover {
	border-color: var(--accent);
	background: var(--surface-2);
}
.mode-card__icon {
	font-size: 44px;
	line-height: 1;
}
.mode-card__title {
	font-size: 18px;
	font-weight: 700;
}
.mode-card__desc {
	font-size: 14px;
	color: var(--text-muted);
}
.league-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	max-width: 820px;
}
.league-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px 16px;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.15s, background 0.15s;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: var(--text);
}
.league-card:hover {
	border-color: var(--accent);
	background: var(--surface-2);
}
.league-card__icon {
	font-size: 28px;
	line-height: 1;
}
.league-card__name {
	font-size: 14px;
	font-weight: 600;
}
.fixture-list {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	max-width: 820px;
}
.fixture-loading,
.fixture-error {
	padding: 24px;
	text-align: center;
	color: var(--text-muted);
}
.fixture-error {
	color: var(--danger);
}
.fixture-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--border);
	cursor: pointer;
	transition: background 0.1s;
}
.fixture-item:last-child {
	border-bottom: none;
}
.fixture-item:hover {
	background: var(--surface-2);
}
.fixture-item__team {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 0;
}
.fixture-item__team--away {
	justify-content: flex-end;
}
.fixture-item__logo {
	width: 28px;
	height: 28px;
	object-fit: contain;
	flex-shrink: 0;
}
.fixture-item__logo--placeholder {
	width: 28px;
	height: 28px;
	background: var(--surface-2);
	border-radius: 4px;
	flex-shrink: 0;
}
.fixture-item__name {
	font-size: 14px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.fixture-item__vs {
	color: var(--text-muted);
	font-size: 13px;
	flex-shrink: 0;
	width: 24px;
	text-align: center;
}
.fixture-item__meta {
	color: var(--text-muted);
	font-size: 12px;
	flex-shrink: 0;
	text-align: right;
	min-width: 90px;
}
/*-----------------*/
/* !Color-Debug    */
/*-----------------*/
.color-pickers {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	flex-wrap: wrap;
}
.color-picker-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}
.color-picker {
	width: 28px;
	height: 28px;
	padding: 2px;
	border: 1px solid var(--border);
	border-radius: 4px;
	background: var(--bg);
	cursor: pointer;
}
.color-code {
	font-size: 11px;
	color: var(--text-muted);
}
.pattern-toggle {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: var(--text-muted);
	cursor: pointer;
	user-select: none;
}
.pattern-toggle__input {
	margin: 0;
	cursor: pointer;
}
/*-----------------------*/
/* !Video-Aufnahme       */
/*-----------------------*/
.btn--recording {
	border-color: var(--accent);
	color: var(--accent);
	opacity: 0.7;
	cursor: not-allowed;
	animation: pulse-record 1.2s ease-in-out infinite;
}
.recording-timer {
	font-variant-numeric: tabular-nums;
	margin-left: 4px;
	font-weight: 600;
}
@keyframes pulse-record {
	0%, 100% { opacity: 0.7; }
	50%       { opacity: 1;   }
}
.video-error {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
}
.error-details {
	font-size: 11px;
}
.error-details summary {
	cursor: pointer;
	color: var(--text-muted);
}
.error-details pre {
	max-height: 200px;
	overflow: auto;
	background: #111;
	color: #ddd;
	padding: 8px;
	border-radius: 4px;
	font-size: 10px;
	white-space: pre-wrap;
	word-break: break-all;
}
.video-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}
.table__video {
	min-width: 130px;
}
/*----------*/
/* !Modal   */
/*----------*/
.video-modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
}
.video-modal[hidden] {
	display: none;
}
.video-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.8);
}
.video-modal__box {
	position: relative;
	z-index: 1;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.video-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	color: var(--text-muted);
	font-size: 18px;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
	transition: color 0.15s;
}
.video-modal__close:hover {
	color: var(--text);
}
.video-modal__player {
	width: 100%;
	max-width: 540px;
	max-height: 70vh;
	border-radius: var(--radius);
	background: #000;
	display: block;
}
.video-modal__actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}
/*--------------------*/
/* !Post-Modal        */
/*--------------------*/
.post-modal__box {
	width: 480px;
}
.post-modal__title {
	font-size: 16px;
	font-weight: 600;
	margin: 0;
}
.post-modal__label {
	font-size: 12px;
	color: var(--text-muted);
	font-weight: 500;
}
.post-modal__textarea {
	width: 100%;
	padding: 10px 12px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	font-size: 13px;
	font-family: inherit;
	resize: vertical;
	box-sizing: border-box;
}
.post-modal__status {
	font-size: 13px;
	padding: 8px 12px;
	border-radius: var(--radius);
}
.post-modal__status--loading {
	background: rgba(255,255,255,0.05);
	color: var(--text-muted);
}
.post-modal__status--success {
	background: rgba(34,197,94,0.12);
	color: #4ade80;
}
.post-modal__status--error {
	background: rgba(239,68,68,0.12);
	color: #f87171;
}
/*--------------------*/
/* !Token-Seite       */
/*--------------------*/
.token-section {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
	margin-bottom: 20px;
}
.token-section__title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 16px;
}
.token-preview {
	font-family: monospace;
	font-size: 13px;
	color: var(--text-muted);
}
.token-hint {
	margin: 12px 0 0;
	font-size: 13px;
	color: var(--text-muted);
}
.token-instructions {
	font-size: 13px;
	line-height: 1.6;
	margin-bottom: 20px;
}
.token-instructions ol {
	margin: 8px 0 8px 20px;
}
.token-instructions code {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 12px;
}
.token-form__label {
	display: block;
	font-size: 12px;
	color: var(--text-muted);
	font-weight: 500;
	margin-bottom: 6px;
}
.token-form__input {
	width: 100%;
	padding: 10px 12px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	font-size: 13px;
	font-family: monospace;
	resize: vertical;
	box-sizing: border-box;
}
.token-form__actions {
	margin-top: 12px;
}
.token-form__status {
	margin-top: 12px;
	font-size: 13px;
	padding: 10px 14px;
	border-radius: var(--radius);
	line-height: 1.6;
}
.token-form__status--loading {
	background: rgba(255,255,255,0.05);
	color: var(--text-muted);
}
.token-form__status--success {
	background: rgba(34,197,94,0.12);
	color: #4ade80;
}
.token-form__status--error {
	background: rgba(239,68,68,0.12);
	color: #f87171;
}
/*-------------------*/
/* !Container        */
/*-------------------*/
.container {
	width: 100%;
	margin: 0 auto;
}
.container.page-match {
	max-width: 800px;
}
/*-----------------------*/
/* !Responsive           */
/*-----------------------*/
.table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	width: 100%;
}
@media (max-width: 768px) {
	.form__grid,
	.form__row {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.mode-cards {
		grid-template-columns: 1fr;
	}
	.league-grid {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 600px) {
	.nav {
		padding: 0 16px;
	}
	.nav__links {
		gap: 12px;
	}
	.nav__links a {
		font-size: 13px;
	}
	.main {
		padding: 20px 16px;
	}
	.page-header {
		flex-wrap: wrap;
		gap: 12px;
	}
	.form {
		padding: 16px;
	}
	.form__actions {
		flex-direction: column;
	}
	.form__actions .btn {
		width: 100%;
		justify-content: center;
	}
	.wizard-step,
	.fixture-list {
		max-width: 100%;
	}
	.league-grid {
		grid-template-columns: 1fr;
	}
	/* Table → Cards */
	.table-wrap {
		overflow-x: visible;
	}
	.table,
	.table tbody,
	.table tr,
	.table td {
		display: block;
		width: 100%;
	}
	.table thead {
		display: none;
	}
	.table tr {
		background: var(--surface);
		border: 1px solid var(--border);
		border-radius: var(--radius);
		margin-bottom: 12px;
		padding: 14px;
	}
	.table tr:hover td {
		background: transparent;
	}
	.table td {
		padding: 4px 0;
		border: none;
	}
	.table td + td {
		margin-top: 8px;
	}
	.table td::before {
		display: block;
		font-size: 11px;
		font-weight: 600;
		color: var(--text-muted);
		text-transform: uppercase;
		letter-spacing: 0.05em;
		margin-bottom: 3px;
	}
	.table td:nth-child(1)::before { content: "Datum"; }
	.table td:nth-child(2)::before { content: "Paarung"; }
	.table td:nth-child(3)::before { content: "Wettbewerb"; }
	.table td:nth-child(4)::before { content: "Ergebnis"; }
	.table td:nth-child(5)::before { content: "Status"; }
	.table td:nth-child(6)::before { content: "Video"; }
	.table td:nth-child(7) {
		margin-top: 12px;
		padding-top: 12px;
		border-top: 1px solid var(--border);
	}
	.table__actions {
		flex-wrap: wrap;
		gap: 6px;
	}
	.table__video {
		min-width: 0;
	}
	.video-player {
		width: 100%;
		max-width: 320px;
	}
}
/*---------*/
/* !LEGAL  */
/*---------*/
.legal {
	max-width: 760px;
	margin: 0 auto;
	padding: 32px 0 64px;
	line-height: 1.7;
}
.legal h1 {
	font-size: 2rem;
	margin-bottom: 4px;
}
.legal__updated {
	color: var(--text-muted, #888);
	font-size: 0.875rem;
	margin-bottom: 40px;
}
.legal h2 {
	font-size: 1.15rem;
	margin: 32px 0 8px;
}
.legal h3 {
	font-size: 1rem;
	margin: 20px 0 6px;
}
.legal p,
.legal ul {
	margin: 0 0 12px;
}
.legal ul {
	padding-left: 20px;
}
.legal a {
	color: var(--accent, #3b82f6);
}
/*--------------*/
/* !SITE-FOOTER */
/*--------------*/
.site-footer {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	padding: 20px;
	font-size: 0.8rem;
	color: var(--text-muted, #888);
	border-top: 1px solid var(--border, #1e293b);
}
.site-footer a {
	color: var(--text-muted, #888);
	text-decoration: none;
}
.site-footer a:hover {
	color: var(--text, #f1f5f9);
}
/*-----------*/
/* !LANDING  */
/*-----------*/
.landing {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
}
.landing__inner {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 16px;
	padding: 40px 20px;
	text-align: center;
}
.landing__icon {
	font-size: 4rem;
}
.landing__title {
	font-size: 2.5rem;
	font-weight: 700;
	margin: 0;
}
.landing__sub {
	color: var(--text-muted, #888);
	margin: 0;
	font-size: 0.95rem;
}
.landing__btn {
	margin-top: 8px;
	padding: 12px 32px;
	font-size: 1rem;
}
/*----------*/
/* !LOGIN   */
/*----------*/
.login-wrap {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.login-box {
	width: 100%;
	max-width: 360px;
	background: var(--surface, #1e293b);
	border: 1px solid var(--border, #334155);
	border-radius: 12px;
	padding: 40px 32px;
	text-align: center;
}
.login-logo {
	font-size: 3rem;
	margin-bottom: 8px;
}
.login-title {
	font-size: 1.4rem;
	font-weight: 700;
	margin: 0 0 24px;
}
.login-error {
	background: rgba(239,68,68,.15);
	border: 1px solid rgba(239,68,68,.4);
	color: #f87171;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 0.875rem;
	margin-bottom: 16px;
	text-align: left;
}
.login-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.login-input {
	width: 100%;
	padding: 10px 14px;
	background: var(--bg, #0f172a);
	border: 1px solid var(--border, #334155);
	border-radius: 6px;
	color: var(--text, #f1f5f9);
	font-size: 0.95rem;
	box-sizing: border-box;
}
.login-input:focus {
	outline: none;
	border-color: var(--accent, #3b82f6);
}
.login-submit {
	width: 100%;
	padding: 11px;
	font-size: 0.95rem;
	margin-top: 4px;
}
.login-footer {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 24px;
	font-size: 0.8rem;
}
.login-footer a {
	color: var(--text-muted, #888);
	text-decoration: none;
}
.nav__logout {
	color: var(--text-muted, #888);
	font-size: 0.85rem;
	margin-left: 4px;
}
.nav__logout:hover {
	color: var(--text, #f1f5f9);
}
