:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0c1014;
  color: #f5f7f9;

  --bg: #0c1014;
  --bg-raised: #14191f;
  --bg-card: #161c23;
  --bg-input: #131920;
  --border: #262f38;
  --border-strong: #33404c;
  --text: #f5f7f9;
  --text-dim: #a4b0bb;
  --text-muted: #7c8893;
  --accent: #36c27f;
  --accent-hover: #45d690;
  --accent-soft: rgba(54, 194, 127, 0.16);
  --accent-strong: #1f9d67;
  --danger: #ff7474;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lift: 0 14px 36px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.download-cta {
  border: 1px solid var(--border-strong);
  background: #1b232b;
  color: var(--text);
  min-height: 38px;
  border-radius: 7px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

button:hover,
.download-cta:hover {
  border-color: #5b7386;
  background: #24303a;
}

input,
select,
textarea {
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text);
  min-height: 40px;
  border-radius: 7px;
  padding: 0 12px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
  border-radius: 8px;
  min-height: 42px;
  padding: 0 18px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.btn-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #062019;
  box-shadow: 0 6px 18px rgba(54, 194, 127, 0.22);
}

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

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #5b7386;
}

.btn-secondary-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  min-height: 38px;
  padding: 0 12px;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.link-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 4px 0;
  min-height: 0;
  cursor: pointer;
  font-size: 13px;
}

.link-btn:hover {
  color: var(--accent);
  background: transparent;
  border-color: transparent;
}

.hidden {
  display: none !important;
}

.accent {
  color: var(--accent);
}

textarea {
  min-height: 120px;
  padding: 10px 12px;
  resize: vertical;
}

.shell {
  min-height: 100vh;
}

.topbar {
  min-height: 64px;
  border-bottom: 1px solid var(--border);
  background: rgba(20, 25, 31, 0.92);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  min-width: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.brand {
  text-decoration: none;
  color: inherit;
}

.brand strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.brand-tld {
  color: var(--accent);
  font-weight: 700;
}

nav {
  display: flex;
  gap: 4px;
}

nav button {
  background: transparent;
  border-color: transparent;
  color: #b8c1ca;
}

nav button.nav-utility {
  font-size: 13px;
  min-height: 34px;
  padding: 0 11px;
}

nav button:hover {
  background: #1e2831;
  border-color: transparent;
  color: #ffffff;
}

main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 54px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: stretch;
  gap: 28px;
  margin: 36px 0 32px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  min-width: 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  border: 1px solid var(--border-strong);
  background: rgba(54, 194, 127, 0.08);
  color: var(--accent);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-text h1 {
  margin: 0;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.6px;
  font-weight: 800;
  color: #fbfdff;
}

.hero-sub {
  margin: 0;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-dim);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.hero-banner {
  position: relative;
  min-height: 320px;
  border: 1px solid #2b3a45;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(20, 27, 34, 0.96), rgba(11, 15, 20, 0.86)),
    radial-gradient(circle at 20% 15%, rgba(84, 200, 220, 0.16), transparent 28%);
  overflow: hidden;
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 32px;
}

.stats-strip .stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.stats-strip .stat strong {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
}

.stats-strip .stat span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.featured-games {
  margin: 0 0 36px;
}

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

.game-tile-card {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  background: var(--bg-card);
  min-height: 120px;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.game-tile-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lift);
  background: var(--bg-card);
}

.game-tile-card .game-tile-art {
  position: relative;
  width: 100%;
  height: 88px;
  background: linear-gradient(135deg, #2a3744, #161e26);
  background-size: cover;
  background-position: center;
}

.game-tile-card .game-tile-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 12, 16, 0.78), transparent 60%);
}

.game-tile-card .game-tile-meta {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.game-tile-card .game-tile-meta strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-tile-card .game-tile-meta span {
  font-size: 12px;
  color: var(--text-muted);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
}

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

.content-section {
  margin: 0 0 40px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.search-field .search-icon {
  position: absolute;
  left: 12px;
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  padding-left: 36px;
}

.empty-state {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(54, 194, 127, 0.06), rgba(54, 194, 127, 0));
  border-radius: 14px;
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
}

.empty-state h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.empty-state p {
  margin: 0;
  max-width: 540px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
}

.empty-state-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
  justify-content: center;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding: 24px clamp(18px, 4vw, 56px);
  background: var(--bg-raised);
}

.footer-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 32px;
  height: 32px;
}

