:root {
  --navy: #071923;
  --deep: #0a2330;
  --panel: #0f2f40;
  --ink: #f2f6f7;
  --copy: #c9d6da;
  --muted: #8fa6ae;
  --line: rgba(234, 245, 246, 0.12);
  --amber: #f4b63f;
  --teal: #59c6ba;
  --up: #6bcf8e;
  --down: #e27538;
  --display: "Bebas Neue", Impact, sans-serif;
  --body: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth }
body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
  background:
    radial-gradient(ellipse 90% 55% at 10% -10%, rgba(89, 198, 186, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 45% at 95% 0%, rgba(244, 182, 63, 0.1), transparent 50%),
    linear-gradient(180deg, #071923 0%, #0a2330 45%, #071923 100%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nav {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(1520px, calc(100% - 2.75rem - 44px));
  background: rgba(7, 25, 35, 0.88);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.42);
}
.navin {
  min-height: 92px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.4rem;
  box-sizing: border-box;
  position: relative;
}
.brand {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex: 0 0 auto;
  margin: 0;
  max-width: none;
  width: auto;
  color: inherit;
}
.mark {
  width: 68px;
  height: 68px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
  width: max-content;
  flex: 0 0 auto;
}
.brand-name {
  display: block;
  color: var(--ink);
  font-size: clamp(0.78rem, 1.1vw, 0.98rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
}
.brand-short {
  display: block;
  margin-top: 0.18rem;
  color: var(--amber);
  font: clamp(1.15rem, 1.7vw, 1.45rem) / 1 var(--display);
  letter-spacing: 0.14em;
  text-decoration: none;
}
.links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--muted);
  flex: 0 0 auto;
}
.links a { text-decoration: none; color: inherit }
.links a:hover,
.links a[aria-current="page"] { color: var(--ink) }
.links a.nav-login {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.7rem;
  border: 1px solid rgba(244, 182, 63, 0.45);
  border-radius: 999px;
  color: var(--amber);
  font-weight: 650;
}
.links a.nav-login:hover {
  color: var(--navy);
  background: var(--amber);
  border-color: var(--amber);
}
.links a.nav-login svg { width: 1rem; height: 1rem; flex-shrink: 0 }
.menu {
  display: none;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  margin-left: auto;
  cursor: pointer;
  font: inherit;
}

.wt-main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: calc(1rem + 92px + 1.5rem) 0 4rem;
}
body.has-dev-notice .wt-main {
  padding-top: calc(1rem + 92px + 0.55rem + 58px + 1.25rem);
}

.wt-hero {
  margin: 0 0 1.75rem;
  max-width: 40rem;
  opacity: 0;
  animation: wt-rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
}
.wt-eyebrow {
  margin: 0 0 0.45rem;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.wt-hero h1 {
  margin: 0;
  font: clamp(3rem, 8vw, 4.6rem)/0.9 var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.wt-lead {
  margin: 0.85rem 0 0;
  color: var(--copy);
  font-size: 1.05rem;
}

.wt-controls {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: wt-rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.18s forwards;
}

.wt-worlds {
  display: grid;
  grid-template-columns: repeat(12, max-content);
  justify-content: center;
  justify-items: stretch;
  gap: 0.4rem;
  width: 100%;
}
.wt-world {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(15, 47, 64, 0.65);
  color: var(--copy);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.wt-world:hover { border-color: rgba(244, 182, 63, 0.45); color: var(--ink) }
.wt-world.is-active {
  background: rgba(244, 182, 63, 0.16);
  border-color: rgba(244, 182, 63, 0.65);
  color: var(--amber);
}
.wt-world .flag-img,
.wt-meta .flag-img {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.wt-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.wt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.wt-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 650;
  padding: 0.55rem 0.2rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.wt-tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--amber);
}

.wt-panel {
  opacity: 0;
  animation: wt-rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.28s forwards;
}
.wt-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.85rem;
}
.wt-panel-head h2 {
  margin: 0;
  font: 1.7rem/1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wt-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.wt-search {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.wt-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 25, 35, 0.55);
  color: var(--ink);
  padding: 0.75rem 0.95rem;
  font: inherit;
}
.wt-search input:focus {
  outline: 2px solid rgba(244, 182, 63, 0.45);
  outline-offset: 1px;
}
.wt-search button {
  appearance: none;
  border: none;
  border-radius: 12px;
  background: var(--amber);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 1.15rem;
  cursor: pointer;
}
.wt-search button:hover { filter: brightness(1.05) }

.wt-board {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(13, 44, 61, 0.55);
  overflow: hidden;
}
.wt-empty {
  margin: 0;
  padding: 2rem 1.25rem;
  color: var(--muted);
  text-align: center;
}

.wt-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(9.5rem, 0.7fr) minmax(11rem, 0.85fr);
  gap: 1rem 1.25rem;
  align-items: center;
  padding: 0.95rem 1.15rem;
  border-top: 1px solid var(--line);
  min-height: 4.75rem;
}
.wt-row:first-child { border-top: none }
.wt-row:nth-child(odd) { background: rgba(7, 25, 35, 0.22) }
.wt-row:hover { background: rgba(244, 182, 63, 0.05) }

