/* ── Fonts ──────────────────────────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

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

/* ── Theme variables — dark (default) ──────────────────────────────── */
:root {
  --bg: #0a0a0c;
  --bg2: #111116;
  --bg3: #18181f;
  --border: #2a2a35;
  --border-bright: #3d3d50;
  --text: #e8e8f0;
  --text2: #8888a8;
  --text3: #4a4a60;
  --link: #00e5ff;
  --link-hover: #66f0ff;
  --active-bg: rgba(0, 229, 255, 0.08);
  --active-border: rgba(0, 229, 255, 0.4);
  --green: #00e676;
  --yellow: #ffd600;
  --red: #ff1744;
  --nvidia: #76b900;
  --amd: #ed1c24;
  --row-hover: rgba(0, 229, 255, 0.04);
  --row-even: #0e0e14;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --radius: 3px;
}

/* ── Light mode (OS) ────────────────────────────────────────────────── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f9;
    --bg2: #eaecf2;
    --bg3: #dfe1ea;
    --border: #c4c8d8;
    --border-bright: #a0a4b8;
    --text: #0a0a1a;
    --text2: #3a3a5c;
    --text3: #7878a0;
    --link: #0055bb;
    --link-hover: #0033aa;
    --active-bg: rgba(0, 85, 187, 0.08);
    --active-border: rgba(0, 85, 187, 0.5);
    --green: #006e33;
    --yellow: #886600;
    --red: #cc1133;
    --nvidia: #4a7a00;
    --amd: #c01018;
    --row-hover: rgba(0, 85, 187, 0.05);
    --row-even: #eef0f6;
  }
}

/* ── Dark mode (manual) ─────────────────────────────────────────────── */
:root[data-theme="dark"] {
  --bg: #0a0a0c;
  --bg2: #111116;
  --bg3: #18181f;
  --border: #2a2a35;
  --border-bright: #3d3d50;
  --text: #e8e8f0;
  --text2: #8888a8;
  --text3: #4a4a60;
  --link: #00e5ff;
  --link-hover: #66f0ff;
  --active-bg: rgba(0, 229, 255, 0.08);
  --active-border: rgba(0, 229, 255, 0.4);
  --green: #00e676;
  --yellow: #ffd600;
  --red: #ff1744;
  --nvidia: #76b900;
  --amd: #ed1c24;
  --row-hover: rgba(0, 229, 255, 0.04);
  --row-even: #0e0e14;
}

/* ── Light mode (manual) ────────────────────────────────────────────── */
:root[data-theme="light"] {
  --bg: #f4f5f9;
  --bg2: #eaecf2;
  --bg3: #dfe1ea;
  --border: #c4c8d8;
  --border-bright: #a0a4b8;
  --text: #0a0a1a;
  --text2: #3a3a5c;
  --text3: #7878a0;
  --link: #0055bb;
  --link-hover: #0033aa;
  --active-bg: rgba(0, 85, 187, 0.08);
  --active-border: rgba(0, 85, 187, 0.5);
  --green: #006e33;
  --yellow: #886600;
  --red: #cc1133;
  --nvidia: #4a7a00;
  --amd: #c01018;
  --row-hover: rgba(0, 85, 187, 0.05);
  --row-even: #eef0f6;
}

/* ── Scanline overlay (dark only) ───────────────────────────────────── */
:root[data-theme="dark"] body::before,
:root:not([data-theme="light"]) body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  pointer-events: none;
  z-index: 9999;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.06) 2px,
      rgba(0, 0, 0, 0.06) 4px
    );
    pointer-events: none;
    z-index: 9999;
  }
}

/* ── Base ───────────────────────────────────────────────────────────── */
body {
  font-family: var(--font);
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

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

/* ── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text3);
}

/* ── Theme toggle ───────────────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}
.theme-toggle-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text2);
  letter-spacing: 0.06em;
}
.toggle-track {
  position: relative;
  width: 32px;
  height: 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.toggle-track.on {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--link);
}
:root[data-theme="light"] .toggle-track.on {
  background: rgba(0, 85, 187, 0.12);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .toggle-track.on {
    background: rgba(0, 85, 187, 0.12);
  }
}
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  background: var(--text3);
  border-radius: 50%;
  transition:
    transform 0.2s,
    background 0.2s;
}
.toggle-track.on .toggle-thumb {
  transform: translateX(14px);
  background: var(--link);
}

/* ── Layout ─────────────────────────────────────────────────────────── */
#wrap {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────────────── */
#sidebar {
  width: 188px;
  min-width: 188px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 16px 14px;
  font-size: 12px;
}

