:root {
	--main-font: "JetBrains Mono";
	--background-color: #221b44;
	--sub-bg-color: #1e173b;
	--primary-color: #009eaf;
	--secondary-color: #b82356;
	--text-color: #dbe7e8;
	--accent-color: #a8d400;
	--ui-color: #2b0914;
}

/* * {
	border-style: dashed;
	border-color: aqua;
	border-width: 0.1rem;
} */

body {
	background-color: var(--background-color);
	font-family: var(--main-font);
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 100vh; /* makes it exactly viewport height */
	color: var(--text-color);
}

body * {
	box-sizing: border-box; /* makes it so that pad+marg incl in height calcs */
}

.hide {
	display: none !important;
}

.current {
	color: var(--accent-color);
}

.incorrect {
	color: darkred;
}

.config-bttn {
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: 0.4rem;
	padding: 0.3rem;
}

.config-bttn:hover {
	cursor: pointer;
	background-color: var(--primary-color);
}

.active {
	background-color: var(--primary-color);
	border: 1px solid transparent;
	border-radius: 0.4rem;
	padding: 0.3rem;
}

.icon {
	color: var(--secondary-color);
	font-size: x-large;
	transform: rotate(0deg); /* avoid double rotation look */
	transition: transform 0.6s ease;
}

.icon:hover {
	transform: rotate(360deg);
	cursor: pointer;
}

.header {
	width: 80%;
	max-width: 60rem;
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	position: relative;
}

#github-link {
	position: absolute;
	right: 0;
}

.page-test {
	width: 100%;
	max-width: 60rem;
	flex: 1 1 0; /* will grow/shrink to fill the entire parent */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
}

.config {
	display: flex;
	flex-direction: column;
	width: 80%;
	align-items: center;
	gap: 0.5rem;
}

.config > * {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}

.labels {
	width: 100%;
	font-size: larger;
	color: var(--secondary-color);
	padding: 0 0.5rem;
}

.result {
	color: var(--primary-color);
	font-size: large;
}

#word-counter {
	color: var(--primary-color);
}

.settings {
	width: 100%;
	color: var(--secondary-color);
	background-color: var(--sub-bg-color);
	padding: 0.5rem;
	border-radius: 0.3rem;
}

.wc-conf,
.tm-conf {
	width: 100%;
	display: flex;
	justify-content: center; /* center the buttons */
	align-items: center;
	gap: 1rem;
}

.stats {
	display: flex;
	gap: 1rem;
}

.test {
	width: 80%;
	background-color: var(--primary-color);
	border-radius: 0.3rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1rem;
}

#sample-text {
	line-height: 1.5; /* pick a stable line height */
	max-height: calc(1.5em * 2); /* exactly 2 lines visible */
	overflow-y: hidden; /* hide everything above/below */
	white-space: normal; /* allow wrapping into lines */
	word-wrap: break-word;
	font-size: large;
}

#input-field {
	width: 100%;
	height: 1.5rem;
	border-radius: 0.2rem;
	border: none;
	font-size: large;
}

.reset {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.5rem;
	color: var(--secondary-color);
}

.reset:hover {
	cursor: pointer;
}

.footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}

.footer * {
	padding: 0.2rem;
}

.key {
	color: var(--background-color);
	background-color: var(--secondary-color);
	border-radius: 0.3rem;
}

a[title] {
	color: purple;
}
