:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1a1d21;
  --muted: #6b7280;
  --border: #e3e6ea;
  --accent: #b3122b;      /* Dragon Con red */
  --accent-soft: #fce8eb;
  --badge-tv: #1f6feb;
  --badge-movie: #7c3aed;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1114;
    --card: #191c21;
    --text: #e8eaed;
    --muted: #9aa0a8;
    --border: #2a2e35;
    --accent: #ff5069;
    --accent-soft: #35181d;
    --badge-tv: #4a91ff;
    --badge-movie: #a978ff;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

.site-header {
  padding: 2rem 1.25rem 1rem;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.site-header h1 {
  margin: 0;
  font-size: 1.9rem;
  letter-spacing: -.02em;
}
.site-header h1::before { content: "🐉 "; }
.tagline { color: var(--muted); margin: .4rem 0 0; }
.last-checked { color: var(--muted); font-size: .82rem; margin: .6rem 0 0; }

.controls {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .75rem 1.25rem;
  max-width: 880px;
  margin: 0 auto;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
#search {
  flex: 1 1 220px;
  min-width: 0;
  padding: .55rem .75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
}
select {
  padding: .55rem .5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: .9rem;
}

.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmented button {
  border: 0;
  background: var(--card);
  color: var(--text);
  padding: .55rem .9rem;
  font-size: .9rem;
  cursor: pointer;
}
.segmented button.active { background: var(--accent); color: #fff; }

.results {
  max-width: 880px;
  margin: 1rem auto 4rem;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card > summary {
  list-style: none;
  cursor: pointer;
  padding: .8rem 1rem;
  display: flex;
  align-items: baseline;
  gap: .55rem;
}
.card > summary::-webkit-details-marker { display: none; }
.card > summary:hover { background: var(--accent-soft); }
.card .name { font-weight: 600; }
.card .year { color: var(--muted); font-weight: 400; font-size: .9em; }
.card .count {
  margin-left: auto;
  color: var(--muted);
  font-size: .82rem;
  white-space: nowrap;
}

.badge {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
  padding: .12rem .4rem;
  border-radius: 5px;
  color: #fff;
  vertical-align: middle;
}
.badge.movie { background: var(--badge-movie); }
.badge.tv { background: var(--badge-tv); }

.detail { padding: 0 1rem 1rem; border-top: 1px solid var(--border); }
.detail .bio { color: var(--muted); font-size: .9rem; margin: .7rem 0 .2rem; }
.detail ul { list-style: none; margin: .5rem 0 0; padding: 0; }
.detail li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem 0;
  border-bottom: 1px dashed var(--border);
}
.detail li:last-child { border-bottom: 0; }
.detail .role { color: var(--muted); text-align: right; }

.who-wrap { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; }
.search-btn {
  border: 0;
  background: none;
  padding: 2px;
  margin: 0;
  color: var(--muted);
  cursor: pointer;
  line-height: 0;
  border-radius: 4px;
  display: inline-flex;
  opacity: .55;
  flex: none;
}
.search-btn:hover { color: var(--accent); opacity: 1; background: var(--accent-soft); }
.detail a { color: var(--accent); text-decoration: none; }
.detail a:hover { text-decoration: underline; }

/* Actor-name links read as text, not calls-to-action. */
.detail a.actor-link { color: var(--text); font-weight: 500; }
.detail a.actor-link:hover { color: var(--accent); }

.disclaimer {
  max-width: 880px;
  margin: 2rem auto 3rem;
  padding: 1rem 1.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.6;
  text-align: center;
}
.disclaimer a { color: var(--muted); text-decoration: underline; }
.disclaimer a:hover { color: var(--accent); }

.empty { text-align: center; color: var(--muted); margin: 3rem; }
