@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --bg: #0a1a0f;
  --surface: #132a1a;
  --text: #e0e0e0;
  --primary: #1abc9c;
  --primary-hover: #16a085;
  --secondary: #3498db;
  --secondary-hover: #2980b9;
  --accent: #f39c12;
  --accent-hover: #d35400;
  --danger: #e74c3c;
  --danger-hover: #c0392b;
  --muted: #1e3a24;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  position: relative;
  padding-bottom: 3rem;
  text-align: center;
  margin: 0;
}

.static-message {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 10px;
  padding: 20px;
  margin: 20px auto;
  max-width: 800px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  text-align: center;
  font-size: 1.2rem;
  line-height: 1.6;
}

.static-message p {
  margin: 15px 0;
}

.static-message .highlight {
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
}

.static-message a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

.static-message a:hover {
  color: var(--primary-hover);
}

/* SPECIAL AD BOX ABOVE SEARCH BAR, BUTTONS CENTERED BELOW TEXT */
.special-ad-box {
  background: radial-gradient(circle at top left, rgba(243,156,18,0.25), transparent 60%),
              radial-gradient(circle at bottom right, rgba(52,152,219,0.25), transparent 60%),
              var(--surface);
  border-radius: 12px;
  padding: 18px 20px 22px 20px;
  margin: 10px auto 20px auto;
  max-width: 900px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
  border: 1px solid rgba(243,156,18,0.4);
  text-align: center;
}

.special-ad-box h2 {
  margin: 0 0 6px 0;
  font-size: 1.4rem;
  color: var(--accent);
}

.special-ad-box p {
  margin: 0;
  font-size: 1rem;
}

/* NEW: container for multiple special buttons */
.special-ad-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding: 0 8px;
}

.special-ad-button {
  display: inline-block;
  margin-top: 0; 
  padding: 10px 26px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--bg);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
  border: 1px solid rgba(0,0,0,0.4);
  box-shadow: 0 6px 14px rgba(0,0,0,0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.special-ad-button:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 18px rgba(0,0,0,0.75);
  filter: brightness(1.05);
}

/* Small info box when special mode is active */
.special-mode-box {
  background: var(--surface);
  border-radius: 8px;
  padding: 10px 16px;
  margin: 10px auto 10px auto;
  max-width: 800px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  border: 1px solid var(--primary);
}

.special-mode-box h3 {
  margin: 0 0 4px 0;
  color: var(--primary);
  font-size: 1.1rem;
}

.special-mode-box p {
  margin: 0;
  font-size: 0.95rem;
}

.special-mode-link {
  color: var(--secondary);
  text-decoration: underline;
  font-weight: 600;
}

.special-mode-link:hover {
  color: var(--secondary-hover);
}

/* QUICK SEARCH BUTTONS UNDER SEARCH BAR */
.quick-search-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 8px auto 14px auto;
  max-width: 900px;
  padding: 0 12px;
}

.quick-search-button {
  display: inline-block;
  padding: 10px 18px;
  background-color: var(--primary);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.15s ease;
}

.quick-search-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

#page-title {
  margin: 0 auto 20px auto;
  max-width: 100%;
  display: block;
}

#search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#search-bar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

#search-bar {
  padding: 10px;
  width: 600px;
  max-width: 90%;
  box-sizing: border-box;
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--muted);
  border-radius: 4px;
}

#search-button,
#copy-link-button {
  padding: 10px 20px;
  margin-left: 10px;
  background-color: var(--primary);
  color: var(--bg);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

#search-button:hover,
#copy-link-button:hover {
  background-color: var(--primary-hover);
}

#result-counter {
  margin-bottom: 10px;
}

#nests {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 20px;
}

.nest {
  padding: 1rem;
  background-color: var(--surface);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  text-align: center;
}

.nest.gold-frame {
  border: 3px solid var(--accent);
}

.teleport-button,
.pedigree-button,
.contact-button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
  color: var(--bg);
  text-decoration: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.teleport-button {
  background-color: var(--secondary);
}

.teleport-button:hover {
  background-color: var(--secondary-hover);
}

.pedigree-button {
  background-color: var(--accent);
}

.pedigree-button:hover {
  background-color: var(--accent-hover);
}

.contact-button {
  background-color: var(--primary);
}

.contact-button:hover {
  background-color: var(--primary-hover);
}

#scroll-up {
  display: none;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--surface);
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

#scroll-up img {
  width: 1.5rem;
  height: 1.5rem;
}

#dropdowns-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 20px;
  transform: scale(0.9);
  transform-origin: top center;
}

.dropdown-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dropdown-group label {
  margin-bottom: 4px;
  font-weight: 500;
  font-size: 0.85rem;
}

.dropdown-group select {
  padding: 5px;
  border-radius: 4px;
  border: 1px solid var(--muted);
  background-color: var(--surface);
  color: var(--text);
  min-width: 120px;
  max-width: 140px;
  width: 120px;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.dropdown-group select option:first-child {
  color: #888 !important;
  font-style: italic;
}

.info-message {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
}

.show-all-link {
  color: var(--text);
  text-decoration: underline;
}

.show-all-link:hover {
  color: var(--primary);
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
}

.modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  color: var(--text);
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 1001;
}

#rare-modal-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

#rare-modal-list li {
  margin: 0.5rem 0;
}

#rare-modal-list a {
  text-decoration: none;
  color: var(--accent);
}

.reset-button {
  padding: 10px 20px;
  background-color: var(--danger);
  color: var(--bg);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
  margin-top: 5px;
}

.reset-button:hover {
  background-color: var(--danger-hover);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.5rem 0;
}

.pagination a,
.pagination span {
  margin: 0.25rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--text);
  border-radius: 5px;
  transition: transform 0.2s ease;
  font-weight: 600;
  border: 1px solid var(--muted);
}

.pagination a:hover {
  transform: scale(1.05);
  background-color: var(--surface);
}

.pagination .current-page {
  background-color: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

/* Added specific wrapper for bottom pagination to ensure visibility */
.bottom-pagination-wrapper {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
}

@media (max-width: 600px) {
  #nests {
    grid-template-columns: 1fr;
  }

  #search-bar {
    width: 100%;
  }

  #search-bar-container {
    flex-direction: column;
  }

  #search-button,
  #copy-link-button {
    margin-left: 0;
    margin-top: 10px;
  }

  .static-message {
    font-size: 1rem;
    padding: 15px;
  }

  .special-ad-button {
    width: 100%;
    max-width: 260px;
  }

  .quick-search-button {
    width: 100%;
    max-width: 260px;
  }
}
