:root {
  --bg: #0b0b0e;
  --panel: #151519;
  --panel-2: #1d1d23;
  --border: #2b2b33;
  --text: #f3f3f6;
  --sub: #aaaab6;
  --muted: #747482;
  --purple: #9147ff;
  --green: #25d0a4;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: #0a0a0d;
}

.twitch-mark,
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.twitch-mark {
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.twitch-mark img {
  width: 25px;
  height: 25px;
}

.twitch-mark b {
  font-size: 0.92rem;
}

.status-pill {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--sub);
  font-size: 0.78rem;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sub);
  font-weight: 750;
}

.nav-link {
  color: var(--sub);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
}

.project-link {
  display: inline-grid;
  min-height: 36px;
  place-items: center;
  padding: 0 13px;
  border: 1px solid rgba(145, 71, 255, 0.55);
  border-radius: 6px;
  background: rgba(145, 71, 255, 0.12);
  color: #e3d5ff;
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.project-link:hover,
.project-link:focus-visible {
  border-color: rgba(199, 168, 255, 0.9);
  background: rgba(145, 71, 255, 0.22);
  color: #fff;
}

main {
  width: min(680px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 34px;
}

.lookup {
  display: grid;
  justify-items: center;
  text-align: center;
}

.simple-card {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--sub);
  text-align: left;
}

.simple-card h2 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 1rem;
}

.simple-card p:last-child {
  margin-bottom: 0;
}

.simple-card a {
  color: #c7a8ff;
  font-weight: 800;
}

.hero-logo {
  width: 68px;
  height: 68px;
  margin-bottom: 14px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 2rem;
  line-height: 1;
}

.lookup > p {
  max-width: 460px;
  margin-bottom: 20px;
  color: var(--sub);
}

.auth-card,
.status-line,
.role-section {
  width: 100%;
}

.auth-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  text-align: left;
}

.auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.auth-card strong {
  display: block;
  font-size: 1rem;
}

.auth-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.primary-button,
.search button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--purple);
  color: white;
  font-weight: 800;
}

.primary-button {
  padding: 0 14px;
}

.search {
  display: flex;
  width: 100%;
  gap: 8px;
  margin-bottom: 10px;
}

.search input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  outline: none;
}

.search input:focus {
  border-color: var(--purple);
}

.search button {
  padding: 0 16px;
}

.status-line {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--sub);
  font-size: 0.86rem;
  text-align: left;
}

.role-section {
  margin-top: 26px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1rem;
}

#role-count-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}

.role-card {
  display: grid;
  justify-items: center;
  min-height: 132px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  text-align: center;
}

.role-card:hover {
  background: var(--panel-2);
}

.role-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--sub);
  font-weight: 900;
}

.role-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.role-card strong {
  width: 100%;
  overflow: hidden;
  color: var(--sub);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-card span {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(145, 71, 255, 0.14);
  color: #c7a8ff;
  font-size: 0.67rem;
  font-weight: 850;
  text-transform: uppercase;
}

.role-card.moderator span {
  background: rgba(37, 208, 164, 0.12);
  color: var(--green);
}

.role-card small {
  color: var(--muted);
  font-size: 0.68rem;
}

.empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px 0;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  width: min(680px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 26px;
  text-align: center;
}

.site-footer p {
  display: inline-flex;
  margin: 0;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--sub);
  font-size: 0.8rem;
  font-weight: 750;
}

@media (max-width: 620px) {
  .nav,
  .auth-card,
  .auth-actions,
  .search {
    align-items: stretch;
    flex-direction: column;
  }
}
