.wl-success { text-align:center; padding:10px 0; }

/* Shimmer note under hero query */
.shimmer-note { 
  display: block; 
  visibility: hidden; /* reserve space, no layout shift */
  min-height: 18px; /* ~12px font-size * 1.4 line-height */
  font-size: 12px; 
  line-height: 1.4; 
  margin: 6px 0 0 12px; 
  color: #b9c0d4; 
  background: linear-gradient(90deg, rgba(185,192,212,0.35), rgba(255,255,255,0.9), rgba(185,192,212,0.35));
  -webkit-background-clip: text; 
  background-clip: text; 
  -webkit-text-fill-color: transparent; 
  background-size: 200% 100%; 
  animation: shimmerText 3.2s linear infinite; /* slowed 2x */
}

@keyframes shimmerText {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Ensure stop icon in the hero send button matches sizing */
#home-send-btn .fa-stop { 
  font-size: 16px; 
}

/* All buttons show pointer on hover */
button:hover { cursor: pointer; }
/* Ensure pointer for all button-like elements (on hover only) */
button:hover,
.icon-btn:hover,
.waitlist-btn:hover,
.home-login-btn:hover,
.copy-btn:hover,
.google-login-btn:hover,
.primary-btn:hover,
.secondary-btn:hover,
.logout-btn:hover,
.tab-btn:hover,
.connect-btn:hover,
.link-btn:hover,
.share-btn:hover,
[role="button"]:hover { cursor: pointer; }

