@font-face {
  font-family: "Exo 2";
  src: url("./assets/fonts/exo2-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Exo 2";
  src: url("./assets/fonts/exo2-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #07030c;
  --panel: rgba(10, 5, 18, 0.96);
  --panel-2: rgba(12, 6, 21, 0.98);
  --line: rgba(157, 57, 215, 0.43);
  --text: #f7efff;
  --muted: #91879d;
  --violet: #b92cff;
  --green: #20e979;
  --app-height: 100svh;
  --safe-top: var(--tg-safe-area-inset-top, 0px);
  --safe-right: var(--tg-safe-area-inset-right, 0px);
  --safe-bottom: var(--tg-safe-area-inset-bottom, 0px);
  --safe-left: var(--tg-safe-area-inset-left, 0px);
  --content-safe-top: var(--tg-content-safe-area-inset-top, 0px);
  --content-safe-bottom: var(--tg-content-safe-area-inset-bottom, 0px);
  --top-safe: max(0px, var(--safe-top), var(--content-safe-top), env(safe-area-inset-top));
  --bottom-safe: max(0px, var(--safe-bottom), var(--content-safe-bottom), env(safe-area-inset-bottom));
  --telegram-header-clearance: 0px;
  --view-top-padding: calc(var(--top-safe) + var(--telegram-header-clearance) + 16px);
  --side: max(8px, calc(100vw * 0.032));
  --panel-side: clamp(16px, 5vw, 21px);
  --metrics-side: clamp(22px, 6.5vw, 28px);
  font-family: "Exo 2";
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body.telegram-app {
  --telegram-header-clearance: clamp(28px, 4.2vh, 38px);
  --view-top-padding: calc(var(--top-safe) + var(--telegram-header-clearance) + 16px);
}

body {
  min-height: var(--app-height);
  overflow: clip;
  color: var(--text);
  overscroll-behavior: none;
  touch-action: manipulation;
}

button,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: 100vw;
  height: var(--app-height);
  min-height: var(--app-height);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 39%, rgba(166, 47, 255, 0.18), transparent 30%),
    radial-gradient(circle at 50% 85%, rgba(176, 43, 255, 0.18), transparent 24%),
    #050209;
}

.screen {
  position: relative;
  width: min(100vw, 430px);
  height: var(--app-height);
  max-height: 930px;
  overflow: clip;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(6, 3, 12, 0.9) 0%, rgba(6, 3, 12, 0.45) 48%, rgba(6, 3, 12, 0.98) 88%),
    #06020a;
  isolation: isolate;
}

.screen::before {
  content: "";
  position: absolute;
  inset: -10% -18%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 13%, rgba(162, 37, 255, 0.16), transparent 24%),
    linear-gradient(90deg, transparent 0 49%, rgba(155, 60, 255, 0.045) 50%, transparent 51%),
    linear-gradient(0deg, transparent 0 49%, rgba(155, 60, 255, 0.035) 50%, transparent 51%);
  background-size: auto, 30px 30px, 30px 30px;
  mask-image: radial-gradient(circle at 50% 40%, black, transparent 76%);
}

.topbar {
  position: absolute;
  top: calc(var(--top-safe) + var(--telegram-header-clearance) + 1.35%);
  left: calc(5.7vw + var(--safe-left));
  right: calc(5.3vw + var(--safe-right));
  height: 7.1%;
  min-height: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  z-index: 5;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: clamp(7px, 2.1vw, 9px);
  min-width: 0;
}

