/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #181822;
  --bg-elevated: #1e1e2a;
  --border: #2a2a3a;
  --text-primary: #eaeaf0;
  --text-secondary: #9898aa;
  --text-muted: #66667a;
  --accent: #00e5ff;
  --accent-glow: rgba(0, 229, 255, 0.3);
  --tier-s: #ff2d55;
  --tier-a: #ff9500;
  --tier-b: #ffcc00;
  --tier-c: #34c759;
  --tier-d: #5ac8fa;
  --tier-f: #8e8e93;
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Satoshi', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.consent-visible {
  padding-bottom: 92px;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg-primary);
  padding: 10px 20px;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ===== UTILITY ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.consent-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 520px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 14px;
  background: rgba(18, 18, 26, 0.94);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-secondary);
  font-size: 14px;
  z-index: 850;
}

.consent-bar[hidden] {
  display: none;
}

.consent-bar button {
  border: 1px solid rgba(0, 229, 255, 0.32);
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  flex-shrink: 0;
}

.consent-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 229, 255, 0.22);
}

.consent-bar button:focus-visible {
  outline: 2px solid rgba(0, 229, 255, 0.6);
  outline-offset: 2px;
}

/* ===== HEADER ===== */
.header {
  padding: 56px 0 60px;
  text-align: center;
  position: relative;
  overflow: visible;
}
.header::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(0, 229, 255, 0.1) 0%, rgba(0, 229, 255, 0.03) 40%, transparent 70%);
  pointer-events: none;
  animation: headerPulse 4s ease-in-out infinite alternate;
}
@keyframes headerPulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  position: relative;
}

.logo-img {
  width: 250px;
  height: auto;
  transform: translate(-8px, 12px);
  filter: drop-shadow(0 0 30px rgba(0, 229, 255, 0.25)) drop-shadow(0 0 60px rgba(0, 229, 255, 0.1));
  animation: logoGlow 3s ease-in-out infinite alternate;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 420px;
}

@keyframes logoGlow {
  0% { filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.2)) drop-shadow(0 0 40px rgba(0, 229, 255, 0.08)); }
  100% { filter: drop-shadow(0 0 35px rgba(0, 229, 255, 0.35)) drop-shadow(0 0 70px rgba(0, 229, 255, 0.15)); }
}

.tagline {
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.header-sub {
  margin-top: 8px;
  font-size: 24px;
  color: var(--text-secondary);
  font-weight: 400;
}

.header-date {
  margin-top: 6px;
  font-size: 23px;
  color: var(--text-muted);
}

.sources-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

/* ===== SEARCH ===== */
.search-section {
  padding: 0 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-primary);
  padding-top: 12px;
}

.search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

.search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-count {
  text-align: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  min-height: 20px;
}

/* ===== TIER LIST ===== */
.tier-list {
  padding: 0 0 64px;
}

