@font-face {
  font-family: 'PoolDigital';
  src: url('/fonts/calculator.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
html, body {
  touch-action: manipulation;
  overscroll-behavior: none;
}

/* === Withdraw (inline SVG) === */
.tp-withdraw-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.tp-withdraw-icon{
  width:22px;
  height:22px;
  flex:0 0 22px;
  display:inline-block;
  fill: currentColor;
}
.tp-withdraw-title-text{
  display:inline-block;
}

.withdraw-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.withdraw-btn .tp-withdraw-btn-icon{
  width:18px;
  height:18px;
  flex:0 0 18px;
  display:inline-block;
  fill: currentColor;
  pointer-events:none;
}
.withdraw-btn .tp-withdraw-btn-text{
  pointer-events:none;
}
/* Стили для прелоадера */

/* ==== Disable text selection (anti-copy highlight) ==== */
html, body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Allow selection inside form fields */
input, textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

img, svg {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-tap-highlight-color: transparent;
}

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0e17, #131a2c);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-container {
  text-align: center;
  position: relative;
}

.ton-loader {
  width: 80px;
  height: 80px;
  position: relative;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ton-logo-loader {
  font-size: 40px;
  color: #00ff88;
  filter: drop-shadow(0 0 15px #00ff88);
  animation: logoPulse 2s ease-in-out infinite;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.loader-ring{
  position:absolute;
  inset:0;
  border-radius:50%;
  --ring-scale: 1;

  /* ✅ Professional "orbit" ring (no conic wheel) */
  background: transparent;
  border: 5px solid rgba(255,255,255,0.06);
  border-top-color: rgba(0, 255, 255, 0.733);
  border-right-color: rgba(51, 196, 184, 0.87);

  box-shadow:
    0 0 14px rgba(0,255,136,0.22),
    0 0 26px rgba(0,255,255,0.12);
  opacity: 0.95;

  /* speed is driven by JS via CSS vars (increases with %) */
  animation: loaderRingSpin var(--tpLoaderDur1, 2.2s) linear infinite,
             loaderRingPulse 1.8s ease-in-out infinite;
  transform: scale(var(--ring-scale));
}

.loader-ring::after{
  /* disable the "dot" from the old ring */
  content: none;
}

/* 2nd ring: smaller + reverse */
.loader-ring:nth-child(2){
  --ring-scale: 0.82;
  border-width: 4px;
  border-top-color: rgba(0,255,255,0.95);
  border-right-color: rgba(0,136,255,0.65);
  opacity: 0.80;
  animation-duration: var(--tpLoaderDur2, 1.6s), 2.1s;
  animation-direction: reverse, normal;
  box-shadow:
    0 0 12px rgba(0,255,255,0.20),
    0 0 22px rgba(0,136,255,0.12);
}

/* 3rd ring: smallest + fastest */
.loader-ring:nth-child(3){
  --ring-scale: 0.64;
  border-width: 3px;
  border-top-color: rgba(0,136,255,0.95);
  border-right-color: rgba(255,0,255,0.55);
  opacity: 0.72;
  animation-duration: var(--tpLoaderDur3, 1.15s), 2.5s;
  animation-direction: normal, normal;
  box-shadow:
    0 0 10px rgba(0,136,255,0.18),
    0 0 18px rgba(255,0,255,0.10);
}

@keyframes loaderRingSpin{
  from { transform: rotate(0deg) scale(var(--ring-scale)); }
  to { transform: rotate(360deg) scale(var(--ring-scale)); }
}

@keyframes loaderRingPulse{
  0%, 100% { filter: brightness(0.95); }
  50% { filter: brightness(1.15); }
}

.loader-text {
  color: #00ff88;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.loader-subtext {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-top: 5px;
}

.progress-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 20px auto;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #00ffff);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.blockchain-animation {
  position: absolute;
  bottom: 50px;
  display: flex;
  gap: 8px;
}

.block {
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 2px;
  animation: blockGlow 1.5s ease-in-out infinite;
  box-shadow: 0 0 10px #00ff88;
}

.block:nth-child(2) { animation-delay: 0.2s; background: #00ffff; }
.block:nth-child(3) { animation-delay: 0.4s; background: #0088ff; }
.block:nth-child(4) { animation-delay: 0.6s; background: #ff00ff; }
.block:nth-child(5) { animation-delay: 0.8s; background: #00ff88; }

@keyframes logoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px #00ff88); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 25px #00ff88); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes blockGlow {
  0%, 100% { opacity: 0.3; transform: translateY(0px); }
  50% { opacity: 1; transform: translateY(-10px); }
}

:root {
  --bg1: #0a0e17; --bg2: #131a2c; --accent: #00ff88; --text: #ffffff; 
  --card-bg: rgba(255,255,255,0.08);

  /* ✅ New check icon (mask) — based on check.svg */
  --tp-check-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A//www.w3.org/2000/svg'%20viewBox%3D'0%200%20507.506%20507.506'%3E%3Cpath%20d%3D'M163.865%2C436.934c-14.406%2C0.006-28.222-5.72-38.4-15.915L9.369%2C304.966c-12.492-12.496-12.492-32.752%2C0-45.248l0%2C0c12.496-12.492%2C32.752-12.492%2C45.248%2C0l109.248%2C109.248L452.889%2C79.942c12.496-12.492%2C32.752-12.492%2C45.248%2C0l0%2C0c12.492%2C12.496%2C12.492%2C32.752%2C0%2C45.248L202.265%2C421.019C192.087%2C431.214%2C178.271%2C436.94%2C163.865%2C436.934z'/%3E%3C/svg%3E");
}

body {
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  color: var(--text);
  font-family: 'Inter', Arial, sans-serif;
  margin: 0;
  padding: 16px;
  text-align: center;
  min-height: 100vh;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  overflow-x: hidden;
}

.blockchain-web {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
}

.web-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  height: 1px;
  opacity: 0.3;
  animation: none !important;
}

.web-node {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  animation: none !important;
  box-shadow: 0 0 10px var(--accent);
  opacity: 0.3;
}

.block-node {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #00ffff;
  border-radius: 2px;
  animation: none !important;
  box-shadow: 0 0 15px #00ffff;
  opacity: 0.4;
}

.data-packet {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #ff00ff;
  border-radius: 50%;
  animation: none !important;
  box-shadow: 0 0 8px #ff00ff;
  opacity: 0.3;
}

.flying-coin {
    position: fixed;
    font-size: 18px;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
    pointer-events: none;
    z-index: 1000;
    animation: flyToBalance 1.5s ease-in-out forwards;
}

@keyframes flyToBalance {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(var(--target-x), var(--target-y)) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--target-x), var(--target-y)) scale(0.5);
        opacity: 0;
    }
}

.help-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: rgb(255, 255, 255);
  padding: 8px 12px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.help-content {
  max-height: 400px;
  overflow-y: auto;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  padding-right: 10px;
}

.help-content h4 {
  color: #00ff88;
  margin: 15px 0 8px 0;
  font-size: 16px;
}

.help-content ul {
  margin: 8px 0;
  padding-left: 20px;
}

.help-content li {
  margin: 5px 0;
  color: rgba(255, 255, 255, 0.9);
}

.help-content strong {
  color: #00ff88;
}

.agreement-text {
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}

.agreement-text p {
  margin: 8px 0;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.back-btn {
  width: 144px;
  justify-content: flex-start;
  padding-left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: white;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}


/* ===== Icon-only Back button (same as Pool style) ===== */
.back-btn.tp-back-icon-only{
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 10px;
  justify-content: center;
  gap: 0;
}
.back-btn.tp-back-icon-only .back-text{ display: none !important; }
.back-btn.tp-back-icon-only .back-icon{ margin: 0; }

/* When icon-only + floating, keep it compact everywhere */
.tp-float-back.tp-back-icon-only{
  width: 44px !important;
  padding: 10px !important;
}
.back-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.back-text {
  white-space: nowrap;
}

.back-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: translateY(-2px);
}

.withdraw-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 20px;
  margin: 20px auto;
  max-width: 400px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.withdraw-input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 16px;
  margin: 10px 0;
  font-family: 'Courier New', monospace;
  box-sizing: border-box;
}

.withdraw-btn {
  background: linear-gradient(45deg, #00ff88, #00ffff);
  border: none;
  color: #0a0e17;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin: 10px 0;
  width: 100%;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
  transition: all 0.3s ease;
}

.withdraw-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

.withdraw-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.withdraw-history {
  margin-top: 20px;
  text-align: left;
}

.withdraw-item {
  background: rgba(0, 255, 136, 0.05);
  padding: 12px;
  border-radius: 12px;
  margin: 8px 0;
  border: 1px solid rgba(0, 255, 136, 0.2);
  backdrop-filter: blur(10px);
  position: relative;
}

.status-pending {
  color: #ffc107;
}

.status-approved {
  color: #00ff88;
}

.status-rejected {
  color: #ff4444;
}

.wallet-btn {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.wallet-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: translateY(-2px);
}

.wallet-btn:active {
  transform: translateY(0);
}

.ton-connect-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 20px;
  margin: 20px auto;
  max-width: 400px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* =============================
   TON Connect UI (Tonkeeper-style)
   ТОЛЬКО стиль (без логики)
   ============================= */

/* палитра в духе Tonkeeper */
#profilePage {
  --tk-surface: rgba(18, 20, 26, 0.88);
  --tk-surface-2: rgba(28, 31, 39, 0.88);
  --tk-border: rgba(255, 255, 255, 0.10);
  --tk-border-2: rgba(255, 255, 255, 0.14);
  --tk-blue: #2f80ed;
  --tk-blue-2: #56ccf2;
  --tk-text: #e9eef7;
  --tk-muted: rgba(233, 238, 247, 0.72);
}

/* карточка блока TON Connect */
#profilePage .ton-connect-section {
  background: linear-gradient(180deg, var(--tk-surface), var(--tk-surface-2));
  border: 1px solid var(--tk-border);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
}

/* блок "Wallet connected" */
#profilePage .wallet-connected {
  background: rgba(47, 128, 237, 0.10);
  border: 1px solid rgba(47, 128, 237, 0.28);
  /* keep same card height before/after connect */
  margin: 0;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* make spacing equal to the CONNECT button block */
#profilePage #wallet-info {
  margin: 15px 0;
}

#profilePage .wallet-address {
  color: var(--tk-muted);
}