#sidebar h1 {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

#sidebar h1 a {
  color: var(--link);
  text-decoration: none;
}

#sidebar h1 a:hover {
  color: var(--link-hover);
  text-decoration: none;
}

#sidebar .tagline {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text2);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

#sidebar .theme-toggle {
  margin-bottom: 16px;
}

#sidebar .stats {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text2);
  margin-bottom: 20px;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

.filter-group {
  margin-bottom: 18px;
}

.filter-group h3 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text);
  margin-bottom: 7px;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 6px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  border-radius: var(--radius);
  transition: all 0.1s;
  border: 1px solid transparent;
}

.filter-group label:hover {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border);
}

.filter-group input[type="checkbox"],
.filter-group input[type="radio"] {
  width: 12px;
  height: 12px;
  cursor: pointer;
  accent-color: var(--link);
}

.sidebar-links {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sidebar-links a,
.sidebar-links span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text2);
  letter-spacing: 0.04em;
  transition: color 0.1s;
}
.sidebar-links a:hover {
  color: var(--link);
  text-decoration: none;
}

/* ── Main ───────────────────────────────────────────────────────────── */
#main {
  flex: 1;
  overflow-x: auto;
  padding: 14px 18px;
}

/* ── Sort bar ───────────────────────────────────────────────────────── */
.sortbar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text3);
}

.sortbar span {
  margin-right: 2px;
}

.sortbar a {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  background: var(--bg3);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  transition: all 0.12s;
}

.sortbar a:hover {
  border-color: var(--border-bright);
  color: var(--text);
  text-decoration: none;
}

.sortbar a.active {
  background: var(--active-bg);
  border-color: var(--active-border);
  color: var(--link);
  font-weight: 500;
}

.result-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ── Table ──────────────────────────────────────────────────────────── */
table {
  width: auto;
  border-collapse: collapse;
  font-size: 12px;
}

thead tr {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 9px 12px;
  text-align: left;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  border-right: 1px solid var(--border);
}

th:last-child {
  border-right: none;
}
th.num {
  text-align: right;
}

tbody tr {
  border-bottom: 1px solid rgba(42, 42, 53, 0.6);
  transition: background 0.08s;
}

tbody tr:hover {
  background: var(--row-hover);
}

tbody tr[data-href] {
  cursor: pointer;
}

tbody tr:nth-child(even) {
  background: var(--row-even);
}

tbody tr:nth-child(even):hover {
  background: var(--row-hover);
}

td {
  padding: 7px 12px;
  vertical-align: middle;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}

td:last-child {
  border-right: none;
}

td.num {
  text-align: right;
  font-family: var(--mono);
}

td.model-name,
td.warranty-val {
  font-family: var(--mono);
  font-size: 0.82rem;
  white-space: nowrap;
  color: var(--fg2);
}

/* ── Metric colors ──────────────────────────────────────────────────── */
.best {
  color: var(--green);
  font-weight: 600;
  font-family: var(--mono);
}
.good {
  color: var(--green);
  opacity: 0.75;
  font-family: var(--mono);
}
.ok {
  color: var(--text);
  font-family: var(--mono);
}
.bad {
  color: var(--text2);
  font-family: var(--mono);
}

/* ── Product cell ───────────────────────────────────────────────────── */
.product-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-title {
  color: var(--link);
  font-size: 12px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  display: block;
  transition: color 0.1s;
}

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

/* ── Badges ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid;
}

/* Dark mode badges */
.badge-nvidia {
  background: rgba(118, 185, 0, 0.12);
  border-color: rgba(118, 185, 0, 0.35);
  color: var(--nvidia);
}
.badge-amd {
  background: rgba(237, 28, 36, 0.1);
  border-color: rgba(237, 28, 36, 0.35);
  color: var(--amd);
}
.badge-ai {
  background: rgba(0, 200, 150, 0.1);
  border-color: rgba(0, 200, 150, 0.35);
  color: #00c896;
}
.badge-dc {
  background: rgba(124, 77, 255, 0.1);
  border-color: rgba(124, 77, 255, 0.3);
  color: #9b77ff;
}
.badge-ws {
  background: rgba(255, 214, 0, 0.08);
  border-color: rgba(255, 214, 0, 0.3);
  color: var(--yellow);
}
.badge-intel {
  background: rgba(0, 113, 197, 0.12);
  border-color: rgba(0, 113, 197, 0.4);
  color: #ffffff;
}
.badge-cs {
  background: var(--bg3);
  border-color: var(--border);
  color: var(--text2);
}
.badge-used {
  background: rgba(255, 107, 53, 0.08);
  border-color: rgba(255, 107, 53, 0.3);
  color: #ff7a44;
}
.badge-new {
  background: rgba(0, 191, 165, 0.1);
  border-color: rgba(0, 191, 165, 0.35);
  color: #00bfa5;
}