/* Tier loading */
.tier-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.tier-loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tier-row {
  display: flex;
  align-items: stretch;
  margin-bottom: 4px;
  border-radius: var(--radius);
  overflow: visible;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.tier-label {
  flex: 0 0 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  position: relative;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.tier-label::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: rgba(255,255,255,0.1);
}

.tier-s .tier-label { background: linear-gradient(135deg, var(--tier-s), #d1234a); }
.tier-a .tier-label { background: linear-gradient(135deg, var(--tier-a), #e07800); }
.tier-b .tier-label { background: linear-gradient(135deg, var(--tier-b), #ddb200); }
.tier-c .tier-label { background: linear-gradient(135deg, var(--tier-c), #28a745); }
.tier-d .tier-label { background: linear-gradient(135deg, var(--tier-d), #42b0e0); }
.tier-f .tier-label { background: linear-gradient(135deg, var(--tier-f), #6e6e78); }

.tier-brawlers {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 12px;
  gap: 6px;
  min-height: 76px;
}

.brawler-icon-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}

.brawler-icon-wrap:hover {
  transform: scale(1.18);
  z-index: 10;
}

.brawler-icon-wrap.dimmed {
  opacity: 0.15;
  pointer-events: none;
}

.brawler-icon-wrap.highlighted {
  opacity: 1;
}

.brawler-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.brawler-icon-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius-sm) + 3px);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.brawler-icon-wrap:hover::before {
  opacity: 1;
}

.tier-s .brawler-icon-wrap::before { box-shadow: 0 0 14px var(--tier-s), 0 0 4px var(--tier-s); }
.tier-a .brawler-icon-wrap::before { box-shadow: 0 0 14px var(--tier-a), 0 0 4px var(--tier-a); }
.tier-b .brawler-icon-wrap::before { box-shadow: 0 0 14px var(--tier-b), 0 0 4px var(--tier-b); }
.tier-c .brawler-icon-wrap::before { box-shadow: 0 0 14px var(--tier-c), 0 0 4px var(--tier-c); }
.tier-d .brawler-icon-wrap::before { box-shadow: 0 0 14px var(--tier-d), 0 0 4px var(--tier-d); }
.tier-f .brawler-icon-wrap::before { box-shadow: 0 0 14px var(--tier-f), 0 0 4px var(--tier-f); }

/* Image fallback */
.brawler-icon-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 20px;
  color: var(--text-muted);
}

.brawler-icon-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Tooltip */
.brawler-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  font-size: 12px;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.tier-s .brawler-tooltip {
  top: calc(100% + 8px);
  bottom: auto;
}

.brawler-icon-wrap:hover .brawler-tooltip {
  opacity: 1;
}

.brawler-tooltip .tt-name {
  font-weight: 600;
  color: var(--text-primary);
}

.brawler-tooltip .tt-score {
  color: var(--text-secondary);
  margin-left: 6px;
  font-size: 11px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 90%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px 28px;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  position: relative;
}

@media (min-width: 1024px) {
  .modal {
    width: 580px;
    max-width: 90vw;
  }
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  font-size: 18px;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--bg-elevated);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.modal-info h2 {
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.modal-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  color: #fff;
}

.modal-score-section {
  margin-bottom: 20px;
}

.modal-score-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.modal-score-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  overflow: hidden;
}

.modal-score-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-score-value {
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-sources-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.modal-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.modal-source-row:last-child { border-bottom: none; }

.modal-source-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.modal-source-name-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s;
}

.modal-source-name-btn:hover {
  color: var(--accent);
}

.modal-source-tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.modal-num-sources {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.modal-share-row {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.modal-share-btn,
.modal-tweet-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  overflow: visible;
  line-height: 1;
}

.modal-share-btn svg {
  overflow: visible;
  flex-shrink: 0;
  transform: translateY(-2px);
}

.modal-tweet-btn svg {
  overflow: visible;
  flex-shrink: 0;
}

.modal-share-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.modal-share-btn:hover {
  background: var(--border);
  color: var(--text-primary);
}

.modal-tweet-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.modal-tweet-btn:hover {
  background: #1d9bf020;
  border-color: #1d9bf0;
  color: #1d9bf0;
}

/* ===== TOAST ===== */
#toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 2000;
  white-space: nowrap;
}

#toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== SOURCES BUTTON (header pill) ===== */
.sources-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
  user-select: none;
}
.sources-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,229,255,0.1);
}
.sources-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.sources-btn .src-count {
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.3;
}

/* ===== EXPORT DROPDOWN ===== */
.export-wrap {
  position: relative;
  display: inline-block;
}

.export-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.export-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 100;
}

.export-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.export-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-align: left;
  width: 100%;
}

.export-option:hover {
  background: rgba(0, 229, 255, 0.08);
  color: var(--accent);
}

.export-option svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.export-option:hover svg {
  opacity: 1;
  color: var(--accent);
}

/* Sources popup */
.sources-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.7);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.sources-popup-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.sources-popup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 90%;
  max-width: 440px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  position: relative;
}
.sources-popup-overlay.active .sources-popup {
  transform: translateY(0) scale(1);
}

.sources-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background 0.15s, color 0.15s;
}
.sources-popup-close:hover {
  background: var(--border);
  color: var(--text-primary);
}
.sources-popup-title {
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.sources-popup-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.src-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.src-list-item:last-child { border-bottom: none; }
.src-list-item:hover {
  transform: translateX(2px);
}
.src-list-item:focus-visible {
  outline: none;
  border-color: rgba(0, 229, 255, 0.22);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.14);
  border-radius: 10px;
}
.src-list-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.src-list-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.src-list-type {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}
.src-list-date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

