/*
Theme Name: PowerRank
Theme URI: https://power-rank-hq.com
Author: Power Rank HQ
Description: Schlankes Block-Theme für Power Rank HQ – sportliche Power-Ranking-Seite für NFL, Fußball und UFC. Dunkler Grundton mit hellem Modus, Akzentfarbe je Sportart.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: powerrank
*/

/* ==========================================================================
   Farben: dunkler Grundton (Standard) und heller Modus
   ========================================================================== */
:root {
	--prq-bg: #0B0D12;
	--prq-surface: #141821;
	--prq-surface-2: #1C2130;
	--prq-text: #F2F4F8;
	--prq-muted: #A3ABBA;
	--prq-line: #272D3C;
	--prq-nfl: #4C8DFF;
	--prq-fussball: #2BCB74;
	--prq-ufc: #FF5458;
	--prq-up: #34D399;
	--prq-down: #F87171;
	--prq-flat: #A3ABBA;
	--prq-on-accent: #FFFFFF;
	--prq-acc: var(--prq-nfl);
	--prq-radius: 14px;
	--prq-gutter: 16px;
	--prq-display: 'Bebas Neue', 'Oswald', Impact, 'Arial Narrow', sans-serif;
	--prq-body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	color-scheme: dark;
}
:root[data-theme="light"] {
	--prq-bg: #F3F4F7;
	--prq-surface: #FFFFFF;
	--prq-surface-2: #E9ECF2;
	--prq-text: #0B0D12;
	--prq-muted: #4A5263;
	--prq-line: #D7DCE5;
	--prq-nfl: #1D4ED8;
	--prq-fussball: #15803D;
	--prq-ufc: #C81E1E;
	--prq-up: #047857;
	--prq-down: #B91C1C;
	--prq-flat: #4A5263;
	color-scheme: light;
}

/* Akzentfarbe je Sportart */
[data-sport="nfl"], .prq-sport-nfl { --prq-acc: var(--prq-nfl); }
[data-sport="fussball"], .prq-sport-fussball { --prq-acc: var(--prq-fussball); }
[data-sport="ufc"], .prq-sport-ufc { --prq-acc: var(--prq-ufc); }
[data-sport="goat"], .prq-sport-goat { --prq-acc: var(--prq-text); --prq-on-accent: var(--prq-bg); }

/* ==========================================================================
   Grundlagen
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--prq-bg);
	color: var(--prq-text);
	font-family: var(--prq-body);
	overflow-x: hidden;
}
.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > main, .prq-main { flex: 1 0 auto; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
a { color: inherit; text-underline-offset: .18em; }
a:hover { color: var(--prq-acc); }
:focus-visible { outline: 3px solid var(--prq-acc); outline-offset: 3px; }
img { max-width: 100%; height: auto; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; z-index: 100;
	top: 8px; left: 8px; padding: 12px 16px; background: var(--prq-surface); color: var(--prq-text); border-radius: 10px;
}

.prq-display, .prq-rank, .prq-badge {
	font-family: var(--prq-display);
	font-weight: 400;
	letter-spacing: .02em;
	line-height: 1;
}
.prq-wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--prq-gutter); }
.prq-wrap--narrow { max-width: 860px; }
.prq-kicker {
	margin: 0 0 14px;
	font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
	color: var(--prq-muted);
}
.prq-muted { color: var(--prq-muted); }

/* ==========================================================================
   Kopfbereich
   ========================================================================== */
.prq-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--prq-bg) 90%, transparent);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--prq-line);
}
.admin-bar .prq-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .prq-header { top: 0; } }
.prq-header__inner {
	max-width: 1120px; margin-inline: auto; padding: 10px var(--prq-gutter) 0;
	display: grid; grid-template-columns: 1fr auto;
	grid-template-areas: "brand toggle" "nav nav";
	align-items: center; gap: 2px 12px;
}
.prq-header__inner > * { margin: 0 !important; }
.prq-brand { grid-area: brand; min-height: 44px; display: flex; align-items: center; }
.prq-brand a {
	display: inline-flex; align-items: center; gap: 12px;
	font-family: var(--prq-display); font-size: 27px; line-height: 1; letter-spacing: .02em;
	text-decoration: none; color: var(--prq-text);
}
.prq-brand a::before {
	content: ""; flex: 0 0 auto; width: 27px; height: 22px; transform: skewX(-18deg);
	background: linear-gradient(90deg,
		var(--prq-nfl) 0 7px, transparent 7px 10px,
		var(--prq-fussball) 10px 17px, transparent 17px 20px,
		var(--prq-ufc) 20px 27px);
}
.prq-header .wp-block-powerrank-theme-toggle { grid-area: toggle; }
.prq-header .prq-nav { grid-area: nav; }