.avatar {
  position: relative;
  flex: 0 0 auto;
  width: clamp(27px, 8.5vw, 32px);
  height: clamp(27px, 8.5vw, 32px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(179, 76, 255, 0.55);
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(145deg, #b62cff, #431063);
  box-shadow: 0 0 8px rgba(173, 52, 255, 0.2);
  font-size: clamp(12px, 3.8vw, 15px);
  font-weight: 900;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.avatar.has-photo img {
  opacity: 1;
}

.avatar.has-photo [data-user-initial] {
  opacity: 0;
}

.user-profile strong {
  min-width: 0;
  max-width: 58vw;
  overflow: hidden;
  color: #fff;
  font-size: clamp(12px, 3.8vw, 15px);
  line-height: 1;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.admin-entry {
  color: #f0c8ff;
  background: linear-gradient(145deg, rgba(68, 17, 91, 0.92), rgba(22, 8, 34, 0.92));
}

.icon-button {
  width: clamp(25px, 9.75vw, 36px);
  height: clamp(25px, 9.75vw, 36px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(174, 76, 255, 0.52);
  border-radius: 7px;
  color: #d9a5ff;
  background: rgba(25, 10, 42, 0.76);
  box-shadow: inset 0 0 14px rgba(156, 67, 255, 0.16), 0 0 12px rgba(158, 55, 255, 0.22);
}

.icon-button svg,
.tab svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero {
  position: absolute;
  top: calc(var(--top-safe) + 9.1%);
  left: 0;
  right: 0;
  height: 42.5%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  container-type: size;
}

.rig-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100cqw, 116.96cqh);
  height: min(100cqh, 85.5cqw);
  transform: translate(-50%, -50%) scale(0.91);
}

.rig-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: saturate(1.03) contrast(1.05) brightness(0.98);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 18%;
  background: linear-gradient(180deg, transparent, #06020a 96%);
}

.hero-glow {
  position: absolute;
  inset: 34% 0 -4%;
  background: radial-gradient(ellipse at 50% 50%, rgba(191, 43, 255, 0.28), transparent 57%);
  mix-blend-mode: screen;
  opacity: 0.66;
}

.stats-grid {
  position: absolute;
  top: 53.6%;
  left: calc(var(--metrics-side) + var(--safe-left));
  right: calc(var(--metrics-side) + var(--safe-right));
  height: 11%;
  display: grid;
  grid-template-columns: 49.15% 50.85%;
  z-index: 3;
  overflow: hidden;
  border: 1px solid rgba(181, 68, 246, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(16, 8, 28, 0.98), rgba(7, 3, 13, 0.99)),
    var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 0 15px rgba(154, 39, 232, 0.13);
}

.stat-card {
  position: relative;
  min-width: 0;
  height: 100%;
  padding: clamp(8px, 2.5vw, 10px) clamp(7px, 2.2vw, 9px);
  display: grid;
  grid-template-columns: clamp(30px, 8.5vw, 35px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.stat-card:first-child {
  padding-left: clamp(11px, 3.2vw, 13px);
}

.stat-card:nth-child(2) {
  padding-left: clamp(9px, 2.7vw, 11px);
  gap: 7px;
}

.stat-card + .stat-card {
  border-left: 1px solid rgba(169, 77, 221, 0.55);
}

.metric-icon {
  width: clamp(30px, 8.5vw, 35px);
  height: clamp(32px, 9vw, 37px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(179, 72, 241, 0.58);
  border-radius: 7px;
  color: #c06dff;
  background: rgba(25, 10, 42, 0.76);
  box-shadow: inset 0 0 13px rgba(159, 48, 231, 0.12);
}

.metric-icon .coin {
  width: clamp(19px, 5.3vw, 22px);
  height: clamp(19px, 5.3vw, 22px);
}

.speed-icon svg {
  width: 55%;
  height: 55%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-copy {
  min-width: 0;
}

.stat-label {
  display: block;
  color: #aa8fbd;
  font-size: clamp(7px, 2.35vw, 9px);
  line-height: 1.1;
  font-weight: 600;
  text-transform: uppercase;
}

.stat-card:first-child .stat-label {
  font-size: clamp(7px, 2.1vw, 8px);
  white-space: nowrap;
}

.stat-card strong {
  display: block;
  margin-top: clamp(6px, 1.8vw, 8px);
  min-height: 20px;
  color: #fff;
  font-size: clamp(15px, 4.65vw, 18px);
  line-height: 1;
  font-weight: 570;
  white-space: nowrap;
}

.power-line {
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.power-line svg {
  width: 7px;
  height: 10px;
  margin-left: 2px;
  fill: #c13cff;
  filter: drop-shadow(0 0 4px rgba(193, 60, 255, 0.65));
}

small {
  display: block;
  margin-top: 5px;
  color: #aca2b5;
  font-size: clamp(7px, 2.75vw, 10px);
  line-height: 1;
  font-weight: 600;
}

.positive {
  color: var(--green);
}

.hourly-income {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #d1b0e2;
  white-space: nowrap;
}

.hourly-income img {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 3px rgba(255, 184, 38, 0.55));
}

.income-card {
  position: absolute;
  top: 65.65%;
  left: calc(var(--panel-side) + var(--safe-left));
  right: calc(var(--panel-side) + var(--safe-right));
  height: 22.5%;
  z-index: 3;
  padding: clamp(7px, 2.2vw, 9px);
  border: 1px solid rgba(203, 87, 255, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(17, 8, 29, 0.98), rgba(7, 3, 13, 0.995)),
    var(--panel-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 18px rgba(183, 47, 255, 0.23);
  text-align: center;
}

.income-inner {
  height: 100%;
  padding: clamp(7px, 2.1vw, 9px) clamp(11px, 3.2vw, 13px) clamp(7px, 2.1vw, 9px);
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  border: 1px solid rgba(139, 55, 193, 0.34);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(25, 11, 40, 0.18), rgba(7, 3, 13, 0.08));
}

.income-card strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.8vw, 11px);
  margin-top: clamp(5px, 1.5vw, 6px);
  color: #fff;
  font-size: clamp(28px, 9.2vw, 36px);
  line-height: 1;
  font-weight: 520;
}

.coin {
  flex: 0 0 auto;
  width: clamp(18px, 5.2vw, 22px);
  height: clamp(18px, 5.2vw, 22px);
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255, 182, 33, 0.56));
}

.income-card .coin {
  width: clamp(32px, 10vw, 40px);
  height: clamp(32px, 10vw, 40px);
  filter: drop-shadow(0 0 9px rgba(255, 179, 26, 0.64));
}

.claim-button .coin {
  width: clamp(18px, 5.2vw, 21px);
  height: clamp(18px, 5.2vw, 21px);
}

.claim-button {
  width: 100%;
  height: clamp(35px, 9.6vw, 39px);
  margin-top: clamp(14px, 2.2vh, 18px);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.6vw, 11px);
  border: 1px solid rgba(190, 92, 222, 0.6);
  border-radius: 8px;
  color: #f9effc;
  background: linear-gradient(180deg, #9228b3 0%, #61107f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -5px 12px rgba(39, 0, 66, 0.36),
    0 4px 10px rgba(47, 4, 69, 0.3),
    0 0 4px rgba(154, 41, 190, 0.14);
  font-size: clamp(12px, 3.9vw, 16px);
  line-height: 1;
  font-weight: 650;
}

.claim-button:active {
  transform: translateY(1px) scale(0.997);
  filter: brightness(0.96);
}

.claim-button.collecting {
  filter: brightness(1.06) saturate(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -5px 12px rgba(47, 0, 79, 0.3),
    0 4px 13px rgba(68, 7, 96, 0.38),
    0 0 10px rgba(174, 54, 216, 0.3);
}

.claim-button:disabled {
  cursor: default;
}

.coin-rain-layer {
  position: absolute;
  inset: 0;
  z-index: 9;
  overflow: hidden;
  pointer-events: none;
}

.coin-rain-particle {
  position: absolute;
  display: block;
  object-fit: contain;
  filter:
    drop-shadow(0 0 4px rgba(255, 187, 44, 0.92))
    drop-shadow(0 2px 2px rgba(76, 29, 0, 0.5));
  will-change: transform, opacity;
}

.admin-view {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: none;
  padding:
    var(--view-top-padding)
    calc(11px + var(--safe-right))
    max(14px, var(--bottom-safe))
    calc(11px + var(--safe-left));
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 7%, rgba(145, 43, 196, 0.16), transparent 26%),
    radial-gradient(circle at 12% 48%, rgba(49, 73, 147, 0.09), transparent 31%),
    linear-gradient(180deg, #09030f 0%, #040207 100%);
}

.screen[data-active-view="admin"] .admin-view {
  display: flex;
  flex-direction: column;
}

.screen[data-active-view="admin"] > .topbar,
.screen[data-active-view="admin"] > .hero,
.screen[data-active-view="admin"] > .stats-grid,
.screen[data-active-view="admin"] > .income-card,
.screen[data-active-view="admin"] > .tabbar {
  display: none;
}

.admin-header {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 9px;
}

.admin-header > button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(151, 63, 190, 0.48);
  border-radius: 7px;
  color: #dba7f4;
  background: rgba(20, 9, 28, 0.94);
}

.admin-header svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-header div {
  min-width: 0;
}

.admin-header span,
.admin-activity header span {
  display: block;
  margin-bottom: 3px;
  color: #a762c2;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0;
}

.admin-header h1 {
  margin: 0;
  color: #f9f1fc;
  font-size: 18px;
  line-height: 1;
  font-weight: 780;
}

.admin-refresh.loading svg {
  animation: admin-spin 700ms linear infinite;
}

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

.admin-content {
  min-height: 0;
  flex: 1;
  padding-bottom: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.admin-content::-webkit-scrollbar {
  display: none;
}

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

.admin-metric {
  position: relative;
  min-height: 82px;
  padding: 12px 10px 9px;
  overflow: hidden;
  border: 1px solid rgba(122, 55, 153, 0.47);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(23, 10, 32, 0.97), rgba(8, 4, 13, 0.99));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.admin-metric::after {
  content: "";
  position: absolute;
  top: -25px;
  right: -20px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 50, 230, 0.16), transparent 70%);
}

.admin-metric span {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 22px;
  color: #8f8297;
  font-size: 8px;
  line-height: 1.25;
  font-weight: 650;
}

.admin-metric strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 5px;
  color: #fbf7fc;
  font-size: 21px;
  line-height: 1;
  font-weight: 720;
}

.admin-metric small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 5px;
  color: #b759d4;
  font-size: 8px;
}

.admin-metric.alert {
  border-color: rgba(202, 80, 115, 0.48);
}

.admin-metric.alert small {
  color: #ec7898;
}

.admin-task-builder {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(139, 59, 171, 0.55);
  border-radius: 8px;
  background:
    radial-gradient(circle at 86% 12%, rgba(142, 37, 190, 0.13), transparent 31%),
    rgba(9, 4, 13, 0.94);
}

.admin-task-builder > header {
  min-height: 43px;
  padding: 9px 11px 7px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(107, 48, 129, 0.3);
  background: linear-gradient(180deg, rgba(31, 12, 41, 0.9), rgba(14, 7, 19, 0.7));
}

.admin-task-builder header span {
  display: block;
  margin-bottom: 3px;
  color: #b566d2;
  font-size: 7px;
  font-weight: 750;
}