:root[data-theme="light"] .badge-new {
  background: rgba(0, 121, 107, 0.08);
  border-color: rgba(0, 121, 107, 0.3);
  color: #00796b;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .badge-new {
    background: rgba(0, 121, 107, 0.08);
    border-color: rgba(0, 121, 107, 0.3);
    color: #00796b;
  }
}

/* Light mode badge overrides */
:root[data-theme="light"] .badge-ai {
  color: #007a5c;
  background: rgba(0, 122, 92, 0.07);
  border-color: rgba(0, 122, 92, 0.25);
}
:root[data-theme="light"] .badge-dc {
  color: #5522cc;
  background: rgba(85, 34, 204, 0.07);
  border-color: rgba(85, 34, 204, 0.25);
}
:root[data-theme="light"] .badge-ws {
  color: var(--yellow);
  background: rgba(136, 102, 0, 0.07);
  border-color: rgba(136, 102, 0, 0.25);
}
:root[data-theme="light"] .badge-used {
  color: #b84400;
  background: rgba(184, 68, 0, 0.07);
  border-color: rgba(184, 68, 0, 0.25);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .badge-ai {
    color: #007a5c;
    background: rgba(0, 122, 92, 0.07);
    border-color: rgba(0, 122, 92, 0.25);
  }
  :root:not([data-theme="dark"]) .badge-dc {
    color: #5522cc;
    background: rgba(85, 34, 204, 0.07);
    border-color: rgba(85, 34, 204, 0.25);
  }
  :root:not([data-theme="dark"]) .badge-ws {
    color: #886600;
    background: rgba(136, 102, 0, 0.07);
    border-color: rgba(136, 102, 0, 0.25);
  }
  :root:not([data-theme="dark"]) .badge-used {
    color: #b84400;
    background: rgba(184, 68, 0, 0.07);
    border-color: rgba(184, 68, 0, 0.25);
  }
}

/* ── Rating column ───────────────────────────────────────────────────── */
.rating-cell {
  text-align: center;
  white-space: nowrap;
  min-width: 80px;
}

.stars {
  display: inline-flex;
  gap: 1px;
}

.star {
  font-size: 11px;
  line-height: 1;
}
.star.full {
  color: var(--yellow);
}
.star.half {
  color: var(--yellow);
  opacity: 0.55;
}
.star.empty {
  color: var(--border-bright);
}

:root[data-theme="light"] .star.empty {
  color: var(--border-bright);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .star.empty {
    color: var(--border-bright);
  }
}

.rating-num {
  font-family: var(--mono);
  color: var(--text2);
  font-size: 11px;
  margin-left: 2px;
}
.review-count {
  font-family: var(--mono);
  color: var(--text3);
  font-size: 10px;
}

/* ── Prime badge ────────────────────────────────────────────────────── */
.prime-badge {
  display: inline-block;
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--link);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 2px;
}

:root[data-theme="light"] .prime-badge {
  background: rgba(0, 85, 187, 0.08);
  border-color: rgba(0, 85, 187, 0.3);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .prime-badge {
    background: rgba(0, 85, 187, 0.08);
    border-color: rgba(0, 85, 187, 0.3);
  }
}

/* ── Search bar ─────────────────────────────────────────────────────── */
.searchbar {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
}

.searchbar input[type="search"] {
  width: 220px;
  padding: 5px 28px 5px 10px;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  letter-spacing: 0.04em;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.12s;
}

.searchbar input[type="search"]::-webkit-search-cancel-button {
  display: none;
}

.searchbar input[type="search"]:focus {
  border-color: var(--link);
  box-shadow: 0 0 0 2px var(--active-bg);
}

.searchbar input[type="search"]::placeholder {
  color: var(--text3);
  letter-spacing: 0.04em;
}

.search-clear {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: var(--text3);
  padding: 0;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.search-clear:hover {
  color: var(--link);
}

/* ── Sort bar extras ────────────────────────────────────────────────── */
.sortbar-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.08em;
  margin-right: 2px;
  white-space: nowrap;
}

.sortbar-sep {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--border);
  margin: 0 4px;
  vertical-align: middle;
  flex-shrink: 0;
}

