.app-main:has(.stake-page) {
  padding: 0 0 calc(var(--tabbar-height) + var(--safe-bottom));
  background: #020302;
}

.stake-page {
  --stake-bg: #020302;
  --stake-card: rgba(14, 18, 12, 0.72);
  --stake-border: rgba(182, 245, 58, 0.14);
  --stake-accent: #b6f53a;
  --stake-text: #f4f7ef;
  --stake-muted: #8f9688;
  --stake-sub: #dfe8d2;
  --stake-panel: rgba(14, 18, 12, 0.75);
  position: relative;
  isolation: isolate;
  min-height: 100%;
  padding: 12px 0 20px;
  background:
    radial-gradient(120% 70% at 50% -8%, rgba(126, 201, 34, 0.14), transparent 55%),
    linear-gradient(180deg, #050805 0%, #020302 50%, #000 100%);
  color: var(--stake-text);
  font-feature-settings: "tnum" 1;
}

.stake-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.stake-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.48;
  animation: stake-float 10s ease-in-out infinite;
}

.stake-orb-a {
  width: 210px;
  height: 210px;
  top: 8%;
  right: -70px;
  background: radial-gradient(circle, rgba(182, 245, 58, 0.3), transparent 68%);
}

.stake-orb-b {
  width: 240px;
  height: 240px;
  bottom: 18%;
  left: -90px;
  background: radial-gradient(circle, rgba(90, 160, 30, 0.22), transparent 70%);
  animation-delay: -3.5s;
}

.stake-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(182, 245, 58, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182, 245, 58, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 70%);
  opacity: 0.6;
}

@keyframes stake-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(14px) scale(1.05); }
}

.stake-header,
.stake-hero,
.stake-tip,
.stake-overview,
.stake-records,
.stake-promo {
  position: relative;
  z-index: 1;
}

.stake-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 auto !important;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  z-index: 90;
}

.stake-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.stake-logo-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(182, 245, 58, 0.08);
  border: 1px solid rgba(182, 245, 58, 0.22);
  box-shadow: 0 0 16px rgba(182, 245, 58, 0.16);
  flex-shrink: 0;
}

.stake-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 5px;
}

.stake-brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.stake-wallet-wrap {
  position: relative;
  flex-shrink: 0;
}

.stake-wallet-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 118px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(12, 16, 10, 0.96);
  border: 1px solid rgba(182, 245, 58, 0.2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(182, 245, 58, 0.08);
  z-index: 100;
  backdrop-filter: blur(12px);
}

.stake-wallet-menu[hidden] {
  display: none !important;
}

.stake-wallet-menu button {
  width: 100%;
  height: 34px;
  border: 0;
  background: transparent;
  color: #f2f2f2;
  font-size: 13px;
  padding: 0 10px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
}

.stake-wallet-menu button:active {
  background: rgba(182, 245, 58, 0.12);
  color: var(--stake-accent);
}

.stake-wallet.connected {
  border-color: rgba(182, 245, 58, 0.55);
  box-shadow: 0 0 16px rgba(182, 245, 58, 0.2);
}

.stake-lang,
.stake-wallet {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 10px;
  border-radius: 11px;
  border: 1px solid rgba(182, 245, 58, 0.14);
  background: var(--stake-panel);
  color: var(--stake-text);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.stake-lang img,
.stake-wallet img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.stake-lang-caret {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  display: block;
  color: #cfd8c2;
}

.stake-wallet {
  border-color: rgba(182, 245, 58, 0.45);
  background: rgba(182, 245, 58, 0.08);
  box-shadow: 0 0 14px rgba(182, 245, 58, 0.12);
}

.stake-hero {
  position: relative;
  margin: 8px 16px 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(182, 245, 58, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.3),
    0 0 24px rgba(182, 245, 58, 0.08);
}

.stake-banner {
  display: block;
  width: 100%;
  height: 162px;
  object-fit: cover;
  object-position: center;
}

.stake-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 3, 2, 0.72) 0%, rgba(2, 3, 2, 0.28) 55%, transparent 100%);
  pointer-events: none;
}

.stake-hero-text {
  position: absolute;
  left: 16px;
  top: 22px;
  right: 38%;
  z-index: 1;
}

.stake-title {
  margin: 0;
  font-size: 26px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 18px rgba(182, 245, 58, 0.25);
}

.stake-hero-text p {
  margin: 14px 0 0;
  font-size: 13px;
  color: #cfd8c2;
  line-height: 1.35;
}