/* Navigation */
.prq-nav { margin-inline: calc(var(--prq-gutter) * -1); }
.prq-nav__list {
	list-style: none; margin: 0; padding: 0 6px;
	display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
}
.prq-nav__list::-webkit-scrollbar { display: none; }
.prq-nav__link {
	position: relative; display: flex; align-items: center;
	min-height: 46px; padding: 0 14px;
	font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
	color: var(--prq-muted);
}
.prq-nav__link:hover, .prq-nav__link.is-active { color: var(--prq-text); }
.prq-nav__link.is-active::after {
	content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px;
	background: var(--prq-acc); transform: skewX(-24deg);
}

/* Unterreiter einer Sportart */
.prq-subnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 18px calc(var(--prq-gutter) * -1) 0; padding: 0 var(--prq-gutter) 4px; }
.prq-subnav::-webkit-scrollbar { display: none; }
.prq-subnav a {
	flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
	border: 1px solid var(--prq-line); border-radius: 999px;
	font-size: 14px; font-weight: 600; text-decoration: none; color: var(--prq-muted); white-space: nowrap;
}
.prq-subnav a:hover { color: var(--prq-text); border-color: var(--prq-acc); }
.prq-subnav a.is-active { background: var(--prq-acc); border-color: var(--prq-acc); color: var(--prq-on-accent); }

/* Hell/Dunkel-Schalter */
.prq-toggle {
	width: 44px; height: 44px; display: grid; place-items: center; padding: 0; cursor: pointer;
	background: var(--prq-surface); color: var(--prq-text);
	border: 1px solid var(--prq-line); border-radius: 10px;
}
.prq-toggle:hover { border-color: var(--prq-acc); }
.prq-toggle svg { width: 20px; height: 20px; }
.prq-toggle .prq-i-moon { display: none; }
:root[data-theme="light"] .prq-toggle .prq-i-moon { display: block; }
:root[data-theme="light"] .prq-toggle .prq-i-sun { display: none; }

@media (min-width: 860px) {
	.prq-header__inner {
		grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav toggle";
		padding-block: 8px;
	}
	.prq-nav { margin: 0; }
	.prq-nav__list { justify-content: center; }
}

/* ==========================================================================
   Startseite: Hero
   ========================================================================== */
.prq-hero {
	position: relative; overflow: hidden;
	padding: 44px 0 40px; border-bottom: 1px solid var(--prq-line);
}
.prq-hero::before, .prq-hero::after {
	content: ""; position: absolute; top: -20%; height: 140%; transform: skewX(-22deg); pointer-events: none;
}
.prq-hero::before {
	right: 4%; width: 64px; background: var(--prq-ufc); opacity: .16;
	box-shadow: -170px 0 0 -20px var(--prq-fussball);
}
.prq-hero::after { right: 34%; width: 26px; background: var(--prq-nfl); opacity: .16; }
.prq-hero > * { position: relative; }
.prq-hero__title {
	margin: 0; max-width: 12ch;
	font-family: var(--prq-display); font-weight: 400; letter-spacing: .02em; line-height: .9;
	font-size: clamp(64px, 18vw, 156px);
}
.prq-hero__title em {
	display: block; font-style: normal; white-space: nowrap;
	color: transparent; -webkit-text-stroke: 2px var(--prq-text);
}
.prq-hero__sub { margin: 18px 0 0; max-width: 34ch; font-size: 18px; color: var(--prq-muted); }
@media (min-width: 860px) { .prq-hero { padding: 80px 0 64px; } }