/* контейнер, куда TonConnectUI рендерит кнопку */
#profilePage #ton-connect {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* сама кнопка (у TonConnect UI классы могут отличаться по версии) */
#profilePage #ton-connect button,
#profilePage #ton-connect .tc-button,
#profilePage #ton-connect [class*="button"],
#profilePage #ton-connect [class*="Button"] {
  background: linear-gradient(180deg, rgba(47, 128, 237, 0.95), rgba(86, 204, 242, 0.92)) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  padding: 12px 16px !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  width: 100% !important;
  max-width: 360px !important;
  cursor: pointer !important;
  box-shadow: 0 10px 26px rgba(47, 128, 237, 0.25) !important;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease !important;
}

#profilePage #ton-connect button:hover,
#profilePage #ton-connect .tc-button:hover,
#profilePage #ton-connect [class*="button"]:hover,
#profilePage #ton-connect [class*="Button"]:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 14px 34px rgba(47, 128, 237, 0.34) !important;
  filter: brightness(1.05) !important;
}

#profilePage #ton-connect button:active,
#profilePage #ton-connect .tc-button:active,
#profilePage #ton-connect [class*="button"]:active,
#profilePage #ton-connect [class*="Button"]:active {
  transform: translateY(0) !important;
  filter: brightness(0.98) !important;
}

/* иконки/текст внутри (если TonConnect UI вставляет svg/span) */
#profilePage #ton-connect button *,
#profilePage #ton-connect .tc-button *,
#profilePage #ton-connect [class*="button"] *,
#profilePage #ton-connect [class*="Button"] * {
  color: inherit !important;
  fill: currentColor !important;
}

/* disable state */
#profilePage #ton-connect button:disabled,
#profilePage #ton-connect .tc-button:disabled,
#profilePage #ton-connect [class*="button"]:disabled,
#profilePage #ton-connect [class*="Button"]:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.15) !important;
}

.wallet-connected {
  background: rgba(0, 255, 136, 0.1);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  margin: 10px 0;
}

/* =============================
   Fake Ad Overlay (5 seconds)
   ============================= */

@keyframes tpSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


.wallet-address {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 8px;
  word-break: break-all;
  font-family: 'Courier New', monospace;
}

.disconnect-btn {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: #ff3b30;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
  transition: all 0.3s ease;
}

.disconnect-btn:hover {
  background: rgba(255, 59, 48, 0.2);
}

.ref-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 15px 0;
}

.ref-stat-item {
  background: rgba(0, 255, 136, 0.1);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.2);
  backdrop-filter: blur(10px);
}

.ref-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #00ff88;
  display: block;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.ref-stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.bonus-info {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
  text-align: left;
}

.bonus-list {
  text-align: left;
  margin: 10px 0;
  padding-left: 20px;
}

.bonus-list li {
  margin: 5px 0;
  color: rgba(255, 255, 255, 0.8);
}

.tasks-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 15px;
  margin: 20px auto;
  max-width: 400px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.tasks-section h3 {
  margin: 0 0 15px 0;
  color: #00ff88;
  text-align: center;
  font-size: 18px;
}

.task-item {
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 10px;
  padding: 10px;
  margin: 6px 0;
  backdrop-filter: blur(10px);
}

.task-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 8px;
}

.task-text {
  flex: 1;
}

.task-text h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: white;
  font-weight: 600;
}

/* Inline SVG task title (Telegram/channel) */
.task-text .tp-task-title {
  display: flex;
  align-items: center;
  gap: 6px; /* icon "pressed" to text */
}

/* RU text is longer and can look visually "far" from the icon.
   Slightly tighten spacing only for Russian UI. */
body[data-lang="ru"] .task-text .tp-task-title {
  gap: 3px;
}

.task-text .tp-task-title-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}

.task-text .tp-task-title-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.task-text p {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.3;
}

.task-rewards {
  text-align: right;
  margin-left: 10px;
  min-width: 60px;
}

.task-reward {
  background: rgba(0, 255, 136, 0.2);
  color: #00ff88;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  display: block;
  margin-bottom: 2px;
}

.task-progress {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.task-btn {
  background: linear-gradient(45deg, #00ff88, #00ffff);
  border: none;
  color: #0a0e17;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
  transition: all 0.3s ease;
}

.task-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.4);
}

.task-btn:disabled {
  background: linear-gradient(45deg, #666, #888);
  color: #ccc;
  cursor: not-allowed;
  transform: none;
}

.task-btn.completed {
  background: linear-gradient(45deg, #ffc107, #ff9800);
  color: #0a0e17;
}

/* ✅ Custom check icon for completed buttons */
.task-btn.completed::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  background-color: currentColor;
  -webkit-mask-image: var(--tp-check-mask);
  mask-image: var(--tp-check-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* ✅ Custom check icon helper (for toasts and other UI) */
.tp-check-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  background-color: #fff;
  -webkit-mask-image: var(--tp-check-mask);
  mask-image: var(--tp-check-mask);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.tasks-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  padding: 15px;
  font-style: italic;
  font-size: 12px;
}

.divider {
  height: 1px;
  background: rgba(0, 255, 136, 0.2);
  margin: 12px 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.header {
  margin-bottom: 20px;
  position: relative;
}

.game-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px 0;
  text-shadow: 0 0 20px var(--accent);
  background: linear-gradient(45deg, #00ff88, #00ffff, #0088ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGlow 3s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ton-logo {
  font-size: 36px;
  font-weight: 800;
  color: #00ff88 !important;
  text-shadow: 0 0 10px #00ff88, 0 0 20px #00ff88;
  animation: logoPulse 3.5s ease-in-out infinite;
  display: inline-block;
  line-height: 1;
  padding: 0 2px;
  -webkit-text-fill-color: #00ff88 !important;
}

@keyframes logoPulse {
  0%, 100% { 
    transform: scale(1); 
    text-shadow: 0 0 10px #00ff88, 0 0 20px #00ff88;
  }
  50% { 
    transform: scale(1); 
    text-shadow: 0 0 15px #00ff88, 0 0 30px #00ff88, 0 0 40px #00ff88;
  }
}

@keyframes titleGlow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.5)); }
  50% { filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.8)); }
}

.balance-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 20px;
  margin: 0 auto 20px;
  max-width: 320px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.balance-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

.balance-amount {
  font-size: 28px;
  font-weight: 700;
  color: #00ff88;
  margin-bottom: 4px;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.balance-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; /* небольшой отступ между текстом и POOL */
}

.balance-label-text {
  display: inline-flex;
  align-items: baseline;
}

/* Small POOL chip near balance (main page) */
.mining-pool-chip {
  background: linear-gradient(45deg, #00ff88, #00ffff, #0088ff);
  border: none;
  color: #0a0e17;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 1px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 255, 136, 0.35);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mining-pool-chip:hover {
  transform: translateY(-1px);
}

.mining-pool-chip:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 255, 136, 0.35);
}

.mining-pool-chip .mining-pool-text {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  color: #0a0e17;
  font-size: 12px;
  font-weight: 750;
  margin: 0;
  text-shadow: none;
}

.balance-unit {
  font-size: 12px;
  color: rgba(0, 255, 136, 0.7);
  margin-left: 4px;
}

.stats-row {
  display: flex;
  justify-content: space-around;
  margin: 16px 0;
  gap: 12px;
}

.stat-item {
  background: rgba(0, 255, 136, 0.1);
  padding: 10px 6px;
  border-radius: 12px;
  flex: 1;
  border: 1px solid rgba(0, 255, 136, 0.2);
  backdrop-filter: blur(10px);
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #00ff88;
  display: block;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.prizes-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin: 20px auto 8px auto;
  max-width: 860px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.prize-cell {
  background: rgba(0, 255, 136, 0.1);
  border-radius: 12px;
  padding: 16px 8px;
  font-size: 16px;
  font-weight: 700;
  color: #e3f2fd;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(0, 255, 136, 0.2);
  position: relative;
  overflow: hidden;
}

.prize-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 12px;
    animation: none !important;
    transform: none !important;
    z-index: 0;
}

.prize-cell.active::before {
    background: linear-gradient(45deg, rgba(0, 255, 136, 0.3), rgba(0, 255, 255, 0.3));
    animation: none !important;
    transform: none !important;
}

.prize-cell > * {
    position: relative;
    z-index: 1;
}

.prize-cell.active {
  background: linear-gradient(45deg, #00ff88, #00ffff);
  color: #0a0e17;
  transform: scale(1.08);
  border-color: rgba(0, 255, 136, 0.8);
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.6);
  z-index: 2;
}

.prize-cell.active::before {
    animation: none !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: rotate(0deg) !important;
    background: conic-gradient(transparent, #00ff88, transparent, #00ffff) !important;
}

.controls {
  margin: 4px 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.spin-btn {
  background: linear-gradient(45deg, #00ff88, #00ffff, #0088ff);
  border: none;
  color: #0a0e17;
  padding: 14px 32px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
  transition: all 0.3s ease;
  min-width: 200px;
  position: relative;
  overflow: hidden;
}

.spin-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.spin-btn:hover::before {
  left: 100%;
}

.spin-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 8px rgba(0, 255, 136, 0.4);
}

.spin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(45deg, #666, #888);
  color: #ccc;
}

.spins-left {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 255, 136, 0.1);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 136, 0.3);
  backdrop-filter: blur(10px);
}

#gamePage .spins-left {
  display: none;
}

.actions-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.action-btn {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  max-width: 140px;
  backdrop-filter: blur(10px);
}

.action-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.action-btn:active {
  transform: translateY(1px);
}

.action-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.action-btn.disabled:hover {
  background: rgba(0, 255, 136, 0.1);
  transform: none;
  box-shadow: none;
}

/* ИСПРАВЛЕННЫЕ СТИЛИ МОДАЛЬНЫХ ОКОН */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10000;
  padding: 20px;
  box-sizing: border-box;
}

.modal.show {
  opacity: 1;
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, rgba(19, 26, 44, 0.95), rgba(10, 14, 23, 0.95));
  color: white;
  padding: 24px;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 255, 136, 0.4);
  max-width: 400px;
  width: 100%;
  border: 1px solid rgba(0, 255, 136, 0.4);
  animation: modalAppear 0.3s ease;
  backdrop-filter: blur(30px);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

