@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --bg: #070B18;
  --surface: #0B1122;
  --surface-2: #101830;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #EEF1F6;
  --muted: #98A2B5;
  --dim: #667086;
  --accent: #20C6FA;
  --accent-ink: #04131C;
  --gold: #FFDE21;
  --ok: #4ADE80;
  --bad: #FF5D5D;
  --cta: #F1F3F8;
  --cta-ink: #0A0F1C;
  --glow: var(--accent);
  --wrap: 1160px;
  --display: "Outfit", "DM Sans", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.lock {
  overflow: hidden;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  width: min(var(--wrap), 100% - 48px);
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 13px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.25s;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn.primary {
  background: var(--cta);
  color: var(--cta-ink);
}

.btn.primary:hover {
  background: #fff;
  box-shadow: 0 12px 34px -16px rgba(255, 255, 255, 0.6);
}

.btn.ghost {
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.02);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.26);
}

.btn.sm {
  height: 38px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 11px;
}

.btn.wide {
  width: 100%;
}

.btn.done {
  background: var(--ok);
  color: #04180B;
  box-shadow: none;
}

.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.07);
}

.chip svg {
  width: 17px;
  height: 17px;
}

.chip img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  image-rendering: pixelated;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

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

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 99px;
  font: 600 11px/1 var(--body);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--glow);
  background: color-mix(in srgb, var(--glow) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--glow) 26%, transparent);
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.input::placeholder {
  color: var(--dim);
}

.input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s, backdrop-filter 0.25s;
}

.nav.stuck {
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-color: var(--line);
}

.nav-in {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 18px/1 var(--display);
  letter-spacing: -0.01em;
}

.brand img {
  width: 30px;
  height: 30px;
}

.brand i {
  font-style: normal;
  color: var(--accent);
}

.brand em {
  font: 500 11.5px/1 var(--body);
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line-2);
  padding: 4px 8px;
  border-radius: 99px;
}

.links {
  display: flex;
  gap: 2px;
  margin-right: auto;
}

.links a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.links a:hover,
.links a.on {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-btn {
  position: relative;
  width: 40px;
  padding: 0;
  justify-content: center;
}

.cart-btn b {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 11px/18px var(--body);
  text-align: center;
}

.cart-btn b:empty {
  display: none;
}

.cart-btn.bump b {
  animation: bump 0.4s var(--ease);
}

.menu {
  position: relative;
}

.menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 132px;
  padding: 6px;
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s var(--ease);
}

.menu.open ul {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.menu li button {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.menu li button:hover,
.menu li button.on {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.foot {
  margin-top: 48px;
  padding: 36px 0 52px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
  justify-content: space-between;
}

.foot small {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-size: 13px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.foot a {
  transition: color 0.2s;
}

.foot a:hover {
  color: var(--text);
}

.toasts {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  display: grid;
  gap: 8px;
  justify-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 11px 16px;
  border-radius: 12px;
  background: #fff;
  color: #0A0F1C;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 18px 44px -14px rgba(0, 0, 0, 0.7);
  animation: pop 0.3s var(--ease);
  transition: opacity 0.25s, transform 0.25s;
}

.toast.bad {
  background: var(--bad);
  color: #fff;
}

.toast.out {
  opacity: 0;
  transform: translateY(8px);
}

.rv {
  opacity: 0;
}

.rv.in {
  opacity: 1;
  animation: rise 0.7s var(--ease) var(--d, 0ms) backwards;
}

.offscreen {
  position: fixed;
  left: -9999px;
  top: 0;
  opacity: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
}

@keyframes bump {
  40% {
    transform: scale(1.35);
  }
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-4px);
  }
  40%,
  80% {
    transform: translateX(4px);
  }
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 6px transparent;
  }
}

@media (max-width: 900px) {
  .nav-in {
    flex-wrap: wrap;
    gap: 0 16px;
    padding-top: 12px;
  }

  .brand {
    margin-right: auto;
  }

  .links {
    order: 3;
    width: 100%;
    margin: 8px -4px 0;
    padding-bottom: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .links::-webkit-scrollbar {
    display: none;
  }

  .nav {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
}

@media (max-width: 560px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .brand em,
  .user-chip span {
    display: none;
  }

  .user-chip {
    padding: 0 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .rv {
    opacity: 1;
    transform: none;
  }
}
