* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #1c1b22;
  --color-bg: #2b2a33;
  --color-border: #3a3944;
  --body-width: 80rem;
  --spacing: 1.25rem;
  --border-radius: calc(var(--spacing) * 0.5);
  --future-blue: #5b9cf6;
  --future-blue-dim: #3a6db5;
  --future-glow: rgba(91, 156, 246, 0.15);
}

body {
  background: var(--bg);
  color: #ffffff;
  font-family: "Inter", sans-serif;
  width: min(var(--body-width), 100% - var(--spacing));
  margin-inline: auto;
  padding-block: var(--spacing);
}

[data-theme="light"] {
  --bg: #f2f2f5;
  --color-bg: #ffffff;
  --color-border: #dddde3;
}

[data-theme="light"] body {
  color: #1c1b22;
}

[data-theme="light"] p {
  color: #555555;
}

[data-theme="light"] #list a,
[data-theme="light"] #future-list a,
[data-theme="light"] #roulette-list .roulette-container {
  color: #1c1b22;
}

[data-theme="light"] #list a .info .name,
[data-theme="light"] #future-list a .info .name,
[data-theme="light"] #roulette-list .roulette-container .info .name,
[data-theme="light"] .stats-points-value,
[data-theme="light"] .profile-completion-name {
  color: #1c1b22;
}

[data-theme="dark"] {
  --bg: #050506;
  --color-bg: #0b0a0e;
  --color-border: #1a1920;
}

#theme-buttons {
  display: flex;
  flex-flow: row nowrap;
  gap: 0.5rem;
  margin-bottom: var(--spacing);
}

#theme-buttons button {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: #ff3b3b;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: filter 0.15s ease;
}

#theme-buttons button:hover {
  filter: brightness(1.2);
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

p {
  font-size: 0.875rem;
  color: #aaaaaa;
  margin-top: 0.25rem;
}

hr {
  border-color: var(--color-border);
  margin-block: var(--spacing);
}

.tabs {
  display: flex;
  flex-flow: row nowrap;
  gap: 0.5rem;
  margin-bottom: calc(var(--spacing) * -1);
}

.tab-btn {
  background: none;
  border: none;
  color: #888888;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  position: relative;
  bottom: 0;
}

.tab-btn:hover {
  color: #cccccc;
  background: rgba(255,255,255,0.04);
}

.tab-btn.active {
  color: var(--future-blue);
  border-bottom: 2px solid var(--future-blue);
  background: var(--future-glow);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ---- MAIN / FUTURE LIST ---- */

#list > *,
#future-list > *,
#roulette-list > * {
    margin-top: var(--spacing);
}


#list a, #future-list a, #roulette-list .roulette-container {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: var(--spacing);
  background: var(--color-bg);
  padding: var(--spacing);
  border-radius: var(--border-radius);
  border: none;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
  transition: filter 0.15s ease;

  &:hover {
    filter: brightness(1.1);
  }
}

#list a .thumb,
#future-list a .thumb,
#roulette-list .roulette-container .thumb {
  flex-shrink: 0;
  width: min(12rem, 40%);
  border-radius: var(--border-radius);
  overflow: hidden;
}


#list a .thumb img, #future-list a .thumb img, #roulette-list .roulette-container .thumb img {
  width: 100%;
  height: auto;
  display: block;
  border: none;
}

#list a .info, #future-list a .info, #roulette-list .roulette-container .info {
  flex: 1;
  min-width: 0;
}

#list a .info .name,
#future-list a .info .name,
#roulette-list .roulette-container .info .name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) * 0.5);
  color: #ffffff; /* ← THIS is the important part */
}


#list a .info .url, #future-list a .info .url {
  font-style: italic;
  font-size: 0.8rem;
  color: #888888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#list a .rank,
#future-list a .rank,
#roulette-list .roulette-container .rank {
  flex-shrink: 0;
  color: #888888;
  font-size: 0.95rem;
}


.unverified-item {
  border: 1px solid rgba(91, 156, 246, 0.3) !important;
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--future-glow) 100%) !important;
}

.unverified-item .info .name {
  color: var(--future-blue) !important;
}

.unverified-item .rank {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.unverified-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--future-blue);
  background: rgba(91, 156, 246, 0.12);
  border: 1px solid rgba(91, 156, 246, 0.3);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
}