.sortbar-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  background: var(--bg3);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.04em;
  line-height: 1.4;
  transition: all 0.12s;
}

.sortbar-btn:hover {
  border-color: var(--border-bright);
  color: var(--text);
}

.sortbar-btn.active {
  background: var(--active-bg);
  border-color: var(--active-border);
  color: var(--link);
  font-weight: 500;
}

/* ── Reset link ─────────────────────────────────────────────────────── */
.reset-link {
  display: block;
  margin-top: 10px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 23, 68, 0.25);
  border-radius: var(--radius);
  color: var(--red);
  background: rgba(255, 23, 68, 0.06);
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: all 0.12s;
}

.reset-link:hover {
  background: rgba(255, 23, 68, 0.12);
  border-color: rgba(255, 23, 68, 0.5);
  color: var(--red);
  text-decoration: none;
}

:root[data-theme="light"] .reset-link {
  border-color: rgba(204, 17, 51, 0.25);
  color: var(--red);
  background: rgba(204, 17, 51, 0.05);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .reset-link {
    border-color: rgba(204, 17, 51, 0.25);
    color: var(--red);
    background: rgba(204, 17, 51, 0.05);
  }
}

/* ── Column toggle ──────────────────────────────────────────────────── */
.col-toggle-wrap {
  position: relative;
  display: inline-block;
}

.col-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 4px;
  z-index: 100;
  min-width: 130px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.col-dropdown label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2);
  cursor: pointer;
  border-radius: 2px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  transition: all 0.1s;
}

.col-dropdown label:hover {
  background: var(--bg3);
  color: var(--text);
}

.col-dropdown input[type="checkbox"] {
  accent-color: var(--link);
  width: 12px;
  height: 12px;
  cursor: pointer;
}

/* ── Best value row ─────────────────────────────────────────────────── */
tr.best-value-row {
  border-left: 2px solid var(--link);
  background: var(--active-bg) !important;
}

tr.best-value-row td:first-child {
  padding-left: 10px;
}

/* ── Filter dot ─────────────────────────────────────────────────────── */
.filter-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--link);
  margin-left: 4px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  box-shadow: 0 0 4px var(--link);
}

/* ── Report button ──────────────────────────────────────────────────── */
.report-btn {
  display: inline-block;
  margin-left: 6px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text3);
  opacity: 0;
  transition:
    opacity 0.15s,
    color 0.15s;
  vertical-align: middle;
  line-height: 1;
}
tr:hover .report-btn {
  opacity: 1;
}
.report-btn:hover {
  color: var(--red);
}
.report-btn.report-btn-done {
  color: var(--text3);
  opacity: 0.4;
  cursor: default;
}

/* ── Report popover ─────────────────────────────────────────────────── */
.report-popover {
  position: absolute;
  z-index: 1000;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 210px;
}
.report-pop-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.report-popover label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
}
.report-submit-btn {
  margin-top: 4px;
  padding: 5px 12px;
  background: rgba(255, 23, 68, 0.12);
  color: var(--red);
  border: 1px solid rgba(255, 23, 68, 0.3);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  align-self: flex-start;
  transition: all 0.12s;
}
.report-submit-btn:hover {
  background: rgba(255, 23, 68, 0.22);
}
.report-submit-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── Toast ──────────────────────────────────────────────────────────── */
.report-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  background: rgba(0, 230, 118, 0.15);
  color: var(--green);
  border: 1px solid rgba(0, 230, 118, 0.35);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.25s,
    transform 0.25s;
  pointer-events: none;
}
.report-toast.report-toast-error {
  background: rgba(255, 23, 68, 0.15);
  color: var(--red);
  border-color: rgba(255, 23, 68, 0.35);
}
.report-toast.report-toast-show {
  opacity: 1;
  transform: translateY(0);
}

/* ── Empty state ────────────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 60px 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
  letter-spacing: 0.06em;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
#footer {
  margin-top: 20px;
  padding: 12px 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  letter-spacing: 0.05em;
}

#footer a {
  color: var(--text3);
}
#footer a:hover {
  color: var(--link);
  text-decoration: none;
}

/* ── Mobile filter toggle button ────────────────────────────────────── */
#filter-toggle {
  display: none;
}