/* Sportart-Chips */
.prq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.prq-chip {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
	background: var(--prq-surface); border: 1px solid var(--prq-line); border-radius: 999px;
	font-size: 14px; font-weight: 600; text-decoration: none; color: var(--prq-text);
}
.prq-chip::before { content: ""; width: 9px; height: 14px; background: var(--prq-acc); transform: skewX(-18deg); }
.prq-chip:hover { border-color: var(--prq-acc); color: var(--prq-text); }

/* Abschnittstitel mit Linie */
.prq-section-title {
	display: flex; align-items: center; gap: 12px; margin: 36px 0 16px;
	font-family: var(--prq-body); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
	color: var(--prq-muted);
}
.prq-section-title::after { content: ""; flex: 1; height: 1px; background: var(--prq-line); }

/* ==========================================================================
   Kacheln (Startseite / Übersicht)
   ========================================================================== */
.prq-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: 16px; }
@media (min-width: 960px) { .prq-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.prq-tile {
	position: relative; overflow: hidden;
	background: var(--prq-surface); border: 1px solid var(--prq-line); border-radius: 16px;
	padding: 22px 18px 18px;
}
.prq-tile::before {
	content: ""; position: absolute; top: 0; left: -8%; width: 58%; height: 5px;
	background: var(--prq-acc); transform: skewX(-30deg);
}
.prq-tile::after {
	content: ""; position: absolute; right: -40px; top: -30px; width: 110px; height: 150px;
	background: var(--prq-acc); opacity: .08; transform: skewX(-22deg); pointer-events: none;
}
.prq-tile__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.prq-tile__title { margin: 0; font-family: var(--prq-display); font-weight: 400; font-size: 46px; line-height: 1; letter-spacing: .02em; }
.prq-tile__title a { text-decoration: none; }
.prq-tile__sub { font-size: 13px; color: var(--prq-muted); }
.prq-n1 { display: block; padding: 12px 0; border-top: 1px solid var(--prq-line); text-decoration: none; color: var(--prq-text); }
.prq-n1__label {
	display: flex; justify-content: space-between; gap: 8px;
	font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--prq-muted);
}
.prq-n1__row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.prq-n1 .prq-rank { width: 20px; font-size: 32px; color: var(--prq-acc); }
.prq-n1__name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.prq-n1:hover { color: var(--prq-text); }
a.prq-n1:hover .prq-n1__name { text-decoration: underline; }
.prq-n1__chev { color: var(--prq-acc); font-weight: 700; }
.prq-mover {
	position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	margin-top: 6px; padding: 12px; border-radius: 12px; background: var(--prq-surface-2);
}
.prq-mover__label { width: 100%; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--prq-muted); }
.prq-mover__name { flex: 1; min-width: 0; font-weight: 600; }
.prq-mover__ctx { width: 100%; font-size: 12px; color: var(--prq-muted); }

/* ==========================================================================
   Bausteine: Badge, Bewegung, Balken
   ========================================================================== */
.prq-badge {
	display: inline-grid; place-items: center; flex: 0 0 auto;
	min-width: 52px; height: 32px; padding: 0 11px;
	font-size: 19px; color: #FFFFFF; background: #3A4152;
	clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
}
.prq-badge--sm { min-width: 46px; height: 28px; font-size: 17px; }
.prq-move {
	display: inline-block; padding: 2px 7px; border-radius: 6px;
	font-size: 12px; font-weight: 700; white-space: nowrap;
}
.prq-move--up { color: var(--prq-up); background: color-mix(in srgb, var(--prq-up) 15%, transparent); }
.prq-move--down { color: var(--prq-down); background: color-mix(in srgb, var(--prq-down) 15%, transparent); }
.prq-move--flat { color: var(--prq-flat); background: var(--prq-surface-2); }
.prq-move--new { color: var(--prq-acc); background: color-mix(in srgb, var(--prq-acc) 15%, transparent); }
.prq-bar { flex: 1; height: 6px; overflow: hidden; border-radius: 3px; background: var(--prq-surface-2); }
.prq-bar__fill { display: block; height: 100%; border-radius: 3px; background: var(--prq-acc); transform-origin: left; }

