/* Kigali Places Finder styling, It has colors friendly of Rwandan landscapes */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Inter:wght@400;500&display=swap');

:root {
  --bg-color: #f7f4ef;
  --text-color: #2b2b2b;
  --header-from: #1b4332;
  --header-to: #2d6a4f;
  --accent: #e08c3e;
  --accent-hover: #c9701f;
  --card-bg: #ffffff;
  --card-shadow: rgba(27, 67, 50, 0.1);
  --input-border: #d8d2c6;
  --muted-text: #6b6b6b;
  --footer-text: #8a8a8a;
}

body.dark {
  --bg-color: #14181a;
  --text-color: #ece7dd;
  --header-from: #0d2818;
  --header-to: #12351f;
  --accent: #e08c3e;
  --accent-hover: #f2a457;
  --card-bg: #21262b;
  --card-shadow: rgba(0, 0, 0, 0.5);
  --input-border: #3a3f42;
  --muted-text: #b0b0b0;
  --footer-text: #7d7d7d;
}

* {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

body {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

header {
  background: linear-gradient(135deg, var(--header-from), var(--header-to));
  color: white;
  padding: 34px 20px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* a subtle decorative shape in the header background, just css, no images */
header::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

header h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  margin: 0 0 6px 0;
  font-size: 28px;
  letter-spacing: -0.5px;
}

header p {
  margin: 0;
  opacity: 0.85;
  font-size: 14px;
}

#dark-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

#dark-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

#finder-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

#finder-form input {
  flex: 1;
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background-color: var(--card-bg);
  color: var(--text-color);
  font-size: 14px;
}

#finder-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 140, 62, 0.15);
}

#finder-form button {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

#finder-form button:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.filters {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted-text);
}

.filters select {
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 4px 8px;
}

#msg-box {
  font-size: 14px;
  color: var(--accent);
  min-height: 20px;
  font-weight: 500;
}

h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 5px;
  margin: 24px 0 12px;
}

/* each place shows up as one of these */
.place-card {
  background: var(--card-bg);
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: 0 2px 8px var(--card-shadow);
  margin-bottom: 10px;
  border-left: 3px solid var(--accent);
}

.place-card:hover {
  transform: translateX(3px);
  box-shadow: 0 4px 14px var(--card-shadow);
}

.place-card h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

.place-meta {
  font-size: 13px;
  color: var(--muted-text);
}

.place-icon {
  font-size: 18px;
  margin-right: 6px;
}

.map-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.map-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* results header row, title + random choice button side by side */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}

.results-header h2 {
  margin: 0;
}

#surprise-btn {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

#surprise-btn:hover {
  background: var(--accent);
  color: white;
}

/* top picks, a horizontal row of highlighted cards */
.top-picks-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.top-pick-card {
  background: linear-gradient(160deg, var(--header-to), var(--header-from));
  color: white;
  border-radius: 10px;
  padding: 14px;
  min-width: 180px;
  flex: 0 0 auto;
  position: relative;
}

.top-pick-card .badge {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 11px;
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: 10px;
}

.top-pick-card h4 {
  margin: 6px 0 4px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
}

.top-pick-card p {
  margin: 0;
  font-size: 12px;
  opacity: 0.85;
}

/* briefly highlights a card when "random choice btn" jumps to it */
.highlight-pulse {
  animation: pulse 1s ease;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(224, 140, 62, 0.6); }
  100% { box-shadow: 0 0 0 14px rgba(224, 140, 62, 0); }
}

/* small loading dots shown while a search is running */
.loading-dots::after {
  content: '.';
  animation: dots 1.2s steps(3, end) infinite;
}

@keyframes dots {
  0%   { content: '.'; }
  33%  { content: '..'; }
  66%  { content: '...'; }
}

footer {
  text-align: center;
  padding: 18px;
  font-size: 12px;
  color: var(--footer-text);
}

footer a {
  color: var(--accent);
}
