/* steam.bargains — dark, uncluttered, a little late-2000s. */

:root {
  --bg: #1b2026;
  --bg2: #232a32;
  --panel: #2a323b;
  --panel2: #313b45;
  --ink: #c7d0d8;
  --ink-dim: #8a95a0;
  --line: #3a4550;
  --accent: #6aa5d9;     /* dusk blue */
  --accent2: #8fc04e;    /* neon green (also the "good"/positive color) */
  --bad: #d9694a;
  --danger: #e2433a;
  --ink-bright: #eef3f7; /* headings + bright text (folded two near-whites) */
  --shadow: 0 1px 0 #3f4a55, 0 2px 6px rgba(0,0,0,.4);
  --grad-blue: linear-gradient(var(--accent), #4f86bb); /* primary blue button */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 "Segoe UI", Tahoma, Verdana, Arial, sans-serif;
}

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

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px;
  background: linear-gradient(#2c353f, #222a31);
  border-bottom: 1px solid #11161b;
  box-shadow: var(--shadow);
}
.brand { font-size: 20px; font-weight: 700; color: var(--ink-bright); letter-spacing: .5px; }
.brand span { color: var(--accent2); }
.nav { display: flex; align-items: center; gap: 14px; }
.nav .inline { margin: 0; display: inline; }
.linkbtn {
  background: none; border: 0; color: var(--accent);
  cursor: pointer; font: inherit; padding: 0;
}
.linkbtn:hover { text-decoration: underline; }
.me { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-bright); text-decoration: none; }
.me:hover { color: #fff; text-decoration: underline; }
.me img { width: 24px; height: 24px; border-radius: 2px; vertical-align: middle; }
.login {
  background: var(--grad-blue); color: #fff;
  padding: 6px 12px; border-radius: 3px; font-weight: 600;
}
.login:hover { text-decoration: none; filter: brightness(1.08); }

/* ---- account: name links to /me, caret button opens the dropdown ---- */
.acct { display: inline-flex; align-items: center; gap: 4px; }
.menu { position: relative; }
.menu > summary {
  list-style: none; cursor: pointer; user-select: none;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 3px; color: var(--ink-dim);
}
.menu-toggle:hover,
.menu[open] > .menu-toggle { background: var(--panel2); color: var(--ink); }
.menu-toggle .caret { font-size: 10px; display: inline-block; transition: transform .12s; }
.menu[open] > .menu-toggle .caret { transform: rotate(180deg); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  min-width: 180px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 4px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.menu-item {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; color: var(--ink);
  font: inherit; cursor: pointer; text-decoration: none;
  padding: 8px 10px; border-radius: 3px;
}
.menu-item:hover { background: var(--panel2); color: #fff; text-decoration: none; }
.menu-sep { border: 0; border-top: 1px solid var(--line); margin: 6px 2px; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: #3a2422; color: #ff8278; }

/* ---- account-deletion confirm ---- */
.confirm-delete {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.confirm-check {
  display: flex; gap: 9px; align-items: flex-start;
  color: var(--ink-bright); line-height: 1.4; cursor: pointer;
}
.confirm-check input { margin-top: 3px; }
.confirm-actions {
  margin-top: 14px; display: flex; align-items: center; gap: 16px;
}
.btn-danger {
  background: linear-gradient(#d8453c, #b5332b); color: #fff; border: 0;
  padding: 8px 16px; border-radius: 3px; font: inherit; font-weight: 600;
  cursor: pointer;
}
.btn-danger:hover { filter: brightness(1.08); }
.confirm-actions .cancel { color: var(--ink-dim); }

/* ---- text pages (about, notices) ---- */
.prose { max-width: 680px; }
.prose h1 { margin-top: 0; }
.prose h2 {
  margin-top: 28px; padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.prose h3 { margin: 22px 0 6px; font-size: 16px; }
/* Privacy table: late-2000s ledger look — gradient header, zebra rows, rounded panel. */
.prose table {
  width: 100%; margin: 14px 0;
  border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--line); border-radius: 4px;
  box-shadow: var(--shadow); overflow: hidden;
}
.prose th, .prose td {
  text-align: left; vertical-align: top;
  padding: 9px 12px; border-bottom: 1px solid var(--line);
}
.prose tr:last-child td { border-bottom: 0; }
.prose th {
  background: linear-gradient(var(--panel2), var(--panel));
  color: var(--ink); font-size: 12px;
  text-transform: uppercase; letter-spacing: .5px;
}
.prose tr:nth-child(even) td { background: var(--bg2); }

/* ---- layout ---- */
.wrap { max-width: 920px; margin: 18px auto; padding: 0 16px; }
.foot {
  text-align: center; color: var(--ink-dim);
  padding: 24px 16px 40px; font-size: 12px;
}

.flash {
  max-width: 920px; margin: 12px auto 0; padding: 10px 14px;
  border-radius: 3px; border: 1px solid var(--line);
}
.flash-ok { background: #243426; border-color: #3e5a3f; color: #cfe6c4; }
.flash-warn { background: #3a3326; border-color: #6a5a3a; color: #e8d9b6; }

/* ---- onboarding nudge ---- */
.nudge {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 4px; box-shadow: var(--shadow);
  padding: 16px 18px; margin-bottom: 16px;
}
.nudge p { margin: 0; color: var(--ink-bright); line-height: 1.5; }
.nudge form { margin: 12px 0 0; }
.nudge button {
  background: var(--grad-blue); color: #fff; border: 0;
  padding: 8px 16px; border-radius: 3px; font: inherit; font-weight: 600;
  cursor: pointer;
}
.nudge button:hover { filter: brightness(1.08); }

/* ---- carousel ---- */
.carousel {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 4px; box-shadow: var(--shadow); overflow: hidden;
}
.carousel-head {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(#313b45, #29323b);
  border-bottom: 1px solid var(--line); padding: 10px 14px;
}
.carousel-title { margin: 0; font-size: 18px; color: var(--ink-bright); }
.carousel-nav {
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 3px; width: 34px; height: 30px; cursor: pointer; font-size: 13px;
}
.carousel-nav:hover { background: var(--panel2); }
.carousel-track { position: relative; }
.panel { display: none; padding: 8px 10px 4px; }
.panel.active { display: block; }
.empty { color: var(--ink-dim); padding: 24px; text-align: center; }

/* Chart + suggested-votes lists share the same row component; the identical
   bits (thumbnail, name, zebra) are grouped, only the row containers differ. */
.chart { list-style: none; margin: 0; padding: 0; }
.chart-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "game deal" "sub sub";
  gap: 2px 12px; align-items: center;
  padding: 8px 6px; border-bottom: 1px solid var(--line);
}
.chart-row:nth-child(odd),
.suggest-row:nth-child(odd) { background: rgba(255,255,255,.015); }
.chart-game { grid-area: game; display: flex; align-items: center; gap: 10px; min-width: 0; }
.chart-game img,
.suggest-game img { width: 92px; height: 43px; object-fit: cover; border-radius: 2px; flex: none; }
.chart-name,
.suggest-name { color: var(--ink-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-deal { grid-area: deal; font-weight: 700; font-size: 16px; text-align: right; }
.chart-sub { grid-area: sub; color: var(--ink-dim); font-size: 12px; }
.good { color: var(--accent2); }
.bad { color: var(--bad); }
.even { color: var(--ink); }

/* ---- suggested votes ---- */
.suggest {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 4px; box-shadow: var(--shadow);
  margin-top: 16px; padding: 12px 14px 6px;
}
.suggest-title { margin: 0; font-size: 16px; color: var(--ink-bright); }
.suggest-sub { margin: 4px 0 8px; color: var(--ink-dim); font-size: 13px; }
.suggest-list { list-style: none; margin: 0; padding: 0; }
.suggest-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 2px 12px; align-items: center;
  padding: 8px 4px; border-bottom: 1px solid var(--line);
}
.suggest-row:last-child { border-bottom: 0; }
.suggest-game { display: flex; align-items: center; gap: 10px; min-width: 0; }
.suggest-meta { color: var(--ink-dim); font-size: 12px; text-align: right; white-space: nowrap; }

.carousel-dots { display: flex; gap: 8px; justify-content: center; padding: 12px; }
.dot {
  width: 10px; height: 10px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--line); padding: 0;
}
.dot.active { background: var(--accent); }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 0 2px; }
.pager-btn { color: var(--accent); padding: 4px 10px; border-radius: 4px; }
.pager-btn:hover { text-decoration: underline; }
.pager-btn.disabled { color: var(--ink-dim); pointer-events: none; }
.pager-info { color: var(--ink-dim); font-size: 13px; }

/* ---- game page ---- */
.game-hero { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.game-img { width: 280px; max-width: 45%; border-radius: 4px; box-shadow: var(--shadow); }
.game-meta h1 { margin: 0 0 6px; color: var(--ink-bright); }
.game-meta h1 a { color: inherit; text-decoration: none; }
.game-meta h1 a:hover { text-decoration: underline; }
.notlive { color: var(--ink-dim); font-style: italic; }
.freeplay { color: var(--accent2); font-weight: 600; }

.stats {
  display: flex; flex-wrap: wrap; gap: 10px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 4px; padding: 14px; margin-bottom: 12px;
}
.stats.locked { color: var(--ink-dim); }
.stat { flex: 1 1 160px; }
.stat-label { display: block; color: var(--ink-dim); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.stat-val { font-size: 20px; font-weight: 700; color: var(--ink-bright); }
.stat-val.danger { color: var(--danger); }
.stat-val .ast { color: var(--danger); font-weight: 700; }
.verdict-good { color: var(--accent2); }
.verdict-bad { color: var(--bad); }
.verdict-just-right { color: var(--accent); }

.malware-notice {
  background: #3a1f1d; border: 1px solid var(--danger); color: #f2b8b2;
  padding: 10px 14px; border-radius: 4px; font-weight: 600; margin: 0 0 14px;
}

/* ---- quality tiles (loot-rarity visual language) ---- */
.qtiles {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px;
}
.qtile {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 4px; padding: 10px 8px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.qtile-name {
  text-transform: capitalize; color: var(--ink-dim);
  font-size: 12px; letter-spacing: .3px;
}
.qtile-num { line-height: 1; font-variant-numeric: tabular-nums; }

/* Each tier a little brighter + bigger than the last, so quality scans at a
   glance: dull/small = bad, bright/big = great. Borders tint to match. */
.quality-broken    { border-color: #5a2723; }
.quality-broken    .qtile-num { color: #9b3b34; font-size: 18px; font-weight: 500; }
.quality-jank      .qtile-num { color: #9aa0a6; font-size: 19px; font-weight: 500; }
.quality-common    .qtile-num { color: var(--ink-bright); font-size: 20px; font-weight: 600; }
.quality-uncommon  { border-color: rgba(92,193,92,.45); }
.quality-uncommon  .qtile-num { color: #5cc15c; font-size: 22px; font-weight: 600; }
.quality-rare      { border-color: rgba(79,155,232,.5); }
.quality-rare      .qtile-num { color: #4f9be8; font-size: 24px; font-weight: 700; }
.quality-epic      { border-color: rgba(177,92,240,.5); }
.quality-epic      .qtile-num { color: #b15cf0; font-size: 26px; font-weight: 700; }
.quality-legendary { border-color: rgba(240,144,42,.55); }
.quality-legendary .qtile-num { color: #f0902a; font-size: 28px; font-weight: 800; }
.quality-mythic    { border-color: rgba(245,212,66,.55); }
.quality-mythic    .qtile-num { color: #f5d442; font-size: 30px; font-weight: 800; text-shadow: 0 0 8px rgba(245,212,66,.35); }
.quality-ultra     { border-color: rgba(255,91,224,.6); }
.quality-ultra     .qtile-num { color: #ff5be0; font-size: 32px; font-weight: 900; text-shadow: 0 0 10px rgba(255,91,224,.5); }

/* ---- rating form ---- */
.rate-cta {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 4px; padding: 14px;
}
.rate {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 4px; padding: 16px;
}
.field > span.metric-title { font-weight: bold; font-size: 15px; }
.field > span.metric-explanation { font-size: 13px; font-style: italic; text-transform: none; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field > span { color: var(--ink-dim); text-transform: capitalize; font-size: 13px; }
.field select {
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  border-radius: 3px; padding: 7px 8px; font: inherit;
}
.submit {
  background: linear-gradient(var(--accent2), #6f9a3a); color: #16210a;
  border: 0; border-radius: 3px; padding: 9px 16px; font-weight: 700;
  cursor: pointer; margin-top: 4px;
}
.submit:hover { filter: brightness(1.06); }

/* ---- vote reveal: read-only current vote + collapsed rating form ---- */
.myvote {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 4px; padding: 14px; margin-bottom: 12px;
}
.myvote h2 { margin: 0 0 10px; font-size: 18px; color: var(--ink-bright); }
.myvote-list { list-style: none; margin: 0; padding: 0; }
.myvote-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 5px 0; border-top: 1px solid var(--line);
}
.myvote-list li:first-child { border-top: 0; }
.myvote-label { color: var(--ink-dim); text-transform: capitalize; }
.myvote-pick { color: var(--ink); font-weight: 700; text-align: right; }

.rate-reveal summary { list-style: none; }
.rate-reveal summary::-webkit-details-marker { display: none; }
.rate-toggle {
  display: inline-block; cursor: pointer;
  background: linear-gradient(var(--panel2), var(--panel)); color: var(--ink);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 9px 18px; font-weight: 700; box-shadow: var(--shadow);
}
.rate-toggle:hover { filter: brightness(1.1); color: #fff; }
.rate-reveal[open] .rate-toggle { margin-bottom: 12px; }

.errorbox {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 4px; padding: 24px; text-align: center;
}

@media (max-width: 560px) {
  .game-hero { flex-direction: column; }
  .game-img { width: 100%; max-width: 100%; }
  .chart-game img { width: 64px; height: 30px; }
}