.src-list-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

/* ===== SOURCES SECTION (grid below) ===== */
.section-heading {
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.section-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.sources-section {
  padding: 0 0 64px;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.source-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.source-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.source-card:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.16);
  transform: translateY(-2px);
}

.source-card-name {
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.source-card-type {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
}

.source-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.source-weight-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.source-weight-btn:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.4);
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}

.source-weight-btn svg {
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.source-weight-btn:hover svg {
  color: var(--accent);
}

.source-card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s;
}

.source-card-link:hover {
  opacity: 0.7;
}

.source-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.78);
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.source-detail-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.source-detail-popup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 90%;
  max-width: 440px;
  max-height: 84vh;
  overflow-y: auto;
  padding: 24px;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  position: relative;
}

.source-detail-overlay.active .source-detail-popup {
  transform: translateY(0) scale(1);
}

@media (min-width: 1024px) {
  .sources-popup,
  .source-detail-popup {
    width: 580px;
    max-width: 90vw;
  }
}

.source-detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background 0.15s, color 0.15s;
}

.source-detail-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.source-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.source-detail-head-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.source-detail-name {
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.source-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.source-cat-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.cat-data {
  color: var(--accent);
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.3);
}

.cat-pro {
  color: #ff9500;
  background: rgba(255, 149, 0, 0.1);
  border-color: rgba(255, 149, 0, 0.3);
}

.cat-editorial {
  color: #bf5af2;
  background: rgba(191, 90, 242, 0.1);
  border-color: rgba(191, 90, 242, 0.3);
}

.cat-community {
  color: #8e8e93;
  background: rgba(142, 142, 147, 0.1);
  border-color: rgba(142, 142, 147, 0.3);
}

.source-detail-date-inline {
  font-size: 12px;
  color: var(--text-muted);
}

.source-detail-weight-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.source-detail-weight {
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.source-detail-weight-rank {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.source-detail-block {
  margin-bottom: 10px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  border-left-width: 3px;
}

.source-block-about {
  border-left-color: rgba(0, 229, 255, 0.5);
}

.source-block-weight {
  border-left-color: rgba(255, 204, 0, 0.5);
}

.source-block-method {
  border-left-color: rgba(52, 199, 89, 0.5);
}

.source-detail-block h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}

.source-detail-block h3 svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.source-detail-block p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.source-detail-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
}

.source-detail-block li {
  margin-bottom: 5px;
  font-size: 13.5px;
  line-height: 1.4;
}

.source-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.source-detail-link:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.3);
  opacity: 1;
}

/* Consensus / Disagreement indicator */
.modal-consensus {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  margin-bottom: 4px;
  font-size: 13px;
}

.consensus-label {
  color: var(--text-muted);
}

.consensus-value {
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.consensus-strong {
  color: #34c759;
  background: rgba(52, 199, 89, 0.12);
}

.consensus-moderate {
  color: #ffcc00;
  background: rgba(255, 204, 0, 0.12);
}

.consensus-weak {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.12);
}