@keyframes modalAppear {
  from { 
    transform: scale(0.9) translateY(20px); 
    opacity: 0; 
  }
  to { 
    transform: scale(1) translateY(0); 
    opacity: 1; 
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.3);
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(45deg, #00ff88, #00ffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.close-btn {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: #00ff88;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: rotate(90deg);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.ref-link {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
  word-break: break-all;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

.ref-link:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: scale(1.02);
}

.ref-link:active {
  transform: scale(0.98);
}

.language-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10;

  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.lang-flag {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex: 0 0 auto;
  box-shadow: 0 1px 6px rgba(0,0,0,0.35);
}

.lang-flag-en { background-image: url('united-states.webp'); }
.lang-flag-ru { background-image: url('russia.webp'); }

.lang-code {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.language-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.language-option {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 12px;
  padding: 15px;
  margin: 10px 0;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

.language-option .lang-flag {
  width: 26px;
  height: 18px;
  border-radius: 6px;
}

.language-option:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 255, 136, 0.3);
}

.language-option.active {
  background: linear-gradient(45deg, #00ff88, #00ffff);
  color: #0a0e17;
  font-weight: bold;
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.5);
}

@media (max-width: 768px) {
  .prizes-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 6px;
    padding: 12px;
    max-width: 400px !important;
  }
  
  .prize-cell {
    padding: 12px 6px;
    font-size: 14px;
  }
  
  .game-title {
    font-size: 28px;
  }
  
  .ton-logo {
    font-size: 32px;
  }
  
  .balance-amount {
    font-size: 24px;
    padding: 6px 12px;
  }
  
  .actions-row {
    flex-direction: column;
    align-items: center;
  }
  
  .action-btn {
    max-width: 200px;
    width: 100%;
  }
  
  .withdraw-section {
    margin: 20px 10px;
    padding: 15px;
  }
  
  .tasks-section {
    margin: 20px 10px;
    padding: 15px;
  }
  
  .language-btn {
    top: 5px;
    right: 5px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .help-btn {
    top: 5px;
    left: 5px;
    padding: 6px 10px;
    font-size: 14px;
    width: 30px;
    height: 30px;
  }
  
  .modal-content {
    padding: 20px;
    margin: 10px;
    max-width: 95%;
  }
  
  .modal-title {
    font-size: 18px;
  }
  
  .close-btn {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
}

.mining-pool-section {
    background: linear-gradient(135deg, rgba(19, 26, 44, 0.9), rgba(10, 14, 23, 0.9));
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px 20px;
    margin:  -10px auto 4px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 300px;
    width: 100%;
    text-align: center;
    height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* If POOL is rendered as a small inline chip (main balance line), override the big-card styles */
.mining-pool-section.mining-pool-chip {
    background: linear-gradient(45deg, #00ff88, #00ffff, #0088ff) !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    border-radius: 999px !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.35) !important;
    border: none !important;
    text-align: center !important;
    display: inline-flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
}

.mining-pool-section:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.4);
}

.mining-pool-section.mining-pool-chip:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 12px 28px rgba(0, 255, 136, 0.35) !important;
}

.mining-pool-text {
    background: linear-gradient(45deg, #00ff88, #00ffff, #0088ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.smoke-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: 900;
    color: #888888;
    text-shadow: 0 0 30px #666666, 0 0 60px #444444;
    opacity: 0;
    z-index: 3;
    animation: smokeRise 2s ease-out forwards;
}

.smoke-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(0, 255, 136, 0.7);
    border-radius: 50%;
    pointer-events: none;
    animation: smokeFloat 1.5s ease-out forwards;
}

@keyframes smokeRise {
    0% {
        opacity: 0;
        transform: translate(-50%, -80%) scale(1);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -60%) scale(1.2);
    }
    40% {
        opacity: 1;
        transform: translate(-50%, -70%) scale(1.1);
    }
    60% {
        opacity: 0.8;
        transform: translate(-50%, -80%) scale(1);
    }
    80% {
        opacity: 0.5;
        transform: translate(-50%, -100%) scale(0.9);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -120%) scale(0.8);
    }
}

@keyframes smokeFloat {
    0% {
        opacity: 0.8;
        transform: translate(0, 0) scale(1);
    }
    25% {
        opacity: 0.6;
        transform: translate(var(--tx1), -20px) scale(1.2);
    }
    50% {
        opacity: 0.4;
        transform: translate(var(--tx2), -40px) scale(1.1);
    }
    75% {
        opacity: 0.2;
        transform: translate(var(--tx3), -60px) scale(0.9);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx4), -80px) scale(0.8);
    }
}

.blockchain-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 1;
}

.bg-block {
    position: absolute;
    width: 40px;
    height: 8px;
    background: #00ff88;
    border-radius: 2px;
}

.bg-block:nth-child(1) { top: 20%; left: 10%; }
.bg-block:nth-child(2) { top: 60%; left: 80%; }
.bg-block:nth-child(3) { top: 40%; left: 70%; }
.bg-block:nth-child(4) { top: 80%; left: 20%; }
.bg-block:nth-child(5) { top: 30%; left: 50%; }

.bg-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00ff88, transparent);
}

.bg-connection:nth-child(6) { 
    top: 25%; 
    left: 15%; 
    width: 60px; 
    transform: rotate(30deg); 
}
.bg-connection:nth-child(7) { 
    top: 65%; 
    left: 65%; 
    width: 50px; 
    transform: rotate(-45deg); 
}
.bg-connection:nth-child(8) { 
    top: 45%; 
    left: 30%; 
    width: 70px; 
    transform: rotate(15deg); 
}

.bg-node {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #00ffff;
    border-radius: 50%;
}

.bg-node:nth-child(9) { top: 25%; left: 25%; }
.bg-node:nth-child(10) { top: 65%; left: 45%; }
.bg-node:nth-child(11) { top: 35%; left: 75%; }

.footer-space {
  height: 100px;
  width: 100%;
}

.number-btn, .clear-btn {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: white;
  padding: 15px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.number-btn:hover, .clear-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  transform: translateY(-2px);
}

.clear-btn {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: #ff3b30;
  font-size: 14px;
}

.clear-btn:hover {
  background: rgba(255, 59, 48, 0.2);
}

.number-btn:disabled, .clear-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

button, .action-btn, .spin-btn, .withdraw-btn, .task-btn, .number-btn, .clear-btn, .back-btn, .help-btn, .language-btn, .close-btn, .disconnect-btn, .wallet-btn {
    -webkit-tap-highlight-color: transparent !important;
    tap-highlight-color: transparent !important;
    outline: none !important;
}

button:active, .action-btn:active, .spin-btn:active, .withdraw-btn:active, .task-btn:active, .number-btn:active, .clear-btn:active, .back-btn:active, .help-btn:active, .language-btn:active, .close-btn:active, .disconnect-btn:active, .wallet-btn:active {
    background-color: inherit !important;
    opacity: 0.9 !important;
    transform: translateY(1px) !important;
}

.spin-btn:active {
    background: linear-gradient(45deg, #00ff88, #00ffff, #0088ff) !important;
    transform: translateY(2px) !important;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.4) !important;
}

.action-btn:active {
    background: rgba(0, 255, 136, 0.15) !important;
    transform: translateY(1px) !important;
}

@media (max-width: 768px) {
  .ref-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 10px 0;
  }
  
  .ref-stat-item {
    padding: 8px;
  }
  
  .ref-stat-value {
    font-size: 16px;
  }
  
  .ref-stat-label {
    font-size: 10px;
  }
  
  .bonus-info {
    padding: 8px;
    margin: 8px 0;
    font-size: 12px;
  }
  
  .bonus-list {
    font-size: 11px;
    padding-left: 15px;
    margin: 5px 0;
  }
  
  .bonus-list li {
    margin: 2px 0;
  }
  
  .modal-content {
    padding: 15px;
    margin: 10px;
  }
  
  .referrals-list {
    max-height: 120px !important;
    font-size: 10px !important;
    padding: 6px !important;
  }
}

@media (max-width: 480px) {
  .ref-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  
  .ref-stat-item {
    padding: 6px 4px;
  }
  
  .ref-stat-value {
    font-size: 14px;
  }
  
  .ref-stat-label {
    font-size: 9px;
  }
  
  .bonus-info {
    padding: 8px;
    margin: 8px 0;
  }
  
  .bonus-info h4 {
    font-size: 13px;
    margin: 5px 0;
  }
  
  .bonus-list {
    font-size: 10px;
    padding-left: 12px;
  }
}

.bonus-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    z-index: 10000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.bonus-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.bonus-content {
    background: linear-gradient(135deg, #00ff88, #00ffff, #0088ff);
    padding: 30px 40px;
    border-radius: 25px;
    text-align: center;
    color: #0a0e17;
    font-weight: bold;
    box-shadow: 
        0 0 50px rgba(0, 255, 136, 0.6),
        0 0 100px rgba(0, 255, 255, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    min-width: 280px;
}

.bonus-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shineRotate 3s linear infinite;
    z-index: 1;
}

@keyframes shineRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bonus-icon {
    font-size: 60px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.3));
    position: relative;
    z-index: 2;
    animation: iconBounce 0.6s ease-in-out;
}

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

.bonus-title {
    font-size: 24px;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
}

.bonus-amount {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
    background: linear-gradient(45deg, #0a0e17, #333);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bonus-subtitle {
    font-size: 16px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.bonus-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: gold;
    border-radius: 50%;
    animation: sparkleFloat 2s ease-out forwards;
    box-shadow: 0 0 10px gold, 0 0 20px yellow;
}

.sparkle:nth-child(1) { top: 20%; left: 20%; animation-delay: 0.1s; }
.sparkle:nth-child(2) { top: 20%; left: 80%; animation-delay: 0.3s; }
.sparkle:nth-child(3) { top: 80%; left: 20%; animation-delay: 0.5s; }
.sparkle:nth-child(4) { top: 80%; left: 80%; animation-delay: 0.7s; }
.sparkle:nth-child(5) { top: 50%; left: 10%; animation-delay: 0.2s; }
.sparkle:nth-child(6) { top: 50%; left: 90%; animation-delay: 0.6s; }

@keyframes sparkleFloat {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    50% {
        opacity: 1;
        transform: translate(var(--sparkle-x, 0), var(--sparkle-y, -30px)) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--sparkle-x, 0), var(--sparkle-y, -60px)) scale(0);
    }
}

