:root {
  --bg: #0a0e14;
  --bg-2: #0a0e14;
  --panel: #161b22;
  --panel-border: #1f2630;
  --row-divider: #1a1f2a;
  --tag-bg: #1f2530;
  --tag-text: #adb6c2;
  --accent: #66c0f4;
  --text: #c7d5e0;
  --text-dim: #6e7681;
  --positive: #66c0f4;
  --mixed: #d49a4d;
  --negative: #d05151;
  --money: #7eb46b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  padding: 1rem 1.5rem;
  background: #06090d;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}
.copyright {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.copyright a { color: var(--text-dim); }
.copyright a:hover { color: var(--accent); }

.kofi-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent);
  color: #000;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}
.kofi-btn:hover { background: #8fd3ff; color: #000; text-decoration: none; transform: translateY(-1px); }
.kofi-icon { width: 18px; height: 18px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: block; }
.brand-text {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
}
.brand-blue { color: var(--accent); }
.brand-light { color: var(--text); }
.tagline { margin: 0.5rem 0 0 54px; color: var(--text-dim); font-size: 0.85rem; }

main { padding: 1rem 1.5rem 3rem; max-width: 1500px; margin: 0 auto; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  padding: 0.9rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}
.filters label {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  gap: 3px;
}
.filters label.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  color: var(--text);
  padding-bottom: 6px;
}
.filters input[type="number"],
.filters input[type="text"],
.filters select {
  padding: 6px 10px;
  background: #0d1117;
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  font-size: 0.95rem;
  min-width: 90px;
}
.filters input[type="text"]::placeholder { color: var(--text-dim); }
.filters button {
  padding: 7px 18px;
  background: var(--accent);
  color: #000;
  border: 0;
  border-radius: 2px;
  font-weight: 600;
  cursor: pointer;
}
.filters button:hover { background: #8fd3ff; }
.filters .reset {
  padding: 7px 12px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.search {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.search input[type="search"] {
  flex: 1;
  max-width: 100%;
  padding: 10px 14px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  font-size: 0.95rem;
}
.search input[type="search"]::placeholder { color: var(--text-dim); }
.search button {
  padding: 8px 18px;
  background: var(--accent);
  color: #000;
  border: 0;
  border-radius: 2px;
  font-weight: 600;
  cursor: pointer;
}
.search button:hover { background: #8fd3ff; }

.genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0.75rem 0 1rem;
}
.genres-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-right: 4px;
}
.pill {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--panel);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text);
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.pill:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.pill.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

.count { margin: 0.5rem 0; color: var(--text-dim); font-size: 0.85rem; }

table.apps {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}
table.apps th,
table.apps td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--row-divider);
  vertical-align: middle;
}
table.apps th {
  background: transparent;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-bottom-color: var(--panel-border);
}
table.apps tr:hover td { background: #0f141c; }
table.apps th.sortable { padding: 0; }
table.apps th.sortable a {
  display: block;
  padding: 12px 14px;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 0.75rem;
}
table.apps th.sortable a:hover { color: var(--accent); }
table.apps td.num,
table.apps th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.apps td.genre { width: 200px; line-height: 1.9; }
table.apps td.sub-col {
  font-size: 0.85rem;
  color: var(--text-dim);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.apps td.genre .tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  margin-right: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
}
table.apps img { display: block; border-radius: 2px; }
table.apps td .name-link { font-weight: 600; font-size: 1rem; }
table.apps td.score-positive { color: var(--positive); }
table.apps td.score-mixed    { color: var(--mixed); }
table.apps td.score-negative { color: var(--negative); }
table.apps td.revenue { color: var(--money); font-weight: 600; }
.strong { font-weight: 700; color: #fff; }
.sub { font-size: 0.8rem; color: var(--text-dim); margin-top: 2px; }
.free { color: var(--mixed); font-style: italic; }
.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  vertical-align: middle;
}
.badge.ea { background: #b5a161; color: #000; }
.empty { padding: 2rem; text-align: center; color: var(--text-dim); }
code { background: #000; padding: 2px 5px; border-radius: 2px; color: var(--accent); }