.stake-tip,
.stake-overview,
.stake-records,
.stake-promo {
  margin-left: 16px;
  margin-right: 16px;
  border: 1px solid var(--stake-border);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(182, 245, 58, 0.07), transparent 42%),
    var(--stake-card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.stake-tip {
  margin-top: 14px;
  min-height: 48px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stake-tip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(182, 245, 58, 0.35));
}

.stake-tip p {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #cfd8c2;
  line-height: 1.45;
}

.stake-overview {
  margin-top: 14px;
  padding: 16px 14px 14px;
}

.stake-card-glow {
  position: absolute;
  width: 160px;
  height: 160px;
  right: -40px;
  top: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(182, 245, 58, 0.18), transparent 70%);
  pointer-events: none;
}

.stake-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stake-overview-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
  color: #dfe8d2;
}

.stake-overview-title img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(182, 245, 58, 0.35));
}

.stake-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(143, 150, 136, 0.28);
  background: rgba(0, 0, 0, 0.22);
  color: #9aa393;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.stake-status-badge.is-running {
  color: var(--stake-accent);
  border-color: rgba(182, 245, 58, 0.35);
  background: rgba(182, 245, 58, 0.1);
  box-shadow: 0 0 12px rgba(182, 245, 58, 0.12);
}

.stake-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #666;
}

.stake-status-badge.is-running .stake-status-dot {
  background: var(--stake-accent);
  box-shadow: 0 0 8px rgba(182, 245, 58, 0.85);
}

.stake-amount-block {
  margin-top: 18px;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(182, 245, 58, 0.12);
  background: rgba(0, 0, 0, 0.22);
}

.stake-amount-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--stake-muted);
}

.stake-amount-value {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 750;
  color: var(--stake-accent);
  line-height: 1.1;
  text-shadow: 0 0 18px rgba(182, 245, 58, 0.35);
}

.stake-stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.stake-stat {
  min-width: 0;
  min-height: 72px;
  padding: 12px 12px 11px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(182, 245, 58, 0.1);
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stake-stat-wide {
  border-color: rgba(182, 245, 58, 0.18);
  background:
    linear-gradient(145deg, rgba(182, 245, 58, 0.08), transparent 55%),
    rgba(0, 0, 0, 0.24);
}

.stake-stat-status {
  align-items: flex-start;
}

.stake-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--stake-muted);
  line-height: 1.3;
}

.stake-stat-value {
  margin-top: 10px;
  font-size: 13px;
  color: var(--stake-accent);
  font-weight: 650;
  line-height: 1.25;
  text-shadow: 0 0 10px rgba(182, 245, 58, 0.2);
}

.stake-stat-value-reward {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-top: 8px;
}

.stake-stat-num {
  font-size: 18px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-shadow: 0 0 14px rgba(182, 245, 58, 0.28);
}

.stake-stat-unit {
  font-size: 11px;
  font-weight: 650;
  color: #cfe6a8;
  line-height: 1.2;
}

.stake-stat-value-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(143, 150, 136, 0.24);
  background: rgba(0, 0, 0, 0.18);
  color: #9aa393;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  text-shadow: none;
}

.stake-stat-status.is-running .stake-stat-value-status {
  color: var(--stake-accent);
  border-color: rgba(182, 245, 58, 0.22);
  background: rgba(182, 245, 58, 0.08);
  text-shadow: 0 0 10px rgba(182, 245, 58, 0.2);
}

.stake-records {
  margin-top: 14px;
  min-height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--stake-sub);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stake-records:active {
  border-color: rgba(182, 245, 58, 0.28);
  box-shadow: 0 0 20px rgba(182, 245, 58, 0.1);
}

.stake-records > svg {
  color: var(--stake-muted);
  flex-shrink: 0;
}

.stake-records-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stake-records-left img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(182, 245, 58, 0.3));
}

.stake-promo {
  margin-top: 14px;
  min-height: 64px;
  padding: 0 12px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stake-promo-coin {
  width: 103px;
  height: 62px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(182, 245, 58, 0.2));
}

.stake-promo-text {
  min-width: 0;
  flex: 1;
}

.stake-promo-text h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--stake-sub);
  line-height: 1.2;
}

.stake-promo-text p {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--stake-muted);
}

.stake-promo-side {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.95;
  border-radius: 10px;
  box-shadow: 0 0 14px rgba(182, 245, 58, 0.18);
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-height) + var(--safe-bottom) + 24px);
  transform: translateX(-50%) translateY(12px);
  max-width: min(86vw, 360px);
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(10, 14, 8, 0.94);
  border: 1px solid rgba(182, 245, 58, 0.22);
  color: #f2f2f2;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
  text-align: center;
  box-shadow: 0 0 20px rgba(182, 245, 58, 0.1);
}

.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .stake-orb {
    animation: none !important;
  }
}