.bonus-coin {
    position: fixed;
    font-size: 24px;
    z-index: 9999;
    pointer-events: none;
    animation: bonusCoinFly 1.5s ease-out forwards;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8));
}

@keyframes bonusCoinFly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--target-x), var(--target-y)) scale(0.5) rotate(360deg);
    }
}

/* ================== Daily Combo (revamp) ================== */
.daily-combo-section {
  text-align: center;
}

.combo-display {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 14px auto 8px;
  padding: 14px 10px;
  border-radius: 14px;
  background: rgba(0, 255, 136, 0.10);
  border: 1px solid rgba(0, 255, 136, 0.35);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  max-width: 320px;
  min-height: 56px;
  user-select: none;
}

.combo-digit {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 255, 136, 0.25);
  font-family: 'Courier New', monospace;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
}

.combo-digit.combo-digit-anim {
  animation: comboSlotIn 240ms ease-out;
}

@keyframes comboSlotIn {
  0%   { transform: translateY(-14px) scale(0.95); opacity: 0.2; }
  60%  { transform: translateY(2px) scale(1.02); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.combo-keyboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px auto 0;
  max-width: 320px;
}

.combo-keyboard .combo-empty {
  opacity: 0;
  pointer-events: none;
}

.combo-message {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

.combo-submit {
  margin-top: 12px;
}
 
/* ===============================
   MAIN PAGE — bold labels only
   =============================== */

/* Верхние подписи (баланс, уровень, спины, выиграно) */
.balance-label,
.stat-label,
.spins-left {
  font-weight: 700;
}

/* Кнопки главной страницы */
.action-btn {
  font-weight: 700;
}

/* Заголовок баланса */
.balance-amount {
  font-weight: 700;
}


/* ================================
   Slot-style animation for MAIN balance (#balance)
   ================================ */
.balance-amount.slot-counter {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.slot-digit {
  display: inline-block;
  position: relative;
  height: 1em;
  width: 0.65em;
  overflow: hidden;
  vertical-align: bottom;
}

.digit-strip {
  display: block;
  will-change: transform;
  transform: translateY(0);
}

.digit-strip.animate {
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.digit-strip > span {
  display: block;
  height: 1em;
  line-height: 1em;
}


/* ===== Step UI: bottom icon bar (shows only on Game page) ===== */
#gamePage:not(.active) #bottomNav{ display:none !important; }

#bottomNav.bottom-nav{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: min(320px, calc(100% - 28px));
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-radius: 26px;
  z-index: 999;
}

#bottomNav.glass{
  background: rgba(10, 16, 24, 0.55);
  border: 1px solid rgba(0,255,136,0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.45);
}

#bottomNav .nav-btn{
  width: 42px;
  height: 42px;
  border-radius: 16px;
  border: 1px solid rgba(0,255,136,0.16);
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}

#bottomNav .nav-btn:active{ opacity: .92; }

#bottomNav .nav-ico{
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(0,255,136,0.25));
}

/* Keep content above fixed nav */
.footer-space{ height: 120px; }
/* Bottom nav inline SVG icons */
.nav-icon{
  width: 22px;
  height: 22px;
  fill: currentColor;
  color: #fff;
  filter: drop-shadow(0 0 6px rgba(0,255,136,0.6));
}
.bottom-nav .nav-btn{
  display:flex;
  align-items:center;
  justify-content:center;
}
.help-btn .help-icon {
  width: 23px;
  height: 23px;
  fill: #d4cdcdc7;              /* ← белый */
  display: block;
  flex-shrink: 0;
}

/* === TON Wallet SVG icon === */
.tp-wallet-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.tp-wallet-icon{
  width:18px;
  height:18px;
  flex:0 0 18px;
  display:inline-block;
}
.tp-wallet-title-text{
  display:inline-block;
}
#profilePage .tp-wallet-icon {
  width: 26px;
  height: 26px;
}
#tasksPage .tp-wallet-icon {
  width: 20px;
  height: 20px;
}
.task-item h4 {
  display: flex;
  align-items: center;   /* вертикальное выравнивание */
  justify-content: center; /* ⬅️ ЭТО главное: центр */
  gap: 8px;              /* расстояние между иконкой и текстом */
}

/* ===== TON Plus: Bottom Nav (new, with labels + active glow) ===== */
#bottomNav.tp-bottom-nav{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: min(460px, calc(100% - 24px));
  padding: 8px;
  height: 81px;
  border-radius: 26px;
  z-index: 999;
}

#bottomNav.tp-bottom-nav.glass{
  background: rgba(10, 16, 24, 0.55);
  border: 1px solid rgba(0,255,136,0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.45);
}

#bottomNav.tp-bottom-nav .tp-nav{
  display: flex;
  gap: 6px;
  width: 100%;
  height: 100%;
  align-items: center;
}

#bottomNav.tp-bottom-nav .tp-nav-btn{
  position: relative;
  flex: 1;
  height: 76px;
  border-radius: 18px;
  border: 1px solid rgba(0,255,136,0.12);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.68);
  cursor: pointer;
  padding: 6px 4px;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
  overflow: hidden;
}

#bottomNav.tp-bottom-nav .tp-nav-btn:active{ transform: translateY(1px); }

#bottomNav.tp-bottom-nav .tp-nav-inner{
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

#bottomNav.tp-bottom-nav .tp-nav-icon{
  width: 26px;
  height: 26px;
  fill: currentColor;
  filter: drop-shadow(0 0 8px rgba(0,255,136,0.45));
}

#bottomNav.tp-bottom-nav .tp-nav-label{
  font-size: 11px;
  line-height: 1;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#bottomNav.tp-bottom-nav .tp-nav-glow{
  position: absolute;
  inset: -18px;
  background: radial-gradient(circle at 50% 35%, rgba(0,255,136,0.28), rgba(0,255,136,0.12) 35%, rgba(0,0,0,0) 65%);
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 1;
  pointer-events: none;
}

#bottomNav.tp-bottom-nav .tp-nav-btn.active{
  background: linear-gradient(135deg, rgba(0,255,136,0.12), rgba(255, 215, 0, 0.08));
  border-color: rgba(255,215,0,0.35);
  color: rgba(255, 214, 120, 0.98);
  box-shadow: 0 0 0 1px rgba(255,215,0,0.20), 0 10px 26px rgba(0,0,0,0.35);
}

#bottomNav.tp-bottom-nav .tp-nav-btn.active .tp-nav-glow{ opacity: 1; }

#bottomNav.tp-bottom-nav .tp-nav-btn.active .tp-nav-icon{
  filter: drop-shadow(0 0 10px rgba(255,215,0,0.40)) drop-shadow(0 0 12px rgba(0,255,136,0.20));
}

/* Keep content above fixed nav */
.footer-space{ height: 130px; }


/* ===== Settings (Profile) ===== */

.tp-settings-btn{
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tp-settings-btn:active{ transform: scale(0.98); }
.tp-settings-icon{
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.95;
}

/* Sheet */
.tp-sheet{
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}
.tp-sheet.open{ pointer-events: auto; }

.tp-sheet-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.35);
  opacity:0;
  transition: opacity 180ms ease;
}
.tp-sheet.open .tp-sheet-backdrop{ opacity:1; }

.tp-sheet-card{
  position:absolute;
  left:50%;
  bottom: 140px; /* compact + slightly higher */
  transform: translate(-50%, 130%);
  opacity:0;
  width: min(92vw, 420px);
  padding: 12px 12px;
  border-radius: 18px;
  background: rgba(15, 20, 32, 0.96);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  transition: transform 220ms ease, opacity 220ms ease;
}
.tp-sheet.open .tp-sheet-card{
  transform: translate(-50%, 0);
  opacity:1;
}
.tp-sheet-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px 6px;
}
.tp-sheet-row + .tp-sheet-row{
  border-top: 1px solid rgba(255,255,255,0.08);
}
.tp-sheet-label{
  font-size: 14px;
  color: rgba(255,255,255,0.9);
}

/* Switch */
.tp-switch{
  position: relative;
  display:inline-block;
  width: 44px;
  height: 24px;
}
.tp-switch input{ opacity:0; width:0; height:0; }
.tp-slider{
  position:absolute;
  cursor:pointer;
  inset:0;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.14);
  transition: 180ms;
  border-radius: 999px;
}
.tp-slider:before{
  position:absolute;
  content:"";
  height: 18px;
  width: 18px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.92);
  transition: 180ms;
  border-radius: 50%;
}
.tp-switch input:checked + .tp-slider{
  background: linear-gradient(45deg, rgba(0,255,136,0.95), rgba(0,255,255,0.95));
  border-color: rgba(0,255,200,0.25);
}
.tp-switch input:checked + .tp-slider:before{
  transform: translate(20px, -50%);
}
.tp-switch-disabled{ opacity: 0.55; }
.tp-switch-disabled .tp-slider{ cursor: not-allowed; }

/* =======================
   FIX: Back + Settings align on Profile
   ======================= */
.profile-top-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.profile-top-bar .back-btn{
  margin-bottom:0 !important;
}
.profile-top-bar .tp-settings-btn{
  position:static !important;
  top:auto !important;
  right:auto !important;
}

/* =======================
   FIX: Make Settings sheet narrower
   ======================= */
#tpSettingsSheet .tp-sheet-card{
  width: min(88vw, 340px) !important;
}


/* ===== Telegram Safe Area Fix ===== */
:root {
  --tg-safe-top: env(safe-area-inset-top, 0px);
}

body {
  padding-top: calc(16px + var(--tg-safe-top));
  box-sizing: border-box;
}

.container {
  padding-top: 8px;
}

.page {
  min-height: calc(100vh - var(--tg-safe-top));
}


/* ===== Fix "rubber scroll" / overscroll bounce (Telegram WebApp / iOS) ===== */
html, body {
  height: 100%;
  overflow: hidden;
}

body {
  padding: 0;
  min-height: 100dvh;
}

.page {
  height: 100%;
  overflow: hidden;
}

.page.active {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  padding: 16px;
  padding-bottom: 110px;
  box-sizing: border-box;
}
/* POOL button color like Play */
#miningPool {
  background: linear-gradient(45deg, #537565, #3d5e5e, #8cacc7) !important;
  box-shadow: 
    0 0 4px rgba(66, 99, 66, 0.5),
    0 0 8px rgba(48, 163, 163, 0.4) !important;
  padding: 2px 6px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
}