.footer-brand strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.footer-brand small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.download-app-card {
  min-height: 100%;
  border-color: rgba(54, 194, 127, 0.55);
  background:
    linear-gradient(145deg, rgba(31, 157, 103, 0.28), rgba(24, 31, 38, 0.96)),
    radial-gradient(circle at 50% 20%, rgba(104, 220, 255, 0.22), transparent 42%);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
  text-align: left;
  padding: 22px;
}

.download-app-card:hover {
  border-color: #36c27f;
  background:
    linear-gradient(145deg, rgba(31, 157, 103, 0.36), rgba(28, 38, 46, 0.98)),
    radial-gradient(circle at 50% 20%, rgba(104, 220, 255, 0.28), transparent 42%);
}

.download-app-card img {
  width: 74px;
  height: 74px;
  border-radius: 18px;
}

.download-app-card strong,
.download-app-card small {
  display: block;
}

.download-app-card strong {
  font-size: 24px;
  font-weight: 900;
}

.download-app-card small {
  color: #b8c6d0;
  margin-top: 5px;
}

.hero-tile {
  position: absolute;
  border: 1px solid rgba(142, 232, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(31, 56, 69, 0.8), rgba(14, 18, 24, 0.92)),
    radial-gradient(circle at 30% 20%, rgba(119, 210, 255, 0.55), transparent 35%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  display: grid;
  place-items: end start;
  overflow: hidden;
  padding: 16px;
  background-image:
    linear-gradient(to top, rgba(6, 10, 14, 0.84), rgba(6, 10, 14, 0.08)),
    var(--game-image),
    linear-gradient(145deg, rgba(31, 56, 69, 0.9), rgba(14, 18, 24, 0.95));
  background-size: cover;
  background-position: center;
}

.hero-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 0 28%, rgba(110, 255, 210, 0.18) 28% 34%, transparent 34% 100%),
    linear-gradient(25deg, rgba(255, 116, 76, 0.22), transparent 44%);
}

.hero-tile-name {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(7, 11, 15, 0.45);
  backdrop-filter: blur(6px);
  align-self: end;
  justify-self: start;
}

.hero-tile-cs2 {
  left: 0;
  top: 0;
  width: min(460px, 66%);
  height: 204px;
  --game-image: url("https://cdn.akamai.steamstatic.com/steam/apps/730/header.jpg");
}

.hero-tile-valorant {
  right: 64px;
  top: 14px;
  width: 280px;
  height: 134px;
  background-image:
    linear-gradient(to top, rgba(6, 10, 14, 0.86), rgba(6, 10, 14, 0.12)),
    linear-gradient(135deg, #ff4655 0 24%, #111820 24% 52%, #2a1016 52% 100%);
}

.hero-tile-rust {
  right: 0;
  bottom: 0;
  width: 210px;
  height: 110px;
  --game-image: url("https://cdn.akamai.steamstatic.com/steam/apps/252490/header.jpg");
}

.quick-actions {
  border: 1px solid #28333d;
  background: #141b22;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-actions span {
  color: #9aa8b4;
  font-size: 13px;
}

.view-tabs {
  border: 1px solid #28333d;
  background: #141b22;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 10px;
  display: inline-flex;
  gap: 4px;
}

.view-tabs button {
  min-height: 34px;
  border-color: transparent;
  background: transparent;
  color: #aab6c0;
  font-weight: 600;
}

.view-tabs button:hover {
  background: #1c252e;
  border-color: transparent;
  color: #d6e0e8;
}

.view-tabs button.active {
  background: #25313b;
  border-color: #3a4a57;
  color: #ffffff;
  box-shadow: inset 0 -2px 0 #36c27f;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
  margin-bottom: 8px;
}

.hidden {
  display: none !important;
}

dialog:not([open]) {
  display: none;
}

.support-panel,
.bug-panel {
  border: 1px solid #33404c;
  background: #12181e;
  border-radius: 10px;
  padding: 0;
}

.bug-panel h2 {
  margin: 0;
  font-size: 16px;
}

.bug-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.bug-form label {
  display: grid;
  gap: 5px;
  color: #aab6c0;
  font-size: 12px;
}

.bug-form .span-all {
  grid-column: 1 / -1;
}

#bug-status {
  color: #a8b5c1;
  font-size: 12px;
  align-self: center;
}

.support-panel h2 {
  margin: 0;
  font-size: 16px;
}

.donation-box {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  padding: 16px;
}

.donation-presets {
  display: flex;
  gap: 6px;
}

.donation-box label {
  display: grid;
  gap: 5px;
  color: #aab6c0;
  font-size: 12px;
}

