* {
    box-sizing: border-box;
}
:root {
    color-scheme: dark;
    --bg: #111318;
    --panel: #1b1f27;
    --panel-soft: #222733;
    --text: #f4f6f8;
    --muted: #99a3b3;
    --accent: #e66aa4;
    --accent-bright: #ff73b3;
    --accent-soft: rgba(230, 106, 164, .15);
    --bot: #80bfff;
    --bot-soft: rgba(128, 191, 255, .12);
    --green: #50d890;
    --gold: #ffd166;
    --line: rgba(255, 255, 255, .08);
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 8% 8%, rgba(230, 106, 164, .11), transparent 28%), radial-gradient(circle at 92% 14%, rgba(128, 191, 255, .09), transparent 30%), var(--bg);
}
a {
    color: inherit;
}
.site-shell {
    width: min(94%, 1180px);
    margin: 0 auto;
}
.topbar {
    min-height: 72px;
    margin-top: 18px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(23, 27, 34, .94);
    box-shadow: 0 18px 55px rgba(0, 0, 0, .24);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.brand-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-soft);
    font-size: 25px;
}
.brand-title {
    display: block;
    font-size: 1.08rem;
    font-weight: 900;
}
.brand-subtitle {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .8rem;
}
.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}
.nav-links a {
    padding: 9px 12px;
    border-radius: 10px;
    color: #cbd5df;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 750;
    transition: .18s;
}
.nav-links a:hover, .nav-links a.active {
    color: #fff;
    background: rgba(255, 255, 255, .055);
}
.login-bar {
    margin-top: 12px;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(27, 31, 39, .88);
}
.login-copy strong, .login-copy span {
    display: block;
}
.login-copy span {
    margin-top: 3px;
    color: var(--muted);
    font-size: .86rem;
}
.login-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.button {
    min-height: 42px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.button:hover {
    transform: translateY(-1px);
}
.button.primary {
    background: var(--accent);
    color: #fff;
}
.button.primary:hover {
    background: var(--accent-bright);
}
.button.secondary {
    color: #dbe5ee;
    border-color: var(--line);
    background: rgba(255, 255, 255, .035);
}
.button.secondary:hover {
    background: rgba(255, 255, 255, .075);
}
main {
    margin: 18px auto 26px;
    display: grid;
    gap: 18px;
}
.hero {
    padding: clamp(30px, 5vw, 52px);
    border: 1px solid rgba(230, 106, 164, .25);
    border-radius: 26px;
    background: radial-gradient(circle at 88% 25%, rgba(128, 191, 255, .13), transparent 30%), linear-gradient(145deg, rgba(27, 31, 39, .98), rgba(17, 19, 24, .97));
    box-shadow: 0 25px 80px rgba(0, 0, 0, .30);
}
.hero-kicker {
    margin-bottom: 12px;
    color: var(--bot);
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.hero h1 {
    max-width: 820px;
    margin: 0;
    font-size:  clamp(1.8rem,  4vw,  3.2rem);
    line-height: .98;
    letter-spacing: -.04em;
}
.hero h1 span {
    color: var(--accent-bright);
}
.hero p {
    max-width: 780px;
    margin: 20px 0 0;
    color: #b5c0cc;
    line-height: 1.7;
}
.hero-actions {
    margin-top: 24px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.stat-card {
    min-height: 132px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(27, 31, 39, .86);
}
.stat-icon {
    font-size: 1.6rem;
}
.stat-value {
    margin-top: 13px;
    color: var(--accent-bright);
    font-size: clamp(1.7rem, 4vw, 2.45rem);
    font-weight: 950;
    line-height: 1;
}
.stat-label {
    margin-top: 7px;
    color: var(--muted);
    font-size: .84rem;
}
.content-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 21px;
    background: rgba(27, 31, 39, .84);
}
.section-head {
    margin-bottom: 18px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}
.section-head h2 {
    margin: 0;
    font-size: 1.4rem;
}
.section-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .9rem;
}
.section-link {
    color: var(--accent);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 850;
}
.month-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.month-selector a {
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #c7d1db;
    background: rgba(255, 255, 255, .025);
    text-decoration: none;
    font-size: .8rem;
    font-weight: 800;
}
.month-selector a.active, .month-selector a:hover {
    color: #fff;
    border-color: rgba(230, 106, 164, .35);
    background: var(--accent-soft);
}
.rank-list {
    display: grid;
    gap: 8px;
}
.rank-row {
    min-height: 70px;
    padding: 11px 14px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 14px;
    background: rgba(255, 255, 255, .022);
}
.rank-row:first-child {
    border-color: rgba(255, 209, 102, .22);
    background: rgba(255, 209, 102, .045);
}
.rank-position {
    text-align: center;
    font-weight: 950;
    font-size: 1.15rem;
}
.rank-player {
    min-width: 0;
}
.rank-player a {
    color: #edf2f6;
    text-decoration: none;
    font-weight: 850;
}
.rank-player a:hover {
    color: var(--accent-bright);
}
.rank-player small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: .74rem;
}
.rank-points {
    text-align: right;
    color: var(--accent-bright);
    font-size: 1.05rem;
    font-weight: 950;
}
.rank-points small {
    color: var(--muted);
    font-size: .7rem;
}
.record-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.record {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 15px;
    background: rgba(255, 255, 255, .022);
}
.record-icon {
    font-size: 1.4rem;
}
.record strong {
    display: block;
    margin-top: 10px;
    font-size: .88rem;
}
.record-name {
    margin-top: 5px;
    color: var(--accent-bright);
    font-weight: 900;
}
.record-value {
    margin-top: 3px;
    color: var(--muted);
    font-size: .8rem;
}
.category-table {
    overflow-x: auto;
}
.category-table table {
    width: 100%;
    border-collapse: collapse;
}
.category-table th, .category-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    text-align: left;
}
.category-table th {
    color: var(--muted);
    font-size: .75rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.category-table td {
    font-size: .86rem;
}
.category-table tr:last-child td {
    border-bottom: 0;
}
.accuracy {
    font-weight: 900;
}
.accuracy.good {
    color: var(--green);
}
.accuracy.mid {
    color: var(--gold);
}
.accuracy.hard {
    color: var(--accent-bright);
}
.question-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.question-list {
    display: grid;
    gap: 8px;
}
.question-item {
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 13px;
    background: rgba(255, 255, 255, .022);
}
.question-category {
    color: var(--bot);
    font-size: .72rem;
    font-weight: 850;
}
.question-text {
    margin-top: 5px;
    color: #e6edf3;
    font-size: .87rem;
    line-height: 1.45;
}
.question-meta {
    margin-top: 7px;
    color: var(--muted);
    font-size: .74rem;
}
.profile-card {
    border-color: rgba(128, 191, 255, .20);
    background: linear-gradient(145deg, rgba(128, 191, 255, .045), rgba(27, 31, 39, .88));
}
.profile-top {
    display: flex;
    align-items: center;
    gap: 14px;
}
.profile-avatar {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--bot-soft);
    font-size: 26px;
}
.profile-name {
    font-size: 1.4rem;
    font-weight: 950;
}
.profile-rank {
    margin-top: 4px;
    color: var(--muted);
    font-size: .84rem;
}
.profile-stats {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}
.profile-stat {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 13px;
    background: rgba(255, 255, 255, .02);
}
.profile-stat strong {
    display: block;
    color: var(--accent-bright);
    font-size: 1.25rem;
}
.profile-stat span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: .72rem;
}
.empty {
    padding: 24px;
    border: 1px dashed rgba(255, 255, 255, .08);
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
}
.database-warning {
    padding: 18px;
    border: 1px solid rgba(255, 110, 110, .20);
    border-radius: 15px;
    color: #ffb0b0;
    background: rgba(255, 80, 80, .055);
}
.site-footer {
    margin-bottom: 20px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(23, 27, 34, .72);
    color: #718090;
    font-size: .85rem;
}
.footer-support {
	margin-top: 6px;
}