.mining-pool-text {
  color: #161c2b;
  font-size: 11px;
  font-weight: 700;
  margin: 0;
}


/* ===== Mining rigs UI ===== */
.rigs-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:10px;
}
.rig-card{
  border:1px solid rgba(0,255,136,0.25);
  background: rgba(10,14,23,0.65);
  border-radius:14px;
  padding:12px;
  text-align:left;
}
.rig-title{
  font-weight:800;
  font-size:13px;
  margin-bottom:6px;
}
.rig-sub{
  font-size:11px;
  opacity:.75;
  margin-bottom:10px;
}
.rig-actions{
  display:flex;
  gap:8px;
}
.rig-btn{
  flex:1;
  border:none;
  border-radius:12px;
  padding:8px 10px;
  font-weight:800;
  cursor:pointer;
  background: linear-gradient(45deg, #00ff88, #00ffff);
  color:#0a0e17;
}
.rig-btn.installed{
  background: linear-gradient(45deg, #ffc107, #ff9800);
}
.rig-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  overflow: hidden;
  margin-top: 10px;
}
.rig-progress > div {
  height: 100%;
  width: 0%;
  background: linear-gradient(45deg, #00ff88, #00ffff);
  transition: width 120ms linear;
}
.rig-card.installing {
  opacity: 0.95;
  border-color: rgba(0,255,136,0.45);
  box-shadow: 0 0 14px rgba(0,255,136,0.18);
}
.rig-status {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 8px;
}
/* loader inside button */
.rig-btn .loader {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border-radius: 50%;
  border: 2px solid rgba(10,14,23,0.35);
  border-top-color: rgba(10,14,23,0.95);
  animation: rigspin 0.8s linear infinite;
}
@keyframes rigspin {
  to { transform: rotate(360deg); }
}

/* ================= Mining Pool (compact buy + rig buttons) ================= */
.tp-pool-controls .tp-pool-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.tp-buy-rig{
  width:auto !important;
  padding:10px 12px !important;
  font-size:13px !important;
  border-radius:14px !important;
  flex:0 0 auto;
}

.tp-rig-buttons{
  display:flex;
  gap:8px;
  flex:1 1 auto;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.tp-rig-btn{
  appearance:none;
  border:1px solid rgba(0,255,136,0.25);
  background: rgba(10,14,23,0.55);
  color: rgba(255,255,255,0.92);
  border-radius:12px;
  padding:9px 10px;
  font-size:12px;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.tp-rig-btn:active{ transform: scale(0.98); }

.tp-rig-btn:disabled{
  opacity:0.55;
  cursor:not-allowed;
}

.tp-rig-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background: rgba(255,255,255,0.25);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.06) inset;
  flex:0 0 auto;
}

.tp-rig-btn.installed .tp-rig-dot{
  background:#00ff88;
  box-shadow: 0 0 10px rgba(0,255,136,0.55), 0 0 0 2px rgba(0,255,136,0.25) inset;
}

.tp-rig-btn.installing{
  opacity:0.8;
}

.tp-pool-bottom{
  justify-content:space-between;
}

.tp-pool-bottom .task-btn{
  width:calc(50% - 6px);
}

.tp-pool-hint{
  margin-top:10px;
  font-size:12px;
  color: rgba(255,255,255,0.65);
  line-height:1.35;
}

/* Modal for rig install */
.tp-rig-modal-actions{
  display:flex;
  gap:10px;
}

.tp-rig-modal-actions .task-btn{
  width:50%;
}


/* ===== Generic page card (used on Mining Pool etc.) ===== */
.tp-page-card {
  max-width: 520px;
  margin: 16px auto;
  padding: 16px 18px;

  /* 🎨 Background (works with VS Code palette) */
  background-color: rgba(28, 42, 66, 0.616);

  /* 💚 Neon border */
  border: 1px solid rgba(11, 14, 12, 0);
  border-radius: 18px;

  /* ✨ Glow effect */
  box-shadow:
    0 0 12px rgba(18, 22, 20, 0.048),
    0 0 28px rgba(0, 255, 136, 0.08);

  /* Smooth */
  backdrop-filter: blur(6px);
  transition: all 0.25s ease;
}


/* Hover (PC / Desktop) */
.tp-page-card:hover {
  box-shadow:
    0 0 18px rgba(25, 27, 26, 0),
    0 0 36px rgba(0, 255, 136, 0.15);
}


/* Inside spacing */
.tp-page-card > * {
  margin-bottom: 10px;
}


/* Titles inside card */
.tp-page-card h2,
.tp-page-card h3 {
  color: #d0d7eed3;
  text-shadow: 0 0 6px rgba(6, 14, 10, 0.4);
}


/* Text */
.tp-page-card p,
.tp-page-card span,
.tp-page-card div {
  color: #b5c9db;
}

.tp-mining-page-card .page-title{ margin-top: 6px; }
.tp-mining-page-card .profile-section{ margin-top: 8px; }



/* ===== Mining Pool stats block ===== */
.tp-pool-stats{
  margin-top: 12px;
  padding: 12px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0,255,136,0.18);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.tp-pool-stat{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.tp-pool-stat:last-child{ border-bottom: none; }

.tp-pool-stat-label{
  font-size: 12px;
  color: rgba(255,255,255,0.70);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.tp-pool-stat-value{
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  font-weight: 800;
  text-align: right;
  letter-spacing: 0.2px;
}


/* ===== Mining Pool: floating Back (outside card) ===== */
.tp-float-back{
  position: fixed;
  left: 14px;
  top: calc(var(--tg-safe-top, 0px) + 12px);
  z-index: 999;
  margin: 0 !important;
  width: auto;
  padding: 10px 14px;
  border-radius: 14px;
}

/* On very narrow screens keep it compact */
@media (max-width: 420px){
  .tp-float-back{ padding: 9px 12px; }
  .tp-float-back .back-text{ display:none; }
}


/* ===== Back button icon-only (like Pool) on ALL pages ===== */
.tp-back-icon-only{
  width: 44px !important;
  height: 44px !important;
  padding: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
}

.tp-back-icon-only .back-text{ display:none !important; }

.tp-back-icon-only .back-icon{
  width: 18px;
  height: 18px;
  margin: 0 !important;
}

/* Mining Pool card header compact */
.tp-mining-page-card{
  padding-top: 12px;
}
.tp-mining-page-card .page-title{
  margin: 0 0 10px 0;
  padding: 0;
}


/* Privacy Policy button (Profile) — looks like Settings, but static (not absolute) */
#profilePage .tp-privacy-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

  width: 100%;
  margin: 16px 0 14px;
  position: relative; /* IMPORTANT: prevent absolute from settings styles */
}
#profilePage .tp-privacy-btn:active{
  transform: translateY(1px);
}
/* Remove green outline/border from header buttons (Language + Help) */
.language-btn,
.help-btn,
.header button,
.language-btn:focus,
.help-btn:focus,
.header button:focus,
.language-btn:active,
.help-btn:active,
.header button:active {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
/* Language button color + transparency */
.language-btn {
  background: rgba(22, 44, 39, 0.452) !important;
  color: #ffffff !important;
}
/* Help button */
.help-btn {
  background: rgba(15, 24, 22, 0.301) !important;
  color: #e7e3e39c !important;
}
.spin-btn {
  width: 190px;      /* ширина */
  height: 44px;      /* высота */
  font-size: 18px;   /* размер текста */
  border-radius: 16px; /* скругление */
}
.spin-btn {
  padding: 10px 20px; /* вверх-вниз | влево-вправо */
}
.spin-btn {
  box-shadow: none !important;
  text-shadow: none !important;
}
.page,
.container,
.main,
.overlay {
  background: #000000 !important;   /* сплошной цвет */
  
}
/* === FIX PRELOADER BACKGROUND === */

#preloader,
.preloader,
.loading-screen,
.loader,
#loader {
  background: hsl(0, 0%, 0%) !important;
  backdrop-filter: none !important;
}
/* === BACKGROUND IMAGE === */

body {
  background: url("/bg.webp") no-repeat center center fixed;
  background-size: cover;
}
.page,
.container {
  background: transparent !important;
}
/* ===== Bottom menu glass effect ===== */
#bottomNav.tp-bottom-nav{
  background: rgba(21, 22, 41, 0.425) !important; /* прозрачность */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-top: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
/* ===== Remove green border/glow from bottom menu ===== */
#bottomNav.tp-bottom-nav{
  border: none !important;
  box-shadow: none !important;
}
/* ===== Remove green border/glow from BACK button ===== */
.back-btn,
.tp-float-back,
.tp-back-icon-only{
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  
}

/* Убираем при нажатии */
.back-btn:focus,
.back-btn:active,
.tp-float-back:focus,
.tp-float-back:active{
  box-shadow: none !important;
  outline: none !important;
}
/* ===== Patch: Language modal backdrop not too dark ===== */
#languageModal.modal{
  background: rgba(0, 0, 0, 0.137) !important;
  backdrop-filter: blur(7px) !important;
}
#languageModal *,
#languageModal::before,
#languageModal::after{
  box-shadow: none !important;
}
#languageModal .modal-content,
#languageModal .lang-modal{
  border: none !important;
  box-shadow: none !important;
}
/* ===== ONLY language modal window (not background) ===== */
#languageModal .modal-content,
#languageModal .lang-modal,
#languageModal .lang-box,
#languageModal > div{
  background: rgba(40, 49, 58, 0.884) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-radius: 18px;
}
/* ===== Language modal: buttons (English / Русский) ===== */
#languageModal .language-option{
  background: rgba(255,255,255,0.06) !important;   /* цвет кнопки */
  border: 1px solid rgba(255,255,255,0.10) !important; /* рамка */
  color: rgba(255,255,255,0.92) !important;        /* цвет текста */
  border-radius: 14px;
}

/* hover/active (чтобы было красиво при тапе) */
#languageModal .language-option:active{
  transform: scale(0.99);
  background: rgba(255,255,255,0.10) !important;
}

/* если хочешь убрать зелёное полностью (если где-то осталось) */
#languageModal .language-option{
  box-shadow: none !important;
}
/* ===== REMOVE glow from POOL button/card ===== */
#miningPool,
.tp-mining-page-card,
.tp-page-card{
  box-shadow: none !important;
}


