* { box-sizing: border-box; }
body {
  font-family: 'Georgia', 'Times New Roman', serif;
  margin: 0;
  background: #07111f;
  color: #e8edf5;
}
header {
  background: linear-gradient(135deg, #0a1d3a 0%, #041022 100%);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  border-bottom: 3px solid #1a4d8f;
}
header h1 { margin: 0; font-size: 2.2rem; color: #d6e8ff; letter-spacing: 0.04em; }
header .tagline { margin: 0.6rem 0 0; color: #8fb3df; font-size: 1rem; font-style: italic; }
.header-nav { margin-top: 1rem; }
.rankings-btn {
  display: inline-block; font-family: system-ui, sans-serif; font-size: 0.9rem;
  color: #fff; background: #1a4d8f; border-radius: 6px; padding: 0.55rem 1.2rem;
  text-decoration: none;
}
.rankings-btn:hover { background: #2563b8; }

main { padding: 1.5rem; max-width: 1200px; margin: 0 auto; }

.filters {
  display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center;
  background: #0d1f38; border: 1px solid #1a3a5c; border-radius: 10px;
  padding: 1rem; margin-top: -1.5rem; position: relative; z-index: 1;
}
.filters input, .filters select, .filters button {
  font-family: inherit; background: #112a4a; color: #e8edf5; border: 1px solid #234b75;
  border-radius: 6px; padding: 0.5rem 0.7rem; font-size: 0.95rem;
}
.filters button { cursor: pointer; background: #1a4d8f; }
.filters button:hover { background: #2563b8; }
.incomplete-only-label { display: flex; align-items: center; gap: 0.4rem; color: #e8edf5; font-size: 0.95rem; }

.hint { text-align: center; color: #7d9bc2; font-size: 0.9rem; margin: 1rem 0; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
  margin-top: 1rem;
}

.card {
  background: #0d1f38;
  border: 1px solid #1a3a5c;
  border-radius: 10px;
  padding: 1.1rem 1.1rem 1.3rem;
  position: relative;
  transition: transform 0.15s, border-color 0.15s;
}
.card:hover { transform: translateY(-3px); border-color: #2563b8; }
.card { cursor: pointer; }
.card h3 { margin: 0.4rem 0 0.3rem; font-size: 1.05rem; color: #f0f5ff; line-height: 1.3; }
.card-meta { margin: 0; color: #6fa8dc; font-size: 0.85rem; }
.card-type { margin: 0.3rem 0 0; color: #8fa6c4; font-size: 0.8rem; font-family: system-ui, sans-serif; }

.status-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: system-ui, sans-serif; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 0.2rem 0.55rem; border-radius: 10px;
}
.status-badge img { height: 1.4em; width: auto; }
.status-safe { background: #16331f; color: #7fdb9a; }
.status-endangered { background: #3a2c10; color: #e0b95a; }
.status-lost { background: #3a1414; color: #e08080; }

.hidden { display: none; }

.detail-view { max-width: 700px; margin: 1.5rem auto; }
.back-btn {
  font-family: system-ui, sans-serif; background: none; color: #6fa8dc; border: none;
  font-size: 0.9rem; cursor: pointer; padding: 0; margin-bottom: 1.2rem;
}
.back-btn:hover { color: #2563b8; }
#detail-content h2 { margin: 0.5rem 0 0.3rem; color: #f0f5ff; }
.detail-field { margin: 0.4rem 0; font-size: 0.95rem; }
.detail-label { color: #6fa8dc; font-family: system-ui, sans-serif; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.4rem; }
.detail-related { margin-top: 1.5rem; }
.detail-related h4 { color: #8fb3df; font-family: system-ui, sans-serif; margin-bottom: 0.5rem; }
.detail-related ul { list-style: none; margin: 0; padding: 0; }
.detail-related li { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid #1a3a5c; }

.load-more-wrap { text-align: center; margin: 2rem 0; }
#load-more-btn {
  font-family: system-ui, sans-serif; background: #1a4d8f; color: #fff; border: none;
  border-radius: 6px; padding: 0.7rem 1.6rem; font-size: 0.95rem; cursor: pointer;
}
#load-more-btn:hover { background: #2563b8; }
#load-more-btn.hidden { display: none; }