.progress-wrap {
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.progress-bar {
  width: 8rem;
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--future-blue-dim), var(--future-blue));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 0.8rem;
  color: var(--future-blue);
  font-weight: 600;
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-flow: row wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}

.tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
  color: #ffffff;
}

.tag-cube        { background: rgba(0, 255, 0, 0.25); color: #111; }
.tag-ship        { background: rgba(255, 0, 255, 0.25); }
.tag-ball        { background: rgba(255, 0, 0, 0.25); }
.tag-ufo         { background: rgba(255, 136, 0, 0.25); color: #111; }
.tag-swingcopter { background: rgba(255, 68, 0, 0.25); }
.tag-wave        { background: rgba(0, 0, 255, 0.25); }
.tag-robot       { background: rgba(200, 200, 200, 0.25); color: #111; }
.tag-spider      { background: rgba(128, 0, 255, 0.25); }
.tag-swing       { background: rgba(255, 255, 0, 0.25); color: #111; }

.tag-memory      { background: rgba(255, 221, 255, 0.25); color: #111; }
.tag-highcps     { background: rgba(255, 204, 0, 0.25); color: #111;}
.tag-nervecontrol { background: rgba(255, 0, 128, 0.25); }
.tag-timings     { background: rgba(0, 0, 0, 0.25); }
.tag-chokepoints { background: rgba(114, 114, 114, 0.25); }

.tag-tiny        { background: rgba(255, 255, 255, 0.25); color: #111; }
.tag-short       { background: rgba(225, 255, 255, 0.25); color: #111; }
.tag-medium      { background: rgba(200, 255, 200, 0.25); color: #111; }
.tag-long        { background: rgba(150, 255, 150, 0.25); color: #111; }
.tag-xl          { background: rgba(100, 255, 100, 0.25); color: #111; }
.tag-xxlplus     { background: rgba(50, 255, 50, 0.25); color: #111; }

.thumb-overlay-wrap {
  position: relative;
}

.thumb-overlay-wrap .unverified-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.55);
  color: var(--future-blue);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-align: center;
  padding: 0.2rem 0;
}

/* ---- STATS ---- */

#stats-list > * {
  margin-top: var(--spacing);
}

.stats-card {
  background: var(--color-bg);
  border-radius: var(--border-radius);
  padding: var(--spacing);
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: var(--spacing);
  cursor: pointer;
  transition: filter 0.15s ease;
}

.stats-card:hover {
  filter: brightness(1.1);
}

.stats-rank {
  flex-shrink: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: #888888;
  min-width: 2.5rem;
  text-align: center;
}

.stats-rank.gold   { color: #f6c84a; }
.stats-rank.silver { color: #b0b8c8; }
.stats-rank.bronze { color: #c87d4a; }

.stats-info {
  flex: 1;
  min-width: 0;
}

.stats-name {
  font-size: 1.2rem;
  font-weight: 700;
}

.stats-count {
  font-size: 0.8rem;
  color: #888888;
  margin-top: 0.2rem;
}

.stats-points {
  flex-shrink: 0;
  text-align: right;
}

.stats-points-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
}

.stats-points-label {
  font-size: 0.7rem;
  color: #888888;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ---- PROFILE OVERLAY ---- */

.profile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.profile-overlay.open {
  display: flex;
}

.profile-modal {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: calc(var(--spacing) * 1.5);
  width: min(36rem, 90vw);
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.profile-modal-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--spacing);
}

.profile-modal-name {
  font-size: 1.4rem;
  font-weight: 700;
}

.profile-modal-pts {
  font-size: 1rem;
  color: #888888;
}

.profile-close {
  background: none;
  border: none;
  color: #888888;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.2rem;
  transition: color 0.15s ease;
}

.profile-close:hover { color: #ffffff; }

.profile-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666666;
  margin-bottom: 0.5rem;
}

.profile-completion-row {
  display: grid;
  grid-template-columns: 1fr 3rem 4.5rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.profile-completion-row:last-child { border-bottom: none; }

.profile-completion-name { color: #ffffff; }

.profile-completion-rank { color: #888888; font-size: 0.8rem; text-align: right; }

.profile-completion-pts {
  color: var(--future-blue);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: right;
}

.profile-unmatched {
  font-size: 0.8rem;
  color: #666666;
  font-style: italic;
  padding: 0.35rem 0;
}
