:root {
	--bg: rgba(2, 6, 23, 1);
	--fg: rgba(229, 231, 235, 1);
	--white: rgba(255, 255, 255, 1);
	--card: rgba(2, 6, 23, 1);
	--accent: rgba(59, 130, 246, 1);
	--accent-soft: rgba(59, 130, 246, .15);
	--border: rgba(31, 41, 55, 1);
	--muted: rgba(156, 163, 175, 1);
	--shadow-soft: 0 18px 45px rgba(15, 23, 42, .55);
}

body.light {
	--bg: rgba(249, 250, 251, 1);
	--fg: rgba(17, 24, 39, 1);
	--card: rgba(255, 255, 255, 1);
	--accent: rgba(37, 99, 235, 1);
	--accent-soft: rgba(37, 99, 235, .1);
	--border: rgba(229, 231, 235, 1);
	--muted: rgba(107, 114, 128, 1);
	--shadow-soft: 0 10px 30px rgba(15, 23, 42, .08);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background: radial-gradient(circle at top left, rgba(59, 130, 246, .2), transparent 60%), var(--bg);
	color: var(--fg);
	min-height: 100vh;
}

header {
	max-width: 1500px;
	margin: 0 auto;
	padding: 2rem 1.25rem 0.75rem;
}

a {
	color: var(--fg);
}

.header-actions {
	margin: auto 0 0 auto;
	display: flex;
	gap: 0.5rem;
}

.lang-select {
	padding: 0.4rem 0.7rem;
	font-size: 0.9rem;
	border-radius: 0.5rem;
	border: 1px solid var(--border);
	background: var(--card);
	color: var(--fg);
	cursor: pointer;
	margin-right: 2rem;
	min-width: 120px;
}

body.light .lang-select {
	background: #fff;
	border-color: #d1d5db;
	color: #111;
}

.logo img {
	max-width: 300px;
}

.logo a {
	margin: 0;
}

.lang-select option {
	padding: 0.4rem;
	font-size: 0.9rem;
}

.flag-btn img {
	width: 35px;
	height: auto;
	display: block;
	border-radius: 0.5rem;
}

.title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

h1 {
	font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

p.subtitle {
	margin: 0.4rem 0 0;
	color: var(--muted);
	font-size: 0.9rem;
}

main {
	max-width: 1500px;
	margin: 0 auto;
	padding: 0 1rem;
}

footer {
	margin: 3rem 0;
	color: var(--fg);
}

footer a {
	color: inherit;
	text-decoration: none;
}

footer a:hover {
	opacity: 1;
}

footer div {
	text-align: center;
}

footer p {
	margin: 0;
	text-align: center;
}

footer > div {
	max-width: calc(36em + 36ex);
	margin: 1rem auto;
	width: 100%;
}

.icon {
	display: inline-flex;
	align-items: center;
}

.icon svg {
	height: 3rem;
	width: 3rem;
	display: block;
}

body.light .github-dark {
	display: none;
}

body:not(.light) .github-light {
	display: none;
}

.github-link {
	display: inline-flex;
	align-items: center;
	color: inherit;
	text-decoration: none;
}

.card {
	background: radial-gradient(circle at top right, rgba(59, 130, 246, .12), transparent 55%), var(--card);
	border-radius: 0.5rem;
	border: 1px solid var(--border);
	padding: 1.25rem 1.15rem 1rem;
	box-shadow: var(--shadow-soft);
	backdrop-filter: blur(16px);
}

.controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 0.9rem;
}

.controls-left,
.controls-right {
	display: flex;
	align-items: center;
	gap: 2rem;
	flex-wrap: wrap;
}

label {
	font-size: 0.9rem;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	cursor: pointer;
	color: var(--muted);
}

input[type="checkbox"] {
	accent-color: var(--accent);
	cursor: pointer;
}

.btn {
	border: 1px solid var(--border);
	background: linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(15, 23, 42, 1));
	color: var(--fg);
	padding: 0.45rem 0.9rem;
	border-radius: 0.5rem;
	font-size: 0.85rem;
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	cursor: pointer;
	transition:
		transform 0.12s ease,
		box-shadow 0.12s ease,
		border-color 0.12s ease,
		background 0.12s ease;
	box-shadow: 0 8px 20px rgba(15, 23, 42, .7);
}

body.light .btn {
	background: linear-gradient(135deg, var(--white), rgba(243, 244, 246, 1));
	box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
}

.btn-change-theme {
	justify-content: center;
	width: 120px;
}

.filters-language {
	cursor: pointer;
}

.btn:hover {
	/* transform: translateY(-1px); */
	box-shadow: 0 12px 28px rgba(15, 23, 42, .8);
	border-color: var(--accent);
}

.badge {
	font-size: .9rem;
	border-radius: 0.5rem;
	padding: .5rem 1rem;
	background: var(--accent-soft);
	color: var(--accent);
	border: 1px solid rgba(59, 130, 246, .35);
}

