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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  background-color: #f8f9fb;
  color: #222;
}

body.modal_aberto {
  overflow: hidden;
}

.active {
  background-color: #ffffff;
  color: #fff
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header {
  background: #ffffff;
  border-bottom: 1px solid #e2e2e2;
  padding: 25px 0;
  overflow: hidden;
}

.logo {
  font-size: 25px;
  font-weight: bold;
  color: #0077cc;
  padding: 10px;
}

.menu {
  list-style: none;
  display: flex;
  gap: 20px;
}

.menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 5px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.07);
  cursor: pointer;
  background-color: #d9d9d974;
  transition: 0.3s ease;
}

.menu a:hover {
  background-color: #f9f8f8;
}

.user {
  display: flex;
  align-items: center;
  gap: 15px;
}

.adicionar_receita {
  display: flex;
  justify-content: center;
  margin: 32px 0;
}

#btn_adicionar_receita {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 260px;
  height: 140px;
  background-color: #ffffff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#btn_adicionar_receita p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #222;
}

#btn_adicionar_receita:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 10px rgba(0, 0, 0, 0.15);
}

#btn_adicionar_receita:active {
  transform: scale(0.97);
}

.modal_adicionar_receita {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(179, 178, 178, 0.507);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.modal_conteudo {
  background-color: #fff;
  padding: 24px;
  border-radius: 12px;
  min-width: 300px;
}

.modal_adicionar_receita.ativo {
  display: flex;
}

.modal_conteudo {
  background-color: #fff;
  padding: 24px;
  border-radius: 12px;
  width: 100%;
  max-width: 360px;
}

.modal_conteudo h2 {
  text-align: center;
  margin-bottom: 20px;
}

.campo_formulario {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.campo_formulario label {
  font-size: 14px;
  font-weight: 500;
}

.campo_formulario input, .campo_formulario select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.acoes_modal {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.botao_salvar {
  flex: 1;
  background-color: #3ca57d;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
}

.botao_salvar:hover {
  background-color: #3ca57dc2;
  transform: translateY(-2px);
}

.botao_salvar:active {
  transform: scale(0.98);
}

.botao_cancelar {
  flex: 1;
  background-color: #ccc;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
}

.botao_cancelar:hover {
  background-color: #ccccccc3;
  transform: translateY(-2px);
}

.botao_cancelar:active {
  transform: scale(0.98);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #ddd;
}

.intro {
  text-align: center;
  padding: 50px 20px 30px;
}

.intro h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.intro p {
  color: #666;
  font-size: 1.1rem;
}

.receitas {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  font-family: Arial, sans-serif;
}

.pesquisa_e_filtros {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px;
  background: #f8f9fb;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.pesquisa_e_filtros input, .pesquisa_e_filtros select {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  outline: none;
  transition: all 0.2s ease;
  background-color: #fff;
}

.pesquisa_e_filtros input:focus, .pesquisa_e_filtros select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.pesquisa_e_filtros input::placeholder {
  color: #999;
}

.pesquisa_e_filtros select:hover {
  cursor: pointer;
}

.ordenacao {
  display: flex;
  gap: 10px;
}

.ordenacao button {
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ordenacao button:hover {
  background-color: #f0f0f0;
}

.ordenacao button.ativo {
  background-color: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card_receita {
  background-color: #f5f5f5;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.card_receita:hover {
  transform: translateY(-5px);
}

.card_receita h3 {
  margin-bottom: 0.5rem;
}

.card_receita p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
  color: #555;
}

.botoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  gap: 10px;
}

.card_receita button {
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 6px;
  background-color: #0077cc;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
}

.card_receita button:hover {
  background-color: #005fa3;
}

.substitutos {
  max-width: 1000px;
  margin: 50px auto;
  padding: 0 20px;
}

.substitutos h2 {
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.tabela-wrapper {
  background: #fff;
  border: 1px solid #dfe6ee;
  border-radius: 10px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 15px;
  text-align: left;
  font-size: 0.95rem;
  border-bottom: 1px solid #f0f0f0;
}

th {
  background: #f8fbff;
  color: #555;
}

td a {
  color: #0077cc;
  text-decoration: none;
}

.imc {
  max-width: 600px;
  margin: 60px auto;
  padding: 0 20px;
  background: linear-gradient(120deg, #e3f0ff 0%, #f8f9fb 100%);
  border-radius: 16px;
  box-shadow: 0 4px 24px 0 rgba(0,119,204,0.07);
  transition: box-shadow 0.3s;
}
.imc:hover {
  box-shadow: 0 8px 32px 0 rgba(0,119,204,0.13);
}
.imc h2 {
  margin-bottom: 10px;
  font-size: 1.7rem;
  text-align: left;
  color: #0077cc;
  display: flex;
  align-items: center;
  gap: 8px;
}
.imc-instrucoes {
  color: #555;
  font-size: 1rem;
  margin-bottom: 18px;
  background: #eaf6ff;
  border-left: 4px solid #0077cc;
  padding: 10px 16px;
  border-radius: 6px;
}
.imc-form {
  background: #fff;
  padding: 24px 20px 20px 20px;
  border: 1px solid #dde5ec;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,119,204,0.04);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.imc-form .input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.imc-form label {
  font-weight: 500;
  color: #0077cc;
}
.imc-form input[type="text"] {
  padding: 10px 12px;
  border: 1.5px solid #b3d8f7;
  border-radius: 6px;
  font-size: 1rem;
  transition: border 0.2s, box-shadow 0.2s;
  outline: none;
}
.imc-form input[type="text"]:focus {
  border-color: #0077cc;
  box-shadow: 0 0 0 2px #e3f0ff;
}
.imc-form button {
  background: linear-gradient(90deg, #0077cc 60%, #00c6fb 100%);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 0;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,119,204,0.08);
}
.imc-form button:hover, .imc-form button:focus {
  background: linear-gradient(90deg, #005fa3 60%, #00a6d6 100%);
  box-shadow: 0 4px 16px rgba(0,119,204,0.13);
}
.imc-resultado {
  margin-top: 18px;
  padding: 16px;
  background: #eaf6ff;
  border-left: 4px solid #0077cc;
  border-radius: 6px;
  color: #222;
  font-size: 1.1rem;
  font-weight: 500;
  animation: fadeInIMC 0.5s;
}

@keyframes fadeInIMC {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

footer {
  text-align: center;
  padding: 30px 20px;
  background: #f1f1f1;
  margin-top: 40px;
}

.footer-links {
  margin-bottom: 10px;
}

.footer-links a {
  margin: 0 10px;
  color: #555;
  text-decoration: none;
  font-size: 0.9rem;
}

footer p {
  font-size: 0.9rem;
  color: #888;
}

/* Quando a tela ficar com 600px ou menos ele vai diminuir no menu e no nav bar o tamanho */
@media screen and (max-width: 610px) {
  .menu {
    list-style: none;
    display: flex;
    gap: 15px;
    transition: 0.4s ease;
  }

  nav {
    margin: auto;
  }

  .logo {
    margin: auto;
  }

  .container {
    flex-wrap: wrap;
  }

  .menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.07);
    cursor: pointer;
    transition: 0.3s ease;
  }
}

@media screen and (max-width: 450px) {
  .menu {
    list-style: none;
    display: flex;
    gap: 15px;
    transition: 0.4s ease;
  }

  .menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 2px 5px;
    border-radius: 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.07);
    cursor: pointer;
    transition: 0.3s ease;
  }

  #btn-abrir-modal {
    transform: scale(90%);
  }

  .pesquisa_e_filtros {
    flex-direction: column;
  }

  .pesquisa_e_filtros input, .pesquisa_e_filtros select {
    width: 100%;
  }

  .ordenacao {
    flex-wrap: wrap;
  }

  .ordenacao button {
    flex: 1;
  }
}