.wt-banner {
  margin: 0 0 0.85rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--amber);
  border-radius: 12px;
  background: rgba(244, 182, 63, 0.08);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.wt-col-who {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.wt-rank {
  flex: 0 0 2.6rem;
  font: 1.4rem/1 var(--display);
  letter-spacing: 0.04em;
  color: var(--amber);
}
.wt-face {
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  position: relative;
}
.wt-avatar,
.wt-avatar-fallback {
  width: 66px;
  height: 66px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.wt-avatar {
  display: block;
  object-fit: cover;
  background: rgba(7, 25, 35, 0.55);
}
.wt-avatar-ph {
  object-fit: cover;
  background: #1a3a4a;
}
.wt-name-block {
  flex: 1 1 auto;
  min-width: 0;
}
.wt-name {
  margin: 0;
  font-weight: 700;
  font-size: 1.02rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wt-sub {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wt-seen {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.3rem;
  color: var(--copy);
  font-size: 0.8rem;
}
.wt-seen-icon {
  width: 14px;
  height: 14px;
  display: block;
  image-rendering: pixelated;
}
.wt-seen-ago { color: var(--copy) }

.wt-col-credits,
.wt-col-earn {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wt-col-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wt-credits-total {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
}
.wt-delta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 650;
}
.wt-delta.up { color: var(--up) }
.wt-delta.down { color: var(--down) }
.wt-delta.flat { color: var(--muted) }
.wt-earn-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.45;
}
.wt-earn-line span:first-child { color: var(--muted) }
.wt-earn-line span:last-child { font-weight: 650 }

.wt-face .wt-avatar-fallback[hidden] { display: none !important }

.wt-gap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin: 0.2rem 0 0.4rem;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  background: rgba(7, 25, 35, 0.72);
  border: 1px solid rgba(234, 245, 246, 0.1);
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.wt-gap-tag {
  flex: 0 0 auto;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9bb0b8;
}
.wt-gap-text {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.wt-gap-text.is-gaining { color: var(--up) }
.wt-gap-text.is-pulling { color: var(--down) }
.wt-gap-text.is-holding { color: var(--amber) }

.wt-foot {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
.wt-foot #wt-visits {
  margin: 0;
}

@keyframes wt-rise {
  from { opacity: 0; transform: translateY(22px) }
  to { opacity: 1; transform: none }
}

@media (max-width: 1100px) {
  .wt-worlds { grid-template-columns: repeat(8, max-content) }
}

@media (max-width: 860px) {
  .menu { display: block }
  .links { display: none }
  .links.open {
    display: flex;
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0.55rem;
    right: 0.55rem;
    padding: 1rem 1.15rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    background: rgba(7, 25, 35, 0.96);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  }
  .navin { min-height: 84px; padding: 0 1rem }
  .mark { width: 58px; height: 58px }
  .brand { gap: 0.65rem }
  .brand-name { font-size: 0.62rem; letter-spacing: 0.04em }
  .brand-short { font-size: 1.05rem; letter-spacing: 0.1em }
  .wt-main { padding-top: calc(1rem + 84px + 1.2rem) }
  body.has-dev-notice .wt-main {
    padding-top: calc(1rem + 84px + 0.55rem + 58px + 1rem);
  }
  .wt-worlds { grid-template-columns: repeat(6, max-content) }
  .wt-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .wt-col-credits,
  .wt-col-earn {
    text-align: left;
    padding-left: calc(2.6rem + 66px + 0.85rem);
  }
}

@media (max-width: 640px) {
  .wt-worlds { grid-template-columns: repeat(4, max-content) }
  .wt-col-credits,
  .wt-col-earn {
    padding-left: 0;
  }
}
