body {
  font-family: "Cursive", Cursive, Cursive;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #333;
}

header {
  text-align: center;
  background: #ff7043;
  color: white;
  padding: 20px;
}
header {
  position: relative;
  text-align: center;
  padding: 20px 0;
}


header .credits strong {
  color: #ffffff;
}

nav {
  margin-top: 10px;
}

nav button {
  background: white;
  color: #ff7f50;
  border-style: dotted;
  padding: 10px 20px;
  margin: 5px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}
.button {
  background: white;
  color: #ff7f50;
  border-radius: 10px;
  font-style: italic;
  border-style: dotted;
  padding: 10px 20px;
  margin: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}
nav button:hover {
  background: #ff7f50;
}

nav button.active {
  background: #ffcc80;
  color: #000;
}

section {
  max-width: 900px;
  margin: 20px auto;
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

input {
  padding: 10px;
  width: 70%;
  max-width: 400px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button {
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tab {
  display: none;
}

.tab.active {
  display: block;
}
.recipe-card {
  background: #fff3e0;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 10px;
  text-align: center;
  transition: transform 0.2s;
}

.recipe-card:hover {
  transform: scale(1.05);
}

.recipe-card img {
  width: 100%;
  border-radius: 6px;
}

.recipe-card h3 {
  font-size: 16px;
  margin: 10px 0;
}

.recipe-card button {
  background: #ff7043;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.recipe-card button:hover {
  background: #ff8a65;
}

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

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
}

.close-btn {
  float: right;
  font-size: 24px;
  cursor: pointer;
  color: white;                /* white X */
  background: rgba(0, 0, 0, 0.5); /* semi-transparent black circle */
  border-radius: 50%;          /* makes it circular */
  width: 36px;                 /* circle width */
  height: 36px;                /* circle height */
  text-align: center;          /* centers the X inside the circle */
  line-height: 36px;           /* vertical centering */
  font-weight: bold;
  transition: background 0.2s, color 0.2s;
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.8); /* darker on hover */
  color: #ffcccb;                 /* optional light red X on hover */
}

.btn-row {
  display: flex;
  justify-content: space-around;
  margin-top: 8px;
}

.btn-row button {
  background: #ff7043;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.btn-row button:hover {
  background: #ff8a65;
}
#category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.category-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 110px;
  background: #ffe0b2;
  border: none;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.category-btn:hover {
  background: #ffcc80;
}

.category-btn img {
  width: 100%;
  border-radius: 8px;
}

.category-btn span {
  margin-top: 6px;
  font-weight: bold;
  color: #333;
}
/* ====== Ingredient Styling ====== */
.modal-content ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 20px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.modal-content li {
  background: #fff3e0;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #444;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: background 0.2s ease;
}

.modal-content li:hover {
  background: #ffe0b2;
}

.modal-content li::before {
  content: "🍴";
  font-size: 16px;
}
/* ====== Modal Layout Enhancements ====== */
.modal-content {
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 25px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  line-height: 1.6;
}

.modal-content img {
  width: 100%;
  border-radius: 10px;
  margin: 15px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
  margin-bottom: 10px;
  color: #ff7043;
}

.modal-content h3,
.modal-content h4 {
  margin-top: 20px;
  color: #444;
}

.modal-content p {
  font-size: 15px;
  color: #333;
  white-space: pre-wrap;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  color: #555;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #ff7043;
}

/* Add a nice scrollbar for long recipes */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
  background-color: #ff7043;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background-color: #ff8a65;
}
