/* Tools BODYE.cz — základní styl */

:root {
	--color-bg: #f4f6f9;
	--color-surface: #ffffff;
	--color-text: #1e2530;
	--color-muted: #5b6572;
	--color-primary: #2563eb;
	--color-primary-dark: #1d4ed8;
	--color-border: #e2e6ec;
	--radius: 10px;
	--shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.06);
	--max-width: 960px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--color-bg: #0f1521;
		--color-surface: #171f2e;
		--color-text: #e6e9ef;
		--color-muted: #9aa4b2;
		--color-primary: #5b8dfa;
		--color-primary-dark: #7ba0fb;
		--color-border: #262f42;
		--shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
	}
}

:root[data-theme="light"] {
	--color-bg: #f4f6f9;
	--color-surface: #ffffff;
	--color-text: #1e2530;
	--color-muted: #5b6572;
	--color-primary: #2563eb;
	--color-primary-dark: #1d4ed8;
	--color-border: #e2e6ec;
	--shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.06);
}

:root[data-theme="dark"] {
	--color-bg: #0f1521;
	--color-surface: #171f2e;
	--color-text: #e6e9ef;
	--color-muted: #9aa4b2;
	--color-primary: #5b8dfa;
	--color-primary-dark: #7ba0fb;
	--color-border: #262f42;
	--shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--color-text);
	background-color: var(--color-bg);
}

img {
	max-width: 100%;
	border: none;
}

a {
	color: var(--color-primary);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

h1, h2, h3 {
	line-height: 1.25;
	margin: 0 0 0.5em;
}

/* ---------- Header / nav ---------- */

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

.navbar {
	max-width: var(--max-width);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75em 1.25em;
	position: relative;
}

.brand {
	font-size: 1.15em;
	font-weight: 700;
	color: var(--color-text);
}

.brand:hover {
	text-decoration: none;
}

.nav-right {
	display: flex;
	align-items: center;
}

.nav-links {
	list-style: none;
	display: flex;
	gap: 1.5em;
	margin: 0;
	padding: 0;
}

.nav-links a {
	color: var(--color-text);
	font-weight: 500;
}

.nav-links a:hover {
	color: var(--color-primary);
	text-decoration: none;
}

.theme-toggle {
	background: none;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	width: 36px;
	height: 36px;
	font-size: 1em;
	line-height: 1;
	cursor: pointer;
	margin-left: 1.5em;
}

.theme-toggle:hover {
	border-color: var(--color-primary);
}

.nav-toggle {
	display: none;
}

.nav-toggle-label {
	display: none;
	cursor: pointer;
	width: 28px;
	height: 22px;
	position: relative;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--color-text);
	transition: 0.2s ease;
}

.nav-toggle-label span {
	top: 10px;
}

.nav-toggle-label span::before {
	top: -8px;
}

.nav-toggle-label span::after {
	top: 8px;
}

@media (max-width: 640px) {
	.nav-toggle-label {
		display: block;
	}

	.nav-links {
		display: none;
		flex-direction: column;
		gap: 0;
		width: 100%;
		position: absolute;
		top: 100%;
		left: 0;
		background-color: var(--color-surface);
		border-bottom: 1px solid var(--color-border);
		box-shadow: var(--shadow);
	}

	.nav-links li {
		border-top: 1px solid var(--color-border);
	}

	.nav-links a {
		display: block;
		padding: 0.85em 1.25em;
	}

	.nav-toggle:checked ~ .nav-links {
		display: flex;
	}
}

/* ---------- Layout ---------- */

.container {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2em 1.25em 4em;
}

.hero {
	text-align: center;
	padding: 2em 0 1.5em;
}

.hero h1 {
	font-size: 2em;
}

.hero p {
	color: var(--color-muted);
	max-width: 640px;
	margin: 0 auto;
}

/* ---------- Cards ---------- */

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.25em;
	margin-top: 2em;
}

.card {
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 1.5em;
	color: var(--color-text);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(16, 24, 40, 0.12);
	text-decoration: none;
}

.card h3 {
	margin-bottom: 0.35em;
}

.card p {
	color: var(--color-muted);
	margin: 0;
	font-size: 0.95em;
}

/* ---------- Content panel ---------- */

.panel {
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 2em;
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-block;
	background-color: var(--color-primary);
	color: #fff;
	padding: 0.65em 1.4em;
	border-radius: var(--radius);
	font-weight: 600;
}

.btn:hover {
	background-color: var(--color-primary-dark);
	color: #fff;
	text-decoration: none;
}

/* ---------- File list ---------- */

.sort-bar {
	display: flex;
	align-items: center;
	gap: 1em;
	color: var(--color-muted);
	font-size: 0.9em;
	margin-bottom: 0.75em;
}

.sort-bar a {
	color: var(--color-muted);
	font-weight: 600;
}

.sort-bar a.active {
	color: var(--color-primary);
}

.file-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75em;
}

.file-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 0.9em 1.2em;
	flex-wrap: wrap;
}

.file-row .file-name {
	font-weight: 600;
	word-break: break-all;
	margin-right: auto;
}

.file-row .file-meta {
	display: flex;
	align-items: center;
	gap: 0.75em;
	color: var(--color-muted);
	font-size: 0.9em;
	white-space: nowrap;
}

.file-row .file-date {
	min-width: 125px;
	text-align: right;
}

.file-row .file-size {
	min-width: 70px;
	text-align: right;
}

.file-row .btn {
	padding: 0.4em 1em;
	font-size: 0.9em;
}

/* ---------- Footer ---------- */

.site-footer {
	text-align: center;
	padding: 2em 1.25em;
	color: var(--color-muted);
	font-size: 0.9em;
	border-top: 1px solid var(--color-border);
}

.site-footer a {
	color: var(--color-muted);
}