.footer-support a {
	color: var(--accent-bright);
	font-weight: 700;
	text-decoration: none;
}

.footer-support a:hover {
	text-decoration: underline;
}
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .78);
    backdrop-filter: blur(8px);
}
.login-overlay.active {
    display: flex;
}
.login-popup {
    position: relative;
    width: min(100%, 420px);
    padding: 28px;
    border: 1px solid rgba(230, 106, 164, .25);
    border-radius: 20px;
    background: #171b22;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .58);
}
.login-popup h3 {
    margin: 0 0 22px;
    color: var(--accent-bright);
    text-align: center;
}
.close-login {
    position: absolute;
    top: 12px;
    right: 16px;
    color: #c9d2dc;
    font-size: 22px;
    cursor: pointer;
}
.login-error {
    margin-bottom: 12px;
    color: #ff8585;
    text-align: center;
}
.mini-login {
    display: grid;
    gap: 12px;
}
.mini-login input[type=text], .mini-login input[type=password] {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: #10141b;
    color: #fff;
    font: inherit;
    outline: none;
}
.mini-login input:focus {
    border-color: rgba(230, 106, 164, .55);
}
.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .88rem;
}
@media(max-width:950px) {
    .stat-grid, .record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.profile-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
@media(max-width:760px) {
    .topbar, .login-bar, .site-footer {
    align-items: flex-start;
    flex-direction: column;
}
.nav-links {
    width: 100%;
    justify-content: flex-start;
}
.question-grid {
    grid-template-columns: 1fr;
}
.content-card {
    padding: 20px 16px;
}
.section-head {
    align-items: flex-start;
    flex-direction: column;
}
}
@media(max-width:560px) {
    .stat-grid, .record-grid, .profile-stats {
    grid-template-columns: 1fr;
}
.hero {
    padding: 28px 20px;
}
.rank-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 10px 11px;
}
}
@media(prefers-reduced-motion:reduce) {
    *, *: :before, *::after {
    transition: none!important;
}
}

