* { box-sizing: border-box; margin: 0; padding: 0; font-family: Poppins, sans-serif; }
body { background:#f5f5f5; padding:20px; }
.container { max-width:1000px; margin:0 auto; }
h1,h2 { text-align:center; margin:20px 0; }
.search-bar { display:flex; justify-content:center; margin-bottom:20px; }
.search-bar input { padding:10px; width:60%; border:1px solid #ccc; border-radius:5px 0 0 5px; }
.search-bar button { padding:10px 20px; border:none; background:#ff5722; color:white; cursor:pointer; border-radius:0 5px 5px 0; }
.category-filters { text-align:center; margin-bottom:20px; }
.category-filters button { padding:8px 15px; margin:5px; border:none; background:#607d8b; color:white; cursor:pointer; border-radius:5px; }
.recipes-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(250px, 1fr)); gap:20px; }
.recipe-card { background:white; border-radius:10px; overflow:hidden; text-align:center; box-shadow:0 4px 6px rgba(0,0,0,0.1); }
.recipe-card img { width:100%; height:200px; object-fit:cover; }
.recipe-card h3 { padding:10px; }
.recipe-card button { padding:5px 10px; border:none; background:#ff5722; color:white; cursor:pointer; border-radius:5px; }
.recipe-card button:hover { background:#e64a19; }body.dark-mode {
    background: #121212;
    color: #f5f5f5;
}
body.dark-mode .recipe-card {
    background: #1e1e1e;
    color: #f5f5f5;
}
body.dark-mode .search-bar input {
    background: #333;
    color: #f5f5f5;
    border: 1px solid #555;
}
body.dark-mode .search-bar button,
body.dark-mode .category-filters button,
body.dark-mode .recipe-card button {
    background: #ff5722;
    color: #fff;
}
.recipe-card {
    transition: transform 0.3s, box-shadow 0.3s;
}
.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}
button {
    transition: background 0.3s, transform 0.2s;
}
button:hover {
    transform: scale(1.05);
}
@media(max-width:600px){
    .search-bar input { width: 100%; margin-bottom: 10px; }
    .search-bar { flex-direction: column; align-items: center; }
    .recipes-grid { grid-template-columns: 1fr; }
}
/* Tablet responsive */
@media (min-width: 601px) and (max-width: 900px) {
  .search-bar {
    flex-direction: column;
    align-items: center;
  }

  .search-bar input {
    width: 80%;
    margin-bottom: 10px;
  }

  .search-bar button {
    width: 50%;
  }

  .category-filters button {
    padding: 7px 12px;
    margin: 4px;
    font-size: 14px;
  }

  .recipes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .recipe-card img {
    height: 180px;
  }

  h1, h2 {
    font-size: 1.6rem;
  }
}
@media (max-width: 700px) {
  .recipes-grid {
    grid-template-columns: 1fr;
  }
}
/* Floating dark mode toggle button */
.dark-toggle {
    position: fixed;       /* Fixed on screen */
    top: 20px;             /* 20px from top */
    right: 20px;           /* 20px from right */
    padding: 10px 15px;    /* Button padding */
    border: none;
    border-radius: 50%;    /* Circular button */
    background: #ff5722;   /* Orange color */
    color: white;          /* Text color */
    cursor: pointer;
    font-size: 18px;
    z-index: 1000;         /* Make sure it stays on top */
    transition: transform 0.2s; /* Smooth hover effect */
}

/* Hover effect */
.dark-toggle:hover {
    transform: scale(1.1);
}