body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background-color: #fff5e1;
  color: #333;
  transition: all 0.3s ease;
}

nav {
  background-color: #ffa500;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
  gap: 1rem;
}

nav h1 {
  margin: 0;
  font-size: 1.5rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.95rem;
}

nav a:hover {
  text-decoration: underline;
}

.mode-toggle {
  background: white;
  color: #ffa500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.2rem;
}

.mode-toggle:hover {
  background: #333;
  color: white;
}

header {
  text-align: center;
  padding: 3rem 1rem;
  background: url('https://images.unsplash.com/photo-1590080875832-13b63b8f8d8f') center/cover no-repeat;
}

header .header-content h2 {
  color: black;
  text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  margin-bottom: 1rem;
}

header .header-content p {
  color: black;
  text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
}

.search-box {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem;
}

.search-box input {
  width: 100%;
  max-width: 400px;
  padding: 0.7rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
}

.search-box button {
  padding: 0.8rem 1.2rem;
  background: #ffa500;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  white-space: nowrap;
}

.search-box button:hover {
  background: #ff8c00;
}

section {
  padding: 2rem 1rem;
  text-align: center;
}

section h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 1rem;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: scale(1.03);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

.card h4 {
  color: #ffa500;
  font-size: 1.3rem;
  margin: 0.5rem 0;
}

.card p {
  font-size: 0.95rem;
  margin: 0.5rem 0;
  text-align: left;
}

.card button {
  padding: 0.6rem 1.2rem;
  background: #ffa500;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  margin-top: auto;
  font-weight: 600;
  font-size: 0.95rem;
}

.card button:hover {
  background: #ff8c00;
}

.view-all-btn, .back-btn {
  padding: 0.8rem 2rem;
  background: #ffa500;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 2rem;
  transition: all 0.3s ease;
}

.view-all-btn:hover, .back-btn:hover {
  background: #ff8c00;
  transform: scale(1.05);
}

.back-btn {
  background: #666;
}

.back-btn:hover {
  background: #555;
}

/* Dark Mode */
body.dark {
  background-color: #222;
  color: white;
}

body.dark nav {
  background-color: #333;
}

body.dark .card {
  background-color: #2a2a2a;
  color: white;
}

body.dark .mode-toggle {
  background: #ffa500;
  color: white;
}

body.dark header .header-content h2,
body.dark header .header-content p {
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

footer {
  background-color: #333;
  color: white;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  nav {
    padding: 1rem;
    justify-content: center;
  }
  
  nav h1 {
    font-size: 1.2rem;
    width: 100%;
    text-align: center;
  }
  
  nav ul {
    gap: 0.8rem;
    justify-content: center;
    font-size: 0.9rem;
  }
  
  header .header-content h2 {
    font-size: 1.5rem;
  }
  
  header .header-content p {
    font-size: 1rem;
  }
  
  .search-box {
    flex-direction: column;
    width: 100%;
  }
  
  .search-box input {
    width: 90%;
  }
  
  .search-box button {
    width: 90%;
  }
  
  section h3 {
    font-size: 1.5rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 0.5rem;
  }
  
  .card h4 {
    font-size: 1.2rem;
  }
  
  .view-all-btn, .back-btn {
    width: 90%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  nav h1 {
    font-size: 1rem;
  }
  
  nav ul {
    gap: 0.5rem;
    font-size: 0.85rem;
  }
  
  header {
    padding: 2rem 0.5rem;
  }
  
  header .header-content h2 {
    font-size: 1.3rem;
  }
  
  header .header-content p {
    font-size: 0.9rem;
  }
  
  section {
    padding: 1.5rem 0.5rem;
  }
  
  section h3 {
    font-size: 1.3rem;
  }
  
  .card {
    padding: 0.8rem;
  }
  
  .card h4 {
    font-size: 1.1rem;
  }
  
  .card p {
    font-size: 0.85rem;
  }
}