* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  min-height: 100vh;
  background-color: #f8f9fa;
  line-height: 1.6;
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background-color: #c1c1c1;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #a8a8a8;
}

/* NAVBAR */
nav {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  width: 100%;
  background: rgb(49, 46, 46);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
  height: 60px;
  line-height: 60px;
  color: #ff6b35;
  font-weight: 700;
  font-size: 2em;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  padding-left: 20px;
  transition: color 0.3s ease;
}

.logo:hover {
  color: #ff8c55;
}

#toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: rgb(221, 221, 221);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s ease;
}

#toggle:hover {
  background: rgb(200, 200, 200);
}

#toggle::before,
#toggle::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 2px;
  background: rgb(49, 46, 46);
  transition: 0.3s;
}

#toggle::before {
  transform: translateY(-5px);
}

#toggle::after {
  transform: translateY(5px);
}

#toggle.active::before {
  transform: translateY(0px) rotate(45deg);
  background: rgb(221, 221, 221);
}

#toggle.active::after {
  transform: translateY(0px) rotate(-45deg);
  background: rgb(221, 221, 221);
}

#toggle.active {
  background: rgb(87, 81, 81);
}

#navbar {
  position: relative;
  height: 60px;
  right: 60px;
  background: rgb(49, 46, 46);
  transition: 0.5s;
  width: 0px;
  overflow: hidden;
}

#navbar.active {
  width: auto;
}

#navbar ul {
  position: relative;
  display: flex;
  flex-direction: row;
}

#navbar ul li {
  list-style: none;
}

#navbar ul li a {
  color: white;
  height: 60px;
  line-height: 60px;
  display: inline-block;
  text-decoration: none;
  font-size: 1.1em;
  padding: 0 20px;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  font-weight: 500;
}

#navbar ul li a:hover {
  color: rgb(49, 46, 46);
  background: #ff6b35;
}

@media (max-width: 991px) {
  #navbar.active {
    width: 100%;
    height: auto;
  }

  #navbar ul {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
}

/* HERO SECTION */
.recipes-hero {
  background: linear-gradient(135deg, #ff6b35, #ff8c55);
  padding: 120px 0 80px;
  text-align: center;
  color: white;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* SEARCH SECTION */
.search-section {
  padding: 40px 0;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.search-bar {
  display: flex;
  max-width: 600px;
  margin: 0 auto 30px;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s ease;
}

.search-bar:focus-within {
  border-color: #ff6b35;
}

#searchInput {
  flex: 1;
  padding: 15px 25px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
}

#searchInput::placeholder {
  color: #999;
}

#searchBtn {
  padding: 15px 20px;
  background: #ff6b35;
  border: none;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

#searchBtn:hover {
  background: #ff5722;
}

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  border: 2px solid #e9ecef;
  background: white;
  color: #666;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
  background: #ff6b35;
  color: white;
  border-color: #ff6b35;
}

/* RECIPES SECTION */
.recipes-container {
  padding: 60px 0;
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.recipe-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.recipe-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.recipe-image {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.recipe-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.recipe-card:hover .recipe-overlay {
  opacity: 1;
}

.btn-view {
  padding: 12px 25px;
  background: #ff6b35;
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-view:hover {
  background: #ff5722;
  transform: scale(1.05);
}

.recipe-info {
  padding: 25px;
}

.recipe-info h3 {
  font-size: 1.4rem;
  color: #333;
  margin-bottom: 10px;
  font-weight: 600;
}

.recipe-description {
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
}

.recipe-meta {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.cook-time,
.difficulty {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
}

.cook-time {
  background: #e3f2fd;
  color: #1976d2;
}

.difficulty {
  background: #f3e5f5;
  color: #7b1fa2;
}

.recipe-actions {
  display: flex;
  gap: 10px;
}

.btn-save {
  flex: 1;
  padding: 12px;
  background: transparent;
  color: #ff6b35;
  border: 2px solid #ff6b35;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.btn-save.saved {
  background: #4caf50;
  color: white;
  border-color: #4caf50;
}

/* NO RESULTS */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #333;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  overflow-y: auto;
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #666;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  background: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.close:hover {
  color: #333;
}

.modal-recipe {
  padding: 40px;
}

.modal-recipe-header {
  text-align: center;
  margin-bottom: 30px;
}

.modal-recipe-header img {
  width: 100%;
  max-width: 400px;
  height: 250px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 20px;
}

.modal-recipe-header h2 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 10px;
}

.modal-recipe-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.modal-recipe-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.ingredients-section h3,
.instructions-section h3 {
  color: #ff6b35;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.ingredients-list {
  list-style: none;
}

.ingredients-list li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  color: #555;
}

.instructions-list {
  list-style: none;
  counter-reset: step-counter;
}

.instructions-list li {
  counter-increment: step-counter;
  margin-bottom: 20px;
  padding-left: 40px;
  position: relative;
  color: #555;
  line-height: 1.6;
}

.instructions-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background: #ff6b35;
  color: white;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .recipes-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .modal-content {
    width: 95%;
    margin: 2% auto;
    max-height: 95vh;
  }

  .modal-recipe {
    padding: 20px;
  }

  .modal-recipe-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .modal-recipe-meta {
    flex-direction: column;
    gap: 10px;
  }
}

/* FOOTER */
footer {
  background-color: rgb(49, 46, 46);
  position: relative;
  width: 100%;
  height: auto;
  padding: 50px 0 30px;
}

footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 40px;
}

.about-us {
  flex: 2;
  max-width: 500px;
}

.quick-links {
  flex: 1;
  min-width: 250px;
}

footer h2 {
  position: relative;
  color: white;
  font-weight: 600;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

footer h2::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50px;
  height: 3px;
  background: #ff6b35;
}

.about-us p {
  color: #ccc;
  line-height: 1.7;
  margin-bottom: 20px;
}

.smlinks {
  display: flex;
  gap: 15px;
}

.smlinks li {
  list-style: none;
}

.smlinks li a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.smlinks li a:hover {
  transform: scale(1.1);
}

.info {
  list-style: none;
}

.info li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  color: #ccc;
}

.info li span:first-child {
  margin-right: 15px;
  margin-top: 3px;
}

.info li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.info li a:hover {
  color: #ff6b35;
}

@media (max-width: 768px) {
  footer .container {
    flex-direction: column;
    text-align: center;
  }

  .about-us,
  .quick-links {
    max-width: 100%;
  }

  .smlinks {
    justify-content: center;
  }
}