.consensus-detail {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

/* ===== AD CONTAINER ===== */
.ad-container {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

/* ===== ABOUT ===== */
.about-section {
  padding: 0 0 64px;
}

.about-content {
  display: grid;
  gap: 16px;
}

.about-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
}

.about-block h3 {
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.about-block p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.about-block p:last-child { margin-bottom: 0; }

/* ===== PRIVACY ===== */
.privacy-section {
  padding: 0 0 64px;
}

.privacy-section p {
  margin-bottom: 10px;
}

.privacy-section p:last-child { margin-bottom: 0; }

.footer-links-secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}

/* ===== FAQ ===== */
.faq-section {
  padding: 0 0 64px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: rgba(0, 229, 255, 0.25);
}

.faq-question {
  padding: 18px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.15s;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: '+';
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item[open] .faq-question::after {
  content: '−';
  color: var(--accent);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-answer {
  padding: 0 24px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ===== METHODOLOGY ===== */
.methodology-section {
  padding: 0 0 64px;
}

.methodology-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.methodology-box strong {
  color: var(--text-primary);
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

.footer a:hover { color: var(--accent); }

.footer-version {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
}

.footer-version:hover {
  color: var(--accent);
  border-color: rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.08);
  transform: translateY(-1px);
}

.footer-version:focus-visible {
  outline: 2px solid rgba(0, 229, 255, 0.6);
  outline-offset: 3px;
}

.footer-version:disabled {
  cursor: default;
  opacity: 0.65;
  transform: none;
}

.version-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.version-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.version-modal-title {
  font-family: 'Clash Display', 'Satoshi', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 6px;
}

.version-modal-badge {
  display: inline-flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.version-modal-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.version-modal-meta svg {
  opacity: 0.6;
}

.version-modal-body {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.version-modal-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.version-modal-links {
  display: grid;
  gap: 10px;
}

.version-modal-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.v-link-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v-link-left svg {
  color: var(--text-muted);
  transition: color 0.2s;
}

.version-modal-link::after {
  content: '↗';
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
}

.version-modal-link:hover {
  color: var(--accent);
  border-color: rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.08);
  transform: translateY(-2px);
}

.version-modal-link:hover .v-link-left svg,
.version-modal-link:hover::after {
  color: var(--accent);
}

.version-modal-link:hover::after {
  transform: translate(2px, -2px);
}

.footer-tm {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  body.consent-visible { padding-bottom: 112px; }
  .consent-bar { width: calc(100% - 24px); left: 12px; right: 12px; bottom: 12px; transform: none; flex-direction: column; align-items: stretch; }
  .consent-bar button { width: 100%; }
  .header { padding: 32px 0 28px; }
  .hero-brand { flex-direction: column; align-items: center; gap: 10px; }
  .hero-copy { align-items: center; text-align: center; max-width: 100%; }
  .logo-img { width: 180px; transform: translate(0, 6px); }
  .tagline { font-size: 16px; letter-spacing: 2px; }
  .header-sub { font-size: 14px; }
  .header-date { font-size: 13px; }
  .tier-label { flex: 0 0 48px; font-size: 24px; }
  .brawler-icon-wrap { width: 46px; height: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; }
  .brawler-icon { width: 46px; height: 46px; flex-shrink: 0; }
  .brawler-name-label { display: block; font-size: 9px; color: var(--text-secondary); text-align: center; width: 46px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 1.2; }
  .tier-brawlers { padding: 8px; gap: 4px; align-items: flex-start; }
  .section-heading { font-size: 22px; }
  .sources-grid { grid-template-columns: 1fr; }
  .modal { padding: 24px 20px; width: 95%; }
  .modal-icon { width: 64px; height: 64px; }
  .modal-info h2 { font-size: 20px; }
  .container { padding: 0 16px; }
  .src-list-right { align-items: flex-start; }
  .sources-popup { width: 95%; padding: 20px; }
  .source-detail-popup { width: 95%; padding: 20px; }
  .source-detail-name { font-size: 20px; }
  .version-modal-icon { width: 44px; height: 44px; }
  .version-modal-icon svg { width: 20px; height: 20px; }
  .version-modal-title { font-size: 20px; }
}

/* ===== BRAWLER NAME LABEL (mobile only) ===== */
.brawler-name-label {
  display: none;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
