:root {
	color-scheme: dark;
	--bg: #0d0f14;
	--fg: #f4f6fa;
	--muted: #9aa4b2;
	--accent: #f95721;
	--border: #232833;
	--danger: #ef4444;
	--radius: 14px;
	--space: 1rem;
	--font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: #0d0f14;
	color: #f4f6fa;
	font-family: var(--font);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	background-image: 
		radial-gradient(circle at 50% 0%, rgba(249, 87, 33, 0.07) 0%, transparent 50%),
		linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
	background-size: 100% 100%, 32px 32px, 32px 32px;
}

/* Custom range inputs */
input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	background: rgba(255, 255, 255, 0.1);
	height: 6px;
	border-radius: 999px;
	outline: none;
}

input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #f95721;
	cursor: pointer;
	border: 2px solid #ffffff;
	box-shadow: 0 0 10px rgba(249, 87, 33, 0.5);
	transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
	transform: scale(1.15);
}

/* Scrollbar tuning */
::-webkit-scrollbar {
	width: 7px;
	height: 7px;
}

::-webkit-scrollbar-track {
	background: #0d0f14;
}

::-webkit-scrollbar-thumb {
	background: #272c36;
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: #f95721;
}

/* Primitives for UI consistency */
.loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: calc(var(--space) * 1.5);
	color: var(--muted);
}

.spinner {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	border: 2px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: fab-spin 0.7s linear infinite;
}

@keyframes fab-spin {
	to {
		transform: rotate(360deg);
	}
}

.skeleton {
	display: block;
	height: 1rem;
	border-radius: calc(var(--radius) / 2);
	background: linear-gradient(90deg, var(--border), transparent, var(--border));
	background-size: 200% 100%;
	animation: fab-shimmer 1.2s linear infinite;
}

@keyframes fab-shimmer {
	to {
		background-position: -200% 0;
	}
}

.alert {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--border);
	border-left: 3px solid var(--muted);
	border-radius: var(--radius);
}

.alert-error {
	border-left-color: var(--danger);
	color: var(--danger);
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