.admin-task-builder h2 {
  margin: 0;
  color: #f3ebf6;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

.admin-task-builder form {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 8px;
}

.admin-task-type {
  grid-column: 1 / -1;
  height: 34px;
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  border: 1px solid rgba(86, 47, 99, 0.45);
  border-radius: 7px;
  background: rgba(5, 3, 8, 0.74);
}

.admin-task-type button {
  border: 0;
  border-radius: 5px;
  color: #817687;
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-weight: 650;
}

.admin-task-type button.active {
  color: #fff6ff;
  background: linear-gradient(135deg, rgba(166, 32, 214, 0.88), rgba(91, 20, 128, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
}

.admin-task-hint {
  grid-column: 1 / -1;
  margin: -3px 2px 0;
  color: #766b7c;
  font-size: 7px;
  line-height: 1.25;
}

.admin-task-builder label {
  min-width: 0;
  display: block;
}

.admin-task-builder label:nth-of-type(2),
.admin-task-builder label:nth-of-type(3) {
  grid-column: 1 / -1;
}

.admin-task-builder label:nth-of-type(1) {
  grid-column: 1;
  grid-row: 3;
}

.admin-task-builder label:nth-of-type(4) {
  grid-column: 2;
  grid-row: 3;
}

.admin-task-builder label > span:first-child {
  display: block;
  margin: 0 0 5px 2px;
  color: #83778a;
  font-size: 7px;
  font-weight: 650;
}

.admin-task-builder input {
  width: 100%;
  height: 34px;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid rgba(87, 48, 102, 0.58);
  border-radius: 6px;
  outline: 0;
  color: #efe7f2;
  background: rgba(7, 4, 10, 0.92);
  font: inherit;
  font-size: 9px;
}

.admin-task-builder input:focus {
  border-color: rgba(194, 72, 235, 0.8);
  box-shadow: 0 0 0 2px rgba(153, 37, 196, 0.1);
}

.admin-task-builder input::placeholder {
  color: #514858;
}

.admin-reward-input {
  position: relative;
  display: block;
}

.admin-reward-input img {
  position: absolute;
  top: 50%;
  left: 8px;
  z-index: 1;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  object-fit: contain;
}

.admin-reward-input input {
  padding-left: 28px;
}

.admin-form-error {
  grid-column: 1 / -1;
  min-height: 10px;
  margin: -2px 2px -3px;
  color: #e77797;
  font-size: 8px;
}

.admin-create-task {
  grid-column: 1 / -1;
  height: 38px;
  border: 1px solid rgba(214, 88, 255, 0.78);
  border-radius: 7px;
  color: #fff9ff;
  background: linear-gradient(180deg, #a925d3 0%, #6f148f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 12px rgba(151, 38, 193, 0.22);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
}

.admin-create-task:disabled {
  opacity: 0.62;
}

.admin-activity {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(111, 50, 137, 0.43);
  border-radius: 8px;
  background: rgba(8, 4, 12, 0.86);
}

.admin-activity header {
  min-height: 42px;
  padding: 9px 11px 7px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(102, 48, 124, 0.28);
  background: linear-gradient(180deg, rgba(27, 11, 36, 0.82), rgba(13, 7, 18, 0.68));
}

.admin-activity h2 {
  margin: 0;
  color: #f0e8f3;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

.admin-row {
  min-height: 48px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(78, 44, 89, 0.24);
}

.admin-row:last-child {
  border-bottom: 0;
}

.admin-row strong,
.admin-row small {
  display: block;
}

.admin-row strong {
  overflow: hidden;
  color: #e7dfe9;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row small {
  margin-top: 3px;
  color: #746b79;
  font-size: 8px;
}

.admin-row b {
  color: #d9cce0;
  font-size: 10px;
  font-weight: 650;
  text-align: right;
}

.admin-row b.success {
  color: #42dc78;
}

.admin-row b.pending {
  color: #e2ad5d;
}

.admin-empty,
.admin-loading {
  padding: 17px 10px;
  color: #817687;
  font-size: 9px;
  text-align: center;
}

.admin-toast {
  position: absolute;
  left: 50%;
  bottom: max(12px, var(--bottom-safe));
  z-index: 14;
  max-width: calc(100% - 40px);
  padding: 8px 13px;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(180, 76, 220, 0.5);
  border-radius: 7px;
  color: #eadcf0;
  background: rgba(27, 10, 36, 0.97);
  font-size: 9px;
  text-align: center;
  transition: 170ms ease;
}

.admin-toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.market-view {
  position: absolute;
  inset: 0 0 76px;
  z-index: 4;
  display: none;
  padding: var(--view-top-padding) 10px 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(12, 5, 18, 0.98), rgba(5, 2, 9, 0.995)),
    #06020a;
}

.screen[data-active-view="market"] .market-view {
  display: flex;
  flex-direction: column;
}

.screen[data-active-view="market"] > .topbar,
.screen[data-active-view="market"] > .hero,
.screen[data-active-view="market"] > .stats-grid,
.screen[data-active-view="market"] > .income-card {
  display: none;
}

.market-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.market-header h1 {
  margin: 0;
  color: #f8eeff;
  font-size: 24px;
  line-height: 1;
  font-weight: 750;
}

.market-wallet {
  height: 34px;
  padding: 0 4px 0 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(103, 42, 132, 0.38);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(18, 9, 25, 0.94), rgba(10, 5, 15, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 0 8px rgba(93, 24, 128, 0.08);
}

.market-wallet > img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: drop-shadow(0 0 3px rgba(255, 183, 35, 0.42));
}

.market-wallet strong {
  min-width: 62px;
  color: #e9e3ec;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.market-wallet button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(157, 69, 198, 0.42);
  border-radius: 6px;
  color: #ddb5ed;
  background: linear-gradient(180deg, rgba(62, 22, 81, 0.96), rgba(31, 11, 42, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 0 6px rgba(141, 43, 181, 0.16);
  font-size: 17px;
  line-height: 1;
}

.market-filters {
  height: 48px;
  margin: 10px 0 12px;
  padding: 4px;
  display: grid;
  grid-template-columns: 92px 82px;
  gap: 6px;
  border: 1px solid rgba(111, 47, 143, 0.24);
  border-radius: 8px;
  background: rgba(10, 5, 15, 0.88);
}

.market-filters button {
  min-width: 0;
  border: 0;
  border-radius: 6px;
  color: #796e83;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.market-filters button.active {
  color: #fff;
  background: linear-gradient(180deg, #8b2fc0, #4c196b);
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 255, 0.16),
    0 0 10px rgba(147, 42, 204, 0.25);
}

.market-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding-bottom: 12px;
}

.market-list::-webkit-scrollbar {
  display: none;
}

.market-card {
  position: relative;
  height: 170px;
  margin-bottom: 10px;
  padding: 9px;
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(101, 43, 133, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(20, 9, 29, 0.98), rgba(8, 4, 13, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 4px 13px rgba(0, 0, 0, 0.22);
}

.product-visual {
  position: relative;
  min-width: 0;
  min-height: 150px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(31, 12, 44, 0.74), rgba(8, 4, 13, 0.2));
}

.product-visual::after {
  content: "";
  position: absolute;
  inset: auto 8px 3px;
  height: 16px;
  background: radial-gradient(ellipse at center, rgba(143, 43, 202, 0.28), transparent 70%);
  filter: blur(3px);
}

.product-visual > span {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 2;
  padding: 5px 8px;
  border: 1px solid rgba(217, 124, 255, 0.4);
  border-radius: 5px;
  color: #f4d8ff;
  background: rgba(94, 28, 126, 0.88);
  font-size: 8px;
  font-weight: 750;
}

.product-visual > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.5));
}

.product-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.product-info h2 {
  margin: 7px 0 14px;
  overflow: hidden;
  color: #f5ecfa;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-info dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.product-info dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.product-info dt {
  color: #776b80;
  font-size: 11px;
}

.product-info dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  color: #cbbbd3;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.product-info dd img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.market-buy {
  width: 100%;
  height: 43px;
  margin-top: auto;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(126, 40, 166, 0.72);
  border-radius: 7px;
  color: #e7e1eb;
  background:
    linear-gradient(180deg, rgba(45, 13, 62, 0.96), rgba(22, 7, 31, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(236, 196, 255, 0.05),
    inset 0 0 12px rgba(128, 31, 173, 0.08),
    0 0 7px rgba(112, 24, 153, 0.12);
}

.market-buy img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.market-buy strong {
  font-size: 12px;
  font-weight: 600;
}

.market-buy > span:last-child {
  margin-left: auto;
  color: #d8bee4;
  font-size: 18px;
  line-height: 1;
}

.market-buy.owned {
  justify-content: center;
  border-color: rgba(145, 137, 151, 0.34);
  color: #bdb7c2;
  background:
    linear-gradient(180deg, rgba(43, 40, 46, 0.96), rgba(25, 23, 28, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 0 10px rgba(255, 255, 255, 0.018);
  cursor: default;
  opacity: 1;
}

.market-buy.owned > span:last-child {
  margin: 0;
  color: #bdb7c2;
  font-size: 10px;
  font-weight: 600;
}

.market-toast {
  position: absolute;
  left: 50%;
  bottom: 9px;
  z-index: 8;
  min-width: 170px;
  padding: 8px 13px;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(81, 218, 156, 0.38);
  border-radius: 7px;
  color: #b6f4d5;
  background: rgba(10, 34, 25, 0.96);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.38);
  font-size: 10px;
  font-weight: 650;
  text-align: center;
  transition: opacity 170ms ease, transform 170ms ease;
}

.market-toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.market-toast.error {
  border-color: rgba(235, 91, 121, 0.38);
  color: #ffc0ce;
  background: rgba(48, 12, 22, 0.96);
}

.balance-pop {
  animation: balance-pop 360ms cubic-bezier(.2, .82, .24, 1);
}

@keyframes balance-pop {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  45% {
    transform: scale(1.045);
    filter: brightness(1.24);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .balance-pop {
    animation: none;
  }
}

.tasks-view {
  position: absolute;
  inset: 0 0 76px;
  z-index: 4;
  display: none;
  padding: var(--view-top-padding) 10px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 11%, rgba(105, 30, 154, 0.12), transparent 27%),
    linear-gradient(180deg, #08030e 0%, #050208 100%);
}

.screen[data-active-view="tasks"] .tasks-view {
  display: flex;
  flex-direction: column;
}

.screen[data-active-view="tasks"] > .topbar,
.screen[data-active-view="tasks"] > .hero,
.screen[data-active-view="tasks"] > .stats-grid,
.screen[data-active-view="tasks"] > .income-card {
  display: none;
}

.tasks-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tasks-header h1 {
  margin: 0;
  color: #f8eeff;
  font-size: 24px;
  line-height: 1;
  font-weight: 750;
}

.tasks-filters {
  height: 40px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.tasks-filters button {
  min-width: 0;
  border: 1px solid rgba(77, 50, 91, 0.48);
  border-radius: 7px;
  color: #aaa0b2;
  background: rgba(13, 8, 18, 0.92);
  font: inherit;
  font-size: 12px;
  font-weight: 520;
  transition: 150ms ease;
}

.tasks-filters button.active {
  border-color: rgba(205, 83, 255, 0.8);
  color: #fff7ff;
  background: linear-gradient(135deg, #a51adb 0%, #6c149f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 12px rgba(164, 36, 224, 0.25);
}

.tasks-list {
  min-height: 0;
  flex: 1;
  padding: 0 1px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.tasks-list::-webkit-scrollbar {
  display: none;
}

.task-card {
  position: relative;
  min-height: 78px;
  padding: 13px 116px 10px 68px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(154, 69, 194, 0.55);
  border-radius: 9px;
  background:
    radial-gradient(circle at 24% 40%, rgba(104, 35, 147, 0.12), transparent 31%),
    linear-gradient(145deg, rgba(18, 8, 26, 0.98), rgba(7, 4, 11, 0.995));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 8px 20px rgba(0, 0, 0, 0.24);
}

.task-icon {
  position: absolute;
  top: 50%;
  left: 9px;
  width: 50px;
  height: 50px;
  overflow: hidden;
  border: 1px solid rgba(218, 87, 255, 0.72);
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-shadow: 0 0 12px rgba(141, 40, 197, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateY(-50%);
}

.task-icon[data-icon="bot"] { background-image: url("./assets/tasks/task-bot.webp"); }
.task-icon[data-icon="mining"] { background-image: url("./assets/tasks/task-mining.webp"); }

.task-card-copy {
  min-width: 0;
}

.task-card h2 {
  margin: 0 0 3px;
  overflow: hidden;
  color: #f7f1fa;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-card p {
  margin: 0;
  overflow: hidden;
  color: #9b909f;
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-reward {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #897d8f;
  font-size: 8px;
  line-height: 1;
  font-weight: 580;
  white-space: nowrap;
}

.task-reward img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(255, 174, 32, 0.5));
}

.task-actions {
  position: absolute;
  right: 9px;
  top: 8px;
  bottom: 7px;
  left: auto;
  width: 99px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.task-actions button {
  width: 100%;
  height: 34px;
  min-width: 0;
  border: 1px solid rgba(76, 61, 85, 0.52);
  border-radius: 7px;
  color: #b8afb9;
  background: linear-gradient(180deg, rgba(16, 10, 22, 0.96), rgba(8, 5, 12, 0.98));
  font: inherit;
  font-size: 9px;
  font-weight: 620;
}

.task-actions .task-claim {
  border-color: rgba(211, 80, 255, 0.82);
  color: #fff7ff;
  background: linear-gradient(180deg, #b525e5 0%, #7914ae 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 0 12px rgba(176, 40, 231, 0.35);
}

.task-actions button:disabled {
  cursor: default;
  opacity: 0.7;
}

.task-card.completed {
  border-color: rgba(67, 141, 87, 0.42);
}

.task-actions .task-completed {
  border-color: rgba(25, 181, 77, 0.55);
  color: #35e66c;
  background: rgba(4, 38, 16, 0.7);
}

.task-actions .task-completed svg {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tasks-empty {
  margin: auto;
  color: #8f8396;
  font-size: 11px;
}

.tasks-toast {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 8;
  min-width: 176px;
  max-width: calc(100% - 40px);
  padding: 8px 13px;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(180, 76, 220, 0.5);
  border-radius: 7px;
  color: #eadcf0;
  background: rgba(27, 10, 36, 0.97);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  transition: opacity 170ms ease, transform 170ms ease;
}

.tasks-toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.bonuses-view {
  position: absolute;
  inset: 0 0 76px;
  z-index: 4;
  display: none;
  padding: var(--view-top-padding) 10px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 9%, rgba(112, 23, 153, 0.12), transparent 28%),
    linear-gradient(180deg, #09030f 0%, #050208 100%);
}

.screen[data-active-view="bonuses"] .bonuses-view {
  display: flex;
  flex-direction: column;
}

.screen[data-active-view="bonuses"] > .topbar,
.screen[data-active-view="bonuses"] > .hero,
.screen[data-active-view="bonuses"] > .stats-grid,
.screen[data-active-view="bonuses"] > .income-card {
  display: none;
}

.bonuses-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bonuses-header h1 {
  margin: 0;
  color: #f8eeff;
  font-size: 24px;
  font-weight: 750;
  line-height: 1;
}

.bonuses-content {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.bonuses-content::-webkit-scrollbar {
  display: none;
}

.bonus-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(112, 43, 143, 0.4);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(19, 8, 28, 0.98), rgba(8, 4, 13, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 5px 15px rgba(0, 0, 0, 0.28);
}

.daily-bonus {
  aspect-ratio: 169 / 110;
  height: auto;
  padding: 18px 15px 78px;
}

.daily-bonus::after {
  content: "";
  position: absolute;
  top: -28px;
  right: -24px;
  width: 176px;
  height: 140px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(147, 48, 204, 0.2), transparent 67%);
}

.daily-copy {
  position: relative;
  z-index: 2;
}

.daily-copy h2,
.turbo-copy h2,
.bonus-cards h2 {
  margin: 0;
  color: #f5edf9;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
}

.daily-copy p {
  margin: 10px 0 20px;
  color: #9e91a8;
  font-size: 10px;
  line-height: 1.38;
}

.daily-copy small {
  width: 150px;
  display: block;
  padding-top: 13px;
  border-top: 1px solid rgba(111, 49, 139, 0.3);
  color: #817589;
  font-size: 9px;
  line-height: 1.2;
}

.daily-copy strong {
  display: block;
  margin-top: 2px;
  color: #c795dc;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.daily-crate {
  position: absolute;
  z-index: 1;
  top: -18px;
  right: 5px;
  width: 195px;
  height: 215px;
  object-fit: contain;
  filter:
    drop-shadow(0 8px 9px rgba(0, 0, 0, 0.52))
    drop-shadow(0 0 10px rgba(137, 46, 188, 0.34));
}

.daily-claim {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  z-index: 3;
  height: 44px;
  border: 1px solid rgba(207, 91, 255, 0.82);
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(180deg, #b737e7 0%, #6d1694 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 255, 0.24),
    inset 0 -3px 8px rgba(52, 0, 83, 0.36),
    0 0 12px rgba(173, 46, 225, 0.46);
  font-size: 11px;
  font-weight: 650;
}

.daily-claim.claimed {
  border-color: rgba(141, 132, 147, 0.32);
  color: #aaa2af;
  background: linear-gradient(180deg, #302c33, #1d1a20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.turbo-bonus {
  aspect-ratio: 169 / 80;
  height: auto;
  margin-top: 8px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
}

.turbo-gauge-asset {
  width: 156px;
  height: 156px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 10px rgba(163, 50, 211, 0.35))
    drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
}

.turbo-copy {
  min-width: 0;
}

.turbo-copy p {
  margin: 11px 0 17px;
  color: #95899d;
  font-size: 10px;
}

.turbo-copy button {
  width: 100%;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(124, 40, 163, 0.72);
  border-radius: 8px;
  color: #ddd5e2;
  background: linear-gradient(180deg, rgba(46, 14, 63, 0.96), rgba(21, 7, 30, 0.98));
  font-size: 12px;
  font-weight: 600;
}

.turbo-copy button img {
  width: 19px;
  height: 19px;
}

.turbo-copy button.active {
  border-color: rgba(148, 139, 154, 0.34);
  color: #bdb7c2;
  background: linear-gradient(180deg, #2b282e, #19171c);
}

.bonus-cards {
  aspect-ratio: 169 / 147;
  min-height: 0;
  margin-top: 8px;
  padding: 15px 10px 11px;
}

.bonus-cards > p {
  margin: 5px 0 12px;
  color: #817589;
  font-size: 9px;
}

.bonus-card-grid {
  height: 238px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  perspective: 900px;
}

.reward-card {
  position: relative;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
  perspective: 900px;
}

.reward-card:focus {
  outline: none;
}

.reward-card:focus-visible .reward-card-inner {
  filter: drop-shadow(0 0 8px rgba(197, 82, 239, 0.62));
}

.reward-card-inner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform-style: preserve-3d;
  transition: transform 680ms cubic-bezier(.2, .72, .2, 1);
}

.reward-card.revealed .reward-card-inner {
  transform: rotateY(180deg);
}

.reward-card.locked:not(.revealed) {
  cursor: default;
  filter: saturate(0.72) brightness(0.78);
}

.reward-card-side {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 8px;
}

.reward-card-side > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(160, 50, 207, 0.32));
}

.reward-card-front {
  transform: rotateY(180deg);
}

.reward-card-front strong {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 21px;
  z-index: 2;
  padding: 5px 4px;
  border: 1px solid rgba(204, 112, 239, 0.38);
  border-radius: 5px;
  color: #f5eafa;
  background: rgba(12, 5, 18, 0.78);
  box-shadow: 0 0 9px rgba(121, 31, 166, 0.24);
  font-size: 9px;
  font-weight: 650;
  text-align: center;
}

.bonus-card-status {
  height: 31px;
  margin: 8px 0 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(105, 39, 134, 0.24);
  color: #c38dd9 !important;
  font-size: 10px !important;
  font-weight: 600;
}

@media (max-width: 390px) {
  .bonus-card-grid {
    height: 200px;
  }

  .reward-card-front strong {
    bottom: 16px;
    font-size: 8px;
  }

  .bonus-card-status {
    height: 29px;
    margin-top: 5px !important;
    font-size: 9px !important;
  }
}

.bonus-toast {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 8;
  min-width: 168px;
  padding: 8px 12px;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(183, 81, 224, 0.5);
  border-radius: 7px;
  color: #eadcf0;
  background: rgba(27, 10, 36, 0.97);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  transition: opacity 170ms ease, transform 170ms ease;
}

.bonus-toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.friends-view {
  position: absolute;
  inset: 0 0 76px;
  z-index: 4;
  display: none;
  padding: var(--view-top-padding) 10px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 25%, rgba(94, 18, 130, 0.11), transparent 37%),
    linear-gradient(180deg, #08030e 0%, #050208 100%);
}

.screen[data-active-view="friends"] .friends-view {
  display: flex;
  flex-direction: column;
}

.screen[data-active-view="friends"] > .topbar,
.screen[data-active-view="friends"] > .hero,
.screen[data-active-view="friends"] > .stats-grid,
.screen[data-active-view="friends"] > .income-card {
  display: none;
}

.friends-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.friends-header h1 {
  margin: 0;
  color: #f8eeff;
  font-size: 24px;
  font-weight: 750;
  line-height: 1;
}

.friends-content {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding-bottom: 10px;
}

.friends-content::-webkit-scrollbar {
  display: none;
}

.referral-card {
  position: relative;
  width: 100%;
  aspect-ratio: 241 / 260;
  overflow: hidden;
  border: 1px solid rgba(184, 70, 226, 0.72);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(118, 28, 160, 0.24), transparent 36%),
    linear-gradient(180deg, rgba(21, 8, 30, 0.99), rgba(7, 3, 11, 0.995));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 14px rgba(120, 31, 165, 0.18);
}

.referral-heading {
  position: relative;
  z-index: 2;
  padding-top: 20px;
  text-align: center;
}

.referral-heading h2 {
  margin: 0;
  color: #f4ebf7;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.07;
}

.referral-heading p {
  margin: 7px 0 0;
  color: #aaa0b0;
  font-size: 10px;
  line-height: 1.35;
}

.friends-hero {
  position: absolute;
  z-index: 1;
  top: 55px;
  left: 50%;
  width: 71%;
  height: 215px;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: center bottom;
  filter:
    drop-shadow(0 0 9px rgba(161, 49, 211, 0.36))
    drop-shadow(0 11px 11px rgba(0, 0, 0, 0.58));
}

.referral-controls {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  height: 139px;
  padding: 11px 10px 10px;
  border: 1px solid rgba(86, 40, 108, 0.5);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 9, 25, 0.97), rgba(8, 4, 13, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 -8px 19px rgba(6, 2, 9, 0.42);
}

.referral-controls label {
  display: block;
  margin-bottom: 7px;
  color: #8c7c98;
  font-size: 9px;
  line-height: 1;
}

.referral-link-field {
  height: 45px;
  padding: 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 5px;
  border: 1px solid rgba(72, 39, 86, 0.58);
  border-radius: 7px;
  background: rgba(7, 4, 11, 0.9);
}

.referral-link-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #978c9f;
  background: transparent;
  font-family: inherit;
  font-size: 9px;
}

.referral-link-field button {
  display: grid;
  place-items: center;
  border: 1px solid rgba(170, 71, 211, 0.55);
  border-radius: 6px;
  color: #ddb1ef;
  background: linear-gradient(180deg, #5d2378, #2d103d);
}

.referral-link-field svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.invite-friends-button {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(218, 101, 255, 0.9);
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(180deg, #b632e5, #681591);
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 255, 0.24),
    inset 0 -3px 9px rgba(52, 0, 79, 0.35),
    0 0 12px rgba(174, 46, 220, 0.46);
  font-size: 12px;
  font-weight: 650;
}

.invite-friends-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.referral-stats {
  height: 76px;
  margin-top: 9px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.referral-stats article {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(99, 41, 126, 0.48);
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(18, 8, 26, 0.98), rgba(8, 4, 13, 0.99));
}

.referral-stats article > span {
  display: block;
  overflow: hidden;
  color: #8d7f96;
  font-size: 8px;
  white-space: nowrap;
}

.referral-stats strong {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #f2eaf5;
  font-size: 20px;
  font-weight: 600;
}

.referral-stats strong svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #cf5df5;
  stroke-width: 1.6;
}

.referral-stats strong img {
  width: 23px;
  height: 23px;
}

.invited-friends {
  margin-top: 13px;
}

.invited-friends > h2 {
  margin: 0 0 8px;
  color: #eee5f2;
  font-size: 12px;
  font-weight: 700;
}

.friend-row {
  height: 68px;
  margin-bottom: 6px;
  padding: 7px 10px 7px 7px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(76, 34, 94, 0.48);
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(14, 7, 20, 0.99), rgba(6, 3, 10, 0.995));
}

.friend-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(196, 70, 235, 0.8);
  border-radius: 50%;
  background: #14091c;
  box-shadow: 0 0 8px rgba(151, 46, 194, 0.3);
}

.friend-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-avatar span {
  color: #d98cff;
  font-size: 17px;
  font-weight: 650;
}

.friend-row > div:nth-child(2) {
  min-width: 0;
}

.friend-row > div:nth-child(2) > strong {
  display: block;
  margin-bottom: 6px;
  overflow: hidden;
  color: #eee7f1;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-row > div:nth-child(2) > span {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #82778a;
  font-size: 9px;
  white-space: nowrap;
}

.friend-row > div:nth-child(2) img {
  width: 12px;
  height: 12px;
}

.friend-earned {
  text-align: right;
}

.friend-earned span {
  display: block;
  margin-bottom: 6px;
  color: #817687;
  font-size: 8px;
  white-space: nowrap;
}

.friend-earned strong {
  color: #f4edf7;
  font-size: 14px;
  font-weight: 650;
}

.friends-toast {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 8;
  min-width: 170px;
  padding: 8px 13px;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(180, 76, 220, 0.5);
  border-radius: 7px;
  color: #eadcf0;
  background: rgba(27, 10, 36, 0.97);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  transition: opacity 170ms ease, transform 170ms ease;
}

.friends-toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.tabbar {
  position: absolute;
  left: calc(18px + var(--safe-left));
  right: calc(18px + var(--safe-right));
  bottom: max(7px, var(--bottom-safe));
  height: clamp(58px, 8%, 62px);
  min-height: 58px;
  z-index: 5;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  overflow: hidden;
  border: 1px solid rgba(109, 41, 142, 0.44);
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(24, 10, 34, 0.98) 0%, rgba(12, 6, 18, 0.995) 48%, rgba(6, 3, 10, 1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(206, 105, 255, 0.08),
    inset 0 -1px 0 rgba(88, 27, 119, 0.24),
    0 8px 24px rgba(0, 0, 0, 0.48),
    0 0 18px rgba(102, 28, 141, 0.15);
  backdrop-filter: blur(18px);
}

.tabbar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
  background: linear-gradient(180deg, rgba(190, 72, 244, 0.085), transparent 17px);
}

.tab {
  position: relative;
  z-index: 1;
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 24px 12px;
  justify-items: center;
  align-content: center;
  gap: 1px;
  color: #796b84;
  text-decoration: none;
  font-size: clamp(7px, 2.15vw, 9px);
  line-height: 1;
  font-weight: 650;
  transition: color 150ms ease, filter 150ms ease;
}

.tab svg {
  width: clamp(17px, 4.9vw, 21px);
  height: clamp(17px, 4.9vw, 21px);
  align-self: center;
  stroke-width: 1.8;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.72));
}

.tab span {
  position: relative;
  z-index: 2;
  max-width: 100%;
  white-space: nowrap;
  opacity: 0.92;
}

.tab.active {
  color: #db86ff;
  text-shadow:
    0 0 5px rgba(211, 104, 255, 0.78),
    0 0 10px rgba(141, 38, 198, 0.48);
}

.tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 36px;
  height: 32px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(181, 55, 238, 0.38), rgba(112, 26, 160, 0.12) 52%, transparent 74%);
  filter: blur(1px);
}

.tab.active::after {
  content: none;
}

.tab.active svg {
  position: relative;
  z-index: 2;
  fill: currentColor;
  stroke-width: 1.55;
  filter:
    drop-shadow(0 1px 1px rgba(27, 4, 38, 0.78))
    drop-shadow(0 0 5px rgba(213, 92, 255, 0.74));
}

.tab[data-view="tasks"].active svg,
.tab[data-view="bonuses"].active svg {
  fill: rgba(116, 35, 151, 0.18);
  stroke-width: 1.8;
}

.tab:not(.active):active {
  color: #c49bd7;
}

.tab:not(.active):active svg {
  transform: translateY(1px);
}

@media (max-height: 700px) {
  .topbar {
    top: calc(var(--top-safe) + var(--telegram-header-clearance) + 1.1%);
  }

  .hero {
    top: calc(var(--top-safe) + 9.1%);
    height: 42.55%;
  }

  .stats-grid {
    top: 53.6%;
    height: 11%;
  }

  .stat-card {
    padding-top: clamp(10px, 3.2vw, 12px);
    padding-bottom: clamp(10px, 3.2vw, 12px);
  }

  .income-card {
    top: 65.65%;
    height: 22.5%;
  }

  .tabbar {
    height: clamp(58px, 8%, 62px);
  }
}

.wallet-view {
  position: absolute;
  inset: 0 0 76px;
  z-index: 4;
  display: none;
  padding: var(--view-top-padding) 10px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 22%, rgba(99, 20, 145, 0.12), transparent 27%),
    linear-gradient(180deg, #08030e 0%, #050208 100%);
}

.screen[data-active-view="wallet"] .wallet-view {
  display: flex;
  flex-direction: column;
}

.screen[data-active-view="wallet"] > .topbar,
.screen[data-active-view="wallet"] > .hero,
.screen[data-active-view="wallet"] > .stats-grid,
.screen[data-active-view="wallet"] > .income-card {
  display: none;
}

.wallet-header {
  min-height: 58px;
  display: flex;
  align-items: center;
}

.wallet-header h1 {
  margin: 0;
  color: #f8eeff;
  font-size: 24px;
  line-height: 1;
  font-weight: 750;
}

.wallet-content {
  min-height: 0;
  flex: 1;
  padding-bottom: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.wallet-content::-webkit-scrollbar {
  display: none;
}

.wallet-balance-card {
  position: relative;
  height: 150px;
  overflow: hidden;
  border: 1px solid rgba(174, 65, 224, 0.62);
  border-radius: 10px;
  background:
    radial-gradient(circle at 78% 64%, rgba(128, 26, 191, 0.24), transparent 38%),
    linear-gradient(145deg, rgba(29, 11, 43, 0.97), rgba(9, 4, 15, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 0 13px rgba(125, 29, 173, 0.13);
}

.wallet-balance-card::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -35%;
  width: 72%;
  height: 80%;
  transform: perspective(140px) rotateX(61deg);
  background:
    linear-gradient(rgba(130, 35, 185, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 35, 185, 0.15) 1px, transparent 1px);
  background-size: 17px 17px;
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000);
}

.wallet-balance-copy {
  position: relative;
  z-index: 2;
  width: 62%;
  padding: 23px 0 0 17px;
}

.wallet-balance-copy > span {
  display: block;
  margin-bottom: 13px;
  color: #ad87be;
  font-size: 12px;
}

.wallet-balance-copy strong {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: clamp(25px, 7.8vw, 31px);
  line-height: 1;
  font-weight: 560;
  white-space: nowrap;
}

.wallet-balance-copy strong img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  filter: drop-shadow(0 0 7px rgba(255, 183, 27, 0.62));
}

.wallet-balance-copy small {
  display: block;
  margin-top: 12px;
  color: #95899e;
  font-size: 12px;
}

.wallet-device {
  position: absolute;
  z-index: 1;
  top: 5px;
  right: -7px;
  width: 49%;
  height: 148px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(72, 8, 109, 0.42));
}

.wallet-actions {
  height: 64px;
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.wallet-actions button {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(166, 66, 207, 0.56);
  border-radius: 7px;
  color: #dcd1e2;
  background: linear-gradient(145deg, rgba(25, 11, 36, 0.98), rgba(12, 6, 19, 0.99));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  font-size: 12px;
  font-weight: 500;
}

.wallet-actions button:active {
  transform: translateY(1px);
  border-color: rgba(197, 90, 241, 0.78);
  background: rgba(41, 15, 57, 0.98);
}

.wallet-action-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 72, 255, 0.88);
  border-radius: 50%;
  color: #d878ff;
  background: rgba(31, 9, 48, 0.82);
  box-shadow:
    inset 0 0 9px rgba(159, 39, 213, 0.15),
    0 0 8px rgba(170, 43, 224, 0.26);
}

.wallet-action-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wallet-history {
  margin-top: 17px;
}

.wallet-history h2 {
  margin: 0 0 8px;
  color: #8e8198;
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
}

.transaction-list {
  overflow: hidden;
  border: 1px solid rgba(66, 35, 80, 0.55);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(10, 6, 15, 0.99), rgba(6, 3, 10, 0.99));
}

