:root {
  --bg-deep: #05070a;
  --glass: rgba(12, 18, 32, 0.52);
  --glass-strong: rgba(16, 22, 38, 0.78);
  --border-glass: rgba(255, 255, 255, 0.12);
  --blue: #4d9fff;
  --cyan: #00e5ff;
  --violet: #a855f7;
  --text: #eef6ff;
  --text-muted: #9eb4d4;
  --font-ui: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-display: "Sora", var(--font-ui);
  --fw-regular: 400;
  --fw-medium: 500;
  --liquid-blur: blur(22px) saturate(1.65);
}

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

html.tg-webapp body {
  min-height: var(--tg-viewport-stable-height, 100vh);
  padding-top: max(0px, env(safe-area-inset-top, 0px));
  padding-bottom: max(0px, env(safe-area-inset-bottom, 0px));
}

body {
  font-family: var(--font-ui);
  font-weight: var(--fw-regular);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg-deep);
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* —— Liquid glass (кнопки) —— */
.liquid-glass {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: var(--fw-medium);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.05) 38%,
      rgba(12, 24, 48, 0.35) 100%
    );
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: var(--liquid-blur);
  -webkit-backdrop-filter: var(--liquid-blur);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 20px rgba(77, 159, 255, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0.06) 32%,
    transparent 52%,
    rgba(0, 229, 255, 0.07) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.liquid-glass::after {
  content: "";
  position: absolute;
  top: -55%;
  left: -15%;
  width: 55%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.22) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.liquid-glass:hover {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 28px rgba(77, 159, 255, 0.1),
    0 14px 36px rgba(0, 0, 0, 0.32),
    0 0 32px rgba(77, 159, 255, 0.12);
  transform: translateY(-1px);
}

.liquid-glass:hover::after {
  opacity: 1;
  transform: translate(4%, 6%);
}

.liquid-glass:active {
  transform: scale(0.98);
}

.liquid-glass:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.liquid-glass--accent {
  color: rgba(240, 248, 255, 0.95);
  background:
    linear-gradient(
      145deg,
      rgba(77, 159, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.08) 42%,
      rgba(168, 85, 247, 0.12) 100%
    );
  border-color: rgba(125, 190, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 0 24px rgba(77, 159, 255, 0.12),
    0 10px 32px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(77, 159, 255, 0.1);
}

.liquid-glass--pill {
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hidden {
  display: none !important;
}

/* —— Background (glass wave art) —— */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg-deep);
}

.page-bg__image {
  position: absolute;
  inset: 0;
  background: url("../img/offfloor-bg.jpg") center center / cover no-repeat;
  transform: scale(1.03);
  animation: bgKenBurns 28s ease-in-out infinite alternate;
}

@keyframes bgKenBurns {
  0% {
    transform: scale(1.03) translate(0, 0);
  }
  100% {
    transform: scale(1.07) translate(-1.2%, 0.8%);
  }
}

.page-bg__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 7, 10, 0.22) 0%,
    rgba(5, 7, 10, 0.48) 40%,
    rgba(5, 7, 10, 0.78) 70%,
    rgba(5, 7, 10, 0.92) 100%
  );
}

/* —— Glass —— */
.glass-panel {
  background: var(--glass-strong);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 40px rgba(77, 159, 255, 0.08);
}

.glow-pulse {
  animation: glowPulse 3.2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 0 24px rgba(77, 159, 255, 0.2);
  }
  50% {
    box-shadow:
      0 12px 40px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 0 48px rgba(77, 159, 255, 0.38),
      0 0 72px rgba(168, 85, 247, 0.12);
  }
}

/* —— Logo —— */
.brand-logo {
  position: relative;
  display: inline-flex;
  justify-content: center;
  max-width: min(100%, 360px);
}

.brand-logo--sm {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 12px;
}

.brand-logo--hero {
  max-width: min(100%, 760px);
  margin: 4px auto 0;
  padding: 0 clamp(8px, 3vw, 20px);
}

