* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Poppins", sans-serif;
}

body {
	background-color: #E6E6EA;
}

#TwoDForLife {
	transition: transform 0.5s;
}

#TwoDForLife:hover {
	transform: scale(1.1);
}

#btnCalcularIMC,
#btnLimpar,
#btnLimparHistorico,
#btnFeedback {
	background-color: #C0E0DE;
	border: 0.1rem solid #4f7cac;
	color: #4f7cac;
	font-weight: 600;
	padding: 0.6rem 1.2rem;
	cursor: pointer;
	margin: 0.3rem 0.3rem 0.3rem 0;
	transition: background-color 0.2s, transform 0.1s;
}

#btnCalcularIMC:hover,
#btnLimpar:hover,
#btnLimparHistorico:hover,
#btnFeedback:hover {
	background-color: #4f7cac;
	color: #C0E0DE;
}

#btnCalcularIMC:active,
#btnLimpar:active,
#btnLimparHistorico:active,
#btnFeedback:active {
	transform: scale(0.97);
}

h2, table, section, img {
	border-radius: 5px;
}

input, button, textarea {
	border-radius: 5px;
	padding: 0.4rem;
	border: 0.1rem solid #4f7cac;
}

h1 {
	color: #C0E0DE;
	font-size: 3rem;
}

tbody,
th,
tr {
	color: #C0E0DE;
	background-color: #4f7cac;
}

caption {
	font-weight: 600;
	color: #4f7cac;
	padding-bottom: 0.5rem;
}

h2 {
	color: #4f7cac;
	border: 0.1rem solid #4f7cac;
	width: auto;
	background-color: #C0E0DE;
	text-align: center;
}

p {
	text-align: justify;
}

header {
	padding: 3rem;
	background-color: #4f7cac;
	text-align: center;
}

main {
	padding: 2rem;
	display: flex;
	flex-direction: column;
	gap: 2rem;
	max-width: 1200px;
	margin: 0 auto;
}

section {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

section[class="lado"] {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 2rem;
}

section[class="sinopse"] {
	font-size: 1.2rem;
}

section[class="direita"] {
	text-align: right;
	flex: 1 1 250px;
	padding: 10px;
}

#calimc > details {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

img[class="imgc"] {
	height: auto;
	max-width: 300px;
}

section[class="sobe"] {
	flex: 3 1 420px;
	text-align: left;
	padding: 10px;
}

section[class="feedback"] {
	border: 0.2rem solid #C0E0DE;
	background-color: #4f7cac;
	color: #C0E0DE;
	margin: 0;
	padding: 1.5rem;
}

section[class="rodape"] {
	background-color: #4f7cac;
	color: #C0E0DE;
	text-align: center;
}

img[class="imc"] {
	display: block;
	margin: 0 auto;
	width: 100%;
	max-width: 600px;
	height: auto;
}

table {
	margin: 0 auto;
	border-collapse: collapse;
	text-align: center;
	width: 100%;
	max-width: 500px;
}

table th,
table td {
	padding: 0.5rem;
	border: 1px solid #C0E0DE;
}

p[class="rodape"] {
	text-align: center;
}

footer {
	padding: 3rem 1rem;
}

strong {
	color: #4f7cac;
}

ul[class="direita"] {
	list-style: inside;
}

img {
	width: 300px;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	display: block;
}

figcaption {
	text-align: center;
}

input[type="radio"],
input[type="checkbox"] {
	accent-color: rgb(37, 202, 231);
}

legend {
	text-align: center;
	font-weight: 600;
	color: #4f7cac;
}

/* === Resultado do cálculo === */
#resultado {
	margin-top: 20px;
	font-weight: bold;
	background-color: #C0E0DE;
	color: #4f7cac;
	padding: 1rem;
}

#resultado:empty {
	display: none;
}

/* === Barra visual de escala do IMC === */
#area-escala {
	display: none;
	gap: 0.3rem;
}

#area-escala.mostrar {
	display: flex;
}

#escala-imc {
	position: relative;
	height: 1.2rem;
	width: 100%;
	border-radius: 999px;
	background: linear-gradient(
		to right,
		#8ecae6 0%,
		#95d5b2 25%,
		#ffd166 50%,
		#f4a261 75%,
		#e76f51 100%
	);
}

#marcador-imc {
	position: absolute;
	top: -0.4rem;
	left: 0%;
	width: 0.5rem;
	height: 2rem;
	background-color: #4f7cac;
	border: 2px solid #E6E6EA;
	border-radius: 999px;
	transform: translateX(-50%);
	transition: left 0.6s ease;
}

#escala-legendas {
	display: flex;
	justify-content: space-between;
	font-size: 0.8rem;
	color: #4f7cac;
	font-weight: 600;
}

/* === Histórico local === */
#historico-secao {
	background-color: #C0E0DE;
	padding: 1rem;
	color: #4f7cac;
}

#lista-historico {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

/* === Botão Fixo de Ajuda === */
#btnAbrirMenu {
	position: fixed;
	top: 50%;
	left: 0;
	transform: translateY(-50%);
	z-index: 999;
	background-color: #4f7cac;
	color: #C0E0DE;
	border: none;
	border-radius: 0 8px 8px 0;
	padding: 0.8rem 1rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
	transition: background-color 0.2s, transform 0.2s;
}

#btnAbrirMenu:hover {
	background-color: #3b5f85;
	transform: translateY(-50%) scale(1.05);
}

/* === Barra Lateral (Sidebar) === */
.sidebar {
	position: fixed;
	top: 0;
	left: -300px;
	width: 280px;
	height: 100vh;
	background-color: #4f7cac;
	color: #C0E0DE;
	padding: 2rem 1.5rem;
	box-shadow: 3px 0 10px rgba(0, 0, 0, 0.3);
	z-index: 1001;
	transition: left 0.3s ease-in-out;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.sidebar.ativo {
	left: 0;
}

.sidebar h2 {
	color: #4f7cac;
	background-color: #C0E0DE;
	margin-top: 1rem;
}

.sidebar ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 0;
}

.sidebar a {
	color: #C0E0DE;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s;
}

.sidebar a:hover {
	color: #ffffff;
	text-decoration: underline;
}

#btnFecharMenu {
	position: absolute;
	top: 10px;
	right: 10px;
	background: transparent;
	border: none;
	color: #C0E0DE;
	font-size: 1.5rem;
	cursor: pointer;
}

#overlayMenu {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1000;
}

#overlayMenu.ativo {
	display: block;
}

/* === Responsividade === */
@media (max-width: 700px) {
	main {
		padding: 1rem;
	}

	h1 {
		font-size: 2rem;
	}

	section[class="lado"] {
		flex-direction: column;
	}

	section[class="direita"] {
		text-align: left;
	}

	img[class="imc"],
	img {
		width: 100%;
	}
}