/* ===== Referrals Page (new page, not modal) ===== */
.tp-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.tp-ref-card { margin-top: 12px; }

.tp-ref-big { padding: 18px; }

.tp-ref-kicker {
  font-size: 12px;
  color: rgba(255,255,255,0.70);
  letter-spacing: 0.2px;
  margin-bottom: 8px;
}

.tp-ref-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.tp-ref-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.tp-ref-actions {
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 10px;
  margin-top: 14px;
}

.tp-btn {
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.tp-btn:active { transform: translateY(1px); }

.tp-btn-primary {
  border: none;
  background: linear-gradient(90deg, rgba(0,255,136,0.95), rgba(0,255,255,0.95));
  color: #0a0e17;
}

.tp-btn-square {
  width: 56px;
  padding: 0;
}

.tp-btn-square svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.tp-ref-bonuses { margin-top: 6px; }

.tp-ref-bonus-item {
  font-size: 13px;
  color: rgba(255,255,255,0.86);
  padding: 4px 0;
}

.tp-ref-list-title {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,0.85);
}

.tp-ref-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 90px; /* чтобы не пряталось за bottom nav */
}

.tp-referrals-list-card{
  margin-top: 16px;
  padding: 12px;
}

.tp-ref-list-title--in-card{
  margin-top: 0;
  margin-bottom: 10px;
}

.tp-ref-list-scroll{
  margin-top: 0;
  gap: 8px;
  padding-bottom: 0;
  max-height: min(520px, 55vh); /* ~10 items, then scroll */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

#referralsPage .tp-ref-list{
  padding-bottom: 0;
}


.tp-ref-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
}

.tp-ref-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  font-weight: 900;
  font-size: 12px;
  color: rgba(255,255,255,0.9);
}

.tp-ref-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tp-ref-meta { flex: 1; min-width: 0; }

.tp-ref-name {
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-ref-small {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255,255,255,0.62);
}


/* =======================
   Profile: Settings button top-right, scrolls with content
   (Do not use absolute/fixed positioning on Profile settings)
   ======================= */
#profilePage .profile-top-bar{
  justify-content: flex-end;
  position: relative;
  min-height: 44px;
}
#profilePage .tp-settings-btn{
  position: relative;
  top: auto;
  right: auto;
  margin-left: auto;
}



/* Daily Combo: allow a bit more scroll space */
#dailyComboPage .container{ padding-bottom: 48px; }

.tp-ref-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  min-height: 44px;
}

.tp-ref-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.tp-ref-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}

.tp-ref-name {
  text-align: left;
  margin: 0;
  font-size: 14px;
}
/* === Referrals page: cards color ONLY === */

#referralsPage .tp-card {
  background: rgba(54, 69, 83, 0.473);   /* основной фон карточки */
  border: 1px solid rgba(0, 195, 255, 0.068);
}

#referralsPage .tp-ref-item {
  background: rgba(10, 18, 28, 0.9);   /* фон строки реферала */
  border: 1px solid rgba(0, 255, 136, 0.15);
}
/* ===== REFERRALS PAGE: each block separately ===== */

/* 1) Friends invited (текст отдельно) */
#referralsPage #refFriendsLabelTop{
  font-size: 22px;
  color: #e2e2e2bb;
  font-weight: 800;
}

/* Friends invited (цифра отдельно) */
#referralsPage #refFriendsInvited{
  font-size: 23px;
  color: #2cad20; /* <-- если ошибка, замени на #00ffff */
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* 2) Bonus spins (текст отдельно) */
#referralsPage #refSpinsLabelTop{
  font-size: 15px;
  color: #e2e2e2bb;
  font-weight: 600;
}

/* Bonus spins (цифра отдельно) */
#referralsPage #refBonusSpinsPage{
  font-size: 20px;
  color: #2cad20;
  font-weight: 800;
}

/* 3) Earned Tonplus (текст отдельно) */
#referralsPage #refEarnedLabelTop{
  font-size: 15px;
  color: #e2e2e2bb;
  font-weight: 600;
}

/* Earned Tonplus (цифра отдельно) */
#referralsPage #refEarnedTonplus{
  font-size: 20px;
  color: #2cad20;
  font-weight: 800;
}

/* 4) Invitation bonuses (заголовок отдельно) */
#referralsPage #bonusTitlePage{
  font-size: 19px;
  color: #e2e2e2bb;
  font-weight: 800;
}

/* Invitation bonuses (блок отдельно) */
#referralsPage #refInvitationBonuses{
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(53, 92, 75, 0.185);
  border: 1px solid rgba(0, 255, 136, 0.082);
}

/* строки внутри Invitation bonuses */
#referralsPage #refInvitationBonuses .tp-ref-bonus-item{
  font-size: 15px;
  color: rgb(224, 224, 224);
  line-height: 1.35;
  font-weight: 600;
  margin: 6px 0;
}

/* 5) Invite friends (кнопка отдельно) */
#referralsPage #inviteFriendsBtn{
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: #111111;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 0;
  border-radius: 10px;
  overflow: visible;
}

/* rainbow glow (always on) */
#referralsPage #inviteFriendsBtn:before{
  content: '';
  background: linear-gradient(45deg,
    #ff0000,#ff7300,#fffb00,#48ff00,
    #00ffd5,#002bff,#7a00ff,#ff00c8,#ff0000);
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: inviteGlow 20s linear infinite;
  opacity: 1;
  border-radius: 10px;
}

#referralsPage #inviteFriendsBtn:after{
  z-index: -1;
  content: '';
  position: absolute;
  inset: 0;
  background: #2b2b3d;
  border-radius: 10px;
}

@keyframes inviteGlow{
  0% { background-position: 0 0; }
  50% { background-position: 400% 0; }
  100% { background-position: 0 0; }
}
/* 6) Your referrals (заголовок отдельно) */
#referralsPage #yourReferralsTitle{
  font-size: 20px;
  color: #e2e2e2bb;
  font-weight: 900;
  letter-spacing: 0.2px;
}

/* 7) Цифры отдельно (если где-то ещё цифры через <strong>) */
#referralsPage strong{
  color: #00ffff;
  font-weight: 800;
}




/* =========================
   Custom TON Connect button
   (always-active border animation)
   ========================= */

.tp-connect-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px 0;
}

.tp-connect-center {
  width: 180px;
  height: 60px;
  position: relative;
}

.tp-connect-btn {
  width: 180px;
  height: 60px;
  cursor: pointer;
  background: transparent;
  border: 1px solid #91C9FF;
  outline: none;
  position: relative;
  padding: 0;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.tp-connect-btn svg {
  position: absolute;
  left: 0;
  top: 0;
  fill: none;
  stroke: #fff;
}

.tp-connect-btn .bg-line {
  opacity: 0.25;
  stroke-width: 1;
}

.tp-connect-btn .hl-line {
  stroke-width: 1;
  stroke-dasharray: 150 480;
  stroke-dashoffset: 150;
  animation: tpConnectDash 3s linear infinite;
}

@keyframes tpConnectDash {
  0%   { stroke-dashoffset: 150; }
  60%  { stroke-dashoffset: -480; } /* анимация идёт */
  100% { stroke-dashoffset: -480; } /* пауза */
}

.tp-connect-btn span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
  font-weight: 100;
  letter-spacing: 0.02em;
}

/* optional: subtle press feedback without changing style */
.tp-connect-btn:active {
  transform: translateY(0.5px);
}


/* ===== Double reward (2x) button near Spin ===== */
.spin-row{
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:center;
  width:100%;
}
.double-btn{
  min-width:64px;
  height:46px;
  padding:0 14px;
  border:none;
  border-radius:14px;
  font-weight:800;
  font-size:16px;
  cursor:pointer;
  user-select:none;
  box-shadow: 0 0 18px rgba(0,255,136,0.14);
  background: linear-gradient(45deg, #ffb800, #ff6a00);
  color:#0a0e17;
}
.double-btn:disabled{
  opacity:0.55;
  cursor:not-allowed;
  filter: grayscale(0.2);
}
.double-btn.pulse{
  animation: tpDoublePulse 1.2s ease-in-out infinite;
}
@keyframes tpDoublePulse{
  0%{ transform: scale(1); }
  50%{ transform: scale(1.06); }
  100%{ transform: scale(1); }
}
/* ===============================
   NEON PULSE (Winning Cells)
   =============================== */

.prize-cell {
  position: relative;
  border-radius: 10px;
  transition: all 0.15s ease;
}

.prize-cell.active {
  background: rgba(102, 145, 156, 0.507);
  box-shadow:
    0 0 4px rgba(0,255,200,0.3),
    0 0 8px rgba(0,255,200,0.2),
    0 0 14px rgba(0,255,200,0.15);
  animation: neonPulse 1s infinite alternate;
  z-index: 5;
}

.prize-cell.active::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  border: 2px solid rgba(0, 255, 200, 0.521);
  box-shadow: 0 0 12px rgba(0,255,200,0.8);
  pointer-events: none;
}

@keyframes neonPulse {
  0% {
    box-shadow:
      0 0 6px rgba(0,255,200,0.4),
      0 0 14px rgba(0, 255, 200, 0.281),
      0 0 22px rgba(0,255,200,0.2);
    transform: scale(1);
  }

  100% {
    box-shadow:
      0 0 12px rgba(0, 255, 200, 0.349),
      0 0 24px rgba(0, 255, 200, 0.384),
      0 0 40px rgba(0, 255, 200, 0);
    transform: scale(1.04);
  }
}
/* === REMOVE TRIANGLE FROM PRIZE CELLS === */
.prize-cell::before,
.prize-cell::after {
  display: none !important;
  content: none !important;
}
/* Disable blockchain "web" background */
#blockchainBackground,
.blockchain-web {
  display: none !important;
}

/* =========================
   LIVE CRYPTO PRICES (POOL)
   ========================= */
/* Live prices title icon */
.tp-liveprices-title{
  display: flex;
  align-items: center;
  justify-content: center; /* ⬅ центр по горизонтали */
  gap: 8px;
  text-align: center;
}
.tp-liveprices-icon{
  width: 26px;
  height: 26px;
  display: inline-block;
  flex: 0 0 auto;
  transform: translateY(1px);
}
.tp-liveprices-text{
  display: inline-block;
}

