@font-face {
  font-family: "SF Pro Rounded";
  src:
    url("./fonts/SF-Pro-Rounded-Regular.woff2") format("woff2"),
    url("./fonts/SF-Pro-Rounded-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SF Pro Rounded";
  src:
    url("./fonts/SF-Pro-Rounded-Bold.woff2") format("woff2"),
    url("./fonts/SF-Pro-Rounded-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #19191b;
  --screen: #0e0f10;
  --material: rgba(35, 35, 37, 0.72);
  --material-strong: rgba(43, 43, 45, 0.82);
  --material-soft: rgba(255, 255, 255, 0.075);
  --stroke: rgba(255, 255, 255, 0.13);
  --stroke-soft: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.58);
  --muted-strong: rgba(255, 255, 255, 0.72);
  --blue: #0f9bfd;
  --green: #4fd374;
  --red: #ff5c50;
  --gold: #e8c45d;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --ease-pop: cubic-bezier(0.2, 0.9, 0.22, 1);
}

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

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

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

@keyframes tapPop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(0.965);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes selectPop {
  0% {
    transform: scale(0.985);
  }
  60% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes actionIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

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

@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.96);
  }
  70% {
    opacity: 1;
    transform: translateY(-3px) scale(1.01);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sheetOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}

@keyframes billFly {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.75) rotate(0deg);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), var(--y)) scale(1) rotate(var(--r));
  }
}

* {
  box-sizing: border-box;
  font-family: var(--font) !important;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 31rem),
    linear-gradient(180deg, #09090a 0%, #161618 48%, #0b0b0c 100%);
  font-family: var(--font);
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.preview {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
}

.screen {
  position: relative;
  width: min(402px, 100vw);
  height: 100dvh;
  max-height: none;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 48% 25%, rgba(255, 255, 255, 0.08), transparent 16rem),
    radial-gradient(circle at 14% 58%, rgba(79, 211, 116, 0.09), transparent 12rem),
    linear-gradient(180deg, #101112 0%, var(--bg) 100%);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

body.telegram-runtime .screen {
  width: 100vw;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 82%, transparent);
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.34));
}

.app {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: max(34px, env(safe-area-inset-top)) clamp(20px, 5.6vw, 28px) calc(80px + env(safe-area-inset-bottom));
}

.app.telegram-locked {
  display: grid;
  place-items: center;
  padding: max(26px, env(safe-area-inset-top)) 28px max(26px, env(safe-area-inset-bottom));
}

.boot-loader {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.08), transparent 15rem),
    rgba(13, 14, 15, 0.96);
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.boot-loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-spinner {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--green);
  border-right-color: rgba(15, 155, 253, 0.85);
  animation: spin 0.78s linear infinite;
}

