* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}


body {
  margin: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

nav,
footer {
  background-color: #FFCC99;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2vmin;
  font-size: 2vh;
  color: #778899;
  text-align: center;
}

nav a {
  text-decoration: none;
  color: slategray;
  background-color: white;
  padding: 1vmin;
  border-radius: 1vmin;

  &:hover {
    color: gray;
    background-color: lightslategray;
    color: white;
  }
}

nav span {
  font-size: 1.5vmin;
  color: lightslategray;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 5vmin;
}

form {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2vmin;
}

form * {
  font-size: 2vmin;
  padding: 1vmin;
  border-radius: 1vmin;
}

input,
textarea,
select {
  border: 0.3vmin solid black;
}

form button[type='submit'] {
  grid-column: span 2;
}

button:hover {
  background-color: lightslategray;
  color: white;
}

.error-msg {
  color: rgb(223, 116, 116);
}
#show-page {
  display: flex;
  gap: 2rem;
}

#show-page > div {
  flex: 1;
  max-width: 33%;
}

#show-page .reviews {
  max-height: 600px;
  overflow-y: auto;
  border-left: 1px solid #ccc;
  padding-left: 1rem;
}

#show-page .review-item {
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.btn,
button {
  font-size: 2vmin;
  padding: 1vmin;
  border-radius: 1vmin;
  border: none;
  background-color: white;
  color: slategray;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn:hover,
button:hover {
  background-color: lightslategray;
  color: white;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 1vmin;
  width: 100%;
  max-width: 300px;
}

.button-group form,
.button-group .btn {
  width: 100%;
}

.full-width {
  display: block;
  text-align: center;
}

#recipe-show {
  display: flex;
  gap: 2rem;
  padding: 2vmin;
}

#recipe-image,
#recipe-details,
#recipe-reviews {
  flex: 1;
  max-width: 33%;
}


#recipe-reviews {
  max-height: 600px;
  overflow-y: auto;
  border-left: 1px solid #ccc;
  padding-left: 1rem;
}

.review-item {
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.profile-pic {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  margin-top: -90px ;
  margin-bottom: -10px;

}

.profile-pic-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
  vertical-align: middle;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 1000px;
}

.user-card {
  width: 100px;
  padding: .5rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  text-align: center;
  background-color: #f9f9f9;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.user-card-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem;
}

.recipe-card {
  display: flex;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1rem;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recipe-thumbnail img {
  width: 150px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.recipe-content {
  flex: 1;
}

.recipe-content h2 {
  margin: 0;
}

.recipe-content .description {
  margin: 0.5rem 0;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #555;
}

.recipe-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recipe-actions form,
.recipe-actions button {
  width: 100%;
}

.share-btn {
  background-color: #eee;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.site-name {
  font-family: 'Lobster', cursive;
  font-size: 1.8rem;
  margin: 0 1rem;
  color: #009d80;
  align-self: center;
  user-select: none;
}

@media (max-width: 768px) {

  nav {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  nav a {
    padding: 2vmin 4vmin;
    font-size: 3.5vw;
       font-size: 3.5vw;
  }

  nav span {
    font-size: 3vw;
  }

  .recipe-list {
    flex-direction: column;
    padding: 0.5rem;
  }

  .recipe-card {
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
  }

 .recipe-thumbnail img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
  }
  
    .recipe-content {
    width: 100%;
    text-align: center;
  }

    .recipe-actions {
    flex-direction: row;
    gap: 1rem;
    width: 100%;
    justify-content: center;
  }

    .recipe-actions form,
  .recipe-actions button {
    width: auto;
    flex: 1;
  }

    main {
    margin-top: 2vmin;
  }

    #show-page > div {
    max-width: 100%;
  }

    .profile-pic {
    width: 40px;
    height: 40px;
  }

    .profile-pic-large {
    width: 120px;
    height: 120px;
  }
}