.field {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;

}

.field input[type="text"],
.field select {
	border-radius: 0.5rem;
	border: 1px solid var(--border);
	background: rgba(15, 23, 42, .8);
	color: var(--fg);
	padding: 0.35rem 0.8rem;
	font-size: 0.85rem;
	outline: none;
	width: 200px;
}

body.light .field input[type="text"],
body.light .field select {
	background: var(--white);
	border-color: rgba(209, 213, 219, 1);
}

.field input[type="text"]::placeholder {
	color: var(--muted);
}

.table-wrapper {
	margin-top: 0.7rem;
	border-radius: 0.5rem;
	border: 1px solid var(--border);
	overflow: hidden;
	background: rgba(15, 23, 42, .96);
	max-height: 75vh;
	overflow: auto;
}

body.light .table-wrapper {
	background: var(--white);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: .9rem;
}

thead {
	position: sticky;
	top: 0;
	z-index: 2;
	background: linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(15, 23, 42, .98));
}

body.light thead {
	background: linear-gradient(135deg, rgba(249, 250, 251, 1), rgba(229, 231, 235, 1));
}

th,
td {
	color: var(--fg);
	padding: 0.75rem;
	border-bottom: 1px solid rgba(15, 23, 42, .9);
}

body.light th,
body.light td {
	border-bottom-color: rgba(229, 231, 235, 1);
}

th {
	text-align: left;
	font-weight: 600;
	color: var(--fg);
	white-space: nowrap;
	position: relative;
	user-select: none;
}

th:nth-child(3),
th:nth-child(5),
th:nth-child(6),
th:nth-child(7) {
	text-align: center;
}

th.numeric {
	text-align: center;
}

th[data-sort] {
	cursor: pointer;
}

th[data-sort]:hover {
	color: var(--accent);
}

th.sorted-asc,
th.sorted-desc {
	color: var(--accent);
}

th.sorted-asc::after,
th.sorted-desc::after {
	content: "";
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	margin-left: 0.3rem;
}

th.sorted-asc::after {
	border-bottom: 6px solid var(--accent);
	transform: translateY(-1px);
}

th.sorted-desc::after {
	border-top: 6px solid var(--accent);
	transform: translateY(1px);
}

tbody tr:nth-child(odd) {
	background: rgba(15, 23, 42, .14);
}

body.light tbody tr:nth-child(odd) {
	background: #f9fafb;
}

tbody tr:hover {
	background: rgba(59, 130, 246, .12);
}

body.light tbody tr:hover {
	background: rgba(59, 130, 246, .08);
}

td.numeric {
	text-align: center;
	font-variant-numeric: tabular-nums;
}

td.date_created {
	text-align: center;
}

td.pushed_at {
	text-align: center;
}

td.archived {
	text-align: center;
}

a.repo-link {
	color: var(--fg);
	text-decoration: none;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

a.repo-link:hover {
	color: var(--accent);
}

td.name {
	width: 300px;
	max-width: 300px;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	color: var(--muted);
}

td.description {
	max-width: 450px;
	width: 450px;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	color: var(--muted);
	font-size: 0.82rem;
}

td.language {
	max-width: 100px;
	width: 100px;
	text-align: center;
}

.pill-archived {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.75rem;
	padding: 0.15rem 0.55rem;
	border-radius: 0.5rem;
	background: rgba(239, 68, 68, .14);
	color: #fca5a5;
	border: 1px solid rgba(239, 68, 68, .4);
}

body.light .pill-archived {
	background: rgba(239, 68, 68, .08);
	color: rgba(185, 28, 28, 1);
}

.hint {
	color: var(--fg);
	font-size: .9rem;
	padding: 1.25rem 0 0 0;
}

.fw-bold {
	font-weight: bold;
}

.text-center {
	text-align: center;
}

.lang-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	color: var(--accent);
}

.lang-icon img {
	width: 1.5rem;
	height: 1.5rem;
	display: block;
}

.lang-text {
	color: var(--muted);
	font-size: 0.75rem;
	white-space: nowrap;
	border: 1px solid var(--muted);
	border-radius: 0.25rem;
	padding: .25rem;
	cursor: pointer;
}

.lang-na {
	color: var(--muted);
	font-size: 0.75rem;
	white-space: nowrap;
	border: 1px solid var(--muted);
	border-radius: 0.25rem;
	padding: .25rem;
	cursor: pointer;
}

.table-hint {
	display: none;
}

@media (max-width: 768px) {
	.logo a {
		margin: auto;
	}

	.header-actions {
		margin: auto;
		display: flex;
		gap: 0.5rem;
	}

	.table-hint {
		display: flex;
		text-align: center;
		font-size: 0.75rem;
		color: var(--muted);
		margin: auto;
		padding: 0.4rem 0;
		user-select: none;
	}

	.table-hint::before {
		content: "←";
		padding-right: .25rem;
	}

	.table-hint::after {
		content: "→";
		padding-left: .25rem;
	}
}