/* ── Sidebar overlay backdrop ───────────────────────────────────────── */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 498;
  backdrop-filter: blur(2px);
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  /* Sidebar becomes a slide-in drawer */
  #sidebar {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 240px;
    z-index: 500;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    overflow-y: auto;
    box-shadow: 6px 0 32px rgba(0, 0, 0, 0.6);
  }

  #sidebar.sidebar-open {
    transform: translateX(0);
  }

  #sidebar-overlay.sidebar-open {
    display: block;
  }

  /* Filter toggle button — fixed bottom-right on mobile */
  #filter-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    position: fixed;
    bottom: 20px;
    right: 16px;
    z-index: 499;
    padding: 9px 16px;
    background: var(--bg2);
    border: 1px solid var(--active-border);
    border-radius: 3px;
    color: var(--link);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transition: background 0.15s;
  }

  #filter-toggle:hover {
    background: var(--active-bg);
  }

  #filter-toggle .filter-toggle-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--link);
    box-shadow: 0 0 6px var(--link);
    flex-shrink: 0;
  }

  /* Close button inside sidebar on mobile */
  #sidebar-close {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 14px 4px;
  }

  #sidebar-close button {
    background: none;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text3);
    font-family: var(--mono);
    font-size: 11px;
    padding: 3px 8px;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: all 0.12s;
  }

  #sidebar-close button:hover {
    border-color: var(--border-bright);
    color: var(--text);
  }
}

/* Hide close button on desktop */
#sidebar-close {
  display: none;
}

/* ── Row fade-in ────────────────────────────────────────────────────── */
@keyframes rowFadeIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
tbody tr {
  animation: rowFadeIn 0.18s ease both;
}

/* ── GPU Upgrade Calculator ──────────────────────────────────────────── */


.current-gpu-card {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--active-bg);
  border: 1px solid var(--active-border);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 14px;
}

.current-gpu-card .gpu-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 3px;
}

.current-gpu-card .gpu-name {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--link);
}

.gpu-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.gpu-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
}

.stat-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* Perf Gain column */
td.perf-gain {
  color: var(--green);
  font-weight: 600;
  font-family: var(--mono);
}

/* Current GPU selector in sidebar */
.upgrade-gpu-input {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.upgrade-gpu-input input[type="text"] {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}

.upgrade-gpu-input input[type="text"]:focus {
  outline: none;
  border-color: var(--link);
  box-shadow: 0 0 0 2px var(--active-bg);
}

.upgrade-gpu-input button[type="submit"] {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 10px;
  background: var(--link);
  color: #000;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  flex-shrink: 0;
}

.upgrade-gpu-input button[type="submit"]:hover {
  background: var(--link-hover);
}

.upgrade-not-found {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--red);
  margin-top: 4px;
}

/* Light-mode overrides for upgrade card */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .upgrade-gpu-input button[type="submit"] { color: #fff; }
}
:root[data-theme="light"] .upgrade-gpu-input button[type="submit"] { color: #fff; }

.upgrade-methodology {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text3);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.upgrade-methodology strong {
  color: var(--text2);
}

.badge-beta {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  padding: 1px 4px;
  vertical-align: middle;
  opacity: 0.85;
}

/* Fix: .sidebar-links a has higher specificity (0,1,1) than .badge-beta (0,1,0) */
.sidebar-links .badge-beta {
  color: var(--yellow);
  border-color: var(--yellow);
}

/* GPU search bar in main content */
.upgrade-gpu-form {
  margin-bottom: 18px;
}

.upgrade-gpu-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  margin-bottom: 6px;
}

/* Fused search-bar: icon | input | button */
.upgrade-gpu-search-bar {
  display: flex;
  align-items: center;
  max-width: 520px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.upgrade-gpu-search-bar:focus-within {
  border-color: var(--link);
  box-shadow: 0 0 0 2px var(--active-bg);
}

.upgrade-gpu-search-icon {
  padding: 0 4px 0 10px;
  font-size: 17px;
  color: var(--text3);
  flex-shrink: 0;
  pointer-events: none;
  line-height: 1;
}

.upgrade-gpu-search-bar input[type="text"] {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 9px 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  outline: none;
}

.upgrade-gpu-search-bar input[type="text"]::placeholder {
  color: var(--text3);
}

.upgrade-gpu-search-bar button[type="submit"] {
  flex-shrink: 0;
  border: none;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: var(--link);
  color: #000;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}

.upgrade-gpu-search-bar button[type="submit"]:hover {
  background: var(--link-hover);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .upgrade-gpu-search-bar button[type="submit"] { color: #fff; }
}
:root[data-theme="light"] .upgrade-gpu-search-bar button[type="submit"] { color: #fff; }

/* Inline hint / not-found messages */
.upgrade-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  margin-top: 8px;
}

.upgrade-hint-warn {
  color: var(--yellow);
}