.brand-logo__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 32px rgba(77, 159, 255, 0.55)) drop-shadow(0 0 72px rgba(168, 85, 247, 0.28));
}

.brand-logo--float {
  animation: floatLogo 5.5s ease-in-out infinite;
}

@keyframes floatLogo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* —— Gate —— */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 7, 10, 0.55);
  backdrop-filter: blur(10px);
}

.gate__card {
  width: min(520px, 100%);
  padding: 24px 20px 24px;
  border-radius: 24px;
  text-align: center;
}

.gate__title {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: var(--fw-medium);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.gate__text {
  font-size: 0.94rem;
  font-weight: var(--fw-regular);
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.btn-ton {
  width: 100%;
  padding: 15px 20px;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

/* —— Shop —— */
.shop {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 16px 10px 48px;
}

@media (min-width: 1024px) {
  .shop {
    padding: 24px 20px 64px;
  }
}

.shop__header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 4px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.market-tabs {
  max-width: 1400px;
  margin: 12px auto 0;
  padding: 0 4px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

#market-tabs button.market-tabs__btn {
  flex: 1 1 auto;
  min-width: 96px;
  max-width: 140px;
  padding: 10px 14px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(12, 18, 32, 0.55);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  line-height: 1.2;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.market-tabs__btn:hover {
  color: var(--text);
  border-color: rgba(77, 159, 255, 0.45);
}

.market-tabs__btn--active {
  color: #fff;
  border-color: rgba(77, 159, 255, 0.65);
  background: linear-gradient(
    145deg,
    rgba(77, 159, 255, 0.35),
    rgba(168, 85, 247, 0.22)
  );
  box-shadow:
    0 0 24px rgba(77, 159, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.lot-filters {
  position: relative;
  z-index: 8;
  max-width: 1400px;
  margin: 0 auto 12px;
  padding: 0 4px;
}

.lot-filters__panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(8, 12, 24, 0.62);
  border: 1px solid rgba(77, 159, 255, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: visible;
}

.lot-filters__panel--hidden {
  display: none;
}

.lot-filters__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 140px;
  min-width: min(100%, 148px);
}

.lot-filters__label {
  font-size: 0.68rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lot-filters__label--row {
  width: 100%;
  margin-bottom: -4px;
}

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

/* Кастомный дропдаун (нативный option в WebView не стилизуется) */
.ui-select {
  position: relative;
  width: 100%;
}

.ui-select__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(77, 159, 255, 0.35);
  background: linear-gradient(
    160deg,
    rgba(14, 22, 40, 0.92),
    rgba(6, 10, 20, 0.88)
  );
  color: #f1f6ff;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: var(--fw-regular);
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.22);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.ui-select__trigger:hover {
  border-color: rgba(77, 159, 255, 0.55);
}

.ui-select--open .ui-select__trigger {
  border-color: rgba(77, 159, 255, 0.75);
  box-shadow:
    0 0 0 1px rgba(77, 159, 255, 0.25),
    0 0 28px rgba(77, 159, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ui-select__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-select__chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid #9eb4d4;
  border-bottom: 2px solid #9eb4d4;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ui-select--open .ui-select__chevron {
  transform: rotate(-135deg) translateY(-2px);
  border-color: var(--cyan);
}

.ui-select__list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: min(280px, 52vh);
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid rgba(77, 159, 255, 0.35);
  background: rgba(10, 16, 30, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(77, 159, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ui-select__list::-webkit-scrollbar {
  width: 6px;
}

.ui-select__list::-webkit-scrollbar-thumb {
  background: rgba(77, 159, 255, 0.35);
  border-radius: 999px;
}

.ui-select__option {
  padding: 11px 12px;
  border-radius: 10px;
  color: #dbe8fb;
  font-size: 0.88rem;
  line-height: 1.3;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.ui-select__option:hover {
  background: rgba(77, 159, 255, 0.14);
  color: #fff;
}

.ui-select__option--active {
  background: linear-gradient(
    90deg,
    rgba(77, 159, 255, 0.22),
    rgba(0, 229, 255, 0.1)
  );
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.2);
}

.lot-filters__field {
  position: relative;
}

.lot-filters__select {
  color-scheme: dark;
}

.lot-filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.lot-filters__chip {
  flex: 1 1 auto;
  min-width: 64px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 18, 32, 0.55);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.lot-filters__chip:hover {
  color: var(--text);
  border-color: rgba(77, 159, 255, 0.4);
}

.lot-filters__chip--active {
  color: #fff;
  border-color: rgba(0, 229, 255, 0.45);
  background: linear-gradient(145deg, rgba(77, 159, 255, 0.28), rgba(168, 85, 247, 0.18));
  box-shadow: 0 0 18px rgba(77, 159, 255, 0.2);
}

.lot-filters__empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Атрибуты как на fragment.com/gift/… */
.gift-card__attrs-fragment {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(4, 8, 18, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gift-card__attr-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gift-card__attr-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.gift-card__attr-row:first-child {
  padding-top: 0;
}

.gift-card__attr-key {
  color: var(--text-muted);
  font-weight: var(--fw-regular);
  flex-shrink: 0;
}

.gift-card__attr-val {
  color: #e8f2ff;
  font-weight: var(--fw-medium);
  text-align: right;
  line-height: 1.35;
}

.gift-card__attr-rarity {
  display: block;
  font-size: 0.68rem;
  font-weight: var(--fw-regular);
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.lot-filters__panel[data-filters-for="nft"] {
  border-color: rgba(255, 255, 255, 0.1);
}

.lot-filters__panel[data-filters-for="nft"] .lot-filters__label {
  color: #8fa8c8;
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 0.76rem;
}

.gift-card__letters {
  font-size: 0.72rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.gift-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cyan);
}

.gift-card__media--888,
.gift-card__media--username {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: linear-gradient(160deg, rgba(77, 159, 255, 0.12), rgba(168, 85, 247, 0.1));
}

.gift-card__glyph {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
  color: #fff;
  text-align: center;
  padding: 8px;
  word-break: break-word;
}

.gift-card__glyph--handle {
  font-size: 1.22rem;
}

.gift-card__leaderboard {
  margin: 4px 0 12px;
  padding: 10px 10px 8px;
  border-radius: 14px;
  background: rgba(5, 10, 22, 0.55);
  border: 1px solid rgba(77, 159, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.gift-card__leaderboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gift-card__leaderboard-title {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.gift-card__leaderboard-peak {
  font-size: 0.78rem;
  font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
  color: var(--blue);
}

.gift-card__leaderboard-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gift-card__leaderboard-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  line-height: 1.2;
}

.gift-card__leaderboard-row--top {
  background: linear-gradient(
    90deg,
    rgba(77, 159, 255, 0.16),
    rgba(0, 229, 255, 0.08)
  );
  border: 1px solid rgba(0, 229, 255, 0.22);
  box-shadow: 0 0 16px rgba(77, 159, 255, 0.12);
}

.gift-card__lb-rank {
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.gift-card__leaderboard-row--top .gift-card__lb-rank {
  color: var(--cyan);
}

.gift-card__lb-user {
  font-family: var(--font-ui);
  color: #c5d8f5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.gift-card__lb-ton {
  font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
  color: #e8f4ff;
  white-space: nowrap;
}

.gift-card__leaderboard-row--top .gift-card__lb-ton {
  color: var(--cyan);
}

.shop__brand {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 8px auto 14px;
  pointer-events: none;
}

.shop__brand .brand-logo__img {
  pointer-events: none;
}

.shop__tagline {
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 2.4vw, 0.76rem);
  font-weight: var(--fw-regular);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238, 246, 255, 0.68);
  text-shadow: 0 0 20px rgba(77, 159, 255, 0.2);
}

.wallet-pill {
  color: rgba(238, 246, 255, 0.88);
  font-variant-numeric: tabular-nums;
  min-width: 5.5rem;
}

.wallet-pill--balance {
  min-width: 7.5rem;
  color: var(--cyan);
  letter-spacing: 0.02em;
  text-transform: none;
}

#gifts-root {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
}

.market-tabs {
  position: relative;
  z-index: 3;
}

.collection {
  margin-bottom: 36px;
}

.collection__title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3vw, 1.42rem);
  font-weight: var(--fw-medium);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  padding-left: 2px;
  color: rgba(238, 246, 255, 0.92);
  text-shadow: 0 0 24px rgba(77, 159, 255, 0.18);
}

@media (min-width: 1024px) {
  .collection {
    margin-bottom: 44px;
  }

  .shop__header {
    margin-bottom: 28px;
  }
}

.gifts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 1024px) {
  .gifts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.gift-card {
  border-radius: 18px;
  padding: 12px;
  background: var(--glass);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.25s ease-in-out,
    box-shadow 0.25s ease-in-out,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  animation: cardEnter 520ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--stagger, 0ms);
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gift-card:hover {
  border-color: rgba(77, 159, 255, 0.45);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    0 0 32px rgba(77, 159, 255, 0.22),
    0 0 48px rgba(168, 85, 247, 0.08);
  transform: translateY(-4px);
}

.gift-card__media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 24px rgba(77, 159, 255, 0.12);
}

.gift-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.09) 50%,
    transparent 62%
  );
  animation: imgShimmer 7s ease-in-out infinite;
}

@keyframes imgShimmer {
  0%,
  100% {
    transform: translateX(-120%);
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  55% {
    transform: translateX(120%);
    opacity: 0;
  }
}

.gift-card:hover .gift-card__img {
  transform: scale(1.03);
}

.gift-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: linear-gradient(145deg, rgba(77, 159, 255, 0.15), rgba(168, 85, 247, 0.12));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 1024px) {
  .gift-card {
    border-radius: 22px;
    padding: 18px;
  }

  .gift-card__media {
    border-radius: 16px;
    margin-bottom: 12px;
  }

  .gift-card__img {
    min-height: 200px;
  }
}

.gift-card__collection {
  font-size: 0.7rem;
  font-weight: var(--fw-regular);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.2;
}

.gift-card__name {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: clamp(0.82rem, 3vw, 1.05rem);
  line-height: 1.25;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.gift-card__timer {
  font-size: 0.7rem;
  font-weight: var(--fw-regular);
  color: #7dd3fc;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

@media (min-width: 1024px) {
  .gift-card__timer {
    font-size: 0.85rem;
  }
}

.gift-card__timer.is-ended {
  color: var(--text-muted);
  text-shadow: none;
}

.gift-card__timer.is-urgent,
.bet-modal__timer.is-urgent {
  color: #ff8fa3;
  text-shadow: 0 0 14px rgba(255, 99, 132, 0.45);
}

.gift-card__price {
  font-size: 0.86rem;
  font-weight: var(--fw-medium);
  color: var(--cyan);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

@media (min-width: 1024px) {
  .gift-card__price {
    font-size: 1rem;
    margin-bottom: 12px;
  }
}

.gift-card__bet {
  width: 100%;
  border-radius: 14px;
  padding: 11px 10px;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.gift-card__bet.liquid-glass--accent::after {
  width: 48%;
  top: -50%;
}

@media (min-width: 1024px) {
  .gift-card__bet {
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 0.88rem;
  }
}

/* —— Bet modal —— */
.bet-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.bet-modal.hidden {
  display: none;
}

.bet-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.78);
  backdrop-filter: blur(8px);
  opacity: 0;
}

.bet-modal.bet-modal--open .bet-modal__backdrop {
  animation: backdropIn 200ms ease forwards;
}

@keyframes backdropIn {
  to {
    opacity: 1;
  }
}

.bet-modal__card {
  position: relative;
  width: min(420px, 100%);
  padding: 24px 22px 22px;
  border-radius: 22px;
  transform: scale(0.96);
  opacity: 0;
}

.bet-modal.bet-modal--open .bet-modal__card {
  animation: modalCardIn 200ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes modalCardIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.bet-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.bet-modal__title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: var(--fw-medium);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.bet-modal__gift {
  font-size: 0.98rem;
  font-weight: var(--fw-regular);
  margin-bottom: 8px;
  color: #d8e8ff;
}

.bet-modal__timer {
  font-size: 0.9rem;
  font-weight: var(--fw-regular);
  color: #7dd3fc;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.bet-modal__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.bet-modal__field-label {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.bet-modal__input {
  width: 100%;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1.05rem;
  font-weight: var(--fw-medium);
  font-family: var(--font-display);
  color: var(--text);
  background: rgba(5, 7, 10, 0.55);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bet-modal__input:focus {
  outline: none;
  border-color: rgba(77, 159, 255, 0.65);
  box-shadow: 0 0 24px rgba(77, 159, 255, 0.35);
}

.bet-modal__error {
  font-size: 0.82rem;
  font-weight: var(--fw-regular);
  color: #ff8fa3;
  margin-top: 4px;
}

.bet-modal__rows {
  margin-bottom: 20px;
}

.bet-modal__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
}

.bet-modal__row dt {
  color: var(--text-muted);
}

.bet-modal__row dd {
  font-weight: var(--fw-medium);
  color: var(--blue);
}

.bet-modal__row--total {
  border-bottom: none;
  padding-top: 14px;
}

.bet-modal__row--total dd {
  font-size: 1.05rem;
  font-weight: var(--fw-medium);
  color: var(--cyan);
}

.bet-modal__confirm {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.94rem;
  letter-spacing: 0.04em;
}

.empty-wallet-modal__text {
  font-size: 0.98rem;
  font-weight: var(--fw-regular);
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 20px;
  text-align: center;
}

/* —— Резерв перед списанием —— */
.reserve-modal .bet-modal__backdrop {
  background: rgba(5, 7, 10, 0.86);
}

.reserve-modal__card {
  text-align: center;
  padding: 28px 24px 26px;
  border: 1px solid rgba(77, 159, 255, 0.28);
  box-shadow:
    0 0 48px rgba(77, 159, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.reserve-modal__icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.reserve-modal__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(77, 159, 255, 0.45);
  background: radial-gradient(circle at 30% 30%, rgba(0, 229, 255, 0.25), rgba(77, 159, 255, 0.08));
  position: relative;
  box-shadow: 0 0 28px rgba(77, 159, 255, 0.35);
}

.reserve-modal__icon--pulse::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--cyan);
  border-right-color: rgba(77, 159, 255, 0.6);
  animation: reserveSpin 0.85s linear infinite;
}

.reserve-modal__card--done .reserve-modal__icon--pulse::after {
  animation: none;
  border: none;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e5ff' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E")
    center / 34px no-repeat;
}

.reserve-modal__card--done .reserve-modal__icon {
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.35);
}

@keyframes reserveSpin {
  to {
    transform: rotate(360deg);
  }
}

.reserve-modal__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.reserve-modal__text {
  font-size: 1.02rem;
  font-weight: var(--fw-medium);
  line-height: 1.45;
  color: #e8f4ff;
  min-height: 2.9em;
  margin-bottom: 20px;
  transition: color 0.35s ease;
}

.reserve-modal__card--done .reserve-modal__text {
  color: var(--cyan);
}

.reserve-modal__progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.reserve-modal__bar {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--violet));
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.45);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.reserve-modal.bet-modal--open .reserve-modal__bar {
  width: 52%;
  animation: reserveBarPulse 1.4s ease-in-out infinite;
}

.reserve-modal__card--done .reserve-modal__bar {
  width: 100%;
  animation: none;
}

@keyframes reserveBarPulse {
  0%,
  100% {
    opacity: 0.85;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .page-bg__image {
    animation: none;
    transform: none;
  }

  .gift-card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .gift-card__media::after {
    animation: none;
    display: none;
  }

  .brand-logo--float {
    animation: none;
  }

  .glow-pulse {
    animation: none;
  }

  .bet-modal__card,
  .bet-modal__backdrop {
    opacity: 1;
    transform: none;
  }
}