.telegram-lock {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.telegram-lock h2 {
  max-width: 310px;
  margin: 0;
  font-size: 30px;
  line-height: 1.04;
}

.telegram-lock p {
  max-width: 290px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.telegram-lock a {
  height: 46px;
  display: inline-grid;
  place-items: center;
  margin-top: 8px;
  padding: 0 20px;
  border-radius: 15px;
  background: var(--blue);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.header {
  height: 82px;
  flex: 0 0 82px;
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.header h1 {
  max-width: calc(100% - 62px);
  margin: 0;
  overflow: hidden;
  font-size: 47px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(180deg, #ffffff 3%, #d9d9da 38%, #808083 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.36);
}

.lang-button {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.18),
    0 10px 22px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(22px) saturate(1.35);
  transition: transform 0.18s var(--ease-pop), background 0.18s ease;
}

.lang-button img {
  width: 33px;
  height: 33px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.balance-card,
.match-card,
.portfolio-card,
.history-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    var(--material);
  border: 1px solid var(--stroke);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 18px 38px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(28px) saturate(1.25);
}

.portfolio-card,
.history-card {
  animation: cardIn 0.34s var(--ease-pop) both;
}

.balance-card {
  height: 91px;
  min-height: 91px;
  flex: 0 0 91px;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: center;
  gap: 14px;
  padding: 0 18px 0 22px;
  border-radius: 15px;
  text-align: left;
  transition: transform 0.18s var(--ease-pop), border-color 0.18s ease, background 0.18s ease;
}

.balance-copy {
  min-width: 0;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 7px;
  padding-top: 2px;
}

.balance-card span,
.section-title span,
.portfolio-card span,
.history-card span,
.history-card small {
  color: var(--muted);
  font-weight: 700;
}

.balance-card span {
  display: block;
  font-size: 17px;
  line-height: 1;
}

.balance-card strong {
  display: block;
  margin: 0;
  overflow: hidden;
  font-size: 31px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-icon {
  width: 58px;
  height: 58px;
  justify-self: end;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(79, 211, 116, 0.24), rgba(79, 211, 116, 0.09)),
    rgba(23, 75, 42, 0.55);
  box-shadow: none;
}

.wallet-icon img {
  width: 38px;
  height: 38px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
  transition: transform 0.24s var(--ease-pop);
}

.sport-tabs {
  width: 100%;
  height: 48px;
  flex: 0 0 48px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 21px 0 12px;
}

.match-filters {
  width: 100%;
  min-height: 34px;
  flex: 0 0 34px;
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.match-filters.is-pressed,
.match-filters.dragging {
  cursor: grabbing;
}

.match-filters.dragging .filter-chip {
  pointer-events: none;
}

.match-filters::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  height: 34px;
  min-width: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
}

.filter-chip b {
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
}

.filter-chip.active {
  border-color: rgba(79, 211, 116, 0.62);
  background:
    linear-gradient(180deg, rgba(79, 211, 116, 0.14), rgba(79, 211, 116, 0.045)),
    rgba(24, 45, 33, 0.72);
  color: #ffffff;
}

.filter-chip.active b {
  background: rgba(79, 211, 116, 0.22);
  color: #b9f39a;
}

.sport-tab {
  position: relative;
  height: 48px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
    rgba(35, 35, 37, 0.72);
  border: 1px solid var(--stroke);
  color: #ffffff;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  backdrop-filter: blur(26px) saturate(1.2);
  transition:
    transform 0.18s var(--ease-pop),
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.sport-tab.active {
  color: #ffffff;
  border-color: rgba(79, 211, 116, 0.72);
  background:
    linear-gradient(180deg, rgba(79, 211, 116, 0.16), rgba(79, 211, 116, 0.055)),
    rgba(24, 45, 33, 0.78);
  box-shadow: none;
}

.sport-tab:active,
.odd:active,
.nav-item:active,
.primary-action:active {
  transform: scale(0.965);
}

.tap-pop {
  animation: tapPop 0.22s var(--ease-pop);
}

.sport-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: block;
  object-fit: contain;
  filter: none;
}

.page {
  display: none;
  min-height: 0;
  width: 100%;
  min-width: 0;
}

.page.active {
  display: block;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 92px;
  animation: pageIn 0.22s var(--ease-pop) both;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.page.active::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.app[data-page="portfolio"] .sport-tabs,
.app[data-page="history"] .sport-tabs,
.app[data-page="portfolio"] .match-filters,
.app[data-page="history"] .match-filters {
  display: none;
}

.app.has-pick .page.active {
  padding-bottom: 142px;
}

.featured {
  position: relative;
  height: 294px;
  min-height: 294px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px minmax(0, 1fr);
  grid-template-rows: 32px 104px 1px 50px 42px;
  align-items: center;
  gap: 9px 8px;
  padding: 13px 14px 15px;
  border-radius: 17px;
}

.featured::after {
  content: "";
  grid-column: 1 / -1;
  grid-row: 3;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.live-pill {
  position: static;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  min-width: 96px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 12px;
  color: var(--red);
  background:
    linear-gradient(180deg, rgba(255, 92, 80, 0.2), rgba(255, 92, 80, 0.08)),
    rgba(64, 33, 32, 0.82);
  border: 1px solid rgba(255, 92, 80, 0.28);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: none;
  transition: transform 0.22s var(--ease-pop);
}

.live-pill span,
.live-pill b {
  white-space: nowrap;
}

.live-pill b {
  color: #ffffff;
  font-size: 14px;
}

.featured[data-status="upcoming"] .live-pill {
  color: #ffd66e;
  background:
    linear-gradient(180deg, rgba(232, 196, 93, 0.2), rgba(232, 196, 93, 0.08)),
    rgba(58, 45, 22, 0.82);
  border-color: rgba(232, 196, 93, 0.28);
}

.team {
  grid-row: 2;
  min-width: 0;
  display: grid;
  grid-template-rows: 22px 76px;
  justify-items: center;
  align-self: start;
  align-content: start;
  gap: 3px;
  padding-top: 0;
  transform: translateY(0);
}

.team .club-logo {
  grid-row: 2;
}

.team strong {
  grid-row: 1;
}

.team-left {
  grid-column: 1;
}

.team-right {
  grid-column: 3;
}

.team strong {
  display: block;
  max-width: 100%;
  margin-top: 0;
  overflow: hidden;
  color: #ffffff;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 700;
}

.stars {
  display: none;
  height: 0;
  color: var(--gold);
  font-size: 15px;
  line-height: 1;
  letter-spacing: 1px;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.club-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: visible;
}

.club-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter:
    drop-shadow(0 7px 11px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.16));
}

.club-logo-wide {
  width: 96px;
  height: 56px;
  margin-top: 2px;
}

.logo-spartak {
  width: 104px;
  height: 66px;
}

.logo-cska,
.logo-lokomotiv,
.logo-dynamo,
.logo-krasnodar,
.logo-spirit,
.logo-vp,
.logo-navi,
.logo-falcons {
  width: 58px;
  height: 58px;
}

.logo-zenit img {
  transform: scale(1.1);
}

.logo-spartak img,
.logo-krasnodar img {
  transform: scale(1.08);
}

.logo-lokomotiv img,
.logo-cska img {
  transform: scale(1.06);
}

.featured .club-logo-wide {
  width: 78px;
  height: 72px;
  overflow: visible;
  transform: none;
}

.featured .logo-zenit img {
  transform: scale(0.9);
}

.featured .logo-spartak img {
  transform: scale(0.8);
}

.featured .logo-spirit img,
.featured .logo-vp img {
  transform: scale(0.9);
}

.score {
  color: #ffffff;
  font-size: 42px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: none;
  transition: transform 0.22s var(--ease-pop);
}

.score-wrap {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  display: grid;
  justify-items: center;
  align-self: center;
  gap: 6px;
  padding-top: 0;
}

.live-meta {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.05;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.odds-row {
  grid-column: 1 / -1;
  grid-row: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 0;
}

.extra-row {
  grid-column: 1 / -1;
  grid-row: 5;
}

.market-odd {
  height: 40px;
  background:
    linear-gradient(180deg, rgba(79, 211, 116, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(43, 47, 44, 0.78);
}

.invoice-link {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(79, 211, 116, 0.14);
  border: 1px solid rgba(79, 211, 116, 0.34);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.invoice-link[hidden],
.pay-status[hidden] {
  display: none;
}

.pay-status {
  margin-top: -2px;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.68);
}

.market-odd .odd-label {
  font-size: 10.5px;
}

.market-odd b {
  font-size: 15px;
}

.odd {
  height: 44px;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(48, 48, 50, 0.78);
  border: 1px solid var(--stroke-soft);
  box-shadow: none;
  font-size: 11.5px;
  line-height: 1;
  font-weight: 700;
  backdrop-filter: blur(20px);
  transition:
    transform 0.18s var(--ease-pop),
    border-color 0.18s ease,
    background 0.18s ease;
}

.odd-label,
.odd b {
  min-width: 0;
  overflow: hidden;
  max-width: 100%;
  text-align: left;
}

.odd-label {
  display: block;
  min-height: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.odd b {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 16.5px;
  line-height: 1;
  padding-bottom: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.odd.selected {
  border-color: rgba(255, 255, 255, 0.38);
  background:
    linear-gradient(180deg, rgba(15, 155, 253, 0.18), rgba(15, 155, 253, 0.055)),
    rgba(38, 52, 63, 0.82);
}

.match-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.matches-empty,
.market-empty {
  display: grid;
  place-items: center;
  min-width: 0;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.matches-empty {
  min-height: 92px;
  padding: 16px;
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(40, 40, 42, 0.74);
  border: 1px solid var(--stroke-soft);
  font-size: 13px;
}

.matches-empty.loading {
  background: transparent;
  border-color: transparent;
}

.matches-empty.loading::before {
  content: "";
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.13);
  border-top-color: var(--green);
  animation: spin 0.78s linear infinite;
}

.market-empty {
  grid-column: 1 / -1;
  min-height: 40px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--stroke-soft);
  font-size: 11px;
}

.compact-match {
  height: 156px;
  min-height: 156px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr);
  grid-template-rows: 38px 40px 36px;
  align-items: center;
  gap: 8px 10px;
  padding: 11px 12px;
  border-radius: 17px;
}

.compact-team {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.compact-home {
  justify-content: flex-start;
}

.compact-away {
  justify-content: flex-end;
}

.compact-logo {
  width: 36px;
  height: 36px;
}

.compact-match strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
}

.compact-away strong {
  text-align: right;
}

.match-time {
  color: var(--muted);
  text-align: center;
  font-size: 12.5px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.compact-match .odds-row {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 0;
}

.compact-match .extra-row {
  grid-row: 3;
}

.compact-match .odd {
  height: 40px;
  gap: 5px;
  padding: 0 8px;
}

.compact-match .market-odd {
  height: 36px;
}

.compact-match .odd-label {
  min-height: 0;
  font-size: 10.5px;
}

.compact-match .odd b {
  font-size: 14.5px;
}

.compact-match .club-logo img {
  transform: scale(0.94);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  margin: 10px 0 14px;
  gap: 12px;
}

.section-title h2 {
  margin: 0;
  min-width: 0;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 700;
}

.section-title span {
  min-height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.portfolio-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 118px;
  padding: 14px;
  border-radius: 15px;
}

.portfolio-card strong {
  display: block;
  font-size: 17px;
  line-height: 1.12;
}

.portfolio-card span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.22;
  max-width: 230px;
}

.portfolio-empty-copy {
  min-width: 0;
}

.ticket-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(79, 211, 116, 0.22), rgba(79, 211, 116, 0.08)),
    rgba(23, 75, 42, 0.54);
}

.ticket-icon svg {
  width: 29px;
  height: 29px;
  display: block;
  fill: none;
  stroke: #4fd374;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.portfolio-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.portfolio-row {
  min-height: 122px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 10px;
  padding: 14px;
  overflow: hidden;
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025)),
    rgba(38, 38, 40, 0.75);
  border: 1px solid var(--stroke-soft);
}

.portfolio-row.status-won {
  background:
    linear-gradient(180deg, rgba(79, 211, 116, 0.14), rgba(255, 255, 255, 0.025)),
    rgba(36, 49, 39, 0.8);
  border-color: rgba(79, 211, 116, 0.3);
}

.stake-action {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 6;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--blue);
  color: #ffffff;
  font-size: 19px;
  line-height: 1;
  font-weight: 700;
  box-shadow: none;
  transition: transform 0.18s var(--ease-pop), background 0.18s ease, opacity 0.18s ease;
}

.stake-action:not([hidden]) {
  animation: actionIn 0.26s var(--ease-pop) both;
}

.stake-action[hidden] {
  display: none;
}

.stake-action.is-done {
  background: var(--green);
}

.topup-modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
  animation: modalFadeIn 0.18s ease both;
}

.topup-modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
}

