body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f8f8;
  color: #333;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

/* Theme Toggle Button Styling */
.theme-toggle {
  padding: 8px 16px;
  margin-bottom: 20px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.theme-toggle:hover {
  background-color: #218838;
}

/* Navigation Styles */
nav {
  background-color: #ffffff;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.nav li {
  display: inline;
}

.nav a {
  text-decoration: none;
  color: #28a745;
  font-weight: bold;
  padding: 10px 15px;
  display: inline-block;
  transition: background-color 0.2s, color 0.2s;
}

.nav a:hover {
  background-color: #28a745;
  color: white;
  border-radius: 4px;
}

h1, h2, h3 {
  color: inherit;
}

input[type="text"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  background-color: #fff;
  color: #333;
}

.cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: calc(33.333% - 20px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  height: auto;
}

.card-content {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  color: inherit;
}

.card-content h3 {
  margin: 0 0 10px 0;
}

.card-content p {
  flex: 1;
}

.btn {
  background-color: #28a745;
  color: white;
  text-decoration: none;
  padding: 10px;
  text-align: center;
  border-radius: 4px;
  margin-top: 10px;
}

.btn:hover {
  background-color: #218838;
}

#recipeDetail img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 20px;
}

#recipeDetail {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
  max-width: 800px;
}

#recipeDetail h1 {
  font-size: 2em;
  margin-bottom: 0.5em;
  border-bottom: 2px solid #ddd;
  padding-bottom: 10px;
}

#recipeDetail h2 {
  font-size: 1.5em;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #28a745;
}

#recipeDetail h3 {
  font-size: 1.1em;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #28a745;
}

#recipeDetail ul {
  margin: 0 0 20px 20px;
  padding: 0;
  list-style-type: disc;
}

#recipeDetail ul li {
  line-height: 1.6;
  margin-bottom: 5px;
}

#recipeDetail p {
  margin: 10px 0;
  line-height: 1.6;
}

.container > .btn {
  display: block;
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
}

/* Site Logo */
.site-logo {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 75px; /* Adjust width as needed */
  z-index: 9999;
}

/* (Optional) Adjust for smaller screens */
@media (max-width: 480px) {
  .site-logo {
    width: 75px; /* scale down on mobile if desired */
    top: 10px;
    right: 10px;
  }
}


/* Media Queries */
@media (max-width: 768px) {
  .card {
    width: calc(50% - 20px);
  }
  .nav {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .card {
    width: 100%;
  }
}

/* Dark Theme Styles */
body.dark {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark input[type="text"] {
  background-color: #333;
  color: #e0e0e0;
  border: 1px solid #444;
}

body.dark .card {
  background: #1e1e1e;
  border: 1px solid #333;
  box-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

body.dark .btn {
  background-color: #4caf50;
}

body.dark .btn:hover {
  background-color: #43a047;
}

body.dark #recipeDetail {
  background: #1e1e1e;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

body.dark #recipeDetail h1 {
  border-bottom-color: #333;
}

body.dark #recipeDetail h2 {
  color: #4caf50;
}

body.dark #recipeDetail h3 {
  color: #4caf50;
}

body.dark #recipeDetail ul li,
body.dark #recipeDetail p {
  color: #e0e0e0;
}

body.dark nav {
  background-color: #1e1e1e;
  border-bottom: 1px solid #444;
}

body.dark .nav a {
  color: #4caf50;
}

body.dark .nav a:hover {
  background-color: #4caf50;
  color: white;
}

/* Global link styles scoped to main content only */
main a {
  color: #28a745;
  text-decoration: underline;
  transition: color 0.2s, text-decoration 0.2s;
}

main a:hover {
  color: #218838;
  text-decoration: none;
}

body.dark main a {
  color: #4caf50;
}

body.dark main a:hover {
  color: #81c784;
}

/* Optional button-style link */
.link-button {
  display: inline-block;
  padding: 6px 12px;
  background-color: #28a745;
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.2s;
}

.link-button:hover {
  background-color: #218838;
}

body.dark .link-button {
  background-color: #4caf50;
}

body.dark .link-button:hover {
  background-color: #43a047;
}


/* Tag badges */
.tag {
  display: inline-block;
  background-color: #28a745;  /* match your accent */
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* Container spacing (optional) */
.tags {
  margin-bottom: 0.5em;
}

/* Dark‑mode override */
body.dark .tag {
  background-color: #4caf50;
}


/* Filter Dropdown Styling */
#tagFilter {
  width: 100%;
  max-width: 300px;       /* or whatever fits your layout */
  padding: 10px;
  margin-bottom: 20px;    /* same spacing as search bar */
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  background-color: #fff;
  color: #333;
  appearance: none;       /* remove default arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23333' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  cursor: pointer;
}

/* If you want the label and filter on one line on desktop */
@media (min-width: 600px) {
  .filter-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
  }
}

/* Dark‑mode override */
body.dark #tagFilter {
  background-color: #333;
  color: #e0e0e0;
  border: 1px solid #444;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23e0e0e0' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
}