/* ==========================================================================
   Ranking-Seite
   ========================================================================== */
.prq-pagehead { position: relative; overflow: hidden; padding: 26px 0 8px; }
.prq-pagehead::before, .prq-pagehead::after {
	content: ""; position: absolute; top: -20%; height: 140%; background: var(--prq-acc);
	transform: skewX(-22deg); pointer-events: none;
}
.prq-pagehead::before { right: 30%; width: 18px; opacity: .14; }
.prq-pagehead::after { right: 4%; width: 70px; opacity: .10; }
.prq-pagehead > * { position: relative; }
.prq-crumb { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--prq-acc); }
.prq-crumb a { text-decoration: none; }
.prq-pagehead h1, .prq-page__title {
	margin: 0; font-family: var(--prq-display); font-weight: 400; letter-spacing: .02em; line-height: .95;
	font-size: clamp(50px, 14vw, 104px);
}
.prq-pagehead h1 span { display: block; color: var(--prq-acc); }
.prq-meta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-top: 18px; }
.prq-meta__date { font-size: 14px; color: var(--prq-muted); }
.prq-select { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--prq-muted); }
.prq-select select {
	min-height: 44px; padding: 0 12px; border: 1px solid var(--prq-line); border-radius: 10px;
	background: var(--prq-surface); color: var(--prq-text); font: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none;
}
.prq-select noscript a, .prq-archive-links a { color: var(--prq-acc); }

.prq-movers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 20px 0 14px; }
.prq-mvcard {
	position: relative; overflow: hidden; padding: 12px 12px 14px;
	background: var(--prq-surface); border: 1px solid var(--prq-line); border-radius: var(--prq-radius);
}
.prq-mvcard__label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--prq-muted); }
.prq-mvcard__value { display: block; margin-top: 4px; font-family: var(--prq-display); font-size: 44px; line-height: 1; }
.prq-mvcard__value--up { color: var(--prq-up); }
.prq-mvcard__value--down { color: var(--prq-down); }
.prq-mvcard__who { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; font-weight: 600; }