.donation-box input {
  width: 110px;
}

#donation-status {
  flex-basis: 100%;
  min-height: 16px;
  color: #a8b5c1;
  font-size: 12px;
  text-align: right;
}

dialog.account-panel {
  width: min(980px, calc(100% - 34px));
}

.account-panel .account-grid {
  padding: 16px;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 14px;
}

.account-card {
  border: 1px solid #28333d;
  background: #151b21;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.account-card.account-wide {
  grid-column: 1 / -1;
}

.account-card h2,
.account-card h3 {
  margin: 0;
}

.account-card p {
  margin: 0;
  color: #a4b0bb;
  font-size: 13px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label {
  display: grid;
  gap: 5px;
  color: #aab6c0;
  font-size: 12px;
}

.form-grid .span-all {
  grid-column: 1 / -1;
}

.avatar-picker > div {
  border: 1px solid #2a3540;
  background: #111820;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-controls {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
}

.avatar-controls input[type="file"] {
  padding: 8px;
  min-width: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subtle-button {
  color: #a8b5c1;
}

.my-config-list {
  display: grid;
  gap: 9px;
}

.my-config-row {
  border: 1px solid #26333e;
  background: #101820;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.my-config-row strong,
.my-config-row small {
  display: block;
}

.my-config-row small {
  color: #8f9da9;
  margin-top: 4px;
}

.my-config-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.my-config-actions select {
  width: 116px;
}

button.danger {
  border-color: #6e3b3e;
  color: #ffd6d6;
}

.status {
  color: #9aa8b4;
  margin: 8px 0 12px;
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
  gap: 14px;
  justify-content: start;
}

.card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 12px;
  min-width: 0;
  overflow: hidden;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.card.config-card,
.card.profile-card,
.card.game-card {
  cursor: pointer;
}

.card.config-card:hover,
.card.profile-card:hover,
.card.game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(54, 194, 127, 0.55);
  box-shadow: var(--shadow-lift);
}

.visual-card {
  display: grid;
  gap: 10px;
}

.card-art {
  --tone-a: #29556a;
  --tone-b: #1a2530;
  position: relative;
  min-height: 138px;
  border-radius: 7px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--tone-a) 80%, #111820), var(--tone-b)),
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.22), transparent 34%);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.card-art::after,
.profile-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(to top, rgba(8, 12, 16, 0.76), transparent 62%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 30%);
  pointer-events: none;
}

.art-image,
.card-art img,
.profile-banner img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art-image[src=""] {
  display: none;
}

.art-initials {
  position: relative;
  z-index: 1;
  color: rgba(245, 247, 249, 0.92);
  font-size: 40px;
  font-weight: 900;
}

.card-art .upvote {
  position: absolute;
  right: 9px;
  top: 9px;
  z-index: 4;
  backdrop-filter: blur(10px);
  min-width: 56px;
  min-height: 32px;
  border-color: rgba(31, 125, 88, 0.7);
  background: rgba(15, 60, 46, 0.78);
  color: #b9ffe1;
  font-weight: 700;
  font-size: 14px;
  padding: 0 10px;
  gap: 4px;
}

.card-art .upvote[aria-pressed="true"] {
  background: #135041;
  color: #d4ffec;
  border-color: #62d6b5;
}

