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

body {
	font-family: Verdana, Geneva, Tahoma, sans-serif;
	background-color: hsl(216, 20%, 95%);
}

button {
	border: none;
	border-radius: 4px;
	padding: 0.6rem 1rem;
	font-size: 0.9rem;
	color: white;
	cursor: pointer;
	transition:
		transform 0.1s ease,
		background-color 0.2s ease;
}

button:active {
	transform: translateY(2px);
}

h1 {
	text-align: center;
	font-size: 2rem;
	padding: 2rem 1rem 1rem;
}

.header-actions {
	display: flex;
	justify-content: center;
	margin-bottom: 2rem;
}

#newBook {
	background-color: hsl(195, 38%, 48%);
	color: white;
	font-weight: 900;
	border-radius: 8px;
}

#newBook:hover {
	transform: scale(1.05);
	background-color: hsl(210, 29%, 29%);
}

.container {
	padding: 2rem;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 25px;
}

.book-card {
	padding: 1.5rem;
	border-left: 8px solid hsl(195, 38%, 48%);
	border-radius: 8px;
	box-shadow: 0 4px 6px hsla(0, 0%, 0%, 0.1);
	background-color: white;

	min-height: 280px;

	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.book-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 15px hsla(0, 0%, 0%, 0.15);
}

.book-card .title {
	font-size: 1.3rem;
	font-weight: 900;
	color: hsl(195, 60%, 20%);
	line-height: 1.2;
}

.book-card .author {
	color: hsl(195, 20%, 40%);
	font-style: italic;
}

.book-card .pages {
	font-size: 0.85rem;
	color: hsl(195, 10%, 50%);
}

.status-text {
	margin-top: auto;
	align-self: flex-start;
	padding: 0.3rem 0.8rem;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 1px;
	background-color: hsl(195, 53%, 94%);
	color: hsl(195, 38%, 30%);
}

.card-buttons {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
}

.card-buttons button {
	flex: 1;
}

.btn-remove {
	background-color: hsl(0, 70%, 93%);
	color: hsl(0, 70%, 30%);
}

.btn-remove:hover {
	background-color: hsl(0, 70%, 85%);
}

.btn-toggle {
	background-color: hsl(195, 38%, 48%);
	color: white;
}

.btn-toggle:hover {
	background-color: hsl(195, 38%, 38%);
}

.error-display {
	display: none;
}

.error-display.active {
	display: block;
	color: hsl(0, 70%, 30%);
}

dialog {
	padding: 2rem;
	border: none;
	border-radius: 0.8rem;
	box-shadow: 0 10px 30px hsla(0, 0%, 0%, 0.3);
	margin: auto;
	width: min(90%, 400px);
}

dialog::backdrop {
	background-color: hsla(0, 0%, 0%, 0.6);
	backdrop-filter: blur(1px);
}

form {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.form-buttons {
	display: flex;
	gap: 0.8rem;
	color: hsl(195, 38%, 30%);
}

.form-buttons button {
	background-color: hsl(195, 38%, 48%);
	color: white;
	flex: 1;
}

#close {
	background-color: hsl(0, 0%, 90%);
	color: hsl(0, 0%, 20%);
	border: 1px solid hsl(0, 0%, 80%);
}

#addBook {
	font-weight: 900;
}

fieldset {
	display: flex;
	flex-direction: column;
	gap: 5px;
	border-radius: 5px;
	border: 1px solid hsl(0, 0%, 80%);
	padding: 0.8rem;
}
