body {
  font-family: Arial, sans-serif;
  background-color: #121212;
  color: #f5f5f5;
  padding: 20px;
}
body.light-mode {
  background-color: #ffffff;
  color: #000000;
}
#search, #category-filter {
  padding: 8px;
  margin-bottom: 10px;
  width: 100%;
  max-width: 400px;
}
.theme-toggle {
  margin-bottom: 20px;
}
.result-card {
  background-color: #1e1e1e;
  padding: 20px;
  margin-bottom: 10px;
  border-radius: 8px;
}
body.light-mode .result-card {
  background-color: #f0f0f0;
}

pre {
  background-color: #2e2e2e;
  color: #f8f8f2; /* softer code text color */
  padding: 15px;
  border-radius: 8px;
  margin: 10px 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  white-space: pre-wrap; /* allow wrapping */
  word-break: break-word; /* break long strings */
  box-shadow: 0 2px 5px rgba(0,0,0,0.4); /* slight shadow */
}

body.light-mode pre {
  background-color: #f4f4f4;
  color: #222;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.code-block {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #333;
  color: #fff;
  border: none;
  padding: 5px 10px;
  font-size: 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.2s;
}

.copy-btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

body.light-mode .copy-btn {
  background: #ccc;
  color: #000;
}

.footer {
  flex-shrink: 0; /* ensure footer does not shrink */
  max-width: 900px;
  width: 90%;
  margin: 2rem auto 1rem auto;
  padding: 1rem;
  background: #1e1e1e;
  border-top: 1px solid #333;
  border-radius: 0 0 10px 10px;
  text-align: center;
  font-size: 0.9rem;
}

.footer-content a {
  color: #90caf9;
  text-decoration: none;
}

.footer-content a:hover {
  text-decoration: underline;
}

.footer-attribution {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #bbb;
}

body.light-mode .footer {
  background-color: #f0f0f0; /* optional: lighten the footer background if you want */
  color: #333333; /* dark grey text for light mode footer */
  border-top: 1px solid #ccc; /* lighter border */
}

body.light-mode .footer-content a {
  color: #0077cc; /* optional: nicer blue link color for light mode */
}

.container {
  max-width: 900px;
  width: 90%;
  margin: 0 auto; /* centers everything inside */
}

ul {
  padding-left: 1.2rem;
}

li {
  margin: 0.25rem 0;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* <-- add this */
  padding: 1rem 0;
  max-width: 900px;
  width: 90%;
  margin: 0 auto;
  border-bottom: 1px solid #333;
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
}

.logo span {
  color: #e41c1c; /* accent color */
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem; /* space between items */
}

.theme-btn {
  all: unset; /* resets ALL button styles to nothing */
  cursor: pointer;
  font-size: 1.5rem;
  color: inherit;
  transition: transform 0.2s;
}

.theme-btn:hover {
  transform: scale(1.2);
}

img, svg {
  max-width: 100%;
  height: auto;
}

@media screen and (max-width: 600px) {
  .header-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.5rem;
  }

  .theme-btn {
    font-size: 1.4rem; /* slightly smaller */
  }

  h1 {
    font-size: 1.6rem; /* scale down headings */
    text-align: center; /* center title if needed */
  }

  #search, #category-filter {
    width: 100%;
  }

  .result-card {
    padding: 1rem;
  }

  .footer {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
}