.transaction-empty {
  margin: 0;
  padding: 24px 12px;
  color: #756b7c;
  font-size: 10px;
  text-align: center;
}

.transaction-row {
  height: 48px;
  padding: 0 11px 0 9px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(79, 42, 93, 0.3);
}

.transaction-row:last-child {
  border-bottom: 0;
}

.transaction-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(23, 12, 31, 0.9);
}

.transaction-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.transaction-icon.incoming {
  color: #17da75;
  background: rgba(7, 48, 32, 0.52);
}

.transaction-icon.outgoing {
  color: #e34b59;
  background: rgba(62, 15, 25, 0.47);
}

.transaction-icon.reward {
  color: #f0ad24;
  background: rgba(64, 40, 8, 0.5);
}

.transaction-icon.referral {
  color: #8d64d8;
  background: rgba(40, 25, 66, 0.52);
}

.transaction-icon.exchange {
  color: #8c79aa;
  background: rgba(37, 28, 50, 0.56);
}

.transaction-row > div {
  min-width: 0;
}

.transaction-row strong,
.transaction-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-row strong {
  color: #d9d1dc;
  font-size: 11px;
  font-weight: 500;
}

.transaction-row small {
  margin-top: 3px;
  color: #756b7c;
  font-size: 9px;
}

.transaction-row b {
  color: #bfb6c4;
  font-size: 11px;
  font-weight: 500;
}