/* Ensure pointer for specific hero/header buttons */
#open-login-btn,
#copy-prompt-btn,
#join-waitlist-btn,
#join-waitlist-initial-btn,
#google-login { cursor: pointer !important; }
.wl-check { width:36px; height:36px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:#1B1D21; border:1px solid #2a3141; color:#53df8e; font-weight:800; margin-bottom:8px; }
.wl-title { color: var(--text); font-weight:700; margin-bottom:4px; }
.wl-sub { color: var(--muted); }
:root { --border: #2a3141; --text: #dfe6f6; --muted: #9aa6bb; --positive: #53df8e; --danger: #ff6b6b; --shadow: 0 6px 30px rgba(0,0,0,0.35); --accent: #7aa2f7; --accent-2: #9d7af7; --bg: #0f1524; --panel: #0d1220; --panel-2: #0b101d; --bg-1: #121827; --bg-2: #0e1423; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: #16171A;
  /* Subtle plus-sign wallpaper pattern */
  background-image: radial-gradient(circle at 0 0, transparent 0, transparent 30px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%231a1e24' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M24 12v12M18 18h12'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-position: 0 0, 0 0;
  background-size: auto, 48px 48px;
  color: var(--text);
  overflow: hidden; /* no page vertical scrolling */
}

/* Public Home */
.home-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(22,23,26,0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
}
.home-header .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.4px; font-size: 20px; }
.home-header .spacer { flex: 1 1 auto; }
.home-login-btn { padding: 8px 14px; background: white; color: #1f1f1f; border: 1px solid #dadce0; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.home-login-btn:hover { background: #f8f9fa; }

.home-hero {
  position: relative;
  height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 20px;
  background: transparent;
}
.hero-inner { 
  width: min(960px, 92vw); 
  display: grid; 
  gap: 18px; 
}
.hero-title { margin: 0 0 18px 0; font-size: 36px; font-weight: 800; letter-spacing: -0.02em; text-align: center; background: linear-gradient(180deg, #ffffff, #f0f0f0); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 18px rgba(255,255,255,0.12); }
.home-hero .query-wrap { background: #1A1A1A; border: 1px solid #323232; border-radius: 12px; padding: 12px 16px 8px 16px; }
#home-hero .query-wrap { padding: 0; }
.hero-query .label-row { display:flex; align-items:center; justify-content:space-between; gap:8px; padding: 0 12px 6px 12px; }
.hero-query .label-actions { display:inline-flex; gap:10px; }
.copy-btn { display:inline-flex; align-items:center; gap:8px; padding:0; background:none; border:none; color:#A7A7A7; font-size:12px; line-height: 1; }
.copy-btn svg { width: 14px; height: 14px; color:#A7A7A7; }
.copy-btn .copy-text { color:#A7A7A7; }
.copy-btn:hover .copy-text, .copy-btn:hover svg { color:#d0d0d0; }
.home-hero .query-topbar { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 12px; border-bottom:none; background: #1A1A1A; border-top-left-radius:12px; border-top-right-radius:12px; }
.home-hero .query-topbar .top-left { display:flex; align-items:center; gap:8px; }
.context-meter { display:inline-flex; align-items:center; gap:6px; color:#A7A7A7; font-size:12px; }
.context-ring { transform: rotate(-90deg); }
.context-ring .ring-bg { fill: none; stroke: #2a3141; stroke-width: 3; opacity: 0.7; }
.context-ring .ring-fg { fill: none; stroke: #A7A7A7; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 50.265; stroke-dashoffset: 50.265; transition: stroke-dashoffset 200ms ease; }
.at-badge { width: 16.8px; height: 16.8px; border-radius: 4.8px; display:inline-grid; place-items:center; background:#272727; border:1px solid #323232; color:#565656; font-weight:700; font-size:10.8px; line-height:1; padding:2.4px; box-sizing:border-box; text-align:center; vertical-align:middle; }
.home-hero .query-bottombar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 12px; border-top:none; background: #1A1A1A; border-bottom-left-radius:12px; border-bottom-right-radius:12px; }
.bottom-left { display:flex; align-items:center; gap:6px; }
.chip-mini { display:inline-flex; align-items:center; gap:6px; padding:4px 8px; border-radius:8px; border:1px solid #323232; background: #272727; color:#A7A7A7; font-size:12px; }
.chip-mini .mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; color:#565656; }
.chip-icon { width: 12px; height: 12px; display:inline-block; filter: grayscale(100%) brightness(80%); }
.chip-svg { width: 12px; height: 12px; color:#565656; display:inline-block; }
.cmd-combo { display:inline-flex; align-items:center; gap:1px; color:#565656; }
.cmd-symbol { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 16.9px; line-height: 1; }
.cmd-i { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; color: #565656; }
.model-label { color:#A7A7A7; font-size:12px; padding-left: 6px; display:inline-flex; align-items:center; gap:6px; }
.home-hero .query-wrap textarea { padding: 12px 16px; min-height: 56px; background: #1A1A1A; color: #F3F3F3; }
.muted.small { color: var(--muted); font-size: 12px; }

/* Syntax highlighting container */
.query-highlight-container {
  position: relative;
  width: 100%;
}

#home-query-input { 
  width: 100%; 
  background: transparent; 
  border: none; 
  color: transparent; /* Make text invisible so we can show highlighted text behind */
  caret-color: var(--text); /* Keep cursor visible */
  outline: none; 
  resize: none; 
  min-height: 38px;
  position: relative;
  z-index: 2;
  pointer-events: none; /* allow selecting text from the highlight layer below */
}

#home-query-highlight {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: auto; /* allow text selection */
  z-index: 1;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 12px 16px;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
  line-height: 1.5;
  color: var(--text); /* Default text color */
  background: transparent;
  border: none;
  resize: none;
  min-height: 38px;
}

/* Mobile-only hero adjustments */
@media (max-width: 640px) {
  .hero-title { font-size: 26px; margin: 8px 0 14px 0; }
  #home-query-input, #home-query-highlight { min-height: 168px; }
  .hero-cta { margin-top: 0; }
}

/* Toast */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  transform: translateY(0);
  background: #0f1524;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 200ms ease;
  z-index: 2000;
}
.toast.show {
  opacity: 1;
  transform: translateY(-2px);
}

.highlight-domain {
  background: rgba(122, 162, 247, 0.2);
  color: inherit;
  border-radius: 3px;
  padding: 1px 2px;
  overflow-wrap: anywhere;
  word-break: break-all;
}

#home-query-input:disabled { opacity: 1; cursor: default; }
#home-query-input::placeholder { color: var(--muted); }
.query-label { color:#A7A7A7; font-size:12px; margin: 0 0 6px 0; }
.hero-cta { 
  margin-top: 32px; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1; /* Take available space between query and share icons */
  position: relative; /* For absolute positioning of form */
  padding-bottom: 64px; /* Reserve space above fixed share bar */
}
.waitlist-btn { 
  background: linear-gradient(180deg, #f7f7f4, #efefea); 
  color: #111111; 
  border: 1px solid #e5e5e0; 
  border-radius: 10px; 
  padding: 12px 24px; 
  font-weight: 600; 
  font-size: 14px;
  width: min(400px, 92vw); /* Match form width */
  height: auto; /* Reset height */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transform: translateY(0);
  margin: 0 auto; /* Center horizontally */
}
.waitlist-btn:hover { 
  background: linear-gradient(180deg, #ffffff, #f4f4f1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.waitlist-inline[hidden] { display: block !important; }
.waitlist-inline { 
  position: relative;
  width: min(400px, 92vw);
  display: grid; 
  justify-items: center; 
  overflow: visible; /* allow children to render outside without affecting layout */
  height: 0; /* keep container from expanding */
  opacity: 1; 
  pointer-events: none; /* disabled until open */
  margin: 0 auto; 
}
.waitlist-inline.open { 
  pointer-events: auto;
}

/* Animate child form without changing parent height */
.waitlist-inline-form {
  transform-origin: top center;
  transform: scaleY(0);
  opacity: 0;
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1), opacity 300ms ease;
}
.waitlist-inline.open .waitlist-inline-form {
  transform: scaleY(1);
  opacity: 1;
}
.waitlist-inline-form { 
  display: grid; 
  grid-auto-flow: row; 
  gap: 12px; 
  padding: 20px 20px 0 20px; /* Remove bottom padding */
  background: #1A1A1A; /* match query box */
  border: 1px solid #323232; /* match query box border */
  border-radius: 12px; 
  width: min(400px, 92vw); /* Same width as button */
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.waitlist-inline-form input { 
  padding: 12px 16px; 
  border-radius: 8px; 
  border: 1px solid #323232; 
  background: #141414; /* slightly darker than form for contrast */
  color: var(--text); 
  width: 100%; 
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field-error {
  color: #ff6b6b;
  font-size: 12px;
  height: 0; /* occupy no layout height */
  overflow: visible; /* allow text to render */
  padding: 0 2px; /* keep horizontal padding */
  margin: 0; /* no extra spacing */
  transform: translateY(-6px); /* sit inside the existing 12px gap below the input */
  pointer-events: none; /* avoid blocking clicks/focus */
}
.waitlist-inline-form input.error { border-color: rgba(255, 107, 107, 0.8); box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.12); }
.waitlist-btn.loading { position: relative; color: transparent; pointer-events: none; }
.waitlist-btn.loading::after { content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid #555; border-top-color: transparent; animation: spin 0.8s linear infinite; }
.waitlist-inline-form input::placeholder { color: var(--muted); }
.waitlist-inline-form input:focus {
  outline: none;
  border-color: #4a4a4a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.03);
}
.waitlist-inline-form .waitlist-btn { 
  width: calc(100% + 40px); /* Extend beyond form padding */
  margin: 12px -20px 0 -20px; /* Negative margins to align with form edges */
  justify-content: center; 
  border-radius: 0 0 12px 12px; /* Match form's bottom radius */
  border-top: 1px solid #2a2a2a; /* separation matching theme */
  transform: translateY(0);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Success check animation */
.wl-check { animation: pop 320ms ease; }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* Highlight chip for @domain.com in hero */
.domain-chip { 
  display:inline-flex; 
  align-items:center; 
  gap:6px; 
  background: linear-gradient(135deg, rgba(122, 162, 247, 0.15), rgba(157, 122, 247, 0.1)); 
  border: 1px solid rgba(122, 162, 247, 0.4); 
  border-radius: 8px; 
  padding: 6px 10px; 
  color: #7aa2f7; 
  font-size: 12px; 
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(122, 162, 247, 0.15);
  animation: pulse-glow 2s ease-in-out infinite;
}
.domain-chip i { 
  font-size: 12px; 
  color: #7aa2f7; 
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 2px 8px rgba(122, 162, 247, 0.15);
    border-color: rgba(122, 162, 247, 0.4);
  }
  50% { 
    box-shadow: 0 4px 16px rgba(122, 162, 247, 0.25);
    border-color: rgba(122, 162, 247, 0.6);
  }
}

/* Share bar */
.sharebar { 
  display: grid; 
  place-items: center; 
  padding: 0;
  position: fixed;
  bottom: 24px; /* Exactly 24px from bottom of viewport */
  left: 50%;
  transform: translateX(-50%); /* Center horizontally */
}
.icons-row { display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.share-label { color: var(--muted); font-size: 13px; margin-right: 8px; white-space: nowrap; }
.share-btn { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; }
.share-btn img { width:100%; height:100%; display:block; filter: grayscale(100%) brightness(80%); }
/* Ensure share icons show pointer cursor on hover */
.share-btn:hover, .share-btn:hover * { cursor: pointer; }

/* Global: show pointer on hover for interactive buttons */
button:not(:disabled):hover,
.btn:hover,
.button:hover,
[role="button"]:hover,
.waitlist-btn:not(.loading):hover,
.primary-btn:not(.loading):hover,
.secondary-btn:not(.loading):hover,
.modal-close:hover,
.link-btn:hover,
.share-btn:hover { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(15,17,21,0.85) 0%, rgba(15,17,21,0.65) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
}

.header-nav {
  display: flex;
  gap: 8px;
}

.tab-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  border-bottom: 2px solid transparent;
}

.tab-btn:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: transparent;
}
.site-header .brand {
  max-width: none;
  margin: 0;
  padding: 0;
  font-weight: 800;
  letter-spacing: 0.4px;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.index-card {
  padding: 0;
  background: transparent;
  margin: 0;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  width: 100%;
  border-radius: 0;
}

.container.index-mode {
  grid-template-columns: 100%;
  padding: 0;
}

.container.index-mode .sidebar,
.container.goated-mode .sidebar {
  display: none;
}


.index-header {
  padding: 24px 24px 0 24px;
}

.index-header h2 {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  padding: 0;
}

.index-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  padding: 24px;
}

.index-category {
  margin-bottom: 0;
  background: transparent;
  padding: 16px 0;
}

.index-category h3 {
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
  padding: 0 0 8px 0;
  border-bottom: 2px solid var(--accent);
  display: block;
  width: 100%;
}

.index-repo-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.index-repo-item {
  padding: 8px 0;
  background: transparent;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.index-repo-item:hover {
  background: var(--hover);
  padding-left: 8px;
  border-left-color: #ffffff;
}

.index-repo-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  font-size: 14px;
  display: block;
}

.index-repo-link:hover {
  color: var(--primary);
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: none;
}

.container {
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 25% 75%;
  gap: 0;
  height: calc(100vh - var(--header-h, 0px));
}
.container.index-mode { grid-template-columns: 100%; }
.container.goated-mode { grid-template-columns: 100%; }

.sidebar {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border-right: 1px solid var(--border);
  border-radius: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-h, 0px));
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.new-pipeline-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(180deg, #2a3348, #212a3e);
  color: #eef2f8;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}
.new-pipeline-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.new-pipeline-btn i {
  font-size: 12px;
}
.sidebar-head {
  padding: 10px 12px;
  border-bottom: none;
  font-weight: 600;
  color: var(--muted);
}
.pipeline-list { padding: 0; overflow: auto; }
.pipeline-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border: none; border-radius: 0; margin: 0;
  background: transparent; cursor: pointer;
}
.pipeline-item:hover { background: var(--row-hover); }
.pipeline-item .title { color: var(--text); font-size: 13px; }
.pipeline-item .meta { color: var(--muted); font-size: 11px; margin-left: auto; }
.pipeline-badge {
  margin-right: 8px;
  padding: 2px 8px;
  font-size: 11px; font-weight: 700; color: var(--text);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(122,162,247,0.18) 0%, rgba(157,122,247,0.18) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(122,162,247,0.55),
    0 0 10px rgba(122,162,247,0.15);
  backdrop-filter: saturate(120%);
}
/* Running dot */
.pipeline-running { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(90,163,255,0.45); border-right-color: transparent; display: inline-block; margin-right: 8px; align-self: center; animation: spinOnly 1.6s linear infinite; box-sizing: content-box; }
.pipeline-running::before { display: none; }
@keyframes spinOnly { to { transform: rotate(360deg); } }

.composer-card { padding: 0; background: transparent; border: none; box-shadow: none; }
.results-card { padding: 0; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px 6px 6px;
  color: var(--text);
  font-size: 12px;
}
.chip a { color: inherit; }
.chip a:visited { color: inherit; }
.chip a:hover { color: inherit; }
.chip.add { background: #162035; border-style: dashed; cursor: pointer; }
.chip.add:hover { background: #1a2542; }
.chip .remove { cursor: pointer; color: var(--muted); margin-left: 6px; font-weight: 600; }
.chip .remove:hover { color: var(--danger); }

.composer {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 8px 0 4px 0;
}

.query-wrap {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  width: 100%;
  background: #0c0f16;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px 8px 16px; /* slight extra top padding */
}
#query-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  outline: none;
  resize: none;
  min-height: 38px;
}
#query-input::placeholder { color: var(--muted); }
.chips-inline { display: inline-flex; flex-wrap: wrap; gap: 6px; }

.query-actions { display: flex; justify-content: space-between; align-items: center; padding: 0 0 6px 0; margin-top: 8px; }
.actions-left { display: inline-flex; gap: 8px; }
.actions-right { display: inline-flex; gap:8px; }
.query-actions .icon-btn { width: 27px; height: 27px; }

.connect-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #1b2436;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  padding: 0;
}
.connect-icon { width: 16px; height: 16px; display: block; border-radius: 3px; }
.connect-btn.loading .connect-icon { visibility: hidden; }
.connect-btn.loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid #9aa3b2;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
}
@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.icon-btn {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #d0d0d0; /* light gray center */
  border: 2px solid #2a2d33; /* thin dark inner ring */
  box-shadow:
    0 0 0 2px #a6a6a6, /* mid gray ring */
    0 0 0 4px #2a2d33; /* outer dark ring */
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0); }
.icon-btn.danger {
  background: #d0d0d0;
  border: 2px solid #2a2d33;
  box-shadow:
    0 0 0 2px #a6a6a6,
    0 0 0 4px #2a2d33;
}
.icon-img { width: 12px; height: 12px; display: block; }
.icon-btn i { color: #565656; font-size: 12px; }
.icon-btn svg { width: 12px; height: 12px; color:#565656; display:block; }

/* Make the photo icon appear without any visible container */
#home-photo-btn {
  background: transparent;
  border: none;
  box-shadow: none;
  width: auto;
  height: auto;
  padding: 0;
  border-radius: 0;
}
#home-photo-btn:hover,
#home-photo-btn:active {
  transform: none;
  background: transparent;
}

/* Make the photo icon 2x size (24px) */
#home-photo-btn svg { width: 14.4px; height: 14.4px; }

.mention-dropdown {
  position: absolute;
  left: var(--mention-left, 8px);
  top: var(--mention-top, 100%);
  right: auto;
  bottom: auto;
  margin-top: 6px;
  max-height: 220px;
  max-width: 420px;
  overflow: auto;
  background: #0d1220;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  box-shadow: var(--shadow);
  z-index: 50;
}
.mention-item {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}
.mention-item:hover, .mention-item.active { background: var(--row-hover); }
.mention-item .repo { color: var(--accent); font-weight: 500; }
.mention-item .stars { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 12px 10px;
  min-height: 24px;
  justify-content: flex-start;
  text-align: left;
}
.status-row.tight { 
  padding-top: 2px; 
  padding-bottom: 8px; 
  display: flex;
  align-items: center;
  gap: 8px;
}
.stream-text { 
  color: var(--muted); 
  font-size: 13px; 
  font-weight: 500;
  min-height: 16px;
  display: flex;
  align-items: center;
}

.loader { 
  display: inline-flex; 
  gap: 4px; 
  align-items: center;
}
.loader[aria-hidden="true"] { display: none; }
.loader .dot {
  width: 6px; 
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
  animation: bounce 1.2s infinite ease-in-out;
}
.loader .dot:nth-child(2) { animation-delay: 0.2s; }
.loader .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

/* Enhanced status message styling */
.stream-text {
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-1) 100%);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.stream-text:empty {
  display: none;
}

.results-card { padding: 0; }
.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 10px 8px;
}
.table-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.table-meta { color: var(--muted); font-size: 12px; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 60vh;
  position: relative;
}

.results-actions {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0 12px 0;
}
.repos-used { margin: 8px 0 0 0; padding: 8px; border-radius: 8px; background: #0d1220; border: 1px solid var(--border); }
.repos-used .title { display: inline-block; margin-right: 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.repos-used .gh-chip { display: inline-block; margin: 4px 6px 0 0; padding: 4px 8px; border-radius: 999px; background: #121a2a; border: 1px solid var(--border); color: var(--text); font-size: 12px; }
.results-actions .spacer { flex: 1 1 auto; }
.results-actions .actions { display: inline-flex; gap: 8px; }
.primary-btn {
  background: linear-gradient(180deg, #7aa2f7, #6c8fe6);
  color: white;
  border: 1px solid rgba(122, 162, 247, 0.3);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(122, 162, 247, 0.2);
}
.primary-btn:hover { 
  background: linear-gradient(180deg, #8bb4f8, #7da5f0);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(122, 162, 247, 0.3);
}
.secondary-btn { background: #121a2a; color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.secondary-btn:hover { filter: brightness(1.05); }
.primary-btn.loading, .secondary-btn.loading { position: relative; pointer-events: none; opacity: 0.85; }
.primary-btn.loading .btn-label, .secondary-btn.loading .btn-label { visibility: hidden; }
.primary-btn.loading::after, .secondary-btn.loading::after {
  content: '';
  width: 16px; height: 16px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; border: 2px solid #9aa3b2; border-top-color: transparent; animation: spin 0.8s linear infinite;
}
.btn-icon { width: 14px; height: 14px; display: inline-block; border-radius: 3px; }

table { width: 100%; border-collapse: collapse; border-spacing: 0; }
thead th {
  position: sticky;
  top: 0;
  background: #0d1220;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  z-index: 5;
}
.sortable { position: sticky; top: 0; z-index: 6; }
.sortable::before, .sortable::after {
  position: absolute;
  right: 6px;
  font-size: 12px;
  opacity: 0.35;
  color: var(--muted);
  z-index: 7;
}
.sortable::before { content: '▲'; top: 6px; }
.sortable::after { content: '▼'; bottom: 6px; }
.sortable.sorted-asc::before { opacity: 1; color: var(--accent); }
.sortable.sorted-asc::after { opacity: 0.2; }
.sortable.sorted-desc::after { opacity: 1; color: var(--accent); }
.sortable.sorted-desc::before { opacity: 0.2; }
tbody td {
  padding: 12px;
  vertical-align: middle;
}
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:hover { background: var(--row-hover); cursor: pointer; }

.score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #122033;
  color: var(--accent);
  border: 1px solid #22314a;
}
.score .bar {
  width: 70px;
  height: 6px;
  background: #0a1422;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #1d2a3f;
}
.score .fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.top-row { position: relative; background: transparent; }
.top-row::before { content: none; }
.top-row::after { content: none; }

.pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #131b2a;
  border: 1px solid var(--border);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.gh-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gh-chip {
  background: #121a2a;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
}

.composer-card, .results-card { padding: 0; }
.composer-card { margin: 8px 0 6px 0; }
.results-card { margin: 0; }

.right-pane {
  grid-column: 2;
  display: grid;
  grid-template-rows: auto 1fr;
  height: calc(100vh - var(--header-h, 0px));
  overflow: hidden;
  padding: 0 12px; /* minimal side padding for the whole right pane */
}
.container.index-mode .right-pane,
.container.goated-mode .right-pane { 
  grid-column: 1; 
  padding: 0; 
  background: transparent;
}
.container.index-mode .sidebar { display: none; }
.right-pane .results-card { display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; }
.right-pane .table-wrap { overflow: auto; }
.right-pane .status-row { justify-content: flex-start; }

/* Index view */
.index-card { display: grid; grid-template-rows: 1fr; gap: 0; margin-top: 8px; }
.index-head { display: none; }
.index-wrap { position: relative; border: none; border-radius: 0; overflow: hidden; background: transparent; min-height: 380px; height: 60vh; }
#index-svg { width: 100%; height: 100%; display: block; }
.index-tooltip { position: absolute; pointer-events: none; background: #0f1524; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font-size: 12px; box-shadow: var(--shadow); transform: translate(-50%, -120%); }

/* Fullscreen index layout */
.index-card.fullscreen { height: calc(100vh - var(--header-h, 0px)); margin-top: 0; }
.index-card.fullscreen .index-wrap { height: 100%; }

@media (max-width: 780px) {
  thead th:nth-child(5), tbody td:nth-child(5) { display: none; }
}
@media (max-width: 520px) {
  thead th:nth-child(6), tbody td:nth-child(6),
  thead th:nth-child(7), tbody td:nth-child(7) { display: none; }
}

thead th.tag-col { width: 60px; min-width: 60px; max-width: 60px; }
tbody td.tag-col { width: 60px; min-width: 60px; max-width: 60px; }

/* Table column widths to prevent horizontal scrolling */
thead th:nth-child(1), tbody td:nth-child(1) { width: 60px; min-width: 60px; max-width: 60px; } /* tag-col */
thead th:nth-child(2), tbody td:nth-child(2) { width: 200px; min-width: 180px; max-width: 220px; } /* name */
thead th:nth-child(3), tbody td:nth-child(3) { width: 80px; min-width: 70px; max-width: 90px; } /* score */
thead th:nth-child(4), tbody td:nth-child(4) { width: 200px; min-width: 180px; max-width: 220px; } /* rationale */
thead th:nth-child(5), tbody td:nth-child(5) { width: 150px; min-width: 130px; max-width: 170px; } /* primary metadata */
thead th:nth-child(6), tbody td:nth-child(6) { width: 120px; min-width: 100px; max-width: 140px; } /* secondary metadata */
thead th:nth-child(7), tbody td:nth-child(7) { width: 100px; min-width: 80px; max-width: 120px; } /* source */
tbody td.tag-col { 
  white-space: nowrap; 
  text-align: center; 
  padding: 8px 4px;
  overflow: hidden;
}
.row-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px; font-weight: 700; color: var(--text);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(122,162,247,0.18) 0%, rgba(157,122,247,0.18) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(122,162,247,0.55),
    0 0 8px rgba(122,162,247,0.12);
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: grid; place-items: center; z-index: 1000;
}
.modal-overlay[hidden] { display: none !important; }
.modal-dialog {
  width: min(680px, 92vw);
  background: #0f1524;
  border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 16px; color: var(--text); }
.modal-close { background: transparent; border: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.modal-close:hover { color: var(--text); }
.auth-modal #auth-close { position: absolute; top: 10px; right: 12px; font-size: 22px; }
.modal-body { padding: 12px 14px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); }

/* Waitlist modal only: no chrome, consistent padding, reuse inline form */
#waitlist-modal .modal-dialog { width: auto; background: transparent; border: none; border-radius: 0; box-shadow: none; padding: 0; }
#waitlist-modal .modal-header, #waitlist-modal .modal-footer, #waitlist-modal .modal-close { display: none; }
#waitlist-modal .modal-body { padding: 16px; display: flex; align-items: center; justify-content: center; }
#waitlist-modal .waitlist-inline-form { 
  transform: none; opacity: 1; 
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px; background: #1A1A1A; border: 1px solid #323232; border-radius: 12px;
  width: min(420px, 92vw); margin: 0 auto; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
#waitlist-modal .waitlist-inline-form input { width: 100%; margin: 0; }
#waitlist-modal .waitlist-inline-form .waitlist-btn { width: 100%; margin: 12px 0 0 0; border-radius: 8px; }

/* Waitlist modal form uses inline form components without extra margins */
#waitlist-modal .waitlist-inline-form { transform: none; opacity: 1; }
#waitlist-modal .waitlist-inline-form input,
#waitlist-modal .waitlist-inline-form .waitlist-btn { margin: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.step-circle {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: 700; color: #0d1220;
  background: linear-gradient(180deg, #7aa2f7, #4c7be6);
  border: 1px solid rgba(255,255,255,0.18);
}
.step-title { color: var(--text); font-weight: 600; margin-bottom: 2px; }
.step-desc { color: var(--muted); font-size: 13px; }
code { background: #111a2e; padding: 1px 4px; border-radius: 4px; border: 1px solid var(--border); }

.name-cell { display: grid; grid-template-columns: 40px 1fr; gap: 8px; align-items: center; min-height: 44px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #192239; border: 1px solid var(--border); object-fit: cover; display: block; }
.name-block { display: flex; flex-direction: column; }
.name-block .full { color: var(--accent); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; text-decoration: none; }
.name-block .full:hover { text-decoration: underline; }
.name-cell * { border-bottom: 0 !important; }

.meta-list { color: var(--text); font-size: 13px; }
.meta-list .muted { color: var(--muted); }

/* Prevent text overflow in table cells */
tbody td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Allow wrapping for specific columns that need it */
tbody td:nth-child(4), /* rationale column */
tbody td:nth-child(5) { /* primary metadata column */
  white-space: normal;
  word-wrap: break-word;
}
.meta-list ul { margin: 0; padding-left: 18px; }
.meta-list li { margin: 2px 0; }
.meta-list { max-height: none; overflow: visible; }
.meta-list ul { margin: 0; padding-left: 18px; }
.meta-list li { margin: 3px 0; }
.link-btn { color: var(--accent); text-decoration: underline; cursor: pointer; }
.muted { color: var(--muted); }


/* Person Drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.0); /* animated to 0.55 */
  display: block;
  pointer-events: none; /* enabled when open */
  z-index: 1200;
  transition: background 220ms ease;
}
.drawer-overlay[hidden] { display: none !important; }
.drawer-overlay.open { background: rgba(0,0,0,0.55); pointer-events: auto; }

.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100vh;
  width: min(560px, 92vw);
  background: #0f1524;
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 260ms ease;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto auto;
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
}
.drawer-overlay.open .drawer-panel { transform: translateX(0); }

.drawer-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}
.drawer-close:hover { color: var(--text); }

.person-header {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.person-avatar { width: 64px; height: 64px; border-radius: 10px; border: 1px solid var(--border); object-fit: cover; background: #1b2336; }
.person-name { margin: 0 0 6px 0; font-size: 18px; }
.person-socials, .person-contact { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.person-contact a, .person-socials a { color: var(--accent); text-decoration: none; }
.person-contact a:hover, .person-socials a:hover { text-decoration: underline; }

.person-section { background: #0d1220; border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.section-title { margin: 0 0 8px 0; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0.2px; }
.person-about { margin: 0; color: var(--text); font-size: 14px; line-height: 1.5; }

.person-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 720px) { .person-grid { grid-template-columns: 1fr; } }

.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list .pill { background: #121a2a; border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; font-size: 12px; }

.list { margin: 0; padding-left: 18px; }
.list li { margin: 4px 0; }

.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.link-list a { color: var(--accent); text-decoration: none; }
.link-list a:hover { text-decoration: underline; }

/* Repository Modal Styles */
.repo-modal-dialog {
  width: min(800px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
}

.repo-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.repo-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.repo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.repo-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.repo-link i {
  font-size: 20px;
}

.repo-stars {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  background: var(--chip);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.repo-stars i {
  color: #ffd700;
}

.repo-stars::before {
  content: "⭐";
  font-size: 16px;
  margin-right: 2px;
}

.contributors-section {
  margin-top: 20px;
}

.contributors-section .section-title {
  margin: 0 0 16px 0;
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
}

.contributors-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.contributor-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contributor-row:hover {
  background: var(--row-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.contributor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--chip);
}

.contributor-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contributor-name {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.contributor-username {
  color: var(--muted);
  font-size: 12px;
}

.contributor-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.contributor-prs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--chip);
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.loading-contributors {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 20px;
}

/* Goated List Styles */
.goated-card {
  padding: 0;
  background: transparent;
  margin: 0;
  width: 100%;
  border-radius: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  height: calc(100vh - var(--header-h, 0px));
  overflow: hidden;
}

.goated-table-wrap {
  height: 100%;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.goated-footer {
  padding: 12px 16px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.goated-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--row-hover);
  border-color: var(--accent);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#goated-page-info {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

/* Top Performer Styling */
.top-10 {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 165, 0, 0.05) 100%);
  border-left: 4px solid #ffd700;
}

.top-50 {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.08) 0%, rgba(169, 169, 169, 0.05) 100%);
  border-left: 4px solid #c0c0c0;
}

.top-100 {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.08) 0%, rgba(184, 115, 51, 0.05) 100%);
  border-left: 4px solid #cd7f32;
}

.top-500 {
  background: linear-gradient(135deg, rgba(122, 162, 247, 0.05) 0%, rgba(157, 122, 247, 0.03) 100%);
  border-left: 4px solid var(--accent);
}

/* Rank Badges */
.rank-badge {
  display: inline-block;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  text-align: center;
  min-width: 20px;
  max-width: 50px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-10-badge {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #000;
  border: 1px solid #ffed4e;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.top-50-badge {
  background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
  color: #000;
  border: 1px solid #e8e8e8;
  box-shadow: 0 0 6px rgba(192, 192, 192, 0.3);
}

.top-100-badge {
  background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
  color: #fff;
  border: 1px solid #daa520;
  box-shadow: 0 0 6px rgba(205, 127, 50, 0.3);
}

/* Special Score Styling */
.top-10-score {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #000;
  border: 1px solid #ffed4e;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
  font-weight: 700;
}

.top-50-score {
  background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
  color: #000;
  border: 1px solid #e8e8e8;
  box-shadow: 0 0 6px rgba(192, 192, 192, 0.3);
  font-weight: 600;
}

.top-100-score {
  background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
  color: #fff;
  border: 1px solid #daa520;
  box-shadow: 0 0 6px rgba(205, 127, 50, 0.3);
  font-weight: 600;
}

/* Hover effects for top performers */
.top-10:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.1) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.top-50:hover {
  background: linear-gradient(135deg, rgba(192, 192, 192, 0.15) 0%, rgba(169, 169, 169, 0.1) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(192, 192, 192, 0.2);
}

.top-100:hover {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.15) 0%, rgba(184, 115, 51, 0.1) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(205, 127, 50, 0.2);
}

.top-500:hover {
  background: linear-gradient(135deg, rgba(122, 162, 247, 0.1) 0%, rgba(157, 122, 247, 0.08) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(122, 162, 247, 0.2);
}

/* Loading indicator for lazy loading */
.loading-row {
  background: transparent !important;
  border: none !important;
}

.loading-cell {
  text-align: center;
  padding: 20px !important;
  border: none !important;
}

.loading-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.loading-text {
  margin-left: 8px;
}

/* Hide the Goated List tab */
#tab-goated {
  display: none;
}

/* Auth Gate Styles */
.auth-gate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* no blur or tint behind modal */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.auth-modal {
  background: #1A1A1A; /* match query box */
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 400px;
  width: 90%;
  position: relative; /* for close button */
}

.auth-header {
  margin-bottom: 24px;
}

.auth-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  margin-bottom: 16px;
}

.auth-header h2 {
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.auth-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 24px;
  background: white;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
}

.google-login-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.google-login-btn:active {
  background: #f1f3f4;
}

.google-logo {
  width: 18px;
  height: 18px;
}

.auth-error {
  color: var(--danger);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 6px;
}

/* User Info Styles */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

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

.logout-btn {
  padding: 6px 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}