.topup-sheet {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  padding: 20px 16px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(49, 49, 52, 0.96), rgba(28, 28, 30, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.46);
  transform-origin: 50% 100%;
  animation: sheetIn 0.34s var(--ease-pop) both;
}

.topup-modal.is-closing {
  animation: modalFadeOut 0.18s ease both;
}

.topup-modal.is-closing .topup-sheet {
  animation: sheetOut 0.2s ease both;
}

.money-burst {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.money-burst .bill {
  position: absolute;
  left: 50%;
  bottom: 32%;
  width: 30px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: linear-gradient(180deg, #6ce889, #33b95a);
  color: #0f3a1d;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.24);
  animation: billFly 0.9s ease-out forwards;
  animation-delay: var(--d);
}

.wallet-sheet {
  gap: 16px;
}

.wallet-view {
  display: grid;
  gap: 14px;
}

.wallet-view[hidden] {
  display: none;
}

.wallet-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.wallet-stats div {
  display: grid;
  gap: 6px;
  padding: 12px 9px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.wallet-stats span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.wallet-stats b {
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
}

.wallet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.active-invoices {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 15px;
  background: rgba(79, 211, 116, 0.08);
  border: 1px solid rgba(79, 211, 116, 0.2);
}

.active-invoices[hidden] {
  display: none;
}

.active-invoices > strong {
  color: #ffffff;
  font-size: 12px;
}

.active-invoices a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.active-invoices b {
  color: var(--green);
  white-space: nowrap;
}

.topup-sheet h2 {
  margin: 0;
  padding-right: 30px;
  font-size: 18px;
  line-height: 1.18;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
  font-size: 22px;
  line-height: 1;
  transition: transform 0.18s var(--ease-pop), background 0.18s ease;
}

.amount-field {
  height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.username-field {
  height: 54px;
  display: grid;
  align-items: center;
  padding: 0 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.username-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
}

.amount-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
}

.amount-field input::-webkit-outer-spin-button,
.amount-field input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.amount-field input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.amount-field span {
  color: var(--blue);
  font-size: 24px;
  font-weight: 700;
}

.payment-list {
  display: grid;
  gap: 10px;
}

.payment-option {
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  font-size: 14px;
  font-weight: 700;
}

.payment-option.active {
  border-color: rgba(79, 211, 116, 0.54);
  background:
    linear-gradient(180deg, rgba(79, 211, 116, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.075);
}

.payment-option img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}

.stars-pay-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffe083;
  background: linear-gradient(180deg, rgba(255, 211, 77, 0.26), rgba(255, 255, 255, 0.07));
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
}

.pay-button,
.secondary-action,
.collect-button {
  height: 54px;
  border-radius: 16px;
  background: var(--blue);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  transition: transform 0.18s var(--ease-pop), background 0.18s ease;
}

.secondary-action {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.collect-button {
  height: 38px;
  justify-self: stretch;
  background: var(--green);
  font-size: 14px;
}

.pay-button.is-done {
  background: var(--green);
}

.stake-summary {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 13px;
  font-weight: 700;
}

.form-error {
  margin: -4px 2px 0;
  color: #ff7f76;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
}

.portfolio-head,
.history-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-chip {
  height: 26px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.status-chip.win,
.status-chip.success {
  background: rgba(79, 211, 116, 0.13);
  border-color: rgba(79, 211, 116, 0.28);
  color: #b9f39a;
}

.status-chip.loss {
  background: rgba(255, 92, 80, 0.12);
  border-color: rgba(255, 92, 80, 0.24);
  color: #ff8a82;
}

.status-chip.muted {
  background: rgba(206, 199, 255, 0.11);
  border-color: rgba(206, 199, 255, 0.2);
  color: #cec7ff;
}

.bet-metrics {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.bet-metrics div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 9px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.bet-metrics span {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bet-metrics b {
  overflow: hidden;
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-row strong,
.portfolio-row > div:not(.portfolio-head) > span {
  display: block;
}

.portfolio-row > div:not(.portfolio-head),
.history-card > div:not(.history-head) {
  min-width: 0;
}

.portfolio-head .status-chip,
.history-head .status-chip {
  max-width: 58%;
  flex: 0 1 auto;
  display: inline-flex;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  overflow: hidden;
  text-overflow: ellipsis;
}

.portfolio-head .status-chip.win,
.history-head .status-chip.win {
  color: #b9f39a;
}

.history-head .status-chip.loss {
  color: #ff8a82;
}

.portfolio-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 700;
}

.portfolio-row strong {
  overflow: hidden;
  display: -webkit-box;
  line-height: 1.14;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  font-size: 17px;
}

.portfolio-row > div:not(.portfolio-head) > span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.portfolio-head > b,
.history-head > b {
  min-width: 0;
  max-width: 42%;
  flex: 0 1 auto;
  overflow: hidden;
  color: var(--blue);
  font-size: 18px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-action {
  width: 100%;
  height: 58px;
  margin-top: 18px;
  border-radius: 15px;
  background: var(--blue);
  color: #ffffff;
  font-size: 21px;
  line-height: 1;
  font-weight: 700;
  box-shadow: none;
}

.history-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 10px;
  padding: 14px;
  overflow: hidden;
  border-radius: 17px;
}

.history-card.lost {
  background:
    linear-gradient(180deg, rgba(255, 92, 80, 0.11), rgba(255, 255, 255, 0.02)),
    rgba(40, 35, 35, 0.78);
  border-color: rgba(255, 92, 80, 0.22);
}

.history-card + .history-card {
  margin-top: 12px;
}

.history-card span {
  font-size: 11px;
}

.history-card strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.15;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  white-space: normal;
}

.money-history-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.money-history-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card.success span {
  color: #b9f39a;
}

.history-card.muted span {
  color: #cec7ff;
}

.history-card.lost span {
  color: #ff8a82;
}

.history-card .bet-metrics span {
  color: var(--muted);
}

.bottom-nav {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 5;
  height: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
  overflow: hidden;
  border-radius: 27px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    #272729;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.24),
    inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px) saturate(1.18);
}

.nav-thumb {
  position: absolute;
  left: 4px;
  top: 4px;
  width: calc((100% - 8px) / 3);
  height: calc(100% - 8px);
  border-radius: 24px;
  background: #4f4949;
  box-shadow: none;
  transition: transform 0.34s var(--ease-pop);
}

.bottom-nav[data-active="portfolio"] .nav-thumb {
  transform: translateX(100%);
}

.bottom-nav[data-active="history"] .nav-thumb {
  transform: translateX(200%);
}

.nav-item {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 5px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  transition: color 0.18s ease, transform 0.18s var(--ease-pop);
}

.nav-item.active {
  color: #ffffff;
}

.nav-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.nav-icon-image {
  object-fit: contain;
  fill: none;
  stroke: none;
  filter: none;
}

.nav-item > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .sport-tab:hover,
  .odd:hover,
  .primary-action:hover,
  .nav-item:hover,
  .lang-button:hover {
    transform: translateY(-1px);
  }
}

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

@media (max-width: 520px) {
  body {
    background: var(--bg);
  }

  .preview {
    min-height: 100dvh;
  }

  .screen {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    box-shadow: none;
  }

  .header h1 {
    font-size: 46px;
  }
}

@media (max-height: 780px) {
  .app {
    padding-top: max(24px, env(safe-area-inset-top));
  }

  .header {
    height: 60px;
    flex-basis: 60px;
  }

  .header h1 {
    font-size: 42px;
  }

  .balance-card {
    height: 76px;
    min-height: 76px;
    flex-basis: 76px;
    padding-left: 20px;
  }

  .balance-copy {
    gap: 5px;
    padding-top: 1px;
  }

  .balance-card span {
    font-size: 15.5px;
  }

  .balance-card strong {
    font-size: 29px;
  }

  .sport-tabs {
    margin-top: 12px;
    margin-bottom: 8px;
  }

  .match-filters {
    min-height: 31px;
    flex-basis: 31px;
    margin-bottom: 8px;
  }

  .filter-chip {
    height: 31px;
    padding: 0 10px;
  }

  .featured {
    height: 270px;
    min-height: 270px;
    grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr);
    grid-template-rows: 27px 92px 1px 42px 36px;
    gap: 7px 8px;
    padding: 9px 12px;
  }

  .score {
    font-size: 34px;
  }

  .club-logo-wide {
    width: 78px;
    height: 42px;
  }

  .featured .club-logo-wide {
    width: 70px;
    height: 64px;
    overflow: visible;
    transform: none;
  }

  .team {
    grid-template-rows: 18px 68px;
    gap: 3px;
    padding-top: 0;
    transform: translateY(0);
  }

  .featured .logo-zenit img {
    transform: scale(0.88);
  }

  .featured .logo-spartak img {
    transform: scale(0.8);
  }

  .featured .logo-spirit img,
  .featured .logo-vp img {
    transform: scale(0.9);
  }

  .team strong {
    font-size: 14.5px;
  }

  .live-pill {
    height: 26px;
    min-width: 92px;
    font-size: 11px;
  }

  .live-pill b {
    font-size: 13px;
  }

  .live-meta {
    font-size: 9.5px;
  }

  .match-list {
    gap: 8px;
    margin-top: 8px;
  }

  .compact-match {
    height: 130px;
    min-height: 130px;
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
    grid-template-rows: 31px 36px 32px;
    gap: 6px 8px;
    padding: 7px 11px;
  }

  .compact-logo {
    width: 32px;
    height: 32px;
  }

  .compact-match strong,
  .match-time {
    font-size: 13px;
  }

  .match-time {
    font-size: 11.5px;
  }

  .compact-match .odd {
    height: 36px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px;
    padding: 0 7px;
    align-items: center;
  }

  .compact-match .market-odd {
    height: 32px;
  }

  .compact-match .odd-label {
    font-size: 9.5px;
    line-height: 1;
  }

  .compact-match .odd b {
    font-size: 14px;
    line-height: 1;
  }

  .featured .odd {
    height: 42px;
    gap: 4px;
    padding: 0 8px;
  }

  .featured .odd-label {
    font-size: 10.3px;
  }

  .featured .odd b {
    font-size: 15.5px;
  }
}