.creator-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.creator-line .meta {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.avatar {
  --tone-a: #2c586c;
  --tone-b: #1d2835;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, var(--tone-a), var(--tone-b));
  color: #f6fbff;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 800;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.small {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 11px;
}

.avatar.large {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  font-size: 24px;
  position: relative;
  z-index: 4;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card h2 {
  margin: 0 0 5px;
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.18;
}

.meta,
.description,
.stats {
  color: #a4b0bb;
  font-size: 13px;
}

.description {
  min-height: 0;
  margin: 8px 0 0;
}

.score {
  border: 1px solid #2b554e;
  color: #83f0d0;
  background: #10201e;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.tags,
.stats,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stats {
  min-height: 18px;
}

.profile-card,
.game-card {
  cursor: pointer;
}

.profile-banner {
  --tone-a: #2f5b71;
  --tone-b: #111820;
  position: relative;
  min-height: 122px;
  border-radius: 7px;
  background:
    linear-gradient(145deg, var(--tone-a), var(--tone-b)),
    radial-gradient(circle at 28% 18%, rgba(137, 235, 255, 0.28), transparent 34%);
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 12px;
  overflow: hidden;
}

.profile-banner .score {
  position: relative;
  z-index: 4;
  align-self: flex-start;
  backdrop-filter: blur(10px);
}

.profile-card h2,
.game-card h2 {
  margin-bottom: 0;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-stats span {
  border: 1px solid #2a3540;
  background: #111820;
  border-radius: 7px;
  min-height: 54px;
  min-width: 0;
  padding: 8px;
  display: grid;
  gap: 2px;
  color: #91a2b0;
  font-size: 12px;
}

.profile-stats strong {
  color: #f5f7f9;
  font-size: 17px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.actions button[aria-pressed="true"] {
  border-color: #62d6b5;
  background: #12302b;
  color: #b7ffe7;
}

.upvote {
  min-width: 42px;
  font-weight: 900;
  font-size: 16px;
  border-color: #1f7d58;
  background: #0f3c2e;
  color: #9dffd8;
}

.tag {
  border: 1px solid #33404c;
  background: #1d252d;
  color: #c7d4de;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

dialog {
  width: min(760px, calc(100% - 34px));
  border: 1px solid #33404c;
  border-radius: 10px;
  background: #12181e;
  color: #f5f7f9;
  padding: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #28333d;
}

.dialog-head h2 {
  margin: 0 0 5px;
}

.dialog-head p {
  margin: 0;
  color: #a4b0bb;
}

pre {
  margin: 0;
  padding: 16px;
  max-height: 60vh;
  overflow: auto;
  white-space: pre-wrap;
  color: #d6e0e8;
}

.app-dialog-body {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.app-download-visual {
  border: 1px solid #26333e;
  background:
    linear-gradient(145deg, rgba(31, 157, 103, 0.16), rgba(16, 24, 32, 0.96)),
    radial-gradient(circle at 25% 20%, rgba(104, 220, 255, 0.22), transparent 42%);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-download-visual img {
  width: 52px;
  height: 52px;
  border-radius: 13px;
}

.app-download-visual strong {
  font-size: 18px;
}

.app-dialog-body ul {
  margin: 0;
  padding-left: 20px;
  color: #d6e0e8;
  display: grid;
  gap: 6px;
}

.app-benefits {
  display: grid;
  gap: 8px;
}

.app-benefits span {
  border: 1px solid #28333d;
  background: #151b21;
  border-radius: 7px;
  padding: 10px;
  color: #d6e0e8;
}

.app-dialog-body p {
  margin: 0;
  color: #9aa8b4;
  font-size: 13px;
}

a[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 22px 0 24px;
  }

  .hero-text h1 {
    font-size: 32px;
    letter-spacing: -0.4px;
  }

  .hero-banner {
    min-height: 210px;
    padding: 14px;
  }

  .hero-tile-cs2 {
    width: 84%;
    height: 168px;
  }

  .hero-tile-valorant {
    right: 0;
    top: 18px;
    width: 60%;
    height: 116px;
  }

  .hero-tile-rust {
    right: 10px;
    bottom: 0;
    width: 48%;
    height: 92px;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-strip .stat strong {
    font-size: 22px;
  }

  .featured-games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
    flex-wrap: wrap;
  }

  nav {
    overflow-x: visible;
    flex-wrap: wrap;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .view-tabs {
    width: 100%;
  }

  .view-tabs button {
    flex: 1;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .support-panel {
    grid-template-columns: 1fr;
  }

  .bug-form {
    grid-template-columns: 1fr;
  }

  .bug-form .span-all {
    grid-column: auto;
  }

  .donation-box {
    justify-content: flex-start;
  }

  #donation-status {
    text-align: left;
  }

  .account-grid,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .account-card.account-wide {
    grid-column: auto;
  }

  .my-config-row {
    grid-template-columns: 1fr;
  }

  .my-config-actions {
    justify-content: flex-start;
  }

  .avatar-picker > div {
    align-items: stretch;
    flex-direction: column;
  }

  .avatar-controls {
    grid-template-columns: 1fr;
  }
}

/* Smart search autocomplete */
.search-field-wrap {
  position: relative;
  min-width: 0;
}

.search-field {
  width: 100%;
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.search-clear:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-color: transparent;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-lift);
  z-index: 30;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.search-suggestions .suggestion-group {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.search-suggestions .suggestion {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  color: var(--text);
  min-height: 0;
}

.search-suggestions .suggestion:hover,
.search-suggestions .suggestion[aria-selected="true"] {
  background: rgba(54, 194, 127, 0.08);
  border-color: rgba(54, 194, 127, 0.32);
}

.search-suggestions .suggestion-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--tone-a, #2e6c86), var(--tone-b, #162733));
  color: #f5f7f9;
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 28px;
  background-size: cover;
  background-position: center;
}

.search-suggestions .suggestion-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.search-suggestions .suggestion-label strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggestions .suggestion-label small {
  color: var(--text-muted);
  font-size: 12px;
}

.search-suggestions .suggestion-kind {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.search-suggestions .suggestion mark {
  background: rgba(54, 194, 127, 0.22);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

/* Featured games — branded fallback covers for Riot games */
.game-tile-card .game-tile-art.cover-valorant {
  background-image:
    linear-gradient(160deg, rgba(255, 70, 85, 0.28), rgba(11, 7, 10, 0.85)),
    linear-gradient(135deg, #ff4655 0 24%, #1a1015 24% 56%, #2a1116 56% 100%);
}

.game-tile-card .game-tile-art.cover-league {
  background-image:
    linear-gradient(160deg, rgba(199, 156, 58, 0.22), rgba(2, 8, 18, 0.88)),
    linear-gradient(135deg, #0a2747 0 36%, #04132a 36% 64%, #1a1410 64% 100%);
}

/* Hero Valorant tile gets a slightly nicer composition */
.hero-tile-valorant {
  background-image:
    linear-gradient(to top, rgba(6, 10, 14, 0.86), rgba(6, 10, 14, 0.12)),
    linear-gradient(135deg, #ff4655 0 24%, #111820 24% 52%, #2a1016 52% 100%);
}

/* Config dialog — Basic / Advanced view */
.config-dialog-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.config-file-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13px;
}

.config-file-info .config-file-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.config-file-info .config-file-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.config-file-info .config-file-row strong .config-file-format {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 700;
}

.config-file-info .config-file-row code {
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 6px;
  word-break: break-all;
  white-space: pre-wrap;
}

.config-file-info .config-file-row em {
  font-size: 12px;
  color: var(--text-muted);
  font-style: normal;
}

.config-view-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  align-self: flex-start;
}

.config-view-tabs button {
  min-height: 30px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  border-color: transparent;
  background: transparent;
  color: var(--text-dim);
}

.config-view-tabs button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: transparent;
}

.config-view-tabs button.active {
  background: rgba(54, 194, 127, 0.14);
  color: var(--text);
  border-color: rgba(54, 194, 127, 0.4);
}

.config-basic-view {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-input);
}

.config-basic-view .basic-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.config-basic-view .basic-category {
  padding: 8px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
}

.config-basic-view .basic-category:first-child {
  border-top: none;
}

.config-basic-view .basic-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  align-items: center;
}

.config-basic-view .basic-row:last-child {
  border-bottom: none;
}

.config-basic-view .basic-row .basic-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.config-basic-view .basic-row .basic-label strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.config-basic-view .basic-row .basic-label small {
  font-size: 11px;
  color: var(--text-muted);
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
  word-break: break-all;
}

.config-basic-view .basic-row .basic-value {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  text-align: right;
}

.config-basic-view .basic-row .basic-value .basic-pill {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: rgba(54, 194, 127, 0.14);
  border: 1px solid rgba(54, 194, 127, 0.32);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.config-basic-view .basic-row .basic-value .basic-pill.muted {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text-dim);
  font-weight: 500;
}

.config-basic-view .basic-row .basic-meter {
  width: 110px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  position: relative;
}

.config-basic-view .basic-row .basic-meter > span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: inherit;
  transform-origin: left center;
}

.config-basic-view .basic-row .basic-range-bounds {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.config-basic-view .basic-row .basic-bool {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 9px;
  border: 1px solid;
}

.config-basic-view .basic-row .basic-bool.on {
  color: #6ee2a4;
  border-color: rgba(54, 194, 127, 0.45);
  background: rgba(54, 194, 127, 0.12);
}

.config-basic-view .basic-row .basic-bool.off {
  color: var(--text-muted);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.config-basic-view .basic-row.unmapped .basic-label small.unmapped-tag {
  color: #c39854;
  font-style: italic;
}

.config-advanced-view {
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  background: var(--bg-input);
}

.config-advanced-view pre {
  margin: 0;
  padding: 14px 16px;
  max-height: 60vh;
  overflow: auto;
  font-size: 13px;
  line-height: 1.5;
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
}

@media (max-width: 640px) {
  .config-basic-view .basic-row {
    grid-template-columns: 1fr;
  }

  .config-basic-view .basic-row .basic-value {
    align-items: flex-start;
    text-align: left;
  }
}