.transaction-row b.positive {
  color: #20df75;
}

.wallet-toast {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 8;
  padding: 8px 13px;
  transform: translate(-50%, 12px);
  border: 1px solid rgba(170, 66, 215, 0.58);
  border-radius: 7px;
  color: #f3e8f8;
  background: rgba(17, 7, 24, 0.97);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.wallet-toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-height: 700px) {
  .wallet-balance-card {
    height: 142px;
  }

  .wallet-device {
    height: 140px;
  }

  .wallet-actions {
    height: 58px;
    margin-top: 9px;
  }

  .wallet-action-icon {
    width: 32px;
    height: 32px;
  }

  .wallet-history {
    margin-top: 13px;
  }

  .transaction-row {
    height: 45px;
  }
}

.wallet-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  padding: max(12px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.wallet-modal-layer.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.wallet-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 1, 5, 0.78);
  backdrop-filter: blur(7px);
}

.wallet-modal {
  position: relative;
  width: min(100%, 410px);
  max-height: calc(100svh - max(22px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
  display: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  border: 1px solid rgba(154, 59, 196, 0.58);
  border-radius: 12px;
  color: #f5edf8;
  background:
    radial-gradient(circle at 84% 3%, rgba(121, 31, 160, 0.18), transparent 30%),
    linear-gradient(165deg, rgba(18, 8, 26, 0.995), rgba(7, 3, 11, 0.998));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 -10px 36px rgba(77, 16, 105, 0.22);
  scrollbar-width: none;
  transform: translateY(22px);
  transition: transform 220ms ease;
}

.wallet-modal-layer.open .wallet-modal.active {
  display: block;
  transform: translateY(0);
}

.wallet-modal::-webkit-scrollbar {
  display: none;
}

.wallet-modal-header {
  min-height: 47px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(108, 48, 132, 0.28);
}

.wallet-modal-header span {
  display: block;
  margin-bottom: 4px;
  color: #8b7895;
  font-size: 9px;
  font-weight: 600;
}

.wallet-modal-header h2 {
  margin: 0;
  color: #fbf6fd;
  font-size: 20px;
  line-height: 1;
  font-weight: 650;
}

.settings-modal {
  padding-bottom: 18px;
}

.settings-body {
  padding-top: 15px;
}

.settings-label {
  margin-bottom: 10px;
}

.settings-label span,
.settings-label small {
  display: block;
}

.settings-label span {
  color: #ded4e2;
  font-size: 12px;
  font-weight: 600;
}

.settings-label small {
  margin-top: 4px;
  color: #796e80;
  font-size: 9px;
}

.language-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.language-switch button {
  height: 55px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(91, 50, 106, 0.52);
  border-radius: 8px;
  color: #9b8da3;
  background: linear-gradient(145deg, rgba(20, 10, 27, 0.98), rgba(10, 5, 15, 0.99));
}

.language-switch button.active {
  border-color: rgba(186, 76, 230, 0.78);
  color: #f4eaf7;
  background: linear-gradient(145deg, rgba(49, 17, 64, 0.98), rgba(20, 8, 29, 0.99));
  box-shadow: inset 0 0 12px rgba(145, 39, 185, 0.1);
}

.language-switch button > span {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(172, 77, 207, 0.55);
  border-radius: 6px;
  color: #ce83eb;
  background: rgba(45, 17, 59, 0.76);
  font-size: 9px;
  font-weight: 700;
}

.language-switch strong {
  font-size: 11px;
  font-weight: 600;
}

.wallet-modal-close {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(132, 59, 160, 0.42);
  border-radius: 7px;
  color: #a996b2;
  background: rgba(23, 10, 31, 0.88);
}

.wallet-modal-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.wallet-modal-body {
  padding-top: 14px;
}

.wallet-modal-lead {
  margin: 0 0 11px;
  color: #a295a9;
  font-size: 11px;
}

.deposit-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.deposit-methods button {
  position: relative;
  min-width: 0;
  height: 58px;
  padding: 0 11px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(91, 50, 106, 0.52);
  border-radius: 8px;
  color: #e7dfe9;
  text-align: left;
  background: linear-gradient(145deg, rgba(20, 10, 27, 0.98), rgba(10, 5, 15, 0.99));
}

.deposit-methods button.active {
  border-color: rgba(186, 76, 230, 0.78);
  background: linear-gradient(145deg, rgba(49, 17, 64, 0.98), rgba(20, 8, 29, 0.99));
  box-shadow:
    inset 0 0 12px rgba(145, 39, 185, 0.1),
    0 0 8px rgba(140, 36, 180, 0.14);
}

.method-token {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
  filter:
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 5px rgba(174, 70, 222, 0.16));
}

.deposit-methods strong,
.deposit-methods small {
  display: block;
}

.deposit-methods strong {
  font-size: 12px;
  font-weight: 650;
}

.deposit-methods small {
  margin-top: 3px;
  color: #82768a;
  font-size: 9px;
}

.deposit-methods i {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(136, 91, 151, 0.68);
  border-radius: 50%;
}

.deposit-methods button.active i {
  border: 3px solid #bc61e2;
  box-shadow: 0 0 5px rgba(191, 84, 234, 0.48);
}

.deposit-details {
  margin-top: 14px;
}

.deposit-details label,
.wallet-form-field > span {
  display: block;
  margin-bottom: 7px;
  color: #8e8196;
  font-size: 10px;
  font-weight: 500;
}

.wallet-address-field,
.amount-input {
  height: 45px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(105, 52, 126, 0.48);
  border-radius: 7px;
  background: rgba(6, 3, 10, 0.9);
}

.wallet-address-field > span {
  min-width: 0;
  flex: 1;
  padding-left: 12px;
  overflow: hidden;
  color: #d6cbd9;
  font-family: "Exo 2";
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-address-field button {
  width: 40px;
  height: 35px;
  margin-right: 4px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(150, 63, 184, 0.52);
  border-radius: 6px;
  color: #c783e4;
  background: rgba(46, 17, 61, 0.88);
}

.wallet-address-field svg,
.wallet-modal-primary svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.deposit-details p {
  margin: 9px 2px 0;
  color: #776d7d;
  font-size: 9px;
  line-height: 1.45;
}

.deposit-step[hidden],
.deposit-result[hidden] {
  display: none;
}

.deposit-amount-field {
  margin-top: 14px;
}

.deposit-amount-field .amount-input {
  padding-right: 13px;
}

.amount-currency-icon {
  width: 20px;
  height: 20px;
  margin-right: 5px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
}

.deposit-result {
  padding-top: 14px;
}

.invoice-status {
  height: 54px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(139, 60, 168, 0.48);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(29, 13, 38, 0.98), rgba(12, 6, 17, 0.99));
}

.invoice-status > span {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border: 2px solid #d07af1;
  border-radius: 50%;
  box-shadow:
    inset 0 0 4px rgba(203, 99, 237, 0.52),
    0 0 8px rgba(195, 73, 233, 0.48);
  animation: invoice-pulse 1.8s ease-in-out infinite;
}

@keyframes invoice-pulse {
  50% {
    opacity: 0.45;
    box-shadow: 0 0 3px rgba(195, 73, 233, 0.26);
  }
}

.invoice-status small,
.invoice-status strong {
  display: block;
}

.invoice-status small {
  margin-bottom: 4px;
  color: #7e7185;
  font-size: 8px;
}

.invoice-status strong {
  color: #ece3ef;
  font-size: 12px;
  font-weight: 600;
}

.invoice-summary {
  margin: 12px 0;
  padding: 5px 11px;
  border: 1px solid rgba(77, 40, 90, 0.44);
  border-radius: 7px;
  background: rgba(8, 4, 12, 0.72);
}

.invoice-summary p {
  min-height: 31px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(74, 39, 86, 0.3);
  color: #827687;
  font-size: 9px;
}

.invoice-summary p:last-child {
  border-bottom: 0;
}

.invoice-summary strong {
  color: #f0e7f3;
  font-size: 12px;
  font-weight: 600;
}

.deposit-result > label {
  display: block;
  margin-bottom: 7px;
  color: #8e8196;
  font-size: 10px;
}

.invoice-warning {
  margin: 9px 2px 0;
  color: #817585;
  font-size: 9px;
  line-height: 1.45;
}

.deposit-new-payment {
  width: 100%;
  height: 34px;
  margin-top: 7px;
  border: 0;
  color: #a78daf;
  background: transparent;
  font-size: 10px;
}

.wallet-modal-primary {
  width: 100%;
  height: 43px;
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(203, 99, 238, 0.65);
  border-radius: 8px;
  color: #f8eefb;
  background: linear-gradient(180deg, #8f26b1, #5d0f7a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -5px 11px rgba(38, 0, 61, 0.34),
    0 5px 12px rgba(51, 5, 72, 0.3);
  font-size: 12px;
  font-weight: 650;
}

.wallet-modal-primary:active {
  transform: translateY(1px);
  filter: brightness(0.96);
}

.wallet-modal-primary:disabled {
  cursor: default;
  opacity: 0.58;
}

.withdraw-form {
  padding-top: 14px;
}

.withdraw-network {
  height: 55px;
  padding: 0 11px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(80, 61, 92, 0.52);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(19, 10, 25, 0.98), rgba(9, 5, 14, 0.99));
}

.withdraw-network small,
.withdraw-network strong {
  display: block;
}

.withdraw-network small {
  margin-bottom: 4px;
  color: #766b7d;
  font-size: 8px;
}

.withdraw-network strong {
  color: #e5dde8;
  font-size: 12px;
  font-weight: 650;
}

.withdraw-usdt-balance {
  min-width: 0;
  text-align: right;
}

.withdraw-usdt-balance small,
.withdraw-usdt-balance strong {
  display: block;
  white-space: nowrap;
}

.withdraw-usdt-balance small {
  margin-bottom: 4px;
  color: #766b7d;
  font-size: 8px;
}

.withdraw-usdt-balance strong {
  color: #d7c7dd;
  font-size: 10px;
  font-weight: 600;
}

.wallet-form-field {
  display: block;
  margin-top: 13px;
}

.wallet-form-field input {
  min-width: 0;
  width: 100%;
  height: 45px;
  padding: 0 12px;
  border: 1px solid rgba(105, 52, 126, 0.48);
  border-radius: 7px;
  outline: 0;
  color: #eee6f1;
  background: rgba(6, 3, 10, 0.9);
  font: 500 12px "Exo 2";
}

.wallet-form-field input::placeholder {
  color: #625968;
}

.wallet-form-field input:focus {
  border-color: rgba(181, 73, 224, 0.76);
  box-shadow: 0 0 0 2px rgba(152, 53, 193, 0.09);
}

.amount-input input {
  height: 100%;
  flex: 1;
  border: 0;
  background: transparent;
}

.amount-input b {
  color: #92859a;
  font-size: 10px;
  font-weight: 600;
}

.amount-input button {
  height: 31px;
  margin: 0 5px 0 8px;
  padding: 0 9px;
  border: 1px solid rgba(153, 65, 187, 0.48);
  border-radius: 6px;
  color: #c984e6;
  background: rgba(45, 17, 59, 0.86);
  font-size: 9px;
  font-weight: 650;
}

.withdraw-terms {
  margin-top: 14px;
  padding: 8px 11px;
  border: 1px solid rgba(75, 39, 89, 0.42);
  border-radius: 7px;
  background: rgba(10, 5, 15, 0.72);
}

.withdraw-terms p {
  min-height: 24px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(71, 39, 82, 0.28);
  color: #7e7385;
  font-size: 9px;
}

.withdraw-terms p:last-child {
  border-bottom: 0;
}

.withdraw-terms strong {
  color: #d5cbd9;
  font-size: 10px;
  font-weight: 550;
}

.withdraw-error {
  min-height: 13px;
  margin: 7px 2px -4px;
  color: #ef6b83;
  font-size: 9px;
}

@media (min-width: 520px) {
  .wallet-modal-layer {
    place-items: center;
  }
}

@media (max-height: 700px) {
  .wallet-modal {
    padding: 13px;
  }

  .wallet-modal-header {
    min-height: 42px;
  }

  .wallet-modal-header h2 {
    font-size: 18px;
  }

  .wallet-modal-body,
  .withdraw-form {
    padding-top: 11px;
  }

  .deposit-methods button {
    height: 52px;
  }

  .deposit-details {
    margin-top: 11px;
  }

  .withdraw-network {
    height: 49px;
  }

  .wallet-form-field {
    margin-top: 10px;
  }

  .withdraw-terms {
    margin-top: 10px;
  }

  .wallet-modal-primary {
    height: 40px;
    margin-top: 11px;
  }
}