.tp-crypto-page-card{
  margin-top: 14px;
}
.tp-crypto-card{
  margin-top: 10px;
}
.tp-crypto-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 420px){
  .tp-crypto-grid{
    grid-template-columns: 1fr;
  }
}
.tp-crypto-row{
  contain: paint;
  transform: translateZ(0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(9, 226, 143, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.014);
  backdrop-filter: none;
}
.tp-crypto-left{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.tp-crypto-icon{
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.14);
  object-fit: cover;
  flex: 0 0 auto;
}
.tp-crypto-symbol{
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: 13px;
  white-space: nowrap;
}
.tp-crypto-price{
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.tp-crypto-footnote{
  margin-top: 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  line-height: 1.3;
}


/* TonConnect root: keep mounted but invisible (do NOT use display:none) */
.tp-tonconnect-root{
  position:absolute;
  left:-9999px;
  top:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
  opacity:0;
  pointer-events:none;
}




/* Wallet icon only in Profile */
.tp-wallet-profile{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tp-wallet-profile .tp-wallet-icon{
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-block;
}


/* ================== Daily Combo — TON Cyberpunk Blue/Cyan ================== */
#dailyComboPage{
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(0, 240, 255, 0.25), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(0, 120, 255, 0.25), transparent 65%),
    linear-gradient(180deg, #061225 0%, #040b16 55%, #050a14 100%);
}

/* keep content above background FX */
#dailyComboPage > *{ position: relative; z-index: 2; }

/* subtle grid + stars */
#dailyComboPage::before{
  content:"";
  position:absolute; inset:0;
  background:
radial-gradient(circle at 12% 18%, rgba(255,255,255,0.14) 0 1px, transparent 2px) 0 0/180px 180px,
radial-gradient(circle at 72% 28%, rgba(255,255,255,0.12) 0 1px, transparent 2px) 0 0/220px 220px,
radial-gradient(circle at 42% 78%, rgba(255,255,255,0.11) 0 1px, transparent 2px) 0 0/260px 260px;
  opacity: 0.28;
  z-index: 1;
  pointer-events:none;
}

#dailyComboPage::after{
  content:"";
  position:absolute; inset:-80px;
  background:
    radial-gradient(400px 240px at 50% 0%, rgba(0, 240, 255, 0.18), transparent 65%),
    radial-gradient(420px 260px at 50% 100%, rgba(0, 120, 255, 0.18), transparent 70%);
  filter: blur(2px);
  z-index: 1;
  pointer-events:none;
}

/* Header like a neon plate */
#dailyComboPage .header .game-title{
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  padding: 10px 8px;
  margin: 12px auto 10px;
  max-width: 360px;
  border-radius: 16px;
  color: rgba(235, 252, 255, 0.98);
  font-weight: 900;
  background: linear-gradient(180deg, rgba(0, 221, 255, 0), rgba(0, 0, 0, 0));
  border: 1px solid rgba(0, 221, 255, 0);
  box-shadow:
    0 0 18px rgba(0, 221, 255, 0),
    inset 0 0 0 1px rgba(0, 0, 0, 0);
  text-shadow:
    0 0 6px rgba(0, 240, 255, 0.55),
    0 0 10px rgba(0, 120, 255, 0.28),
    0 2px 0 rgba(0, 0, 0, 0.65);
}


/* Terminal card */
#dailyComboPage .tp-combo-terminal{
  position: relative;
  max-width: 420px;
  margin: 0 auto 24px;
  padding: 18px 16px 18px;
  border-radius: 20px;
  background: rgba(2, 10, 22, 0.62);
  border: 1px solid rgba(0, 220, 255, 0.22);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(0, 220, 255, 0.10),
    inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
}

/* neon frame border */
#dailyComboPage .tp-combo-terminal::before{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius: 28px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.95), rgba(0, 120, 255, 0.85), rgba(0, 240, 255, 0.95));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  box-shadow:
    0 0 18px rgba(0, 240, 255, 0.18),
    0 0 34px rgba(0, 120, 255, 0.12);
  pointer-events:none;
  opacity: 0.75;
}

/* scan line */
#dailyComboPage .tp-combo-terminal::after{
  content:"";
  position:absolute;
  left: 18px; right: 18px;
  top: -20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.85), transparent);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
  opacity: 0.55;
  animation: tpComboScan 7.8s linear infinite;
  pointer-events:none;
}

/* pause scan line when 4X blink is active */
#dailyComboPage .tp-combo-terminal.tp-scan-paused::after{
  animation-play-state: paused !important;
  opacity: 0 !important;
}

@keyframes tpComboScan{
  /* 0–60%: полоса “ждёт” сверху (невидимая) */
  0%   { transform: translateY(-20%); opacity: 0; }
  60%  { transform: translateY(-20%); opacity: 0; }

  /* 60–100%: быстрый проход вниз */
  62%  { opacity: 0.55; }
  100% { transform: translateY(110vh); opacity: 0; }
}


/* section texts */
#dailyComboPage .daily-combo-section h3{
  margin-top: 6px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 900;
  color: #d7fbff;
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

#dailyComboPage .daily-combo-section p{
  color: rgba(210, 245, 255, 0.78);
  margin-top: 0;
  margin-bottom: 12px;
}

/* Code display */
#dailyComboPage .combo-display{
  background:
    radial-gradient(140px 70px at 50% 0%, rgba(0, 240, 255, 0.20), transparent 70%),
    linear-gradient(180deg, rgba(0, 40, 90, 0.35), rgba(0, 0, 0, 0.35));
  border: 1px solid rgba(0, 220, 255, 0.32);
  box-shadow:
    0 0 28px rgba(0, 240, 255, 0.10),
    inset 0 0 0 1px rgba(0, 0, 0, 0.35),
    inset 0 0 18px rgba(0, 240, 255, 0.10);
}

#dailyComboPage .combo-digit{
  color: #c9fbff;
  background:
    linear-gradient(180deg, rgba(0, 220, 255, 0.10), rgba(0, 0, 0, 0.28));
  border: 1px solid rgba(0, 220, 255, 0.30);
  text-shadow:
    0 0 10px rgba(0, 240, 255, 0.38),
    0 0 18px rgba(0, 120, 255, 0.18);
  box-shadow:
    0 0 18px rgba(0, 240, 255, 0.08),
    inset 0 0 10px rgba(0, 240, 255, 0.08);
}

/* keypad */
#dailyComboPage .combo-keyboard{
  gap: 12px;
}

#dailyComboPage .combo-keyboard .number-btn,
#dailyComboPage .combo-keyboard .clear-btn{
  background: rgba(0, 160, 255, 0.08);
  border: 1px solid rgba(0, 220, 255, 0.35);
  border-radius: 14px;
  box-shadow:
    0 0 22px rgba(0, 240, 255, 0.08),
    inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

#dailyComboPage .combo-keyboard .number-btn{
  color: #d7fbff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
  font-size: 18px;
  font-weight: 900;
}

#dailyComboPage .combo-keyboard .clear-btn{
  color: rgba(210, 245, 255, 0.95);
  background: rgba(0, 90, 150, 0.12);
  border-color: rgba(0, 220, 255, 0.28);
  font-size: 16px;
}

#dailyComboPage .combo-keyboard .number-btn:hover,
#dailyComboPage .combo-keyboard .clear-btn:hover{
  transform: translateY(-2px);
  background: rgba(0, 220, 255, 0.12);
  box-shadow:
    0 0 28px rgba(0, 240, 255, 0.12),
    inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

#dailyComboPage .combo-keyboard .number-btn:active,
#dailyComboPage .combo-keyboard .clear-btn:active{
  transform: translateY(1px) scale(0.99);
}

/* Submit button */
#dailyComboPage #submitComboCode{
  width: 100%;
  max-width: 320px;
  margin: 14px auto 0;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 900;
  border-radius: 16px;
  background: linear-gradient(90deg, #00f0ff 0%, #0088ff 45%, #00c8ff 100%);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 0 30px rgba(0, 240, 255, 0.20),
    0 0 46px rgba(0, 120, 255, 0.14);
  animation: tpComboPulse 2.6s ease-in-out infinite;
}

@keyframes tpComboPulse{
  0%,100%{ filter: brightness(1); }
  50%{ filter: brightness(1.08); }
}

#dailyComboPage #submitComboCode:disabled{
  opacity: 0.55;
  filter: none;
  animation: none;
}

/* Message */
#dailyComboPage #comboMessage{
  color: rgba(210, 245, 255, 0.82);
}
/* DAILY COMBO: оставить градиентный текст, но убрать glow */
#dailyComboPage .game-title{
  animation: none !important;
  background: linear-gradient(90deg, #00e5ff, #2f7bff) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}
/* убираем неоновую рамку */
#dailyComboPage .tp-combo-terminal::before{
  content: none !important;
  display: none !important;
}








/* ================== Daily Combo: 4× ADS button (after 10k bonus) ================== */
#dailyComboPage .tp-combo-4x-btn{/* behave like a keypad button (same size as .number-btn) */
width: auto;
max-width: none;
margin: 0;
padding: 12px 10px;
border-radius: 14px;
border: 1px solid rgba(255,255,255,0.12);
background: linear-gradient(90deg, rgba(140, 0, 255, 0.20) 0%, rgba(0, 200, 255, 0.18) 55%, rgba(0, 120, 255, 0.18) 100%);
box-shadow:
  0 0 22px rgba(160, 70, 255, 0.18),
  0 0 38px rgba(0, 220, 255, 0.14);
display: flex;
flex-direction: column;     /* 4X сверху, таймер снизу */
align-items: center;
justify-content: center;
gap: 4px;
color: rgba(235, 252, 255, 0.98);
cursor: pointer;
text-transform: uppercase;
letter-spacing: 1.2px;
-webkit-tap-highlight-color: transparent;

}

#dailyComboPage .tp-combo-4x-btn:active{
  transform: translateY(1px) scale(0.99);
}

#dailyComboPage .tp-combo-4x-btn[disabled]{
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

#dailyComboPage .tp-combo-4x-text{
  font-weight: 1000;
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 0 16px rgba(160, 70, 255, 0.22);
}

#dailyComboPage .tp-combo-4x-timer{
  line-height: 1;

  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.6px;
  color: rgba(210, 245, 255, 0.88);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.18);
  white-space: nowrap;
}

