/* ===== Base Dark Theme ===== */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont;
  padding: 10px;
  background: #0f0f0f;          /* Dark background */
  color: #f2f2f2;               /* Light text */
}
.hero,
select,
#recipeSearch,
#searchResults {
  margin-left: auto;
  margin-right: auto;
}

/* Hero background image section */
.hero {
  max-width: 700px;
  padding-top: 10px;
  padding-bottom: 10px;
  min-height: auto; /* removed forced extra height */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);

  background-image: url("../images/recipes-home.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;

  border-radius: 20px;
  margin-bottom: 15px;
  position: relative;
}


.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 20px;
  z-index: 0;
}

/* Ensure content sits above overlay */
.hero > * {
  position: relative;
  z-index: 1;
}

/* Hero title styling */
.hero h1 {
  font-size: 34px;
  margin-bottom: 10px;

  text-align: center;
  
  color: #e8f1ff; /* soft off-white */

  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.6);
}

/* ===== Dropdowns ===== */
select {
  display: block;
  width: 100%;
  max-width: 600px;

  font-size: 22px;
  padding: 16px;
  margin-bottom: 20px;

  background: #1e1e1e;
  color: #ffffff;

  border: 2px solid #333;
  border-radius: 12px;

  outline: none;
}

/* iOS focus style */
select:focus {
  border-color: #0a84ff;
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.35);
}

/* ===== Search Bars ===== */
#recipeSearch,
#ingredientSearch {
  display: block;

  width: 100%;
  max-width: 600px;

  font-size: 26px;
  padding: 20px;

  background: #1e1e1e;
  color: #ffffff;

  border: 2px solid #333;
  border-radius: 16px;

  outline: none;
  box-sizing: border-box;

  margin-left: auto;
  margin-right: auto;
}

#recipeSearch {
  margin-top: 30px;
}

#ingredientSearch {
  margin-top: 20px;
}

#recipeSearch::placeholder,
#ingredientSearch::placeholder {
  color: #9a9a9a;
}

.app-description {
  margin-top: 20px;
  max-width: 600px;
  margin: 20px auto 10px;
  text-align: center;
}

.app-description p {
  font-size: 18px;
  line-height: 1.6;
  font-style: italic;

  color: #cfcfcf;
  margin: 6px 0;
}

.app-description {
  border-top: 1px solid #2a2a2a;
  padding-top: 15px;
}


/* Search focus */
#recipeSearch:focus,
#ingredientSearch:focus {
  border-color: #0a84ff;
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.35);
}

/* ===== Search Results ===== */
.searchResults {
  list-style: none;
  padding: 0;
  margin-top: 15px;
  max-width: 600px;
}

.searchResults li {
  padding: 20px;
  font-size: 22px;

  background: #1a1a1a;
  color: #ffffff;

  border-bottom: 1px solid #2a2a2a;
}

#ingredientSearch {
  margin-top: 10px;
}

#ingredientResults {
  margin-top: 5px;
}

/* Hover / tap feedback */
#searchResults li:hover {
  background: #2a2a2a;
  cursor: pointer;
}

/* Fade description text when searching */
#recipeSearch:not(:placeholder-shown) ~ .app-description {
  opacity: 0.4;
}

.app-description {
  transition: opacity 0.2s ease;
}

/* Recipe Image */
.recipe-image {
  max-width: 50px;
}

/* ===== Search Wrapper ===== */
.search-wrapper {
  position: relative;
  width: 100%;          /* ADD THIS */
  max-width: 600px;
  margin: 0 auto 20px auto;  /* match dropdown spacing */
}

/* Icon inside input */
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  opacity: 0.5;
  pointer-events: none;
  transition: 
    opacity 0.25s ease,
    transform 0.25s ease,
    color 0.25s ease;
}

/* Push input text right so it doesn’t overlap icon */
#recipeSearch,
#ingredientSearch {
  padding-left: 55px;
}

/* 🔥 Animate icon when input is focused */
.search-wrapper:focus-within .search-icon {
  opacity: 1;
  transform: translateY(-50%) translateX(6px);
  color: #0a84ff;
}

/* Optional subtle glow */
.search-wrapper:focus-within {
  transition: box-shadow 0.25s ease;
}

/* ===== Back Button (Blue Accent Style) ===== */
.back-link-wrapper {
  text-align: center;
  margin: 40px auto;
}

/* ===== Accent Button (Reusable Blue Style) ===== */
.accent-button {
  display: inline-block;
  padding: 14px 26px;

  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;

  background: #4CAF50;
  color: #ffffff;
  text-decoration: none;

  border-radius: 14px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

/* Hover */
.accent-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(255, 255, 255, 255);
}

/* Click */
.accent-button:active {
  transform: translateY(0px);
  box-shadow: 0 4px 10px rgba(10, 132, 255, 0.35);
}

.button-wrapper {
  text-align: center;
  margin: 40px auto;
}

/* ===== Recipe Page Home Button ===== */

.home-button-wrapper {
  text-align: center;
  margin: 30px 0 50px;
}

.home-button {
  display: inline-block;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;

  background: #1a1a1a;
  color: #ffffff;

  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s ease;
}

.home-button:hover {
  background: #2a2a2a;
}

.site-logo-wrapper {
  text-align: center;
  margin: 0 0 15px 0; /* reduced from 40px */
}

.site-logo {
  max-width: 550px;
  width: 95%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 8px 8px rgba(0,0,0,0.6));
}

.planner-title {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 20px;
  font-size: 26px;
  font-weight: 600;
}

#plannerSearch {
  display: block;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 20px auto;

  font-size: 22px;
  padding: 16px;

  background: #1e1e1e;
  color: #ffffff;

  border: 2px solid #333;
  border-radius: 12px;

  outline: none;
}

#recipePool {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 20px auto;
  padding: 0;
}

/* Make layout full height so footer sticks */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

/* If your main content wrapper is not <main>, apply flex: 1 to that instead */
main {
  flex: 1;
}

.site-footer {
  display: flex;
  align-items: center;        /* vertical centering */
  justify-content: center;    /* horizontal centering */

  height: 32px;               /* ~2x 13px text */
  font-size: 13px;

  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);

  color: rgba(255, 255, 255, 0.8);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;

  opacity: 0;
  transition: opacity 0.35s ease;
}

/* When visible */
.modal-overlay.show {
  opacity: 1;
}

/* Hidden state */
.modal-overlay.hidden {
  display: none;
}

/* Modal box */
.modal-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 28px;
  width: 90%;
  max-width: 420px;
  border-radius: 14px;
  color: #f2f2f2;
  text-align: center;
  position: relative;

  transform: translateY(20px);
  transition: transform 0.35s ease;
}

/* Animate box upward */
.modal-overlay.show .modal-box {
  transform: translateY(0);
}

/* Close button */
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 22px;
  cursor: pointer;
}

.modal-close:hover {
  color: white;
}





