:root {
  --bg: #f4f8ff;
  --surface: rgba(255, 255, 255, .84);
  --surface-strong: #fff;
  --ink: #132238;
  --muted: #64748b;
  --line: rgba(31, 64, 104, .13);
  --violet: #7147e8;
  --violet-2: #9a6dff;
  --blue: #2aa8ff;
  --gold: #e4aa37;
  --green: #1fb876;
  --red: #e74f5f;
  --dark: #07101e;
  --dark-2: #0d1727;
  --admin: #07101c;
  --admin-panel: #101b2d;
  --admin-panel-2: #0b1524;
  --admin-line: rgba(146, 185, 255, .16);
  --radius: 8px;
  --shadow: 0 24px 70px rgba(41, 72, 112, .16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0, rgba(114, 179, 255, .22), transparent 360px),
    linear-gradient(180deg, #f8fbff 0, #f1f6ff 52%, #eef4ff 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

body.is-admin {
  color: #e7f0ff;
  background:
    radial-gradient(circle at 16% 0, rgba(83, 141, 245, .2), transparent 420px),
    linear-gradient(180deg, #07101c, #050914);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

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

main {
  min-height: calc(100vh - 170px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 74px;
  padding: 12px max(22px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #122035;
  background: rgba(255, 255, 255, .74);
  border-bottom: 1px solid rgba(33, 73, 121, .11);
  backdrop-filter: blur(18px);
}

.is-admin .topbar {
  color: #e7f0ff;
  background: rgba(5, 10, 18, .88);
  border-bottom-color: rgba(146, 185, 255, .12);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-logo img {
  width: 118px;
  max-height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 9px 18px rgba(60, 71, 102, .18));
}

.admin-brand img {
  width: 110px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a,
.admin-sidebar a,
.admin-period-tabs a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  color: color-mix(in srgb, currentColor 78%, transparent);
  font-size: 14px;
  font-weight: 800;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.site-nav a:hover,
.admin-sidebar a:hover,
.admin-period-tabs a:hover,
.admin-period-tabs a.active {
  color: inherit;
  background: rgba(115, 89, 225, .1);
  transform: translateY(-1px);
}

.is-admin .admin-period-tabs a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 199, 95, .24), rgba(113, 71, 232, .22));
  border: 1px solid rgba(255, 215, 138, .24);
}

.site-footer {
  margin-top: 72px;
  padding: 28px max(22px, calc((100vw - 1240px) / 2));
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  background: rgba(255, 255, 255, .64);
  border-top: 1px solid var(--line);
}

.is-admin .site-footer {
  color: #8392aa;
  background: #050914;
  border-top-color: rgba(146, 185, 255, .1);
}

.site-footer a:hover {
  color: var(--violet);
}

.button,
button,
.ghost {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #6f45e9, #3aa8ff);
  box-shadow: 0 14px 32px rgba(79, 98, 219, .28);
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}

.button:hover,
button:hover,
.ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(79, 98, 219, .34);
}

.button.secondary,
button.secondary {
  color: #122035;
  background: linear-gradient(135deg, #fff, #e9f3ff);
  border: 1px solid rgba(60, 92, 132, .16);
  box-shadow: 0 10px 28px rgba(47, 77, 118, .14);
}

.is-admin .button.secondary,
.is-admin button.secondary {
  color: #eaf2ff;
  background: linear-gradient(135deg, #1d2b44, #172337);
  border: 1px solid rgba(146, 185, 255, .18);
  box-shadow: none;
}

.button.ghost,
button.ghost,
.ghost {
  color: inherit;
  background: rgba(115, 155, 225, .09);
  border: 1px solid rgba(115, 155, 225, .16);
  box-shadow: none;
}

.button.danger,
button.danger {
  color: #fff;
  background: linear-gradient(135deg, #df3b57, #b7253e);
  box-shadow: 0 14px 32px rgba(210, 42, 70, .28);
}

button:disabled,
.button.disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(37, 74, 117, .16);
  border-radius: 8px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(93, 102, 236, .48);
  box-shadow: 0 0 0 4px rgba(97, 118, 239, .12);
}

.is-admin input,
.is-admin select,
.is-admin textarea {
  color: #eaf2ff;
  background: rgba(6, 13, 24, .72);
  border-color: rgba(146, 185, 255, .16);
}

label span,
label small {
  display: block;
}

label span {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.is-admin label span {
  color: #94a9c4;
}

label small,
small,
.muted {
  color: var(--muted);
}

.is-admin small,
.is-admin .muted {
  color: #8392aa;
}

.error {
  color: var(--red);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-head,
.section-title {
  width: min(1160px, calc(100vw - 44px));
  margin: 56px auto 28px;
  text-align: center;
}

.page-head h1,
.section-title h2,
.leaderboard-page h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: .98;
  color: #122035;
  letter-spacing: 0;
}

.page-head p:not(.eyebrow),
.section-title p {
  max-width: 760px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 17px;
}

.section-title span {
  width: 88px;
  height: 4px;
  margin: 18px auto 0;
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--violet), var(--blue));
}

.landing-hero.upup-hero {
  position: relative;
  min-height: 76vh;
  margin: 0;
  padding: 112px 22px 82px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: url("/main.webp") center top / cover no-repeat;
  isolation: isolate;
}

.landing-hero.upup-hero:before,
.landing-hero.upup-hero:after,
.hero-glow-ring {
  display: none;
  content: none;
}

.landing-hero.upup-hero .hero-center {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-align: center;
}

.hero-logo {
  width: min(440px, 82vw);
  margin: 0 auto 22px;
  filter: drop-shadow(0 16px 32px rgba(22, 37, 70, .28));
}

.hero-center p {
  margin: 0 auto;
  max-width: 760px;
  color: #11233e;
  font-size: clamp(18px, 2.1vw, 28px);
  font-weight: 900;
  text-shadow: 0 2px 18px rgba(255, 255, 255, .95), 0 0 34px rgba(255, 255, 255, .75);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.hero-runes {
  position: absolute;
  inset: auto 0 24px;
  display: flex;
  justify-content: center;
  gap: 14px;
  pointer-events: none;
}

.hero-runes i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 0 24px rgba(255, 255, 255, .8);
  animation: runePulse 2.8s ease-in-out infinite;
}

.hero-runes i:nth-child(2) { animation-delay: .25s; }
.hero-runes i:nth-child(3) { animation-delay: .5s; }
.hero-runes i:nth-child(4) { animation-delay: .75s; }

@keyframes runePulse {
  0%, 100% { transform: translateY(0); opacity: .42; }
  50% { transform: translateY(-8px); opacity: 1; }
}

.feature-stack {
  width: min(1160px, calc(100vw - 44px));
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.feature-row {
  min-height: 292px;
  display: grid;
  grid-template-columns: minmax(280px, .92fr) minmax(280px, 1fr);
  align-items: center;
  gap: 28px;
  padding: 16px;
  border: 1px solid rgba(38, 78, 124, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.feature-row.flip .feature-image {
  order: 2;
}

.feature-image {
  height: 260px;
  border-radius: 8px;
  overflow: hidden;
  background: #dbeafe;
}

.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.feature-row:hover .feature-image img {
  transform: scale(1.035);
}

.feature-text {
  padding: 14px 18px;
}

.feature-text h2,
.home-strip h2 {
  margin: 0 0 12px;
  color: #122035;
  font-size: clamp(24px, 3vw, 40px);
}

.feature-text p,
.home-strip p {
  margin: 0;
  color: #53657a;
  font-size: 16px;
}

.home-strip {
  width: min(1160px, calc(100vw - 44px));
  margin: 42px auto 0;
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(235,244,255,.9));
  border: 1px solid rgba(38, 78, 124, .13);
  box-shadow: var(--shadow);
}

.shop-account-panel,
.legal-card,
.panel,
.shop-card,
.login-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shop-account-panel {
  width: min(1160px, calc(100vw - 44px));
  margin: 0 auto 24px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
}

.shop-account-panel:not(.shop-account-ready) {
  grid-template-columns: 1fr minmax(280px, 440px);
}

.shop-account-current {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--violet);
  background: rgba(113, 71, 232, .09);
  font-weight: 1000;
}

.shop-account-form,
.shop-account-form.compact,
.checkout-form {
  display: grid;
  gap: 12px;
}

.shop-account-form.compact {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.shop-grid {
  width: min(1160px, calc(100vw - 44px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.shop-card {
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.shop-card img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.shop-card h2 {
  margin: 0;
  color: var(--ink);
}

.shop-card p {
  margin: 0;
  color: var(--muted);
}

.shop-card > b {
  color: var(--violet);
  font-size: 24px;
}

.checkout-provider-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.checkout-provider-choice label,
.checkout-legal-check,
.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-provider-choice input,
.checkout-legal-check input,
.inline-check input {
  width: auto;
  min-height: auto;
}

.checkout-provider-choice span {
  min-height: 38px;
  flex: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(113, 71, 232, .08);
  font-weight: 900;
}

.checkout-legal-check {
  align-items: flex-start;
  color: var(--muted);
  font-size: 13px;
}

.checkout-legal-check a {
  color: var(--violet);
  font-weight: 900;
}

.checkout-account-warning {
  margin: 0;
  color: var(--red);
  font-weight: 800;
}

.legal-page {
  width: min(960px, calc(100vw - 44px));
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.legal-card {
  padding: 26px;
}

.legal-card h2 {
  margin: 0 0 12px;
}

.legal-data {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 18px;
}

.legal-data dt {
  color: var(--muted);
  font-weight: 900;
}

.table-wrap,
.leaderboard-page,
.match-page-shell,
.match-topline,
.match-result-screen,
.match-extra-grid {
  width: min(1240px, calc(100vw - 44px));
  margin-left: auto;
  margin-right: auto;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(39, 72, 110, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .8);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(39, 72, 110, .1);
  vertical-align: middle;
}

th {
  color: #52657a;
  background: rgba(232, 240, 253, .82);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

td {
  color: #1c2a3d;
}

tr.click-row {
  cursor: pointer;
}

tr.click-row:hover td,
.leaderboard-page tbody tr:hover td {
  background: rgba(113, 71, 232, .065);
}

.avatar-stack {
  display: flex;
  align-items: center;
  min-width: 120px;
}

.avatar-stack img {
  width: 34px;
  height: 34px;
  margin-right: -8px;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  background: #dbeafe;
}

.difficulty-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #263850;
  background: rgba(255, 255, 255, .64);
  border: 1px solid rgba(113, 71, 232, .14);
  border-radius: 999px;
  box-shadow: none;
  font-weight: 1000;
}

.is-admin .difficulty-badge {
  color: #fff2c8;
  background: linear-gradient(135deg, rgba(255, 200, 80, .18), rgba(113, 71, 232, .16));
  border-color: rgba(255, 215, 138, .28);
  text-shadow: 0 1px 10px rgba(255, 197, 86, .16);
}

.result {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(100, 116, 139, .1);
  color: #52657a;
  font-weight: 900;
}

.result.victory,
.result.win,
.result.active {
  color: #0f8f57;
  background: rgba(31, 184, 118, .12);
}

.result.defeat,
.result.lose,
.result.loss,
.result.fail,
.result.failed,
.result.inactive {
  color: #ce3448;
  background: rgba(231, 79, 95, .12);
}

.pagination {
  width: min(1240px, calc(100vw - 44px));
  margin: 24px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination a,
.pagination-gap {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  color: #30435d;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(37, 74, 117, .12);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(41, 72, 112, .08);
}

.pagination a:hover,
.pagination a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  border-color: transparent;
}

.pagination-gap {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.match-page-shell {
  padding-top: 28px;
}

.match-topline {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.match-topline > div,
.match-extra-card {
  padding: 18px;
  border: 1px solid rgba(146, 185, 255, .14);
  border-radius: 8px;
  color: #dfeaff;
  background: linear-gradient(180deg, rgba(16, 27, 45, .95), rgba(8, 14, 25, .98));
}

.match-topline span {
  display: block;
  color: #8fa4c0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.match-result-screen {
  margin-top: 18px;
  padding: 28px;
  color: #eaf2ff;
  border: 1px solid rgba(255, 211, 106, .24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0, rgba(113, 71, 232, .28), transparent 360px),
    linear-gradient(180deg, #111328, #050812 72%);
  box-shadow: 0 30px 100px rgba(4, 8, 18, .38);
}

.match-title {
  text-align: center;
  color: #ffd36a;
  font-size: clamp(34px, 5vw, 66px);
  font-weight: 1000;
}

.match-title.defeat,
.match-title.loss {
  color: #ff7182;
}

.match-meta {
  margin: 6px 0 24px;
  display: flex;
  justify-content: center;
  gap: 32px;
  color: #9cebd2;
  font-weight: 1000;
  font-size: 22px;
}

.match-header,
.match-row {
  display: grid;
  grid-template-columns: 60px minmax(180px, 1.2fr) 90px minmax(220px, 1.05fr) minmax(190px, .95fr) minmax(180px, 1fr) 120px;
  align-items: center;
  gap: 10px;
}

.match-header {
  padding: 10px 12px;
  color: #ffe6a0;
  background: linear-gradient(90deg, rgba(166, 104, 34, .9), rgba(110, 68, 28, .88));
  font-weight: 900;
}

.match-row {
  min-width: 1040px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 211, 106, .15);
  background: rgba(255, 255, 255, .055);
}

.match-row.is-mvp {
  border-color: rgba(255, 211, 106, .58);
  box-shadow: inset 0 0 0 1px rgba(255, 211, 106, .25), 0 0 22px rgba(255, 211, 106, .12);
}

.place {
  color: #ffe6a0;
  font-weight: 1000;
}

.match-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.match-player img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.24);
}

.match-player b,
.leader-player {
  min-width: 0;
  font-weight: 1000;
}

.mvp {
  padding: 4px 6px;
  color: #21160b;
  background: linear-gradient(180deg, #ffeaa5, #d7902b);
  font-size: 11px;
  font-weight: 1000;
}

.resources {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}

.resource-pill {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #eaf2ff;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.resource-pill img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.reward-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.item-icon,
.card-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

.item-icon img,
.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rarity-common { box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.rarity-rare { box-shadow: inset 0 0 0 1px rgba(45,168,255,.42), 0 0 14px rgba(45,168,255,.16); }
.rarity-mythical { box-shadow: inset 0 0 0 1px rgba(188,87,255,.52), 0 0 16px rgba(188,87,255,.2); }
.rarity-legendary { box-shadow: inset 0 0 0 1px rgba(255,160,55,.56), 0 0 16px rgba(255,160,55,.2); }
.rarity-immortal { box-shadow: inset 0 0 0 1px rgba(255,70,84,.62), 0 0 18px rgba(255,70,84,.22); }

.cards-open-button {
  min-height: 36px;
  padding: 0 12px;
  color: #ffe6a0;
  background: rgba(255, 211, 106, .08);
  border: 1px solid rgba(255, 211, 106, .22);
  box-shadow: none;
}

.damage-total {
  color: #9fe9ff;
  font-weight: 1000;
}

.split-bar {
  height: 9px;
  margin: 4px 0;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.split-bar .phys { background: linear-gradient(90deg, #ff5d5d, #ffb44a); }
.split-bar .magic { background: linear-gradient(90deg, #5db7ff, #965dff); }

.split-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #8fa4c0;
  font-size: 12px;
}

.match-extra-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.match-extra-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(146, 185, 255, .1);
}

.cards-popup {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(4, 8, 16, .68);
  backdrop-filter: blur(6px);
}

.cards-popup.visible {
  display: flex;
}

.cards-popup-body {
  width: min(720px, calc(100vw - 44px));
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 24px;
  border-radius: 8px;
  color: #eaf2ff;
  background: linear-gradient(180deg, #15162d, #080a16);
  border: 1px solid rgba(255, 211, 106, .24);
}

.cards-popup-close,
.admin-modal-close {
  width: 36px;
  min-height: 36px;
  padding: 0;
  float: right;
}

.cards-popup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 10px;
}

.popup-card {
  width: 54px;
  height: 54px;
}

.game-tooltip {
  position: fixed;
  z-index: 300;
  min-width: 220px;
  max-width: 340px;
  padding: 12px 14px;
  display: none;
  color: #eaf2ff;
  border: 1px solid rgba(255, 211, 106, .28);
  border-radius: 8px;
  background: linear-gradient(180deg, #17172d, #070914);
  box-shadow: 0 18px 60px rgba(0,0,0,.42);
  pointer-events: none;
}

.game-tooltip.visible {
  display: grid;
  gap: 6px;
}

.game-tooltip b {
  color: #ffe6a0;
}

.leaderboard-page {
  margin-top: 54px;
}

.leaderboard-page h1,
.leaderboard-page h2 {
  text-align: center;
}

.leaderboard-page h2 {
  margin: 10px 0 32px;
  color: var(--violet);
}

.dummy-podium {
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(250px, 1.12fr) minmax(220px, 1fr);
  align-items: end;
  gap: 16px;
}

.dummy-podium-slot {
  position: relative;
  min-height: 250px;
  padding: 28px 18px 24px;
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 9px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(238,245,255,.92));
  border: 1px solid rgba(42, 85, 132, .12);
  box-shadow: var(--shadow);
}

.dummy-podium-slot.place-1 {
  min-height: 324px;
  background:
    radial-gradient(circle at 50% 4%, rgba(255, 214, 105, .36), transparent 140px),
    linear-gradient(180deg, #fff, #fff6da);
  border-color: rgba(228, 170, 55, .35);
}

.dummy-podium-slot.place-3 {
  min-height: 224px;
}

.podium-rank {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #352207;
  background: linear-gradient(180deg, #fff2ba, #e0a539);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.58), 0 10px 24px rgba(184, 125, 24, .22);
  font-weight: 1000;
}

.dummy-podium-slot.place-2 .podium-rank {
  background: linear-gradient(180deg, #f5f8ff, #aeb9c8);
}

.dummy-podium-slot.place-3 .podium-rank {
  background: linear-gradient(180deg, #ffd0a1, #b46b32);
}

.dummy-podium-slot img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 14px 30px rgba(39, 72, 110, .18);
}

.dummy-podium-slot.place-1 img {
  width: 112px;
  height: 112px;
}

.dummy-podium-slot b {
  color: #172339;
  font-size: 18px;
}

.dummy-podium-slot strong {
  color: #7847db;
  font-size: 30px;
  line-height: 1;
}

.leaderboard-page table {
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow);
}

.leader-player {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: none;
}

.leader-player img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
}

.admin-shell {
  width: 100%;
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: linear-gradient(180deg, #07101c, #050914);
}

.admin-sidebar {
  position: sticky;
  top: 74px;
  height: calc(100vh - 74px);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  background: rgba(6, 12, 22, .96);
  border-right: 1px solid var(--admin-line);
}

.admin-sidebar a {
  min-height: 42px;
  justify-content: flex-start;
  color: #9db1ca;
  border-radius: 8px;
}

.admin-sidebar a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(113,71,232,.42), rgba(42,168,255,.22));
}

.admin-sidebar form {
  margin-top: auto;
}

.admin-sidebar .full {
  width: 100%;
}

.admin-content {
  min-width: 0;
  padding: 28px;
}

.admin-head,
.admin-card-head {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-head h1,
.admin-card-head h2,
.panel h2,
.admin-hero h1 {
  margin: 0;
  color: #f4f8ff;
}

.admin-head p,
.admin-hero p {
  margin: 8px 0 0;
}

.admin-players-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
}

.admin-players-search {
  width: min(640px, 100%);
  justify-content: center;
}

.admin-hero,
.admin-hero-pro {
  margin-bottom: 18px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0, rgba(113, 71, 232, .25), transparent 320px),
    linear-gradient(135deg, #111d31, #0a1322);
  border: 1px solid var(--admin-line);
}

.admin-export-form {
  display: grid;
  grid-template-columns: 150px 150px auto;
  gap: 10px;
  align-items: end;
}

.panel {
  margin-bottom: 18px;
  padding: 20px;
}

.is-admin .panel,
.is-admin .login-panel {
  color: #eaf2ff;
  background: linear-gradient(180deg, rgba(16, 27, 45, .96), rgba(9, 17, 30, .98));
  border-color: var(--admin-line);
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}

.is-admin table {
  min-width: 760px;
}

.is-admin th {
  color: #9fb2ca;
  background: rgba(17, 31, 51, .92);
  border-bottom-color: rgba(146, 185, 255, .12);
}

.is-admin td {
  color: #e9f1ff;
  border-bottom-color: rgba(146, 185, 255, .09);
}

.is-admin tr.click-row:hover td,
.is-admin tbody tr:hover td {
  background: rgba(113, 71, 232, .09);
}

.admin-dashboard-grid,
.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-metric-grid {
  display: grid;
  gap: 6px;
}

.admin-metric {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(146, 185, 255, .09);
  background: transparent;
  box-shadow: none;
}

.admin-metric:before {
  display: none;
  content: none;
}

.admin-metric span {
  min-width: 0;
  color: #9fb2ca;
}

.admin-metric b {
  color: #f4f8ff;
  font-size: 18px;
}

.admin-metric em {
  color: #6f8199;
  font-style: normal;
  white-space: nowrap;
}

.inline-search,
.admin-filter-row,
.danger-form,
.quick-form,
.promocode-form,
.wide-form form {
  display: grid;
  gap: 12px;
  align-items: end;
}

.inline-search {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.admin-filter-row {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
}

.admin-filter-row.compact {
  grid-template-columns: minmax(180px, 260px) auto;
  justify-content: start;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-row-actions form {
  margin: 0;
}

.admin-feedback-steam {
  display: block;
  margin-top: 4px;
  color: #71849d;
  font-size: 12px;
}

.admin-feedback-message {
  max-width: 640px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
  color: #dbe8ff;
}

.danger-inline {
  color: #ffb3bd;
  background: rgba(231, 79, 95, .1);
  border-color: rgba(231, 79, 95, .22);
}

.admin-filter-row .button,
.admin-filter-row button,
.inline-search button {
  align-self: end;
  min-height: 42px;
  margin: 0;
}

.quick-form,
.admin-quick-form,
.promocode-form {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quick-form label,
.promocode-form label {
  min-width: 0;
  overflow: hidden;
}

.quick-form label span,
.promocode-form label span {
  min-width: 0;
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.22;
}

.quick-form label small {
  max-width: 100%;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-form button,
.promocode-form .wide,
.wide {
  grid-column: 1 / -1;
}

.extra-field.hidden {
  display: none;
}

.admin-player-cell,
.admin-ability-name,
.player-title,
.admin-player-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-player-cell img,
.player-title img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.admin-player-cell small,
.admin-ability-name small {
  display: block;
}

.admin-player-title {
  margin-bottom: 18px;
}

.admin-player-title .eyebrow,
.admin-player-title h1,
.admin-player-title span {
  margin-top: 0;
  margin-bottom: 0;
}

.admin-player-title .admin-player-name {
  display: grid;
  gap: 2px;
}

.admin-player-title span {
  color: #9fb2ca;
  font-size: 13px;
}

.admin-title-actions {
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-player-summary {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 18px;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(146, 185, 255, .1);
  font-size: 12px;
  font-weight: 900;
}

.admin-player-actions-row {
  margin: 10px 0 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-action-modal,
.admin-catalog-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 12, .72);
  backdrop-filter: blur(7px);
}

.admin-action-modal.visible,
.admin-catalog-modal.visible {
  display: flex;
}

.admin-action-modal-panel,
.admin-catalog-panel {
  width: min(960px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 22px;
  border-radius: 8px;
  color: #eaf2ff;
  background: linear-gradient(180deg, #121f34, #08101d);
  border: 1px solid rgba(255, 211, 106, .22);
  box-shadow: 0 30px 100px rgba(0,0,0,.45);
}

.admin-action-modal-panel {
  overflow: auto;
}

.admin-catalog-panel {
  height: min(820px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-action-modal-panel.wide {
  width: min(1160px, calc(100vw - 40px));
}

.admin-modal-close {
  float: right;
}

.admin-language-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-reward-picker {
  margin: 14px 0;
}

.admin-reward-head,
.admin-catalog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-reward-basket {
  min-height: 92px;
  max-height: 190px;
  margin-top: 10px;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  overflow: auto;
  border-radius: 8px;
  background: rgba(6, 13, 24, .52);
  border: 1px solid rgba(146, 185, 255, .12);
}

.admin-reward-chip {
  min-height: 46px;
  display: grid;
  grid-template-columns: 36px minmax(120px, 1fr) 70px 32px;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}

.admin-reward-chip.is-duration {
  grid-template-columns: 36px minmax(140px, 1fr) 92px 32px;
}

.admin-promo-tabs {
  width: max-content;
  max-width: 100%;
  margin: 6px 0 18px;
  padding: 5px;
  display: flex;
  gap: 4px;
  border-radius: 999px;
  background: rgba(6, 13, 24, .62);
  border: 1px solid rgba(146, 185, 255, .12);
}

.admin-promo-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: #9fb2ca;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.admin-promo-tabs button.active,
.admin-promo-tabs button:hover {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 199, 95, .22), rgba(113, 71, 232, .2));
}

.promo-tab-panel.hidden {
  display: none;
}

.promo-generated-codes {
  min-height: 320px;
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: .03em;
}

.admin-reward-chip img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.admin-reward-chip input,
.admin-reward-chip button {
  min-height: 32px;
  padding: 0 6px;
}

.admin-catalog-panel > input {
  flex: 0 0 auto;
  margin: 12px 0 16px;
}

.admin-catalog-panel > [data-catalog-grid] {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.admin-catalog-section {
  margin-top: 18px;
}

.admin-catalog-section h4 {
  margin: 0 0 10px;
  color: #ffe2a0;
}

.admin-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.admin-catalog-grid button {
  min-height: 128px;
  padding: 10px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  color: #eaf2ff;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(146, 185, 255, .12);
  box-shadow: none;
  text-transform: none;
}

.admin-catalog-grid img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.admin-catalog-grid span,
.admin-catalog-grid small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-bar {
  position: relative;
  min-width: 180px;
  height: 32px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(146, 185, 255, .1);
}

.table-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #7147e8, #2aa8ff);
}

.difficulty-winrate i {
  background: linear-gradient(90deg, #16a76b, #7ce7ad);
}

.table-bar b {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
}

.admin-ability-chart {
  display: grid;
  gap: 8px;
}

.admin-ability-chart-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(240px, 1fr) minmax(260px, 1.6fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(146, 185, 255, .1);
}

.admin-ability-chart-row img,
.tiny-icon {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
}

.admin-ability-chart-row span {
  min-width: 0;
}

.admin-ability-chart-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ability-admin-grid {
  display: grid;
  gap: 8px;
}

.ability-admin-row {
  display: grid;
  grid-template-columns: 42px minmax(140px, .8fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}

.difficulty-loss-bars {
  height: 96px;
  min-width: 210px;
  display: flex;
  align-items: end;
  gap: 8px;
}

.difficulty-loss-bars span {
  width: 34px;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  color: #8fa4c0;
  font-size: 11px;
}

.difficulty-loss-bars i {
  width: 100%;
  align-self: end;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #ff6b7a, #7b3144);
}

.difficulty-loss-bars b {
  color: #eaf2ff;
}

.danger-panel {
  border-color: rgba(231, 79, 95, .28) !important;
}

.danger-form {
  grid-template-columns: minmax(260px, 1fr) auto;
}

pre,
.json-block {
  overflow: auto;
  padding: 14px;
  border-radius: 8px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(146, 185, 255, .1);
  color: #cfe1ff;
}

.admin-player-snapshot {
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(146, 185, 255, .1);
}

.admin-player-snapshot summary {
  cursor: pointer;
  font-weight: 900;
}

.login-panel {
  width: min(420px, calc(100vw - 44px));
  margin: 80px auto;
  padding: 28px;
  display: grid;
  gap: 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(146,185,255,.12);
}

.bar-line {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(146,185,255,.08);
}

/* Public pages: aligned with the admin visual system. */
body:not(.is-admin) {
  color: #e7f0ff;
  background:
    radial-gradient(circle at 16% -4%, rgba(113, 71, 232, .28), transparent 430px),
    radial-gradient(circle at 82% 8%, rgba(42, 168, 255, .18), transparent 420px),
    linear-gradient(180deg, #07101c 0%, #08111f 48%, #050914 100%);
}

body:not(.is-admin) main {
  position: relative;
  overflow: hidden;
}

body:not(.is-admin) main:before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(146, 185, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(146, 185, 255, .035) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 72%);
  pointer-events: none;
}

body:not(.is-admin) .topbar {
  color: #e7f0ff;
  background: rgba(5, 10, 18, .86);
  border-bottom-color: rgba(146, 185, 255, .12);
}

body:not(.is-admin) .site-nav a:hover,
body:not(.is-admin) .site-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(113, 71, 232, .34), rgba(42, 168, 255, .16));
}

body:not(.is-admin) .site-footer {
  color: #8392aa;
  background: #050914;
  border-top-color: rgba(146, 185, 255, .1);
}

body:not(.is-admin) .button.secondary,
body:not(.is-admin) button.secondary {
  color: #eaf2ff;
  background: linear-gradient(135deg, #1d2b44, #172337);
  border: 1px solid rgba(146, 185, 255, .18);
  box-shadow: none;
}

body:not(.is-admin) .page-head h1,
body:not(.is-admin) .section-title h2,
body:not(.is-admin) .leaderboard-page h1 {
  color: #f4f8ff;
  text-shadow: 0 12px 40px rgba(0,0,0,.42);
}

body:not(.is-admin) .page-head p:not(.eyebrow),
body:not(.is-admin) .section-title p {
  color: #9fb2ca;
}

body:not(.is-admin) .landing-hero.upup-hero {
  min-height: 78vh;
  padding: 116px 22px 86px;
  background:
    linear-gradient(180deg, rgba(5, 9, 18, .12) 0%, rgba(5, 9, 18, .28) 58%, #07101c 100%),
    radial-gradient(circle at 50% 24%, rgba(255, 217, 131, .18), transparent 260px),
    url("/main.webp") center top / cover no-repeat;
}

body:not(.is-admin) .landing-hero.upup-hero:before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 42%, transparent 0 210px, rgba(5, 9, 18, .24) 520px),
    linear-gradient(90deg, rgba(5, 9, 18, .42), transparent 34%, transparent 66%, rgba(5, 9, 18, .42));
}

body:not(.is-admin) .landing-hero.upup-hero .hero-center {
  position: relative;
  width: min(880px, 100%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body:not(.is-admin) .hero-logo {
  filter: drop-shadow(0 18px 36px rgba(0,0,0,.42));
}

body:not(.is-admin) .hero-center p {
  color: #eef6ff;
  text-shadow: 0 3px 22px rgba(0,0,0,.76);
}

body:not(.is-admin) .hero-runes i {
  background: #ffd77d;
  box-shadow: 0 0 24px rgba(255, 215, 125, .75);
}

body:not(.is-admin) .feature-row,
body:not(.is-admin) .home-strip,
body:not(.is-admin) .shop-account-panel,
body:not(.is-admin) .shop-card,
body:not(.is-admin) .legal-card,
body:not(.is-admin) .login-panel,
body:not(.is-admin) .table-wrap,
body:not(.is-admin) .leaderboard-page table {
  color: #e7f0ff;
  background:
    radial-gradient(circle at 100% 0, rgba(113, 71, 232, .16), transparent 260px),
    linear-gradient(180deg, rgba(16, 27, 45, .96), rgba(8, 14, 25, .98));
  border: 1px solid rgba(146, 185, 255, .14);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .26);
}

body:not(.is-admin) .feature-image {
  background: #0b1524;
  border: 1px solid rgba(146, 185, 255, .1);
}

body:not(.is-admin) .feature-text h2,
body:not(.is-admin) .home-strip h2,
body:not(.is-admin) .shop-card h2,
body:not(.is-admin) .legal-card h2,
body:not(.is-admin) .login-panel h1 {
  color: #f4f8ff;
}

body:not(.is-admin) .feature-text p,
body:not(.is-admin) .home-strip p,
body:not(.is-admin) .shop-card p,
body:not(.is-admin) .checkout-legal-check,
body:not(.is-admin) .legal-card,
body:not(.is-admin) .muted {
  color: #9fb2ca;
}

body:not(.is-admin) .shop-account-current {
  color: #fff2c8;
  background: rgba(255, 200, 80, .12);
  border: 1px solid rgba(255, 215, 138, .18);
}

body:not(.is-admin) .shop-card {
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

body:not(.is-admin) .shop-card:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 28% 0, rgba(255, 211, 106, .16), transparent 180px);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

body:not(.is-admin) .shop-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 215, 138, .28);
  box-shadow: 0 32px 100px rgba(0,0,0,.34);
}

body:not(.is-admin) .shop-card:hover:before {
  opacity: 1;
}

body:not(.is-admin) .shop-section {
  width: min(1160px, calc(100vw - 44px));
  margin: 0 auto 24px;
}

body:not(.is-admin) .shop-section-head {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}

body:not(.is-admin) .shop-section-head:after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(255, 215, 138, .22), transparent);
}

body:not(.is-admin) .shop-section-head h2 {
  margin: 0;
  color: #fff2c8;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

body:not(.is-admin) .shop-card img {
  position: relative;
  width: 88px;
  height: 88px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(146,185,255,.12);
}

body:not(.is-admin) .shop-card > b {
  color: #ffe6a0;
}

body:not(.is-admin) .checkout-provider-choice span {
  color: #cfe1ff;
  background: rgba(146,185,255,.08);
  border: 1px solid rgba(146,185,255,.12);
}

body:not(.is-admin) .checkout-provider-choice input:checked + span {
  color: #fff;
  background: linear-gradient(135deg, rgba(113,71,232,.42), rgba(42,168,255,.22));
  border-color: rgba(146,185,255,.24);
}

body:not(.is-admin) input,
body:not(.is-admin) select,
body:not(.is-admin) textarea {
  color: #e7f0ff;
  background: rgba(0,0,0,.24);
  border: 1px solid rgba(146, 185, 255, .14);
}

body:not(.is-admin) input::placeholder,
body:not(.is-admin) textarea::placeholder {
  color: #6f8199;
}

body:not(.is-admin) th {
  color: #9fb2ca;
  background: linear-gradient(180deg, rgba(22, 38, 62, .98), rgba(12, 24, 42, .98));
  border-bottom-color: rgba(146, 185, 255, .12);
}

body:not(.is-admin) td {
  color: #dfeaff;
  border-bottom-color: rgba(146, 185, 255, .09);
}

body:not(.is-admin) tr.click-row:hover td,
body:not(.is-admin) .leaderboard-page tbody tr:hover td {
  background: rgba(113, 71, 232, .12);
}

body:not(.is-admin) .avatar-stack img {
  border-color: #0b1524;
  background: #101b2d;
}

body:not(.is-admin) .difficulty-badge {
  color: #fff2c8;
  background: linear-gradient(135deg, rgba(255, 200, 80, .18), rgba(113, 71, 232, .16));
  border-color: rgba(255, 215, 138, .28);
  text-shadow: 0 1px 10px rgba(255, 197, 86, .16);
}

body:not(.is-admin) .result.victory,
body:not(.is-admin) .result.win,
body:not(.is-admin) .result.active {
  color: #8dffc8;
  background: rgba(31, 184, 118, .13);
  border: 1px solid rgba(31,184,118,.18);
}

body:not(.is-admin) .result.defeat,
body:not(.is-admin) .result.lose,
body:not(.is-admin) .result.loss,
body:not(.is-admin) .result.fail,
body:not(.is-admin) .result.failed,
body:not(.is-admin) .result.inactive {
  color: #ff9aa6;
  background: rgba(231, 79, 95, .13);
  border: 1px solid rgba(231,79,95,.18);
}

body:not(.is-admin) .pagination a,
body:not(.is-admin) .pagination-gap {
  color: #cfe1ff;
  background: linear-gradient(180deg, #101b2d, #0b1524);
  border: 1px solid rgba(146,185,255,.14);
  box-shadow: none;
}

body:not(.is-admin) .pagination a:hover,
body:not(.is-admin) .pagination a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255,199,95,.24), rgba(113,71,232,.22));
  border-color: rgba(255,215,138,.24);
}

body:not(.is-admin) .pagination-gap {
  background: transparent;
  border-color: transparent;
}

body:not(.is-admin) .match-topline > div,
body:not(.is-admin) .match-extra-card,
body:not(.is-admin) .match-result-screen {
  background:
    radial-gradient(circle at 100% 0, rgba(113, 71, 232, .18), transparent 280px),
    linear-gradient(180deg, rgba(16, 27, 45, .97), rgba(8, 14, 25, .99));
  border-color: rgba(146, 185, 255, .14);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .24);
}

body:not(.is-admin) .match-page-shell,
body:not(.is-admin) .match-topline,
body:not(.is-admin) .match-result-screen,
body:not(.is-admin) .match-extra-grid {
  width: min(1680px, calc(100vw - 32px));
}

body:not(.is-admin) .match-result-screen {
  overflow-x: auto;
}

body:not(.is-admin) .match-header,
body:not(.is-admin) .match-row {
  grid-template-columns: 50px minmax(190px, 1.05fr) 78px minmax(190px, .92fr) minmax(180px, .86fr) minmax(300px, 1.22fr) 112px;
}

body:not(.is-admin) .match-header {
  min-width: 1320px;
  color: #fff2c8;
  background: linear-gradient(90deg, rgba(255,199,95,.14), rgba(113,71,232,.16));
  border: 1px solid rgba(255,215,138,.12);
}

body:not(.is-admin) .match-row {
  min-width: 1320px;
  border-color: rgba(146,185,255,.11);
  background: rgba(255,255,255,.035);
}

body:not(.is-admin) .resources {
  flex-wrap: nowrap;
  gap: 5px;
}

body:not(.is-admin) .resource-pill {
  min-width: 58px;
  padding: 5px 7px;
  border-radius: 8px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(146,185,255,.08);
  justify-content: center;
}

body:not(.is-admin) .reward-list {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 5px;
  scrollbar-width: thin;
}

body:not(.is-admin) .reward-list .muted {
  white-space: nowrap;
}

body:not(.is-admin) .item-icon,
body:not(.is-admin) .card-icon {
  flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  border-color: rgba(146,185,255,.14);
}

body:not(.is-admin) .cards-open-button {
  color: #fff2c8;
  background: rgba(255, 211, 106, .08);
  border: 1px solid rgba(255, 211, 106, .22);
}

body:not(.is-admin) .cards-popup {
  background: rgba(2, 5, 12, .76);
  backdrop-filter: blur(10px);
}

body:not(.is-admin) .cards-popup-body {
  width: min(860px, calc(100vw - 34px));
  max-height: min(760px, calc(100vh - 34px));
  padding: 24px;
  overflow: visible;
  position: relative;
  background:
    radial-gradient(circle at 100% 0, rgba(113, 71, 232, .2), transparent 280px),
    linear-gradient(180deg, #101b2d, #07101c);
  border: 1px solid rgba(255, 215, 138, .22);
  box-shadow: 0 36px 120px rgba(0,0,0,.5);
}

body:not(.is-admin) .cards-popup-grid {
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding: 4px;
  grid-template-columns: repeat(auto-fill, 66px);
  align-items: start;
  justify-content: start;
}

body:not(.is-admin) .popup-card,
body:not(.is-admin) .cards-popup-grid .card-icon {
  width: 62px;
  height: 62px;
}

.is-admin .match-page-shell,
.is-admin .match-topline,
.is-admin .match-result-screen,
.is-admin .match-extra-grid {
  width: 100%;
}

.is-admin .match-result-screen,
.is-admin .match-topline > div,
.is-admin .match-extra-card {
  background:
    radial-gradient(circle at 100% 0, rgba(113, 71, 232, .18), transparent 280px),
    linear-gradient(180deg, rgba(16, 27, 45, .97), rgba(8, 14, 25, .99));
  border-color: rgba(146, 185, 255, .14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}

.is-admin .match-result-screen {
  overflow-x: auto;
}

.is-admin .match-header,
.is-admin .match-row {
  min-width: 1320px;
  grid-template-columns: 50px minmax(190px, 1.05fr) 78px minmax(190px, .92fr) minmax(180px, .86fr) minmax(300px, 1.22fr) 112px;
}

.is-admin .match-header {
  color: #fff2c8;
  background: linear-gradient(90deg, rgba(255,199,95,.14), rgba(113,71,232,.16));
  border: 1px solid rgba(255,215,138,.12);
}

.is-admin .match-row {
  border-color: rgba(146,185,255,.11);
  background: rgba(255,255,255,.035);
}

.is-admin .match-row .reward-list {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 5px;
}

.admin-match-modern {
  margin-bottom: 18px;
}

.admin-match-modern .match-page-shell {
  padding-top: 0;
}

.admin-match-modern .match-topline {
  margin-top: 0;
}

body:not(.is-admin) .leaderboard-page {
  padding-top: 8px;
}

body:not(.is-admin) .leaderboard-page h2 {
  color: #ffe6a0;
}

body:not(.is-admin) .dummy-podium {
  width: min(980px, 100%);
  perspective: 900px;
}

body:not(.is-admin) .dummy-podium-slot {
  color: #e7f0ff;
  background:
    radial-gradient(circle at 50% 0, rgba(146,185,255,.16), transparent 170px),
    linear-gradient(180deg, #101b2d, #08101d);
  border: 1px solid rgba(146,185,255,.14);
  box-shadow: 0 30px 90px rgba(0,0,0,.32);
  transform: translateZ(0);
}

body:not(.is-admin) .dummy-podium-slot.place-1 {
  background:
    radial-gradient(circle at 50% 0, rgba(255, 214, 105, .32), transparent 190px),
    linear-gradient(180deg, #172236, #0a1220);
  border-color: rgba(255, 215, 138, .3);
}

body:not(.is-admin) .dummy-podium-slot b {
  color: #f4f8ff;
}

body:not(.is-admin) .dummy-podium-slot strong {
  color: #ffe6a0;
}

body:not(.is-admin) .dummy-podium-slot small {
  color: #8fa4c0;
}

body:not(.is-admin) .dummy-podium-slot img {
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 16px 34px rgba(0,0,0,.34);
}

body:not(.is-admin) .podium-rank {
  color: #20170a;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.42), 0 12px 30px rgba(0,0,0,.28);
}

body:not(.is-admin) .leader-player img {
  border: 1px solid rgba(146,185,255,.18);
}

body:not(.is-admin) .login-panel {
  position: relative;
  margin-top: 110px;
  overflow: hidden;
}

body:not(.is-admin) .login-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(255,211,106,.14), transparent 220px);
  pointer-events: none;
}

body:not(.is-admin) .login-panel > * {
  position: relative;
}

@media (max-width: 1100px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .admin-dashboard-grid,
  .grid.two,
  .admin-hero,
  .shop-account-panel,
  .shop-account-panel:not(.shop-account-ready),
  .home-strip {
    grid-template-columns: 1fr;
  }
  .admin-export-form,
  .admin-filter-row,
  .admin-language-grid {
    grid-template-columns: 1fr;
  }
  .match-topline {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
  .feature-row,
  .feature-row.flip {
    grid-template-columns: 1fr;
  }
  .feature-row.flip .feature-image {
    order: 0;
  }
}

@media (max-width: 760px) {
  .topbar {
    position: static;
    justify-content: center;
    flex-direction: column;
  }
  .site-nav {
    justify-content: center;
  }
  .landing-hero.upup-hero {
    min-height: 640px;
    padding-top: 80px;
  }
  .dummy-podium {
    grid-template-columns: 1fr;
  }
  .dummy-podium-slot,
  .dummy-podium-slot.place-1,
  .dummy-podium-slot.place-3 {
    min-height: 230px;
  }
  .match-topline {
    grid-template-columns: 1fr;
  }
  .resources {
    flex-wrap: wrap;
  }
  .admin-content {
    padding: 18px;
  }
  .inline-search,
  .danger-form,
  .shop-account-form.compact {
    grid-template-columns: 1fr;
  }
}