.prq-list-head {
	display: flex; justify-content: space-between; margin: 22px 0 8px; padding: 0 4px;
	font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--prq-muted);
}
.prq-ranking { list-style: none; margin: 0 0 48px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.prq-card {
	position: relative; overflow: hidden;
	background: var(--prq-surface); border: 1px solid var(--prq-line); border-radius: var(--prq-radius);
}
.prq-card__main {
	position: relative; z-index: 1;
	display: grid; grid-template-columns: 40px auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
	padding: 12px 10px 12px 8px;
}
.prq-card .prq-rank { font-size: 38px; text-align: center; }
.prq-card--top { border-color: color-mix(in srgb, var(--prq-acc) 50%, var(--prq-line)); }
.prq-card--top .prq-rank { font-size: 52px; color: var(--prq-acc); }
.prq-card--top::after {
	content: ""; position: absolute; right: -34px; top: -20%; width: 120px; height: 140%;
	background: var(--prq-acc); opacity: .11; transform: skewX(-22deg); pointer-events: none;
}
.prq-card--top1 .prq-card__main { padding-block: 20px; }
.prq-card--top1 .prq-rank { font-size: 64px; }
.prq-card--top1 .prq-card__name { font-size: 19px; }
.prq-card__body { min-width: 0; }
.prq-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.prq-card__name { margin: 0; font-family: var(--prq-body); font-size: 16px; font-weight: 700; line-height: 1.25; letter-spacing: 0; }
.prq-card__rate { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.prq-card__rating { min-width: 26px; text-align: right; font-family: var(--prq-display); font-size: 21px; line-height: 1; }
.prq-card__comment { margin: 7px 0 0; font-size: 13px; line-height: 1.45; color: var(--prq-muted); }
.prq-card__toggle {
	width: 44px; height: 44px; display: grid; place-items: center; padding: 0; cursor: pointer;
	background: var(--prq-surface); color: var(--prq-text); border: 1px solid var(--prq-line); border-radius: 10px;
}
.prq-card__toggle[aria-expanded="true"] { border-color: var(--prq-acc); color: var(--prq-acc); }
.prq-card__toggle svg { width: 20px; height: 20px; }
.prq-hist { position: relative; z-index: 1; padding: 12px 14px 14px; border-top: 1px solid var(--prq-line); }
.prq-hist[hidden] { display: none; }
.prq-hist__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--prq-muted); }
.prq-hist svg { display: block; width: 100%; height: auto; margin-top: 8px; overflow: visible; }
.prq-hist__line { fill: none; stroke: var(--prq-acc); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.prq-hist__dot { fill: var(--prq-acc); }
.prq-hist__grid { stroke: var(--prq-line); stroke-width: 1; }
.prq-hist__label { fill: var(--prq-muted); font-family: var(--prq-body); font-size: 11px; }

@media (min-width: 860px) {
	.prq-pagehead { padding-top: 56px; }
	.prq-card__main { grid-template-columns: 64px 76px minmax(0, 1fr) auto; padding: 14px 16px 14px 10px; }
	.prq-movers { gap: 14px; }
}

/* Leere Zustände und Hinweise */
.prq-note { margin: 20px 0 48px; padding: 18px; border: 1px dashed var(--prq-line); border-radius: var(--prq-radius); color: var(--prq-muted); }

/* ==========================================================================
   Seiten, Beiträge, Archive
   ========================================================================== */
.prq-page { padding-block: 32px 56px; }
.prq-page .wp-block-post-content { margin-top: 24px; }
.prq-page .wp-block-post-content > * { max-width: 70ch; }
.prq-page h2, .prq-page h3 { font-family: var(--prq-display); font-weight: 400; letter-spacing: .02em; line-height: 1.05; }
.prq-page h2 { font-size: 40px; margin: 1.4em 0 .4em; }
.prq-page h3 { font-size: 30px; margin: 1.2em 0 .4em; }
.prq-postlist { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; }
.prq-postlist > li { padding: 16px; background: var(--prq-surface); border: 1px solid var(--prq-line); border-radius: var(--prq-radius); }
.prq-postlist .wp-block-post-title { margin: 0; font-family: var(--prq-display); font-weight: 400; font-size: 30px; line-height: 1.05; }
.prq-postlist .wp-block-post-title a { text-decoration: none; }
.prq-postlist .wp-block-post-date { font-size: 13px; color: var(--prq-muted); }
.wp-block-query-pagination { margin-top: 24px; gap: 12px; }
.prq-404 { padding-block: 64px; }

/* ==========================================================================
   Fußbereich
   ========================================================================== */
.prq-footer { border-top: 1px solid var(--prq-line); font-size: 13px; color: var(--prq-muted); }
.prq-footer__inner {
	max-width: 1120px; margin-inline: auto; padding: 24px var(--prq-gutter) 40px;
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
}
.prq-footer__inner > * { margin: 0 !important; }
.prq-footer a { color: var(--prq-muted); }

/* ==========================================================================
   Bewegung: dezent und abschaltbar
   ========================================================================== */
@keyframes prq-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes prq-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes prq-show { to { opacity: 1; transform: none; } }
.js .prq-reveal { opacity: 0; transform: translateY(14px); animation: prq-show 0s 2.5s forwards; }
.js .prq-reveal.is-visible { animation: prq-rise .5s var(--prq-delay, 0ms) both cubic-bezier(.2, .7, .2, 1); }
.js .prq-reveal .prq-bar__fill { transform: scaleX(0); }
.js .prq-reveal.is-visible .prq-bar__fill { animation: prq-fill .9s calc(var(--prq-delay, 0ms) + 200ms) both ease-out; }
@media (prefers-reduced-motion: reduce) {
	.js .prq-reveal, .js .prq-reveal.is-visible { opacity: 1; transform: none; animation: none; }
	.js .prq-reveal .prq-bar__fill, .js .prq-reveal.is-visible .prq-bar__fill { transform: none; animation: none; }
	html { scroll-behavior: auto; }
}
