/* Aurex GiftBoost — шрифты, токены и стекло поверх Gift Battle */
@font-face {
  font-family: "SF Pro Display";
  src: url("../assets/fonts/SFPRODISPLAYREGULAR-DF_3XEGl.OTF?v=1") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Display";
  src: url("../assets/fonts/SFPRODISPLAYMEDIUM-DSttQARu.OTF?v=1") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SF Pro Display";
  src: url("../assets/fonts/SFPRODISPLAYBOLD-CkqE-6tD.OTF?v=1") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Unbounded;
  src: url("../assets/fonts/Unbounded-Regular-C3kN89tA.ttf?v=1") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Unbounded;
  src: url("../assets/fonts/Unbounded-Medium-B12bGP1c.ttf?v=1") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Unbounded;
  src: url("../assets/fonts/Unbounded-SemiBold-x2Z6HtDC.ttf?v=1") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Unbounded;
  src: url("../assets/fonts/Unbounded-Bold-DbFrtu8U.ttf?v=1") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html.rb-app.rb-giftbattle.rb-aurex {
  --font-sf-pro: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-unbounded: Unbounded, var(--font-sf-pro);
  --font: var(--font-sf-pro);
  --font-body: var(--font-sf-pro);
  --font-display: var(--font-unbounded);
  --color-text: #f4f1fb;
  --color-text-muted: #c9c2d8aa;
  --color-bg: #12141c;
  --color-surface: #0e202c;
  --color-classic: #d7c6ff;
  --color-classic-text: #0c1c26;
  --color-classic-shadow-outer: #a78bfa;
  --color-classic-shadow-inner: #d8fbff;
  --bg-page: #12141c;
  --bg: #12141c;
  --text: var(--color-text);
  --text-primary: var(--color-text);
  --white: var(--color-text);
  --primary-text: #e4d7ff;
  --primary-solid: #d7c6ff;
  --primary-fill: linear-gradient(180deg, #fff8ff 0%, #e4d7ff 42%, #c5b4ea 100%);
  --primary-fill-hover: linear-gradient(180deg, #fff 0%, #efe6ff 42%, #d4c4f4 100%);
  --on-primary: #2a2540;
  --glass-fill: rgba(236, 228, 255, 0.14);
  --glass-stroke: rgba(255, 255, 255, 0.28);
  --glass-highlight: rgba(255, 255, 255, 0.5);
  --accent: #c4b5fd;
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --radius-btn: 18px;
  --radius-card: 18px;
}

.rb-app.rb-aurex {
  --color-text: #f4f1fb;
  --color-text-muted: #c9c2d8aa;
  --bg-page: #12141c;
  --glass-fill: rgba(236, 228, 255, 0.14);
  --glass-stroke: rgba(255, 255, 255, 0.28);
  --glass-highlight: rgba(255, 255, 255, 0.5);
  --accent: #c4b5fd;
  --color-classic: #e4d7ff;
  --color-classic-text: #2a2540;
  --ease-spring: cubic-bezier(0.2, 1.15, 0.32, 1);
  --primary-text: var(--color-text);
  --white: var(--color-text);
}

.rb-app.rb-aurex,
.rb-app.rb-aurex body.rb-giftbattle {
  background-color: var(--bg-page);
  background-image:
    radial-gradient(90% 55% at 6% -8%, rgba(168, 140, 220, 0.32), transparent 58%),
    radial-gradient(70% 48% at 110% 8%, rgba(255, 196, 180, 0.18), transparent 52%),
    radial-gradient(80% 42% at 50% 112%, rgba(180, 160, 230, 0.14), transparent 50%);
  background-attachment: fixed;
}

.rb-app.rb-aurex body.rb-giftbattle::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.08),
      transparent 18%,
      transparent 78%,
      rgba(8, 8, 16, 0.3)
    ),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.32;
}

.rb-app.rb-aurex body.rb-giftbattle > *:not(#aurex-splash-mark) {
  position: relative;
  z-index: 1;
}

.rb-app.rb-aurex .bg-stage {
  opacity: 0.05;
  filter: saturate(0.4) blur(6px);
}

/* —— Splash —— */
#aurex-splash-mark {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  pointer-events: none;
  background:
    radial-gradient(90% 55% at 6% -8%, rgba(168, 140, 220, 0.32), transparent 58%),
    radial-gradient(70% 48% at 110% 8%, rgba(255, 196, 180, 0.18), transparent 52%),
    #12141c;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#aurex-splash-mark.is-out {
  opacity: 0;
  visibility: hidden;
}

