:root {
	--bg: #0b1020;
	--bg-2: #121a33;
	--panel: #161f3d;
	--panel-2: #1d2951;
	--text: #e7ecff;
	--muted: #9aa6d0;
	--accent: #7c9cff;
	--accent-2: #56e1c0;
	--line: #2a366a;
	--shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	height: 100%;
}

body {
	background:
		radial-gradient(1200px 600px at 50% -10%, #1a2340, transparent),
		radial-gradient(900px 500px at 90% 110%, #10321f, transparent),
		var(--bg);
	color: var(--text);
	font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 100%;
	padding: 32px 18px 48px;
}

h1 {
	font-size: 20px;
	font-weight: 650;
	letter-spacing: 0.2px;
	margin: 0 0 4px;
}

.sub {
	color: var(--muted);
	font-size: 13px;
	margin-bottom: 22px;
	text-align: center;
}

.app {
	width: 100%;
	max-width: 560px;
	background: linear-gradient(180deg, var(--panel), var(--bg-2));
	border: 1px solid var(--line);
	border-radius: 20px;
	box-shadow: var(--shadow);
	padding: 22px;
}

.presets {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 8px;
	margin-bottom: 20px;
}

.preset {
	appearance: none;
	border: 1px solid var(--line);
	background: var(--panel-2);
	color: var(--text);
	border-radius: 12px;
	padding: 10px 6px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	transition: transform 0.08s ease, border-color 0.15s ease, background 0.15s ease;
}

.preset small {
	display: block;
	color: var(--muted);
	font-weight: 500;
	margin-top: 3px;
	font-size: 10.5px;
}

.preset:hover {
	border-color: var(--accent);
}

.preset.active {
	background: linear-gradient(180deg, #26356f, #1b2450);
	border-color: var(--accent);
	box-shadow: inset 0 0 0 1px rgba(124, 156, 255, 0.35);
}

.preset:active {
	transform: translateY(1px);
}

.modes {
	display: flex;
	gap: 8px;
	margin-bottom: 6px;
}

.mode {
	flex: 1;
	appearance: none;
	border: 1px solid var(--line);
	background: transparent;
	color: var(--muted);
	border-radius: 10px;
	padding: 9px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
}

.mode.active {
	background: var(--panel-2);
	color: var(--text);
	border-color: var(--accent);
}

.hint {
	min-height: 18px;
	color: var(--muted);
	font-size: 12px;
	margin: 8px 2px 16px;
}

.hint b {
	color: var(--accent-2);
}

.control {
	margin-bottom: 16px;
}

.control .row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 6px;
}

.control label {
	font-size: 13px;
	color: var(--muted);
}

.control .val {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	font-size: 13px;
}

.band {
	color: var(--accent);
	font-size: 11px;
	margin-left: 8px;
	font-weight: 600;
}

input[type="range"] {
	width: 100%;
	appearance: none;
	height: 6px;
	border-radius: 6px;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	outline: none;
}

input[type="range"]::-webkit-slider-thumb {
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--accent);
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--accent);
	cursor: pointer;
}

select {
	appearance: none;
	background: var(--panel-2);
	color: var(--text);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 5px 10px;
	font-size: 12px;
	cursor: pointer;
}

.noise-head {
	display: flex;
	align-items: center;
	gap: 10px;
}

.transport {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
}

.play {
	appearance: none;
	border: none;
	cursor: pointer;
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: linear-gradient(180deg, var(--accent), #5a7cf0);
	color: #0b1020;
	display: grid;
	place-items: center;
	box-shadow: 0 8px 24px rgba(124, 156, 255, 0.4);
	transition: transform 0.08s ease;
}

.play:active {
	transform: scale(0.96);
}

.play svg {
	width: 26px;
	height: 26px;
}

.timer-wrap {
	flex: 1;
}

.timer-wrap .row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}

.clock {
	font-variant-numeric: tabular-nums;
	font-size: 22px;
	font-weight: 650;
	letter-spacing: 0.5px;
}

.clock.idle {
	color: var(--muted);
}

.foot {
	max-width: 560px;
	color: var(--muted);
	font-size: 11.5px;
	line-height: 1.6;
	margin-top: 20px;
	text-align: center;
}

.credit {
	margin-top: 14px;
	color: var(--muted);
	font-size: 12px;
	text-align: center;
}

.credit .heart {
	width: 13px;
	height: 13px;
	color: #ff4d6d;
	vertical-align: -2px;
	margin: 0 1px;
}

.credit a {
	color: var(--muted);
	text-decoration: none;
	border-bottom: 1px dotted var(--muted);
}

.credit a:hover {
	color: var(--accent);
	border-color: var(--accent);
}

.credit a.gh {
	margin-left: 9px;
	vertical-align: -3px;
	border-bottom: none;
}

.credit a.gh:hover {
	color: var(--accent);
}

.pulse {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent-2);
	margin-right: 6px;
	vertical-align: middle;
	opacity: 0.25;
}

.pulse.on {
	animation: blip 1s ease-in-out infinite;
}

@keyframes blip {
	0%, 100% { opacity: 0.25; transform: scale(1); }
	50% { opacity: 1; transform: scale(1.5); }
}

@media (max-width: 600px) {
	body {
		padding: 24px 0 40px;
	}

	.app {
		max-width: none;
		border: none;
		border-radius: 0;
		box-shadow: none;
		padding: 20px 16px;
	}

	.sub,
	.foot,
	.credit {
		padding: 0 16px;
	}
}