/* Blink twice, then pause (loop) */
@keyframes tpCombo4xBlinkTwice{
  0%   { filter: brightness(1); }
  8%   { filter: brightness(1.35); }
  16%  { filter: brightness(0.95); }
  24%  { filter: brightness(1.35); }
  32%  { filter: brightness(0.98); }
  100% { filter: brightness(1); }
}
#dailyComboPage .tp-combo-4x-blink{
  animation: tpCombo4xBlinkTwice 2.4s ease-in-out infinite;
}
/* ============================
   Daily Combo — Countdown timer (no shrink)
   Replace previous countdown patch with this.
   Add at the END of style.css
   ============================ */

/* When #codeDisplay switches from 3 digit boxes to HH:MM:SS timer,
   dailyCombo.js adds class "tp-countdown" */
#dailyComboPage #codeDisplay.tp-countdown{
  /* IMPORTANT: keep same card sizing as .combo-display (no shrinking) */
  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  max-width: 320px;
  box-sizing: border-box;
  margin: 14px auto 8px;
  min-height: 74px;
  padding: 14px 10px;
  border-radius: 14px;

  /* Electronic clock look */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 2.2px;
  line-height: 1;

  color: rgba(235, 252, 255, 0.98);
  text-shadow:
    0 0 10px rgba(0, 240, 255, 0.30),
    0 0 22px rgba(0, 140, 255, 0.18);

  /* Frame colors like Daily Combo (cyan terminal) */
  background: rgba(0, 220, 255, 0.08);
  border: 1px solid rgba(0, 220, 255, 0.26);
  box-shadow:
    0 0 18px rgba(0, 220, 255, 0.10),
    inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}

/* Mobile: a bit smaller so it fits */
@media (max-width: 420px){
  #dailyComboPage #codeDisplay.tp-countdown{
    font-size: 26px;
    letter-spacing: 1.8px;
  }
}

/* Keep digit boxes cyan too (optional, matches the page) */
#dailyComboPage .combo-digit{
  border: 1px solid rgba(0, 220, 255, 0.22);
}
/* ===== LCD TIMER STYLE ===== */
#dailyComboPage #codeDisplay.tp-countdown{
  background: linear-gradient(180deg, #0a1a0f, #08120c);
  border: 1px solid rgba(0,255,120,0.4);
  box-shadow:
    inset 0 0 15px rgba(0,255,120,0.15),
    0 0 20px rgba(0,255,120,0.15);

  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 42px;
  letter-spacing: 6px;
  color: #00ff88;

  text-shadow:
    0 0 6px rgba(0,255,120,0.7),
    0 0 12px rgba(0,255,120,0.4);

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 74px; /* чтобы размер не менялся */
}
/* ===== HELP MODAL OVERLAY ===== */
#helpModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;

  /* ФОН КАРТИНКА */
  background: 
    linear-gradient(rgba(10,14,23,0.55), rgba(10,14,23,0.65)),
    url("/assets/help-bg.webp") center/cover no-repeat;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  z-index: 9999;
}
/* ===== HELP MODAL CONTENT (GLASS) ===== */
#helpModal .modal-content {
  width: 92%;
  max-width: 420px;
  padding: 20px;

  border-radius: 20px;

  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid rgba(255, 255, 255, 0.15);

  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(0, 255, 255, 0.15);

  color: #ffffff;
}
#helpModal.show {
  display: flex;
  animation: fadeInModal 0.35s ease forwards;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
#closeHelpBtn{
  /* color palette: */
  /* color: #d7fbff; */ /* ice */
  /* color: #00ffff; */ /* cyan */
  /* color: #ffffff; */ /* white */
  /* color: #ffd36a; */ /* gold */
  color: #d7fbff;

  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#closeHelpBtn {
  background: linear-gradient(45deg, #537565, #3d5e5e, #8cacc7);
  color: #d7fbff;
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s ease;
}
#closeHelpBtn,
#closeHelpBtn:hover,
#closeHelpBtn:active {
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

/* =========================
   MINING POOL TITLE ICON
   ========================= */
.tp-mining-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  text-align:center;
}
.tp-mining-icon{
  width: 22px;
  height: 22px;
  display:inline-block;
  flex: 0 0 auto;
  transform: translateY(1px);
}
.tp-mining-text{
  display:inline-block;
}

/* ===============================
   WIN FLASH (2 sharp blinks) — v2 (robust)
   =============================== */
.prize-cell.win-flash{
  animation: tpWinFlash 0.45s ease-out 1 !important;
  box-shadow:
    0 0 15px rgba(0,255,255,1),
    0 0 35px rgba(0,200,255,0.9),
    0 0 60px rgba(0,150,255,0.7) !important;
  will-change: transform, filter, box-shadow;
}

@keyframes tpWinFlash{
  0%   { transform: scale(1);     filter: brightness(1.0); opacity: 1; }
  15%  { transform: scale(1.08);  filter: brightness(1.8); opacity: 1; }
  30%  { transform: scale(1.00);  filter: brightness(1.0); opacity: 0.55; }
  55%  { transform: scale(1.08);  filter: brightness(1.9); opacity: 1; }
  70%  { transform: scale(1.00);  filter: brightness(1.0); opacity: 0.55; }
  100% { transform: scale(1.00);  filter: brightness(1.0); opacity: 1; }
}



/* ===============================
   4X BUTTON — Neon Win Loop Flash
   2 flashes + 1.5s pause (loop)
   =============================== */

@keyframes tpNeonLoopFlash {
  0%   { box-shadow: 0 0 0 rgba(0,255,255,0); }

  /* First flash */
  8%   {
    box-shadow:
      0 0 18px rgba(0,255,255,1),
      0 0 40px rgba(0,200,255,0.9),
      0 0 70px rgba(0,150,255,0.8);
  }
  16%  { box-shadow: 0 0 0 rgba(0,255,255,0); }

  /* Second flash */
  24%  {
    box-shadow:
      0 0 18px rgba(0,255,255,1),
      0 0 40px rgba(0,200,255,0.9),
      0 0 70px rgba(0,150,255,0.8);
  }
  32%  { box-shadow: 0 0 0 rgba(0,255,255,0); }

  /* Pause */
  100% { box-shadow: 0 0 0 rgba(0,255,255,0); }
}

#dailyComboPage .tp-combo-4x-btn.tp-neon-loop{
  animation: tpNeonLoopFlash 2.2s ease-in-out infinite;
}



/* ===== Browser Block Overlay (allow only Telegram WebApp) ===== */
.tp-browser-block{
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: radial-gradient(1200px 700px at 30% 20%, rgba(0,255,255,0.10), rgba(0,0,0,0.65)),
              rgba(10,14,23,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tp-browser-card{
  width: min(420px, 100%);
  border-radius: 18px;
  padding: 18px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  text-align: center;
  color: rgba(255,255,255,0.92);
}
.tp-browser-title{
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 8px;
}
.tp-browser-text{
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255,255,255,0.75);
  margin-bottom: 14px;
}
.tp-browser-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  text-decoration: none;
  color: #0a0e17;
  background: linear-gradient(45deg, #2AABEE, #229ED9);
  box-shadow: 0 12px 30px rgba(0,255,200,0.18);
}
.tp-browser-btn:active{ transform: translateY(1px); }
.tp-browser-note{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}
/* ===== POOL NEON (SOFT VERSION) ===== */

/* Power и Time left (текст) */
.mining-stats p {
    color: #00bfff;
    text-shadow:
        0 0 3px #00bfff,
        0 0 6px #0088ff;
    font-weight: 600;
}

/* Значение Power */
#miningPower {
    color: #00eaff;
    text-shadow:
        0 0 3px #00eaff,
        0 0 6px #0099ff;
}

/* Таймер — мягкий красный */
#miningTimeLeft {
    color: #ff3a3a;
    text-shadow:
        0 0 3px #ff3a3a,
        0 0 6px #cc0000;
    font-weight: 700;
}
/* ============================= */
/* ===== POOL DIGITAL NUMBERS === */
/* ============================= */

/* Значения в Mining Pool */
#miningPower,
#miningTimeLeft,
#miningMined {
  font-family: 'PoolDigital', monospace !important;
  letter-spacing: 2px;
}

/* Цифры внутри */
#miningPower span,
#miningTimeLeft span,
#miningMined span,
.mining-value,
.mining-number {
  font-family: 'PoolDigital', monospace !important;
  font-size: 20px;
  letter-spacing: 2px;
}
/* ============================= */
/* ===== DAILY COMBO TIMER ===== */
/* ============================= */

/* Когда отображается таймер HH:MM:SS */
#codeDisplay.tp-countdown {
  font-family: 'PoolDigital', monospace !important;
  letter-spacing: 3px;
  font-size: 24px;
}

/* На всякий случай — сами цифры */
#codeDisplay.tp-countdown span {
  font-family: 'PoolDigital', monospace !important;
}

/* =========================
   FIX: timers "jitter"/move left-right (POOL + DAILY COMBO)
   Keeps your original font; prevents width changes and kerning shifts
   ========================= */

/* Fixed-width timer containers (HH:MM:SS = 8 chars) */
#miningTimeLeft,
#codeDisplay.tp-countdown{
  display: inline-block;
  width: 8ch;
  text-align: center;
  white-space: nowrap;
  font-kerning: none;
  font-feature-settings: "kern" 0, "tnum" 1;
}

/* If timers live inside flex rows, don't allow shrink that can cause wobble */
#miningTimeLeft{ flex: 0 0 8ch; }
#codeDisplay.tp-countdown{ flex: 0 0 8ch; }

/* Render each char into an equal cell (works even with proportional fonts) */
#codeDisplay.tp-countdown .tp-timer-ch,
#miningTimeLeft .tp-timer-ch{
  display: inline-block;
  width: 1ch;
  text-align: center;
  font-kerning: none;
  font-feature-settings: "kern" 0;
}

/* Safety: if any previous fix forced monospace, revert */
#codeDisplay.tp-countdown{ font-family: inherit !important; }

/* ===== POOL TIMER: keep the old soft glow with per-char spans ===== */
#miningTimeLeft{
  text-shadow: none; /* shadow will be on chars now */
}

#miningTimeLeft .tp-timer-ch{
  color: #ff3a3a;
  text-shadow:
    0 0 2px rgba(255, 58, 58, 0.7),
    0 0 4px rgba(255, 0, 0, 0.4);
  font-weight: 700;
}