/* =========================================================
   HALL OF FAME
   Toevoegen aan /css/trivia-statistieken.css
   ========================================================= */

.hall-controls {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hall-controls span {
	color: var(--muted, #9ca6b7);
	font-size: .82rem;
	font-weight: 700;
	min-width: 42px;
	text-align: center;
}

.hall-nav {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(239, 92, 166, .35);
	border-radius: 9px;
	background: rgba(255, 255, 255, .035);
	color: #ef5ca6;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
	transition: .2s ease;
}

.hall-nav:hover:not(:disabled) {
	background: rgba(239, 92, 166, .10);
	border-color: rgba(239, 92, 166, .65);
	transform: translateY(-1px);
}

.hall-nav:disabled {
	opacity: .3;
	cursor: default;
}

.hall-list {
	display: grid;
	gap: 10px;
}

.hall-row {
	display: grid;
	grid-template-columns: 48px 180px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	border: 1px solid rgba(239, 92, 166, .16);
	border-radius: 12px;
	background: rgba(255, 255, 255, .025);
}

.hall-row:first-child {
	border-color: rgba(245, 190, 65, .35);
	background: rgba(245, 190, 65, .045);
}

.hall-hidden {
	display: none;
}

.hall-medal {
	font-size: 1.45rem;
	text-align: center;
}

.hall-month,
.hall-player {
	min-width: 0;
}

.hall-month strong,
.hall-player a {
	display: block;
	color: #f4f6fb;
	font-weight: 800;
}

.hall-player a {
	color: #ef5ca6;
	text-decoration: none;
}

.hall-player a:hover {
	text-decoration: underline;
}

.hall-month small,
.hall-player small {
	display: block;
	margin-top: 3px;
	color: var(--muted, #9ca6b7);
	font-size: .76rem;
}

.hall-points {
	color: #ef5ca6;
	font-size: 1.05rem;
	font-weight: 900;
	white-space: nowrap;
}

.hall-points small {
	color: var(--muted, #9ca6b7);
	font-size: .72rem;
	font-weight: 700;
}

@media (max-width: 720px) {
	.hall-row {
		grid-template-columns: 38px minmax(0, 1fr) auto;
	}

	.hall-month {
		grid-column: 2;
	}

	.hall-player {
		grid-column: 2;
	}

	.hall-points {
		grid-column: 3;
		grid-row: 1 / span 2;
	}

	.hall-controls {
		margin-top: 8px;
	}
}

/* =========================================================
   MOBIEL - HORIZONTALE OVERFLOW VOORKOMEN
   ========================================================= */

html,
body {
	max-width: 100%;
	overflow-x: clip;
}

.site-shell {
	width: min(94%, 1180px);
	max-width: 100%;
	min-width: 0;
}

main,
.hero,
.content-card,
.stat-grid,
.stat-card,
.record-grid,
.record,
.question-grid,
.question-list,
.question-item,
.profile-card,
.profile-top,
.profile-stats,
.profile-stat,
.rank-list,
.rank-row,
.rank-player,
.hall-of-fame-card,
.hall-list,
.hall-row,
.hall-month,
.hall-player {
	min-width: 0;
	max-width: 100%;
}

/* Lange tekst/namen mogen nooit een blok breder duwen */
.rank-player,
.rank-player a,
.rank-player small,
.hall-month,
.hall-player,
.hall-player a,
.hall-player small,
.question-text,
.profile-name {
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* Tabellen mogen binnen hun eigen blok scrollen,
   niet de volledige pagina */
.category-table {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

@media (max-width: 560px) {

	.site-shell {
		width: calc(100% - 20px);
	}

	.topbar,
	.login-bar,
	.site-footer {
		width: 100%;
	}

	.nav-links {
		max-width: 100%;
	}

	.nav-links a {
		max-width: 100%;
	}

	.content-card {
		padding: 18px 12px;
	}

	.hero {
		padding: 24px 16px;
	}

	/* Ranglijsten compacter op smalle telefoons */
	.rank-row {
		grid-template-columns: 30px minmax(0, 1fr) auto;
		gap: 8px;
		padding: 10px 9px;
	}

	.rank-points {
		font-size: .95rem;
		white-space: nowrap;
	}

	/* Hall of Fame mobiel */
	.hall-row {
		grid-template-columns: 30px minmax(0, 1fr) auto;
		gap: 8px;
		padding: 12px 9px;
	}

	.hall-medal {
		font-size: 1.2rem;
	}

	.hall-points {
		font-size: .95rem;
		white-space: nowrap;
	}

	/* Knoppen mogen op zeer smalle schermen afbreken */
	.hero-actions,
	.login-actions {
		width: 100%;
	}

	.hero-actions .button,
	.login-actions .button {
		max-width: 100%;
		white-space: normal;
		text-align: center;
	}
}

/* =========================================================
   STACKED HEADER NAVIGATION
   Brand bovenaan, navigatie eronder
   ========================================================= */

.topbar {
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	row-gap: 8px;
}

.topbar .brand {
	flex: 0 0 100%;
}

.topbar .nav-links {
	width: 100%;
	padding-left: 56px;
	justify-content: flex-start;
	gap: 6px 10px;
}

.topbar .nav-links a {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
}

@media (max-width: 700px) {
	.topbar .nav-links {
		padding-left: 0;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.topbar .nav-links a {
		width: 100%;
		justify-content: center;
		text-align: center;
		padding: 9px 8px;
		border: 1px solid var(--line);
		background: rgba(255, 255, 255, .025);
	}
}

@media (max-width: 420px) {
	.topbar .nav-links {
		grid-template-columns: 1fr;
	}
}

