:root {
  --bg: #061006;
  --bg-2: #0c180b;
  --panel: #101d0f;
  --panel-2: #162914;
  --line: #6f8d52;
  --line-strong: #d6b15e;
  --text: #fff4d8;
  --muted: #c3c996;
  --soft: #f5e7ba;
  --accent: #8ca96a;
  --accent-2: #d39a38;
  --accent-3: #ffe08a;
  --danger: #e45f45;
  --shadow: 8px 8px 0 #020402;
}

* {
  image-rendering: pixelated;
}

body {
  background:
    linear-gradient(90deg, rgba(255, 224, 138, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(255, 224, 138, 0.03) 1px, transparent 1px),
    #050905;
  background-size: 24px 24px;
  font-family: "Pixelify Sans", Inter, system-ui, sans-serif;
  font-size: 18px;
}

body::before {
  font-family: "Press Start 2P", monospace;
  color: rgba(214, 177, 94, 0.035);
  -webkit-text-stroke: 0;
}

.topbar {
  border-bottom: 4px solid #020402;
  background: #071006;
  box-shadow: 0 4px 0 var(--line);
}

.brand {
  font-size: 1.05rem;
  text-transform: uppercase;
}

.brand-mark {
  width: 48px;
  height: 48px;
  padding: 2px;
  border: 3px solid #020402;
  background: #192615;
  box-shadow: 3px 3px 0 var(--line-strong);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tab-button,
.discord-login,
.logout-btn,
.primary-link,
.secondary-link,
.submit-btn,
.item-button,
.close-btn,
input,
select,
textarea {
  border-radius: 0;
  border: 3px solid #020402;
  box-shadow: 4px 4px 0 #020402;
  font-family: "Pixelify Sans", Inter, sans-serif;
}

.tab-button,
.discord-login,
.primary-link,
.submit-btn,
.item-button {
  background: #314d25;
  color: var(--text);
}

.tab-button.active,
.tab-button:hover,
.item-button:hover,
.submit-btn:hover,
.primary-link:hover {
  background: #51783b;
  border-color: #111708;
  color: #fff8d8;
}

.secondary-link,
.logout-btn,
.close-btn {
  background: #0a1209;
}

.hero {
  min-height: min(780px, calc(100svh - 64px));
  padding: 292px 22px 80px;
  background: #050905;
}

.hero::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(transparent 0 60%, rgba(0, 0, 0, 0.16) 60% 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 6px);
  mix-blend-mode: overlay;
}

.hero-store-logo {
  display: none;
}

.hero-merchant {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 100%;
  width: clamp(200px, 19vw, 285px);
  max-height: none;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(6px 6px 0 #020402);
  transform: translateX(-50%);
}

.magearna {
  position: absolute;
  z-index: 5;
  right: clamp(-60px, -4.4vw, -38px);
  top: 53%;
  width: clamp(75px, 7.8vw, 112px);
  aspect-ratio: 512 / 840;
  background: url("/assets/decor/mage-tio-idle-sheet.png") 0 0 / 600% 100% no-repeat;
  filter: drop-shadow(6px 6px 0 #020402);
  animation: magearna-float 3.2s ease-in-out infinite, mage-tio-idle 900ms step-end infinite;
}

.snorlax {
  display: none;
}

.giant-word {
  display: none;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 0 18px 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

@keyframes magearna-float {
  0%,
  100% {
    transform: translateY(8px);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes magearna-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.92;
  }
}

@keyframes mage-tio-idle {
  0%,
  16.66% {
    background-position-x: 0;
  }

  16.67%,
  33.32% {
    background-position-x: 20%;
  }

  33.33%,
  49.99% {
    background-position-x: 40%;
  }

  50%,
  66.66% {
    background-position-x: 60%;
  }

  66.67%,
  83.32% {
    background-position-x: 80%;
  }

  83.33%,
  100% {
    background-position-x: 100%;
  }
}

.hero-logo {
  position: relative;
  display: grid;
  gap: 8px;
  width: min(100%, 760px);
  margin: 2px auto 18px;
  padding: 16px 18px 18px;
  border: 4px solid #020402;
  background:
    linear-gradient(90deg, transparent 0 11px, rgba(214, 177, 94, 0.11) 11px 13px, transparent 13px 24px),
    #10200e;
  box-shadow:
    inset 0 0 0 4px #314d25,
    8px 8px 0 #020402;
}

.hero-copy .kicker {
  display: none;
}

.hero-logo::before,
.hero-logo::after {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  content: "";
  background:
    linear-gradient(#e44a3c 0 45%, #020402 45% 56%, #fff4d8 56% 100%);
  border: 4px solid #020402;
  image-rendering: pixelated;
  transform: translateY(-50%);
}

.hero-logo::before {
  left: -20px;
}

.hero-logo::after {
  right: -20px;
}

.hero-logo-main,
.hero-logo-sub {
  display: block;
  color: #fff4d8;
  font-family: "Press Start 2P", monospace;
  line-height: 0.95;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    5px 0 0 #020402,
    0 5px 0 #020402,
    5px 5px 0 #020402,
    -3px 0 0 #020402,
    0 -3px 0 #020402;
}

.hero-logo-main {
  font-size: clamp(2.1rem, 5.8vw, 5rem);
}

.hero-logo-sub {
  color: #d6b15e;
  font-size: clamp(1.65rem, 4.9vw, 4rem);
  letter-spacing: 0;
}

h1,
h2 {
  font-family: "Press Start 2P", monospace;
  text-transform: uppercase;
  line-height: 1.18;
}

h1 {
  color: #fff4d8;
  font-size: clamp(2.1rem, 7vw, 5.6rem);
  text-shadow: 5px 5px 0 #020402;
}

h2 {
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
  text-shadow: 3px 3px 0 #020402;
}

h3,
.kicker,
.section-label,
label span {
  font-family: "Press Start 2P", monospace;
  font-size: 0.72rem;
}

.app-shell {
  width: min(1320px, calc(100% - 24px));
}

.catalog-item,
.offer-panel,
.info-panel,
.reward-card,
.points-card,
.reward-flow,
.roulette-stage,
.modal-backdrop .offer-modal,
.summary-card,
.admin-row,
.admin-form {
  border-radius: 0;
  border: 4px solid #020402;
  background: #101d0f;
  box-shadow: 6px 6px 0 #020402;
}

.catalog-item:hover,
.catalog-item:focus-within,
.reward-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 #020402;
  background: #172914;
}

.catalog-art,
.prize-art,
.reward-icon,
.empty-art {
  border-radius: 0;
  border: 3px solid #020402;
  background: #071006;
}

.tag,
.points-pill {
  border-radius: 0;
  border: 2px solid #020402;
  background: #243a1c;
  color: #ffe08a;
}

.modal-backdrop {
  backdrop-filter: none;
  background: rgba(0, 0, 0, 0.72);
}

.offer-modal {
  border-left: 5px solid #020402;
}

.history-row {
  border-radius: 0;
  border: 3px solid #020402;
  background: #071006;
}

.wheel {
  border-radius: 0;
}

.roulette-stage.pixel-roulette {
  overflow: visible;
  width: min(960px, 100%);
  margin-inline: auto;
}

.roulette-stage.pixel-roulette::before {
  inset: 10px;
}

.roulette-stage .roulette-actions {
  width: min(380px, 100%);
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .nav-tabs {
    scrollbar-width: none;
  }

  .hero {
    min-height: 690px;
    padding-top: 308px;
  }

  .hero-store-logo {
    display: none;
  }

  .hero-merchant {
    bottom: 100%;
    left: 50%;
    width: 178px;
    opacity: 0.95;
    transform: translateX(-50%);
  }

  .magearna {
    top: 49%;
    right: -34px;
    width: 62px;
  }

  .hero-copy {
    margin-left: 0;
    padding-top: 0;
  }

  .hero-logo {
    padding: 14px 12px 16px;
  }

  .hero-logo::before,
  .hero-logo::after {
    display: none;
  }

  h1 {
    font-size: clamp(1.65rem, 10vw, 3rem);
  }

  .roulette-stage.pixel-roulette {
    grid-template-columns: 1fr;
  }

  .roulette-stage .roulette-actions {
    grid-column: 1;
  }
}