#aurex-splash-mark .aurex-draw {
  width: min(300px, 82vw);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 8px 22px rgba(203, 184, 224, 0.38));
}

/* —— Shell enter —— */
.rb-app.rb-aurex #shell:not(.hidden) {
  animation: aurexScreenIn 0.45s ease both;
}

@keyframes aurexScreenIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* —— Glass surfaces —— */
.rb-app.rb-aurex .header.glass-float,
.rb-app.rb-aurex .tabbar.glass-float {
  background: var(--glass-fill);
  border-color: var(--glass-stroke);
  backdrop-filter: blur(28px) saturate(1.7);
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 12px 36px rgba(0, 8, 16, 0.4);
}

@media (max-width: 899.98px) {
  .rb-app.rb-aurex .tabbar.glass-float {
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .rb-app.rb-aurex .tabbar-btn.is-active {
    color: var(--color-classic);
  }
}

.rb-app.rb-aurex .glass-panel,
.rb-app.rb-aurex .connect-gate .gate__card,
.rb-app.rb-aurex .rb-panel,
.rb-app.rb-aurex .card-surface,
.rb-app.rb-aurex .rb-bt-card,
.rb-app.rb-aurex .bt-seat,
.rb-app.rb-aurex .tk-wbox,
.rb-app.rb-aurex .gg-prod-picker,
.rb-app.rb-aurex .rb-ready,
.rb-app.rb-aurex .rb-live-ticker {
  background: var(--glass-fill);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(18px) saturate(1.55);
  -webkit-backdrop-filter: blur(18px) saturate(1.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 24px rgba(0, 8, 16, 0.25);
}

.rb-app.rb-aurex .modal {
  background: rgba(18, 20, 28, 0.94);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 28px 64px rgba(0, 8, 16, 0.55);
}

.rb-app.rb-aurex .modal::backdrop {
  background: rgba(4, 6, 12, 0.65);
  backdrop-filter: blur(8px);
}

.rb-app.rb-aurex .modal[open] {
  animation: aurexModalIn 0.38s var(--ease-spring) both;
}

@keyframes aurexModalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— Chips / tabs —— */
.rb-app.rb-aurex .filter-row.bt-tabs,
.rb-app.rb-aurex #invFilters.bt-tabs {
  background: rgba(236, 228, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 3px;
}

.rb-app.rb-aurex .bt-tabs__b.chip.is-active,
.rb-app.rb-aurex #invFilters .tab.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(228, 215, 255, 0.22));
  color: var(--color-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.rb-app.rb-aurex .header-link.is-active {
  color: var(--color-classic);
}

/* —— Buttons —— */
.rb-app.rb-aurex .btn-primary,
.rb-app.rb-aurex .rb-start-battle,
.rb-app.rb-aurex .rb-start-battle.rb-cta--go {
  background: linear-gradient(180deg, #fff8ff 0%, #e4d7ff 42%, #c5b4ea 100%) !important;
  color: var(--color-classic-text) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -8px 18px rgba(120, 100, 170, 0.28),
    0 10px 28px rgba(180, 160, 230, 0.22) !important;
}

.rb-app.rb-aurex .btn-secondary {
  color: var(--color-text);
  background: var(--glass-fill);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.rb-app.rb-aurex .btn:active:not(:disabled) {
  transform: scale(0.97);
}

.rb-app.rb-aurex .glass-pill,
.rb-app.rb-aurex .rb-lang {
  background: rgba(236, 228, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.rb-app.rb-aurex .rb-lang__btn.is-on {
  background: linear-gradient(180deg, #fff8ff 0%, #e4d7ff 55%, #c5b4ea 100%);
  color: var(--color-classic-text);
}

/* —— Gifts grid —— */
.rb-app.rb-aurex .gift-card,
.rb-app.rb-aurex .gg-card {
  background: rgba(236, 228, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  animation: aurexGiftIn 0.45s var(--ease-spring) both;
}

.rb-app.rb-aurex .gift-card.selected,
.rb-app.rb-aurex .gg-card.is-selected {
  animation: aurexBreathe 2.4s ease-in-out infinite;
  border-color: rgba(196, 181, 253, 0.55);
  background: rgba(196, 181, 253, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 1px rgba(196, 181, 253, 0.25),
    0 12px 32px rgba(168, 140, 220, 0.22);
}

.rb-app.rb-aurex .bt-list.battle-list .bt-li {
  animation: aurexGiftIn 0.4s var(--ease-spring) both;
}

/* —— Feed / toast —— */
.rb-app.rb-aurex .toast {
  animation: aurexFeedPop 0.55s var(--ease-spring) both;
}

.rb-app.rb-aurex #battleWheelBox.is-win {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 36px rgba(196, 181, 253, 0.35);
}

.rb-app.rb-aurex .tk-wheel__pin,
.rb-app.rb-aurex #wheelPin {
  filter: hue-rotate(215deg) saturate(0.9) brightness(1.08)
    drop-shadow(0 0 12px rgba(200, 180, 255, 0.45));
}

/* —— Typography —— */
.rb-app.rb-aurex .brand-text b,
.rb-app.rb-aurex .eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.rb-app.rb-aurex .connect-gate .gate__logo {
  animation: aurexBreathe 2.8s ease-in-out infinite;
}

.rb-app.rb-aurex input,
.rb-app.rb-aurex textarea,
.rb-app.rb-aurex select {
  background: rgba(236, 228, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.rb-app.rb-aurex input:focus,
.rb-app.rb-aurex input:focus-visible,
.rb-app.rb-aurex textarea:focus,
.rb-app.rb-aurex textarea:focus-visible {
  outline: 2px solid #d7c6ff88;
}

@keyframes aurexGiftIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes aurexBreathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@keyframes aurexFeedPop {
  from {
    opacity: 0;
    transform: translateX(-14px) scale(0.72);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

html.rb-app.rb-giftbattle.rb-aurex body.rb-giftbattle {
  font-family: var(--font-sf-pro);
  color: var(--color-text);
}

html.rb-app.rb-giftbattle.rb-aurex .bt-lhead__t,
html.rb-app.rb-giftbattle.rb-aurex .screen-title,
html.rb-app.rb-giftbattle.rb-aurex .brand-text,
html.rb-app.rb-giftbattle.rb-aurex .gate__title,
html.rb-app.rb-giftbattle.rb-aurex .modal-title,
html.rb-app.rb-giftbattle.rb-aurex .rb-panel__title {
  font-family: var(--font-unbounded);
  font-weight: 600;
  letter-spacing: -0.03em;
}

html.rb-app.rb-giftbattle.rb-aurex .btn-primary,
html.rb-app.rb-giftbattle.rb-aurex .rb-cta.btn-primary,
html.rb-app.rb-giftbattle.rb-aurex .rb-start-battle {
  background: var(--primary-fill) !important;
  color: var(--on-primary) !important;
  border: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -8px 18px rgba(120, 100, 170, 0.28),
    0 10px 28px rgba(167, 139, 250, 0.28) !important;
}

@media (hover: hover) {
  html.rb-app.rb-giftbattle.rb-aurex .btn-primary:hover:not(:disabled) {
    background: var(--primary-fill-hover) !important;
    filter: none;
  }
}

html.rb-app.rb-giftbattle.rb-aurex .gg-card,
html.rb-app.rb-giftbattle.rb-aurex .gift-card {
  background: #123040;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

html.rb-app.rb-giftbattle.rb-aurex .gg-card.is-selected,
html.rb-app.rb-giftbattle.rb-aurex .gift-card.selected {
  box-shadow:
    inset 0 0 0 1px var(--color-classic),
    inset 0 0 50px #d7c6ff1a,
    inset 0 0 80px #d7c6ff1a;
}

@media (max-width: 899.98px) {
  html.rb-app.rb-giftbattle.rb-aurex .tabbar.glass-float {
    left: 50%;
    right: auto;
    width: max-content;
    min-width: 204px;
    height: 60px;
    padding: 4px;
    transform: translateX(-50%);
    border-radius: 30px;
    background: rgba(236, 228, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px) saturate(1.7);
    -webkit-backdrop-filter: blur(15px) saturate(1.7);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.48),
      0 12px 36px rgba(0, 8, 16, 0.4);
  }

  html.rb-app.rb-giftbattle.rb-aurex .tabbar-btn {
    width: 76px;
    height: 52px;
    border-radius: 26px;
    transition: transform 0.12s;
  }

  html.rb-app.rb-giftbattle.rb-aurex .tabbar-btn:active {
    transform: scale(0.92);
  }

  html.rb-app.rb-giftbattle.rb-aurex .tabbar-btn.is-active {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rb-app.rb-aurex #shell:not(.hidden),
  .rb-app.rb-aurex .modal[open],
  .rb-app.rb-aurex .gg-card,
  .rb-app.rb-aurex .gift-card,
  .rb-app.rb-aurex .bt-list.battle-list .bt-li,
  .rb-app.rb-aurex .rb-live-ticker__item,
  .rb-app.rb-aurex .toast,
  #aurex-splash-mark .aurex-splash-logo,
  .rb-app.rb-aurex .connect-gate .gate__logo {
    animation: none !important;
  }
}
