*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0d0e14;
  --bg2: #13151f;
  --bg3: #1a1d2e;
  --border: rgba(255, 255, 255, 0.07);
  --text: #d4d8ec;
  --muted: #6b7094;
  --radius: 6px;

  --c-competitive: #f5c518;
  --c-rogue: #7ec8e3;
  --c-casual: #8bc34a;
  --c-legacy: #e06c75;
  --c-support: #c792ea;
  --c-noclue: #ffa07a;
  --c-toonew: #4fc3f7;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Rajdhani", sans-serif;
  min-height: 100vh;
}

.hero {
  background: linear-gradient(160deg, #0d0e14 40%, #1a1530 100%);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 40% at 50% -10%,
    rgba(245, 197, 24, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
}
.hero h1 span {
  color: var(--c-competitive);
}
.hero p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.controls {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 14, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 380px;
}
.search-wrap svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  padding: 0.55rem 0.75rem 0.55rem 2.4rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-wrap input:focus {
  border-color: var(--c-competitive);
}
.search-wrap input::placeholder {
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.filter-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
  cursor: pointer;
  font-family: "Rajdhani", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.85rem;
  text-transform: uppercase;
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.filter-btn.active {
  color: #000;
  border-color: transparent;
}

.count-badge {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}
.count-badge strong {
  color: var(--text);
}

.main {
  padding: 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.tier-section {
  margin-bottom: 2.5rem;
}
.tier-section.hidden {
  display: none;
}

.tier-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.tier-badge {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.7rem;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 700;
  background: currentColor;
  position: relative;
  overflow: hidden;
}
.tier-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: shimmer 3.5s infinite;
}
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}
.tier-badge-inner {
  position: relative;
  z-index: 1;
  mix-blend-mode: multiply;
  color: #000;
}
.tier-label {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tier-count {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: "Share Tech Mono", monospace;
}

.cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.archetype-chip {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: default;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.75rem;
  transition: all 0.15s;
  border-left: 3px solid currentColor;
}
.archetype-chip:hover {
  background: var(--bg3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.archetype-chip.match-highlight {
  background: rgba(245, 197, 24, 0.1);
  border-color: rgba(245, 197, 24, 0.4);
  border-left-color: currentColor;
}
.archetype-chip.dimmed {
  opacity: 0.2;
  pointer-events: none;
}

#archetype-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: #13151f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
#archetype-tooltip.visible {
  opacity: 1;
}
#archetype-tooltip img {
  width: 200px;
  height: auto;
  border-radius: 4px;
  display: block;
}
#archetype-tooltip span {
  font-size: 0.75rem;
  color: #6b7094;
  font-family: "Share Tech Mono", monospace;
  letter-spacing: 0.05em;
}

.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
  font-size: 1.1rem;
  display: none;
}
.no-results.visible {
  display: block;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 2rem;
  margin-top: 1rem;
}
.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-inner a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-inner a:hover {
  color: var(--text);
}
.footer-sep {
  color: var(--border);
}
.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.github-link:hover {
  color: var(--c-competitive) !important;
}

@media (max-width: 600px) {
  .controls {
    padding: 0.75rem 1rem;
  }
  .main {
    padding: 1rem;
  }
  .count-badge {
    width: 100%;
  }
}
