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

h1 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  margin: 30px 0 10px;
  text-align: center;

}

section h1 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  margin: 30px 0 10px;
  text-align: center;
}

section p {
  text-align: center;
  color: #777;
  margin-bottom: 30px;
}


.recipes {
  width: 90%;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}



.recipes section {
  background: #f8f8f8;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
  background: linear-gradient(135deg, #fffaf5, #fff0e8);
}

.recipes section:hover {
  transform: scale(1.05);
  box-shadow: rgba(240, 82, 8, 0.35) 0px 5px 15px;
}

.recipes img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.recipes h2 {
  font-size: 20px;
  margin: 10px;
}

.recipes p {
  font-size: 14px;
  color: #555;
  padding: 0 10px 10px;
  line-height: 1.5;
}

.recipes p:last-child {
  font-size: 13px;
  color: #777;
}


.recipes a {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* RESPONSIVE */


@media (max-width: 992px) {
  .recipes {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .recipes {
    grid-template-columns: 1fr;
  }

  section h1 {
    font-size: 32px;
  }
}

/* Admin Controls */
.admin-controls {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  padding: 10px;
  justify-content: right;
  border-top: 1px solid #eee;
}

.edit-recipe-btn,
.delete-recipe-btn {
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.edit-recipe-btn {
  font-size: 25px;
  color: #e46033;
  background-color: transparent;

}

.edit-recipe-btn:hover {
  transform: translateY(-2px);
}

.delete-recipe-btn {
  font-size: 25px;
  color: #e46033;
  background-color: transparent;
}

.delete-recipe-btn:hover {
  transform: translateY(-2px);
}

/* Edit Modal */
.edit-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  transition: 0.3s;
}

.modal-close:hover {
  color: #f44336;
}

.modal-content h3 {
  margin-bottom: 20px;
  color: #e46033;
}

.modal-content label {
  display: block;
  margin: 10px 0 5px;
  font-weight: 600;
  color: #333;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.modal-content input:focus,
.modal-content textarea:focus {
  outline: none;
  border-color: #e46033;
}

.modal-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.save-btn,
.cancel-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s;
}

.save-btn {
  background: #e46033;
  color: white;
}

.save-btn:hover {
  background: #c03e12;
}

.cancel-btn {
  background: #ccc;
  color: #333;
}

.cancel-btn:hover {
  background: #999;
}


/* confirm message box */
.blocker {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: transparent; 
}
.confirm-box {
    position: fixed;
    top:30%;
    left:35%;
    background: #f8f5f5;
    padding:4rem 4rem;
    border-radius: 16px;
    width: 30%; 
    text-align: center;
    font-size: 1.6rem;
    z-index: 100000; 
    box-shadow:
        0 10px 25px rgba(0,0,0,0.2),
        0 0 15px #f66505;
    border: 2px solid rgba(255, 140, 0, 0.3);
    animation: popIn 0.3s ease;
}
/* Buttons container */
.confirm-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 2rem;
}
/* Buttons */
.ok-btn {
    margin-top: 1.5rem;
    flex: 1;
    background: linear-gradient(135deg, #ff7a18, #ffb347); 
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}
.cancel-btn {
    flex: 1;
    background: #eee;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}
/* Hover effects */
.ok-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.8);
}
.cancel-btn:hover {
    background: #ddd;
    transform: scale(1.05);
}

/* Animation */
@keyframes popIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}