* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	font-size: 62.5%;
}

.theme-light {
	--number-color: #323239;
	--icon-color: #323238;
	--icon-active-color: #ffffff;
	--bg-primary-color: #e6e6e6;
	--bg-secondary-color: #e0e0e5;
	--button-active-color: #02789c;
	--cs-primary: #b3b3b7;
	--cs-secondary: #ffffff;
	--cs-primary-active: #028ab3;
	--cs-secondary-active: #026685;
}

.theme-dark {
	--number-color: #ffffff;
	--icon-color: #c4c4cc;
	--icon-active-color: #ffffff;
	--bg-primary-color: #121214;
	--bg-secondary-color: #29292e;
	--button-active-color: #0a3442;
	--cs-primary: #232327;
	--cs-secondary: #2f2f35;
	--cs-primary-active: #0c3c4c;
	--cs-secondary-active: #092c38;
}

*::selection {
	color: none;
	background: transparent;
}

body {
	background-color: var(--bg-primary-color);
	font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	transition: background-color 0.25s ease;
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow-x: hidden;
}

button {
	cursor: pointer;
	border: none;
	background-color: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease, opacity 0.2s ease, background-color 0.2s ease;
}

button:active {
	transform: scale(0.94);
}

button.hide {
	display: none !important;
}

main {
	min-height: 100vh;
	width: 100vw;
	position: relative;
	display: flex;
	align-items: center;
	flex-direction: column;
	justify-content: center;
	gap: 4.8rem;
	padding: 4rem 2rem;
}

/* Timer Section (Top) */
.timer {
	display: flex;
	align-items: center;
	flex-direction: column;
	justify-content: center;
}

.timer .time {
	font-family: 'Roboto', sans-serif;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
	font-size: clamp(7.5rem, 14vw, 12.5rem);
	color: var(--number-color);
	cursor: default;
	user-select: none;
	letter-spacing: -2px;
	margin-bottom: 2.8rem;
	transition: color 0.25s ease;
}

.timer .buttons {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1.8rem;
}

.timer .buttons button {
	width: 5.4rem;
	height: 5.4rem;
	border-radius: 50%;
	background: var(--bg-secondary-color);
	border: 1px solid rgba(0, 0, 0, 0.05);
	transition: all 0.2s ease;
}

.theme-dark .timer .buttons button {
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.timer .buttons button:hover {
	transform: translateY(-2px);
	filter: brightness(0.95);
}

.theme-dark .timer .buttons button:hover {
	filter: brightness(1.2);
}

.timer .buttons button i {
	font-size: 2.2rem;
	color: var(--icon-color);
	transition: color 0.2s ease;
}

/* Ambient Sound Cards Section (Bottom) */
.cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2rem;
	justify-content: center;
}

.cards .card {
	background: var(--bg-secondary-color);
	border-radius: 2rem;
	padding: 2.2rem 2rem 1.8rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	width: 14rem;
	height: 15rem;
	transition: all 0.25s ease;
	border: 1px solid rgba(0, 0, 0, 0.05);
}

.theme-dark .cards .card {
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.cards .card:hover {
	transform: translateY(-2px);
}

.cards .card button.cardButton {
	width: 100%;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	cursor: pointer;
}

.cards .card button.cardButton i {
	font-size: 4.4rem;
	color: var(--icon-color);
	transition: color 0.25s ease, transform 0.25s ease;
}

.cards .card:hover button.cardButton i {
	transform: scale(1.06);
}

.cards .card.active {
	background: var(--button-active-color);
	border-color: transparent;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.cards .card.active button.cardButton i {
	color: var(--icon-active-color);
}

/* Noticeable & Easy-to-use Volume Control Bar */
.cards .card input.volume {
	width: 10.4rem;
	height: 0.8rem;
	-webkit-appearance: none;
	appearance: none;
	background: rgba(0, 0, 0, 0.12);
	border-radius: 999px;
	outline: none;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.theme-dark .cards .card input.volume {
	background: rgba(255, 255, 255, 0.15);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cards .card.active input.volume {
	background: rgba(255, 255, 255, 0.3);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Slider Thumb - Webkit (Chrome/Edge/Safari) */
.cards .card input.volume::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	height: 1.8rem;
	width: 1.8rem;
	border-radius: 50%;
	background: var(--button-active-color);
	border: 2.5px solid #ffffff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.2s ease;
}

.theme-dark .cards .card input.volume::-webkit-slider-thumb {
	background: #028ab3;
	border: 2px solid #ffffff;
}

.cards .card.active input.volume::-webkit-slider-thumb {
	background: #ffffff;
	border: 2.5px solid var(--button-active-color);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.cards .card input.volume::-webkit-slider-thumb:hover {
	transform: scale(1.2);
}

/* Slider Thumb - Firefox */
.cards .card input.volume::-moz-range-thumb {
	height: 1.8rem;
	width: 1.8rem;
	border-radius: 50%;
	background: var(--button-active-color);
	border: 2.5px solid #ffffff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
	cursor: pointer;
	transition: transform 0.15s ease;
}

.theme-dark .cards .card input.volume::-moz-range-thumb {
	background: #028ab3;
	border: 2px solid #ffffff;
}

.cards .card.active input.volume::-moz-range-thumb {
	background: #ffffff;
	border: 2.5px solid var(--button-active-color);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.cards .card input.volume::-moz-range-thumb:hover {
	transform: scale(1.2);
}

/* Theme Toggle Button */
footer .themes {
	position: fixed;
	top: 2.4rem;
	right: 2.4rem;
	z-index: 10;
}

footer .themes button {
	width: 4.6rem;
	height: 4.6rem;
	border-radius: 50%;
	background: var(--bg-secondary-color);
	border: 1px solid rgba(0, 0, 0, 0.05);
	transition: all 0.2s ease;
}

.theme-dark footer .themes button {
	border: 1px solid rgba(255, 255, 255, 0.05);
}

footer .themes button:hover {
	transform: translateY(-2px);
	filter: brightness(0.95);
}

.theme-dark footer .themes button:hover {
	filter: brightness(1.2);
}

footer .themes button i {
	font-size: 2.2rem;
	color: var(--icon-color);
	transition: transform 0.25s ease, color 0.25s ease;
}

@media (min-width: 680px) {
	.cards {
		grid-template-columns: repeat(4, 1fr);
		gap: 2.4rem;
	}
}

@media (min-width: 850px) {
	main {
		gap: 5.6rem;
	}

	footer .themes {
		top: 3.6rem;
		right: 3.6rem;
	}
}