/* Reset e base */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap');

* {
	box-sizing: border-box;
	font-family: 'EB Garamond', serif;
	margin: 0;
	padding: 0;
	text-transform: uppercase;
}

body {
	background-color: #241a15;
	color: #e4d2b0;
	padding: 20px;
}

.container {
	max-width: 800px;
	margin: auto;
	padding: 30px;
	background-color: #3b2c25;
	border-radius: 12px;
	border: 2px solid #5c3b29;
	box-shadow: 0 0 15px rgba(92, 59, 41, 0.3);
}

/* Títulos de seção */
span {
	display: block;
	font-size: 1.3rem;
	margin-bottom: 10px;
	font-weight: bold;
	color: #8c5e3c;
}

/* Grupos de input */
.bstats,
.dstats,
.runes,
.sets,
.artifacts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 10px;
}

label {
	margin-top: 10px;
	font-size: 0.9rem;
	color: #e4d2b0;
}

input[type="number"],
select {
	width: 100%;
	padding: 6px 10px;
	margin-top: 4px;
	background-color: #4d3a31;
	color: #e4d2b0;
	border: 1px solid #7a5c46;
	border-radius: 4px;
}

input[type="number"]::placeholder {
	color: #cbb79a;
}

button {
	margin-top: 20px;
	padding: 12px 20px;
	background-color: #8c5e3c;
	color: #f3e5c0;
	border: none;
	border-radius: 6px;
	font-weight: bold;
	font-size: 1rem;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

button:hover {
	background-color: #6d4730;
}

/* Final runes */
.finalRunes {
	margin-top: 30px;
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	padding: 10px;
}

/* Blocos individuais de runas */
.finalRunes .r1,
.finalRunes .r2,
.finalRunes .r3,
.finalRunes .r4,
.finalRunes .r5,
.finalRunes .r6 {
	background-color: #4d3a31;
	border: 2px solid #8c5e3c;
	border-radius: 12px;
	padding: 18px;
	box-shadow: 0 0 10px rgba(140, 94, 60, 0.2);
	transition: transform 0.2s, box-shadow 0.3s;
}

.finalRunes .r1:hover,
.finalRunes .r2:hover,
.finalRunes .r3:hover,
.finalRunes .r4:hover,
.finalRunes .r5:hover,
.finalRunes .r6:hover {
	transform: scale(1.03);
	box-shadow: 0 0 16px rgba(140, 94, 60, 0.4);
}

.finalRunes h3 {
	margin-bottom: 10px;
	font-size: 1.2rem;
	color: #e4d2b0;
}

.finalRunes p {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 1rem;
	color: #e4d2b0;
	padding: 3px 0;
	line-height: 1.4;
}

.finalRunes div[class^="sub"] {
	margin-top: 5px;
}

.finalRunes div[class^="sub"] div {
	margin-bottom: 5px;
}

.finalRunes div[class^="sub"] div p {
	font-size: .85rem;
	padding: 0;
}

.finalRunes div[class^="r"] div div {
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height 0.3s ease, opacity 0.3s ease;
}

.finalRunes div[class^="r"]:hover div div {
	max-height: 500px; /* valor grande o suficiente para o conteúdo caber */
	opacity: 1;
}

.finalRunes img.gem,
.finalRunes img.grind {
	width: 18px;
	height: 18px;
	filter: drop-shadow(0 0 1px #f5e3cc);
}

.finalRunes hr {
	margin-top: 10px;
	border: 0;
	height: 1px;
	background: linear-gradient(to right, transparent, #8c5e3c, transparent);
}

.bstats,
.dstats {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	margin-top: 10px;
}

.stat-col {
	flex: 1;
	min-width: 150px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.stat-table {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 30px;
}

.header-row,
.stat-row {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 10px;
	align-items: center;
}

.stat-row {
	display: grid;
	align-items: center;
	gap: 10px;
	position: relative;
}

.header-row {
	font-weight: bold;
	color: #8c5e3c;
	text-align: center;
	padding-bottom: 8px;
	border-bottom: 1px solid #5c3b29;
}

.stat-row label {
	color: #e4d2b0;
	white-space: nowrap;
	position: relative;
	padding-right: 10px;
}

@media only screen and (min-width: 640px) {
	.stat-row label::after {
		content: "";
		position: absolute;
		top: 50%;
		left: 28%;
		transform: translateY(-50%);
		height: 1px;
		width: 70%;
		background-color: #7a5c46;
	}
}

.stat-row input {
	width: 100%;
	padding: 6px 10px;
	background-color: #4d3a31;
	color: #e4d2b0;
	border: 1px solid #7a5c46;
	border-radius: 4px;
}

.gear-wrapper {
	display: flex;
	flex-direction: row;
	gap: 20px;
	margin-top: 10px;
	width: 100%;
}

.gear-wrapper>div {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
}

.gear-wrapper span {
	font-weight: bold;
	color: #8c5e3c;
	margin-bottom: 8px;
	text-align: center;
}

.runes,
.sets,
.artifacts {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.section-divider {
	border: none;
	height: 1px;
	width: 100%;
	background: linear-gradient(to right, transparent, #5c3b29, transparent);
	margin: 20px 0;
}

@media only screen and (max-width: 640px) {
	.gear-wrapper {
		display: block;
	}

	.gear-wrapper>div {
		margin-top: 20px;
	}
}

/* Estiliza a rolagem dentro de <select> dropdowns (em navegadores WebKit) */
select::-webkit-scrollbar {
	width: 8px;
}

select::-webkit-scrollbar-track {
	background: #3b2c25;
}

select::-webkit-scrollbar-thumb {
	background-color: #7a5c46;
	border-radius: 4px;
	border: 1px solid #5c3b29;
}

select::-webkit-scrollbar-thumb:hover {
	background-color: #a07850;
}

.monster-select {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 30px;
}

.monster-info img {
	width: 64px;
	height: 64px;
	border-radius: 6px;
	border: 2px solid #5c3b29;
	background-color: #3b2c25;
	object-fit: cover;
}

.monster-search {
	position: relative;
	width: 100%;
}

#monster-name {
	width: 100%;
	padding: 4px 6px;
	border: none;
	background: transparent;
	color: #e4d2b0;
	font-size: 1.4rem;
	font-weight: bold;
	border-bottom: 1px solid #5c3b29;
	outline: none;
}

#monster-name::placeholder {
	color: #8c7054;
	opacity: 0.6;
}


#monster-suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	background-color: #3b2c25;
	border: 1px solid #5c3b29;
	border-top: none;
	list-style: none;
	max-height: 200px;
	overflow-y: auto;
	z-index: 10;
	display: none;
}

#monster-suggestions li {
	padding: 8px 12px;
	cursor: pointer;
	color: #e4d2b0;
}

#monster-suggestions li:hover {
	background-color: #5c3b29;
}