body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #121811;
  color: #e5f0d8;
  margin: 0;
  padding: 2rem 1rem;
}

.search-page-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background-color: #1c2619;
  border: 1px solid #3c5427;
  border-radius: 12px;
  padding: 2rem;
}

h1 {
  margin: 0 0 0.5rem 0;
  color: #a7d959;
}

.subtitle a {
  color: #8bb34b;
  text-decoration: none;
}

.subtitle a:hover {
  text-decoration: underline;
}

.search-controls {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
}

#searchTerm {
  flex: 1;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  background: #121811;
  border: 1px solid #3c5427;
  border-radius: 6px;
  color: #fff;
}

#searchBtn,
#clearBtn {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #5a7d29;
}

#searchBtn {
  background-color: #4a6710;
  color: #ffffff;
}

#clearBtn {
  background-color: #2b3922;
  color: #d1e5b8;
}

#searchBtn:hover {
  background-color: #5c8014;
}

#clearBtn:hover {
  background-color: #3b4e2f;
}

.results-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.resultItem {
  display: flex;
  gap: 1rem;
  align-items: center;
  background-color: #243220;
  border: 1px solid #3c5427;
  border-radius: 8px;
  padding: 1rem;
}

.resultThumb {
  width: 90px;
  height: 90px;
  object-fit: contain;
  background-color: #121811;
  border-radius: 6px;
  padding: 4px;
}

.resultDetails {
  flex: 1;
}

.resultDetails h3 {
  margin: 0 0 0.3rem 0;
  color: #c9eb87;
}

.resultDetails p {
  margin: 0 0 0.5rem 0;
  color: #c0d3b0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.resultLink {
  color: #a7d959;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
}

.resultLink:hover {
  text-decoration: underline;
}

.noResults {
  color: #e5b0b0;
  padding: 1rem 0;
  font-style: italic;
}

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #3c5427;
  font-size: 0.85rem;
  color: #7a946b;
}

/* =========================================================================
   MODAL POP-UP (IFRAME VIEWER)
   ========================================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 8, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: #1c2619;
  border: 1px solid #3c5427;
  border-radius: 16px;
  width: 90vw;
  max-width: 820px;
  height: 85vh;
  position: relative;
  display: flex;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(127, 166, 58, 0.2);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
  background: rgba(15, 23, 12, 0.85);
  border: 1px solid #3c5427;
  color: #a7d959;
  font-size: 1.6rem;
  line-height: 1;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.modal-close-btn:hover {
  background: #4a6710;
  color: #ffffff;
  border-color: #a7d959;
  transform: scale(1.08);
}

.modal-body {
  width: 100%;
  height: 100%;
  position: relative;
  background: #121811;
  display: flex;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}
