:root {
  --neon-cyan: #00ffcc;
  --neon-blue: #00ccff;
  --neon-purple: #9d4edd;
  --bg: #0c0e1a;
  --card: #1e2233;
  --text: #ffffff;
  --text-secondary: #a0aec0;
  --gold: #ffd700;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
}
body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.gold-value {
  color: var(--gold) !important;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
}
.container {
  width: 100%;
  margin: 0 auto;
  padding: 12px 12px 90px 12px;
  flex: 1;
  overflow-y: auto;
}
h1 {
  text-align: center;
  margin: 0 0 15px 0;
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 204, 255, 0.5);
  animation: titleGlow 3s ease-in-out infinite alternate;
}
.balance-row {
  display: flex;
  gap: 14px;
  width: 100%;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}
.balance-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}
.balance-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 200, 255, 0.2);
  border-color: rgba(0, 200, 255, 0.3);
}
.balance-value {
  animation: valuePulse 2s ease-in-out infinite;
}
@keyframes valuePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}
.balance-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.balance-value {
  font-size: 16px;
  color: var(--neon-cyan);
  font-weight: bold;
  text-shadow: 0 0 6px rgba(0, 255, 204, 0.6);
}
.level {
  text-align: center;
  font-size: 14px;
  margin: 6px 0;
  color: var(--neon-blue);
  text-shadow: 0 0 6px rgba(0, 204, 255, 0.5);
}
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 204, 255, 0.4), transparent);
  margin: 6px 0;
}
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  margin: 6px 0;
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}
/* НЕОНОВАЯ РАМКА ДЛЯ РЫНКА */
.market-status {
  position: relative;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 10px 0;
  padding: 8px;
  background: rgba(30, 34, 51, 0.5);
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  backdrop-filter: blur(8px);
}
.market-status::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.market-status::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--market-bg, rgba(0, 120, 255, 0.2));
  z-index: -1;
  opacity: 0.6;
  border-radius: 11px;
}
.market-boom { --market-bg: rgba(16, 185, 129, 0.3); color: #10b981; }
.market-dip { --market-bg: rgba(245, 158, 11, 0.3); color: #f59e0b; }
.market-crash { --market-bg: rgba(239, 68, 68, 0.3); color: #ef4444; }
.market-neutral { --market-bg: rgba(37, 99, 235, 0.3); color: #2563eb; }
button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}
button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}
button:hover::before {
  left: 100%;
}
button:active {
  transform: scale(0.98);
  opacity: 0.9;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: black;
  animation: buttonPulse 2s infinite;
  box-shadow: 0 0 12px rgba(0, 255, 204, 0.5);
}
.btn-success {
  background: linear-gradient(135deg, #4cff7a, #0a5f38);
  color: black;
  box-shadow: 0 0 12px rgba(76, 255, 122, 0.4);
}
.btn-balanced {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  box-shadow: 0 0 12px rgba(52, 152, 219, 0.4);
}
.btn-aggressive {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  box-shadow: 0 0 12px rgba(231, 76, 60, 0.4);
}
.btn-secondary {
  background: #4a5568;
  color: white;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}
@keyframes buttonPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 255, 204, 0.5); }
  50% { box-shadow: 0 0 20px rgba(0, 255, 204, 0.8); }
}
.hidden { display: none !important; }
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(30, 34, 51, 0.7);
  display: flex;
  justify-content: space-around;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
  z-index: 900;
  padding: 8px 0;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 204, 255, 0.2);
}
.nav-item {
  padding: 6px 0 4px;
  text-align: center;
  cursor: pointer;
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.nav-item.active {
  color: var(--neon-blue);
  text-shadow: 0 0 8px rgba(0, 204, 255, 0.6);
}
/* ИСПРАВЛЕННЫЕ ГРАДИЕНТНЫЕ РАМКИ */
.bot-card {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 12px;
  gap: 12px;
  border-radius: 25px;
  background: rgba(30, 34, 51, 0.5);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 12px rgba(0, 204, 255, 0.15);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  margin: 10px 0;
  overflow: hidden;
}
.bot-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 25px;
  padding: 2px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.bot-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(0, 255, 204, 0.4);
}
.bot-image-container {
  flex: 0 0 180px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
  background: linear-gradient(135deg, rgba(20, 20, 40, 0.9), rgba(20, 20, 40, 0.9)),
              linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  background-origin: border-box;
  background-clip: content-box, border-box;
  animation: borderShine 3s linear infinite;
}
@keyframes borderShine {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.bot-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.bot-turtle {
  background: linear-gradient(135deg, rgba(20, 20, 40, 0.9), rgba(20, 20, 40, 0.9)),
               linear-gradient(135deg, #0a5f38, #4cff7a);
}
.bot-fox {
  background: linear-gradient(135deg, rgba(20, 20, 40, 0.9), rgba(20, 20, 40, 0.9)),
               linear-gradient(135deg, #001f3f, #00ccff);
}
.bot-wolf {
  background: linear-gradient(135deg, rgba(20, 20, 40, 0.9), rgba(20, 20, 40, 0.9)),
               linear-gradient(135deg, #8b0000, #ff4d4d);
}
.bot-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bot-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 0 6px rgba(0, 204, 255, 0.4);
  text-align: center;
}
.bot-stats {
  display: flex;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
}
.bot-stats strong {
  color: var(--neon-cyan);
  font-weight: 600;
}
.bot-description {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 2px;
  text-align: left;
}
.bot-upgrades {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  background: rgba(20, 24, 40, 0.4);
  border-radius: 12px;
  margin-top: 4px;
  backdrop-filter: blur(6px);
}
.upgrade-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.3s;
}
.upgrade-row:hover {
  background: rgba(0, 204, 255, 0.15);
}
.upgrade-segments {
  display: flex;
  gap: 2px;
  flex: 1;
  height: 6px;
  align-items: center;
}
.segment {
  flex: 1;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  transition: background 0.4s ease;
}
.segment.filled {
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
  box-shadow: 0 0 6px rgba(0, 255, 204, 0.5);
}
.segment.filled.premium {
  background: linear-gradient(90deg, var(--gold), #daa520);
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
}
.upgrade-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: black;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 8px rgba(0, 255, 204, 0.5);
}
.upgrade-icon:hover {
  transform: scale(1.2) rotate(10deg);
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.8);
}
.upgrade-icon.premium {
  background: linear-gradient(135deg, var(--gold), #daa520);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}
.upgrade-level {
  font-size: 11px;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  width: 50px;
  display: inline-block;
}
.info-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}
.info-icon:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}
.modal,
.upgrade-modal,
.upgrade-info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
/* ИСПРАВЛЕННЫЕ МОДАЛЬНЫЕ ОКНА */
.modal-content,
.upgrade-modal-content,
.upgrade-info-content {
  position: relative;
  background: rgba(30, 34, 51, 0.95);
  border-radius: 20px;
  padding: 25px;
  max-width: 320px;
  width: 85%;
  text-align: center;
  box-shadow:
      0 12px 40px rgba(0,0,0,0.8),
      0 0 30px rgba(0, 204, 255, 0.4);
  backdrop-filter: blur(15px);
  color: white;
  margin: 20px;
}
.modal-content::before,
.upgrade-modal-content::before,
.upgrade-info-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-mask: 
      linear-gradient(#fff 0 0) content-box, 
      linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.upgrade-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.upgrade-modal-text {
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 25px;
  color: var(--text-secondary);
  text-align: left;
}
.upgrade-modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}
.upgrade-modal-btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 120px;
}
.upgrade-modal-btn.yes {
  background: linear-gradient(135deg, #4cff7a, #0a5f38);
  color: black;
  box-shadow: 0 0 15px rgba(76, 255, 122, 0.4);
}
.upgrade-modal-btn.no {
  background: linear-gradient(135deg, #ff6b6b, #c44569);
  color: white;
  box-shadow: 0 0 15px rgba(255, 107, 107, 0.4);
}
.upgrade-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}
.upgrade-modal-btn:active {
  transform: translateY(0);
}
.upgrade-modal-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.6s;
}
.upgrade-modal-btn:hover::before {
  left: 100%;
}
/* Адаптив для мобильных */
@media (max-width: 400px) {
  .upgrade-modal-content {
    padding: 20px;
    margin: 15px;
  }
  .upgrade-modal-buttons {
    flex-direction: column;
    gap: 12px;
  }
  .upgrade-modal-btn {
    min-width: auto;
    padding: 12px 16px;
  }
}
/* ИСПРАВЛЕННЫЕ КАРТОЧКИ */
.card {
  position: relative;
  background: rgba(30, 34, 51, 0.6);
  border-radius: 25px;
  padding: 16px;
  margin: 12px 0;
  box-shadow:
    0 4px 16px rgba(0,0,0,0.3),
    0 0 10px rgba(0, 204, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 25px;
  padding: 2px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card.harvesting {
  animation: harvestGlow 4s ease-in-out infinite;
}
.card.ready-to-harvest {
  animation: harvestPulse 1.5s ease-in-out infinite;
}
input, select {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border: 1px solid rgba(0, 204, 255, 0.4);
  border-radius: 12px;
  font-size: 15px;
  background: rgba(20, 24, 40, 0.6);
  color: white;
  backdrop-filter: blur(6px);
}
label {
  display: flex;
  align-items: center;
  margin: 8px 0;
  cursor: pointer;
}
.task-item,
.operation-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.quest-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin: 3px 0;
  overflow: hidden;
}
.quest-progress-fill {
  height: 100%;
  background: var(--neon-blue);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: block;
  object-fit: cover;
  border: 2px solid var(--neon-blue);
  box-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}
.profit-calculator {
  margin: 10px 0;
  padding: 10px;
  background: rgba(0, 120, 255, 0.2);
  border-radius: 10px;
  font-size: 13px;
}
.profit-calculator strong {
  color: var(--text);
}
.achievement-item {
  display: flex;
  align-items: flex-start;
  padding: 10px 0;
  font-size: 14px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.achievement-item small {
  color: var(--text-secondary);
  font-size: 12px;
}
.achievement-level,
.achievement-reward {
  font-size: 11px;
  color: var(--text-secondary);
  margin-left: 6px;
}
#operation-history {
  max-height: 280px;
  overflow-y: auto;
}
.operation-item {
  display: flex;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.operation-item:last-child {
  border-bottom: none;
}
.operation-item .icon {
  width: 22px;
  text-align: center;
  margin-right: 6px;
}
.operation-item .date {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  margin-left: auto;
}
.operation-item.success { color: #4cff7a; }
.operation-item.danger { color: #ff4d4d; }
.operation-item.warning { color: #f59e0b; }
.case-container {
  position: relative;
  width: 100%;
  height: 70px;
  margin: 16px 0;
  overflow: hidden;
  border: 2px solid rgba(0, 204, 255, 0.3);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(0, 120, 255, 0.2), rgba(0, 255, 255, 0.1));
}
.case-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  z-index: 10;
  pointer-events: none;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}
.case-wheel {
  display: flex;
  align-items: center;
  height: 100%;
  transition: transform 4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.case-item {
  min-width: 110px;
  text-align: center;
  padding: 10px 0;
  border-right: 1px solid rgba(0, 204, 255, 0.3);
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
}
.effect-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

/* === BRANDING HEADER (INTRAFARM) - COMPACT === */
.brand-panel {
  text-align: center;
  margin: 6px 0 12px 0; /* Уменьшенные отступы */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.brand-logo-row {
  display: flex;
  align-items: center;
  gap: 8px; /* Расстояние между молнией и текстом */
}

.brand-icon {
  font-size: 20px; /* Чуть меньше иконка */
  filter: drop-shadow(0 0 8px rgba(0, 204, 255, 0.6));
  animation: floatLogo 3s ease-in-out infinite;
}

.brand-text {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 900;
  font-size: 26px; /* Уменьшил с 34px до 26px */
  letter-spacing: 0.5px;
  line-height: 1;
  
  background: linear-gradient(135deg, #ffffff 20%, var(--neon-cyan) 50%, var(--neon-purple) 80%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  
  filter: drop-shadow(0 0 10px rgba(0, 255, 204, 0.4));
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}


/* === ULTRA-GLASS TERMINAL v3.0 STYLES === */
.top-panel.ultra-hud {
position: relative;
background: rgba(18, 22, 36, 0.85);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
border-radius: 24px;
padding: 20px;
border: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: 0 20px 50px -12px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.1);
margin: 12px 0 24px 0;
overflow: hidden;
z-index: 5;
}

/* Анимированный блик фона */
.top-panel.ultra-hud::after {
content: ''; position: absolute; top: 0; left: -150%; width: 100%; height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
transform: skewX(-20deg);
animation: hudSheen 5s infinite ease-in-out;
pointer-events: none;
}
@keyframes hudSheen { 0% { left: -150%; } 20% { left: 150%; } 100% { left: 150%; } }

/* Шапка: Заголовок + Рынок */
.uh-header {
display: flex; justify-content: space-between; align-items: center;
margin-bottom: 18px;
}
.uh-title {
font-size: 12px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase;
color: rgba(255,255,255,0.5);
display: flex; align-items: center; gap: 8px;
}
.uh-dot { width: 8px; height: 8px; background: var(--neon-cyan); border-radius: 50%; box-shadow: 0 0 10px var(--neon-cyan); animation: pulse 2s infinite; }

.uh-market {
font-size: 10px; font-weight: 700; padding: 6px 12px;
background: rgba(0,0,0,0.3); border-radius: 20px;
border: 1px solid rgba(255,255,255,0.1);
display: flex; align-items: center; gap: 6px;
color: #a0aec0; transition: 0.3s;
cursor: pointer;
}
.uh-market:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.3); }
.market-led { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }

/* Сетка балансов */
.uh-grid {
display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
margin-bottom: 18px;
}
.uh-card {
background: linear-gradient(165deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
border-radius: 18px;
padding: 14px;
border: 1px solid rgba(255,255,255,0.05);
position: relative;
display: flex; flex-direction: column;
}
.uh-card-label {
font-size: 9px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
margin-bottom: 8px; color: #718096;
}
.uh-card-value {
font-size: 20px; font-weight: 800; color: #fff; line-height: 1;
text-shadow: 0 4px 20px rgba(0,0,0,0.5);
display: flex; align-items: center; gap: 5px;
}
.txt-cyan { color: var(--neon-cyan); text-shadow: 0 0 20px rgba(0, 255, 204, 0.2); }
.txt-gold { color: var(--gold); text-shadow: 0 0 20px rgba(255, 215, 0, 0.2); }

/* Футер: Уровень и прогресс */
.uh-footer {
background: rgba(0,0,0,0.2); border-radius: 14px; padding: 10px 14px;
display: flex; align-items: center; justify-content: space-between; gap: 14px;
border: 1px solid rgba(255,255,255,0.03);
cursor: pointer;
transition: 0.2s;
}
.uh-footer:active { transform: scale(0.98); background: rgba(0,0,0,0.3); }
.uh-lvl-badge {
background: var(--neon-blue); color: #000; font-weight: 900; font-size: 11px;
padding: 4px 10px; border-radius: 6px; box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
}
.uh-xp-container { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.uh-xp-text {
display: flex; justify-content: space-between; font-size: 9px; font-weight: 700; color: #718096; letter-spacing: 0.5px;
}
.top-panel.ultra-hud .progress-bar { height: 4px; background: rgba(255,255,255,0.1); margin: 0; border-radius: 2px; overflow: hidden; }
.top-panel.ultra-hud .progress-bar-fill { background: linear-gradient(90deg, var(--neon-cyan), #fff); box-shadow: 0 0 10px var(--neon-cyan); }

/* Восстановление следующего стиля */
#invest-form {
  padding: 16px;
  background: rgba(30, 34, 51, 0.6);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  margin: 16px 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 204, 255, 0.2);
}
#invest-form h1 {
  text-align: center;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 700;
}
#form-bot-type {
  text-align: center;
  font-size: 16px;
  margin: 10px 0;
  color: var(--text);
}
.invest-balance-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 0;
  padding: 10px;
  background: rgba(0, 120, 255, 0.2);
  border-radius: 10px;
  font-size: 15px;
}
.invest-balance-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.invest-balance-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.invest-balance-value {
  font-size: 16px;
  color: var(--neon-cyan);
  font-weight: bold;
}
#invest-market-status {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 10px 0;
  padding: 6px;
  background: rgba(0, 120, 255, 0.2);
  border-radius: 10px;
  font-weight: 500;
}
#invest-amount {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid rgba(0, 204, 255, 0.3);
  border-radius: 10px;
  font-size: 15px;
  background: rgba(20, 24, 40, 0.6);
  color: white;
  text-align: center;
}
.amount-buttons {
  display: flex;
  gap: 6px;
  margin: 6px 0;
}
.amount-button {
  flex: 1;
  padding: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 204, 255, 0.3);
  border-radius: 6px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.amount-button:hover {
  background: rgba(255, 255, 255, 0.2);
}
.upgrades-container {
  background: rgba(20, 24, 40, 0.4);
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
  backdrop-filter: blur(6px);
}

.upgrade-item:hover {
  background: rgba(255, 255, 255, 0.1);
}
/* === ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ УЛУЧШЕНИЙ === */
.upgrade-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px; /* Чуть больше поле для клика */
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  margin: 8px 0;
  transition: all 0.2s;
  cursor: pointer; /* Показывает, что можно кликать */
  border: 1px solid transparent;
  position: relative;
  z-index: 20; /* Поднимаем над фоном */
  user-select: none; /* Чтобы текст не выделялся при клике */
}

.upgrade-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 204, 255, 0.3);
}

.upgrade-item.active {
  background: rgba(0, 204, 255, 0.15);
  border-color: var(--neon-cyan);
}

.upgrade-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background: rgba(0,0,0,0.3);
}

/* Когда родитель .upgrade-item имеет класс active */
.upgrade-item.active .upgrade-checkbox {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

.upgrade-item.active .upgrade-checkbox::after {
  content: '✔';
  color: black;
  font-weight: 900;
  font-size: 14px;
}


.upgrade-checkbox.checked {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  border-color: transparent;
}
.upgrade-checkbox.checked::after {
  content: '✓';
  color: black;
  font-weight: bold;
  font-size: 13px;
}
.upgrade-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.upgrade-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upgrade-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.upgrade-name {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}
.upgrade-cost {
  font-size: 11px;
  color: var(--text-secondary);
  margin-left: 3px;
}
.upgrade-description {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}
.btn-confirm {
  background: linear-gradient(135deg, #4cff7a, #0a5f38);
  color: black;
  font-size: 16px;
  font-weight: 700;
  padding: 14px;
  border-radius: 14px;
  margin: 10px 0;
  transition: transform 0.2s;
}
.btn-confirm:active {
  transform: scale(0.98);
}
.btn-back {
  background: #4a5568;
  color: white;
  font-size: 15px;
  padding: 12px;
  border-radius: 10px;
  margin: 0;
  transition: transform 0.2s;
}
.btn-back:active {
  transform: scale(0.98);
}
/* Миниигры */
.minigame-screen {
  display: none;
}
.minigame-screen.active {
  display: block;
}
.case-type-btn {
  margin: 6px 0;
}



@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}


.limit-info {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 6px 0;
  text-align: center;
}
.prizes-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 5px;
  margin-top: 3px;
}
.prizes-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.prizes-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
}
.prizes-table th,
.prizes-table td {
  padding: 6px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.prizes-table th {
  color: var(--text-secondary);
}
.quiz-question {
  margin: 16px 0;
  font-size: 16px;
  text-align: center;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}
.quiz-option-btn {
  padding: 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(0, 204, 255, 0.3);
  border-radius: 10px;
  color: white;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.quiz-option-btn:hover {
  background: rgba(255,255,255,0.2);
}
.quiz-option-btn.selected {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: black;
}
.quiz-controls {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.quiz-controls button {
  flex: 1;
}
.daily-quest-item,
.achievement-item {
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  margin: 6px 0;
}
.daily-quest-header,
.achievement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.daily-quest-title,
.achievement-title {
  font-weight: 600;
}
.daily-quest-reward {
  color: var(--gold);
  font-size: 13px;
}
.daily-quest-desc,
.achievement-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}
.daily-quest-completed {
  opacity: 0.6;
}
.daily-quest-btn {
  margin-top: 6px;
  padding: 6px;
  font-size: 13px;
}
.quest-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.reroll-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  transition: all 0.2s;
}
.reroll-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: var(--text);
}
.reroll-btn span {
  color: var(--gold);
  margin-left: 4px;
  font-weight: bold;
}



.achievement-unlocked {
  color: #4cff7a;
}
.achievement-locked {
  color: var(--text-secondary);
}
.achievement-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle;
}
.mini-game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px;
  background: linear-gradient(135deg, rgba(30, 34, 51, 0.8), rgba(30, 34, 51, 0.9));
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  margin: 10px 0;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(0, 204, 255, 0.2);
}
.mini-game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}
.mini-game-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  font-size: 16px;
}
.mini-game-card img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
/* === АДАПТИВ === */
@media (max-width: 500px) {
  .bot-card {
    display: block;
    padding: 8px;
    gap: 8px;
  }
  .bot-image-container {
    width: 100%;
    height: auto;
    margin-bottom: 8px;
  }
  .bot-content {
    padding: 0 3px;
  }
  .upgrade-icon {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  .upgrade-level {
    font-size: 10px;
    width: 45px;
  }
}
@media (min-width: 501px) {
  .container {
    max-width: 580px;
    margin: 0 auto;
    padding: 16px 16px 80px 16px;
  }
  .bot-card,
  .top-panel {
    max-width: 580px;
    margin: 10px auto;
  }
}
/* ФИКС ШИРИНЫ КНОПКИ И ОПИСАНИЯ */
.bot-content button.btn-primary {
  width: 95% !important;
  margin: 0 auto !important;
  display: block !important;
}
.bot-description {
  max-width: 90% !important;
  margin: 0 auto !important;
  text-align: center !important;
}
.bot-info {
  width: 100% !important;
  max-width: 100% !important;
}
#result-modal .modal-content > .btn-primary {
margin-top: 16px;
}
@keyframes titleGlow {
  0% { text-shadow: 0 0 20px rgba(0, 204, 255, 0.5); }
  100% { text-shadow: 0 0 40px rgba(0, 204, 255, 0.8), 0 0 60px rgba(0, 204, 255, 0.4); }
}
/* УБРАТЬ СТАРЫЕ СТИЛИ С border-image */
.bot-card,
.card,
.modal-content,
.top-panel {
  border: none !important;
}




/* === ИСПРАВЛЕННЫЕ АНИМАЦИИ ДЛЯ КАРТОЧЕК ИНВЕСТИЦИЙ === */
@keyframes harvestGlow {
  0%, 100% {
    box-shadow:
      0 4px 16px rgba(0,0,0,0.3),
      0 0 10px rgba(0, 255, 204, 0.2);
  }
  50% {
    box-shadow:
      0 4px 16px rgba(0,0,0,0.3),
      0 0 20px rgba(0, 255, 204, 0.4);
  }
}
@keyframes harvestPulse {
  0%, 100% {
    box-shadow:
      0 4px 16px rgba(0,0,0,0.3),
      0 0 30px rgba(0, 255, 204, 0.6);
  }
  50% {
    box-shadow:
      0 4px 16px rgba(0,0,0,0.3),
      0 0 50px rgba(0, 255, 204, 1.0);
  }
}


/* Компактная шапка */
.compact-header {
position: sticky;
top: 0;
left: 0;
width: 100%;
background: linear-gradient(135deg, rgba(30, 34, 51, 0.98), rgba(20, 25, 45, 0.98));
backdrop-filter: blur(20px);
border-bottom: 1px solid rgba(0, 204, 255, 0.2);
box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
z-index: 800;
padding: 8px 12px;
}
.compact-header-content {
display: flex;
align-items: center;
justify-content: space-between;
max-width: 580px;
margin: 0 auto;
gap: 12px;
}
.compact-avatar {
width: 28px;
height: 28px;
border-radius: 50%;
object-fit: cover;
border: 1px solid var(--neon-blue);
box-shadow: 0 0 6px rgba(0, 204, 255, 0.4);
}
.compact-stats {
display: flex;
gap: 10px;
align-items: center;
font-size: 13px;
font-weight: 600;
}
.compact-balance,
.compact-it-points,
.compact-level {
display: flex;
align-items: center;
gap: 2px;
}
.compact-balance { color: var(--neon-cyan); }
.compact-it-points { color: var(--gold); }
.compact-level { color: var(--neon-blue); }
.compact-market {
font-size: 11px;
padding: 2px 6px;
border-radius: 8px;
background: rgba(0, 120, 255, 0.2);
transition: all 0.3s ease;
}
.compact-pulse {
animation: compactPulse 0.6s ease;
}
@keyframes compactPulse {
0%, 100% { transform: scale(1); opacity: 1; }
50% { transform: scale(1.05); opacity: 0.8; }
}



/* Compact HUD Patch v3.1 */
.uh-grid.compact-grid { margin-bottom: 8px; gap: 8px; }
.uh-row-split { display: flex; gap: 8px; align-items: stretch; margin-top: 8px; }
.uh-xp-compact { flex: 1; background: rgba(18, 22, 36, 0.6); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: transform 0.2s; }
.uh-xp-compact:active { transform: scale(0.98); }
.uh-xp-container-compact { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.uh-xp-text-mini { font-size: 9px; color: #718096; display: flex; justify-content: space-between; font-weight: 700; letter-spacing: 0.5px; }
.uh-market-compact { display: flex; align-items: center; justify-content: center; padding: 0 16px; border-radius: 16px; font-size: 11px; font-weight: 700; background: rgba(18, 22, 36, 0.6); border: 1px solid rgba(255,255,255,0.05); color: #a0aec0; min-width: 110px; cursor: pointer; transition: 0.3s; white-space: nowrap; }
.uh-market-compact:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.15); }


/* Neon Border Patch for Ultra HUD */
.top-panel.ultra-hud { border: none !important; }
.top-panel.ultra-hud::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 24px;
  padding: 2px; /* Толщина рамки */
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}


/* Стиль для достижений с бейджами */
.achievement-item.legendary-ach {
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.05), transparent);
}
.achievement-item.legendary-ach.unlocked-glow {
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
  border-color: var(--gold);
}



/* === ПРОФИЛЬ НОВОГО ПОКОЛЕНИЯ v2 (Serious Edition) === */
.profile-section {
  padding: 10px;
}

/* Хедер профиля */
.profile-header-card {
  background: linear-gradient(180deg, rgba(30, 34, 51, 0.8) 0%, rgba(12, 14, 26, 0.9) 100%);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

/* Эффект свечения для хедера */
.profile-header-card::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(0, 204, 255, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

/* Аватар и уровень */
.avatar-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
}
.profile-avatar-img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
}
.lvl-badge-circle {
  position: absolute;
  bottom: -5px; right: -5px;
  background: linear-gradient(135deg, var(--gold), #ffa500);
  color: #000;
  font-weight: 900; font-size: 11px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
  z-index: 2;
}

/* Имя и Титул */
.profile-name { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.profile-id { font-size: 11px; color: var(--text-secondary); margin-bottom: 8px; }
.profile-title-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--neon-blue);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 15px;
}

/* Кнопки управления (Гардероб и Бейджи) */
.profile-actions {
  display: flex; gap: 8px; justify-content: center; margin-top: 10px;
}
.action-btn-small {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: 0.2s;
}
.action-btn-small:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--neon-cyan); }

/* Сетка статистики */
.stats-grid-new {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}
.stat-box {
  background: rgba(30, 34, 51, 0.6);
  border-radius: 16px;
  padding: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.03);
}
.stat-box-label { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-box-value { font-size: 18px; font-weight: 800; color: #fff; }

.val-green { color: #4cff7a; text-shadow: 0 0 10px rgba(76, 255, 122, 0.2); }
.val-red { color: #ff4d4d; text-shadow: 0 0 10px rgba(255, 77, 77, 0.2); }
.val-blue { color: #00ccff; text-shadow: 0 0 10px rgba(0, 204, 255, 0.2); }
.val-gold { color: var(--gold); }

/* Блок Маржинколлов */
.margin-call-card {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), transparent);
  border-left: 3px solid #ef4444;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.mc-left { display: flex; flex-direction: column; }
.mc-label { font-size: 11px; color: #ef4444; font-weight: 700; text-transform: uppercase; }
.mc-count { font-size: 10px; color: var(--text-secondary); }
.mc-value { font-size: 16px; font-weight: 800; color: #ef4444; }

/* Секция бейджей (заглушка) */
.badges-row {
  display: flex; gap: 4px; overflow-x: auto; padding: 4px 0;
  scrollbar-width: none;
}
.badge-slot {
  width: 32px; height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.2);
}



/* === SYSTEM: PROGRESSIVE UNLOCK STYLES === */
.bot-card.locked {
  position: relative;
  pointer-events: none; /* Отключаем клики */
  overflow: hidden;
}

/* Блюрим содержимое карточки */
.bot-card.locked .bot-image-container,
.bot-card.locked .bot-content {
  filter: blur(5px) grayscale(0.8);
  opacity: 0.6;
}

/* Оверлей с замком */
.lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: rgba(12, 14, 26, 0.4); /* Легкое затемнение */
  text-align: center;
}

.lock-icon-large {
  font-size: 40px;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
  animation: lockPulse 2s infinite;
}

.lock-text {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
  text-transform: uppercase;
}

@keyframes lockPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* === ОБНОВЛЕННАЯ СТАТИСТИКА В КАРТОЧКАХ === */

/* Контейнер статистики */
.bot-stats {
  display: flex;
  flex-wrap: wrap; /* Разрешаем перенос, если экран узкий */
  gap: 6px;        /* Расстояние между плашками */
  justify-content: center;
  margin: 8px 0;
}

/* Сами плашки (рамочки) */
.stat-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: rgba(20, 24, 40, 0.6); /* Темный полупрозрачный фон */
  border: 1px solid rgba(255, 255, 255, 0.1); /* Базовая рамка */
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap; /* Текст не переносится внутри плашки */
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Цветные акценты для разных типов */
.stat-badge.income {
  border-color: rgba(76, 255, 122, 0.3);
  color: #4cff7a; /* Зеленый текст */
}

.stat-badge.risk {
  border-color: rgba(255, 77, 77, 0.3);
  color: #ff4d4d; /* Красный текст */
}

.stat-badge.limit {
  border-color: rgba(0, 204, 255, 0.3);
  color: #00ccff; /* Голубой текст */
}

/* Стилизация названия параметра (Доход, Риск...) внутри плашки */
.stat-badge span {
  color: var(--text-secondary); /* Серый цвет для подписи */
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Уменьшенное описание, чтобы всё влезло */
.bot-description {
  font-size: 11px !important; /* Чуть меньше, чем было */
  color: var(--text-secondary);
  line-height: 1.3;
  margin-top: 4px !important;
  text-align: center !important;
  opacity: 0.8;
  padding: 0 4px;
}






/* ========================================= */
/*      СТИЛИ ДЛЯ ВСЕХ МИНИ-ИГР (7 ИГР)      */
/* ========================================= */

/* Общий контейнер игры (чтобы не вылезало) */
.game-wrapper {
  position: relative;
  width: 100%;
  height: 100vh; /* На весь экран */
  background: #0c0e1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Хедер игры (Счет, Выход) */
.game-hud {
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  pointer-events: none; /* Чтобы клики проходили сквозь пустые места */
}
.game-hud > * { pointer-events: auto; } /* Кнопки работают */

.hud-score {
  font-size: 24px; font-weight: 900; color: #fff;
  text-shadow: 0 0 10px var(--neon-cyan);
  background: rgba(0,0,0,0.5);
  padding: 5px 10px;
  border-radius: 10px;
}

.hud-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

/* Модальные окна внутри игр (Старт / Гейм Овер) */
.game-modal {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(12, 14, 26, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  text-align: center;
}
.game-modal.hidden { display: none; }
.game-modal h1 { font-size: 36px; margin-bottom: 10px; }

/* --- 1. CRYPTO MINES --- */
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 300px; margin-top: 20px; }
.mine-cell {
  aspect-ratio: 1; background: rgba(255,255,255,0.1); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  border: 1px solid rgba(255,255,255,0.1); cursor: pointer;
}
.mine-cell.safe { background: rgba(76, 255, 122, 0.2); border-color: #4cff7a; }
.mine-cell.boom { background: rgba(255, 77, 77, 0.5); border-color: #ff4d4d; animation: shake 0.4s; }

/* --- 2. MEMORY HASH --- */
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 300px; perspective: 1000px; margin-top: 20px; }
.mem-card {
  aspect-ratio: 1; background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border-radius: 8px; cursor: pointer; transform-style: preserve-3d; transition: 0.4s;
  display: flex; align-items: center; justify-content: center; font-size: 28px; position: relative;
}
.mem-card.flipped { transform: rotateY(180deg); background: #1e2233; border: 1px solid var(--neon-cyan); }
.mem-content { display: none; transform: rotateY(180deg); }
.mem-card.flipped .mem-content { display: block; }
.mem-front { position: absolute; }
.mem-card.flipped .mem-front { display: none; }

/* --- 3. RISK MANAGER --- */
.risk-chart-container { width: 100%; height: 250px; background: rgba(255,255,255,0.05); position: relative; margin-top: 20px; border-radius: 16px; overflow: hidden; }
.risk-bar-wrap { width: 90%; height: 10px; background: rgba(255,255,255,0.1); border-radius: 5px; margin: 20px auto; overflow: hidden; }
.risk-fill { height: 100%; background: linear-gradient(90deg, #4cff7a, yellow, red); width: 0%; transition: width 0.1s linear; }

/* --- 4. TOWER --- */
.tower-block { position: absolute; background: var(--neon-cyan); box-shadow: 0 0 15px var(--neon-cyan); border: 1px solid rgba(255,255,255,0.3); }
.tower-debris { position: absolute; background: rgba(255,255,255,0.5); animation: fall 0.8s forwards; }

/* === 2048 ULTRA CYBER STYLES === */
.g2048-wrapper {
  position: relative; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at center, #1a1f35 0%, #000000 100%);
}

/* Канвас для спецэффектов (лежит поверх всего или под низом) */
#g2048-fx-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; /* Фон */
  pointer-events: none;
}

/* Игровая доска */
.g2048-board {
  position: relative;
  width: 320px; height: 320px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 10px;
  backdrop-filter: blur(12px); /* Эффект стекла */
  box-shadow: 
      0 0 30px rgba(0, 0, 0, 0.8),
      inset 0 0 20px rgba(0, 204, 255, 0.05);
  z-index: 10;
  transition: transform 0.1s; /* Для тряски */
}

.g2048-grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 10px;
  width: 100%; height: 100%;
}

.g2048-cell-empty {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  width: 100%; height: 100%;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.g2048-tile {
  position: absolute;
  width: 65px; height: 65px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 26px; color: #fff;
  transition: left 0.1s ease-in-out, top 0.1s ease-in-out, transform 0.1s;
  z-index: 20;
  /* Стекло */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.2);
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Неоновые цвета плиток (Градиенты + Тени) */
.t-2    { background: linear-gradient(135deg, rgba(0,255,204,0.1), rgba(0,255,204,0.3)); border-color: #00ffcc; box-shadow: 0 0 10px rgba(0,255,204,0.2); color: #00ffcc; }
.t-4    { background: linear-gradient(135deg, rgba(0,204,255,0.1), rgba(0,204,255,0.3)); border-color: #00ccff; box-shadow: 0 0 10px rgba(0,204,255,0.3); }
.t-8    { background: linear-gradient(135deg, rgba(50,100,255,0.2), rgba(50,100,255,0.5)); border-color: #4a90e2; box-shadow: 0 0 15px rgba(74,144,226,0.4); }
.t-16   { background: linear-gradient(135deg, rgba(157,78,221,0.3), rgba(157,78,221,0.6)); border-color: #9d4edd; box-shadow: 0 0 15px rgba(157,78,221,0.5); }
.t-32   { background: linear-gradient(135deg, rgba(255,0,255,0.3), rgba(255,0,255,0.6)); border-color: #ff00ff; box-shadow: 0 0 20px rgba(255,0,255,0.5); }
.t-64   { background: linear-gradient(135deg, rgba(255,50,50,0.4), rgba(255,50,50,0.7)); border-color: #ff3232; box-shadow: 0 0 25px rgba(255,50,50,0.6); }
.t-128  { background: linear-gradient(135deg, #ff9900, #ffcc00); color: #000; box-shadow: 0 0 30px #ff9900; border: none; text-shadow: none; }
.t-256  { background: linear-gradient(135deg, #00ffcc, #00ccff); color: #000; box-shadow: 0 0 35px #00ffcc; border: none; text-shadow: none; }
.t-512  { background: linear-gradient(135deg, #ff00ff, #9d4edd); color: #fff; box-shadow: 0 0 40px #ff00ff; border: none; }
.t-1024 { background: linear-gradient(135deg, #ff0000, #ff9900); color: #fff; box-shadow: 0 0 50px #ff0000; border: none; animation: pulse 1s infinite; }
.t-2048 { background: linear-gradient(135deg, #ffd700, #ffffff); color: #000; box-shadow: 0 0 60px #ffd700; border: 2px solid #fff; animation: pulse 0.5s infinite; text-shadow: none; }

/* Анимации */
.tile-new { animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.tile-merged { animation: popMerge 0.2s ease-out; z-index: 25; }

@keyframes popIn { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes popMerge { 0% { transform: scale(1); } 50% { transform: scale(1.2); filter: brightness(1.5); } 100% { transform: scale(1); } }

/* Цвета плиток */
.t-2    { background: rgba(0, 255, 204, 0.1); border: 1px solid #00ffcc; color: #00ffcc; box-shadow: 0 0 5px #00ffcc; }
.t-4    { background: rgba(0, 204, 255, 0.2); border: 1px solid #00ccff; color: #fff; box-shadow: 0 0 8px #00ccff; }
.t-8    { background: rgba(0, 100, 255, 0.3); border: 1px solid #0064ff; color: #fff; box-shadow: 0 0 10px #0064ff; }
.t-16   { background: rgba(157, 78, 221, 0.4); border: 1px solid #9d4edd; color: #fff; box-shadow: 0 0 12px #9d4edd; }
.t-32   { background: rgba(255, 0, 255, 0.4); border: 1px solid #ff00ff; color: #fff; box-shadow: 0 0 15px #ff00ff; }
.t-64   { background: rgba(255, 50, 50, 0.5); border: 1px solid #ff3232; color: #fff; box-shadow: 0 0 20px #ff3232; }
.t-128  { background: linear-gradient(135deg, #ff9900, #ffcc00); color: #000; box-shadow: 0 0 25px #ff9900; border: none; }
.t-256  { background: linear-gradient(135deg, #00ffcc, #00ccff); color: #000; box-shadow: 0 0 30px #00ffcc; border: none; }
.t-512  { background: linear-gradient(135deg, #ff00ff, #9d4edd); color: #fff; box-shadow: 0 0 35px #ff00ff; border: none; }
.t-1024 { background: linear-gradient(135deg, #ff0000, #ff9900); color: #fff; box-shadow: 0 0 40px #ff0000; border: none; }
.t-2048 { background: linear-gradient(135deg, #ffd700, #fff); color: #000; box-shadow: 0 0 50px #ffd700; border: 2px solid white; animation: pulse 1s infinite; }

.tile-new { animation: popIn 0.2s ease-out; }
.tile-merged { animation: popMerge 0.2s ease-out; }

@keyframes popIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes popMerge { 0% { transform: scale(1.2); } 100% { transform: scale(1); } }


/* --- 6. MATCH-3 --- */
.m3-grid { 
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; 
    width: 320px; height: 320px; background: rgba(0,0,0,0.3); padding: 4px; border-radius: 12px; 
}
.m3-tile { 
    width: 100%; height: 100%; background: rgba(255,255,255,0.05); border-radius: 4px; 
    display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; transition: 0.2s; 
}
.m3-tile.selected { transform: scale(1.1); background: rgba(255,255,255,0.2); border: 1px solid var(--neon-cyan); z-index: 2; }
.m3-tile.match { animation: pop 0.3s forwards; }

/* --- 7. COIN RAIN --- */
.freeze-fx { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(0,204,255,0.3); opacity: 0; pointer-events: none; transition: 0.3s; box-shadow: inset 0 0 50px #00ffcc; }
.freeze-fx.active { opacity: 1; }

/* Анимации */
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes fall { to { transform: translateY(500px) rotate(45deg); opacity: 0; } }
@keyframes pop { to { transform: scale(0); opacity: 0; } }

/* === НОВЫЕ СТИЛИ ДЛЯ ИГРОВОГО ЦЕНТРА === */

/* 1. Виджет энергии (в меню игр) */
.energy-widget {
  background: linear-gradient(90deg, rgba(0, 204, 255, 0.1), rgba(157, 78, 221, 0.1));
  border: 1px solid var(--neon-cyan);
  border-radius: 12px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  box-shadow: 0 0 10px rgba(0, 255, 204, 0.1);
}
.energy-left { display: flex; align-items: center; gap: 10px; }
.energy-icon { font-size: 20px; animation: pulse 2s infinite; }
.energy-val { color: white; font-weight: 800; font-size: 16px; text-shadow: 0 0 5px var(--neon-cyan); }
.energy-timer { color: var(--text-secondary); font-size: 12px; font-family: monospace; }

/* 2. Единый контейнер для всех игр (Game Stage) */
#game-stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0c0e1a;
  z-index: 5000; /* Поверх всего */
  display: none; /* Скрыт по умолчанию */
  flex-direction: column;
}

/* Верхняя панель внутри игры */
.game-hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5001;
  pointer-events: none; /* Чтобы клики проходили сквозь пустоту */
}
.game-hud > * { pointer-events: auto; }

.hud-score-box {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 18px;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.hud-close-btn {
  background: rgba(255, 50, 50, 0.9);
  color: white;
  border: 2px solid rgba(255,255,255,0.2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
  transition: transform 0.2s;
}
.hud-close-btn:active { transform: scale(0.9); }

/* Канвас, на котором рисуется игра */
#active-game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none; /* Блокирует зум и скролл */
}

/* Слой для HTML элементов игры (если игра не на канвасе) */
#game-html-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5000;
}
/* Разрешаем клики внутри HTML слоя */
#game-html-layer > * { pointer-events: auto; }



/* === СТИЛИ ДЛЯ MATCH-3 === */
.m3-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  width: 340px;
  height: 340px;
  margin: 50px auto 0;
  padding: 8px;
  background: rgba(20, 20, 30, 0.8);
  border-radius: 12px;
  border: 2px solid rgba(0, 204, 255, 0.3);
  pointer-events: auto; /* Важно для кликов */
}

.m3-tile {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  user-select: none;
}
.m3-tile.selected {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid var(--neon-cyan);
  transform: scale(1.1);
  z-index: 10;
}
.m3-tile.match { animation: pop 0.3s forwards; }

/* === СТИЛИ ДЛЯ MEMORY === */
.memory-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  pointer-events: auto;
}
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 320px;
}
.mem-card {
  aspect-ratio: 1;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s;
  cursor: pointer;
}
.mem-card.flipped { transform: rotateY(180deg); }
.mem-front, .mem-back {
  width: 100%; height: 100%;
  position: absolute;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  font-size: 28px;
  border: 1px solid rgba(255,255,255,0.1);
}
.mem-front {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  color: rgba(0,0,0,0.5);
  font-size: 0; /* Скрываем знак вопроса */
}
.mem-back {
  background: #1e2233;
  transform: rotateY(180deg);
  border: 1px solid var(--neon-cyan);
}

/* === СТИЛИ ДЛЯ НОВЫХ UI-ИГР (Кликер, Квиз, Кейсы) === */

/* Кликер */
.clicker-wrapper {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; width: 100%; position: relative;
}
.click-btn {
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(0, 255, 204, 0.2), transparent);
  border-radius: 50%;
  border: 4px solid var(--neon-cyan);
  box-shadow: 0 0 30px var(--neon-cyan);
  display: flex; align-items: center; justify-content: center;
  font-size: 60px; cursor: pointer;
  transition: transform 0.05s;
  user-select: none; -webkit-tap-highlight-color: transparent;
  position: relative;
}
.click-btn:active { transform: scale(0.95); box-shadow: 0 0 10px var(--neon-cyan); }
.click-btn::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px dashed rgba(0, 255, 204, 0.5); animation: spin 10s linear infinite;
}
.click-progress { width: 80%; height: 10px; background: rgba(255,255,255,0.1); border-radius: 5px; margin-top: 30px; overflow: hidden; }
.click-fill { height: 100%; background: var(--neon-cyan); width: 0%; transition: width 0.1s; box-shadow: 0 0 10px var(--neon-cyan); }
.float-text { position: absolute; color: white; font-weight: bold; font-size: 24px; pointer-events: none; animation: floatUpFade 0.8s forwards; text-shadow: 0 0 5px black; }
@keyframes floatUpFade { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-80px) scale(1.5); opacity: 0; } }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Квиз */
.quiz-wrapper { padding: 20px; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; }
.quiz-card { background: rgba(30,34,51,0.95); padding: 20px; border-radius: 16px; border: 1px solid var(--neon-purple); text-align: center; box-shadow: 0 0 30px rgba(157, 78, 221, 0.2); }
.quiz-option {
  background: rgba(255,255,255,0.05); padding: 15px; margin: 10px 0; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1); cursor: pointer; transition: 0.2s; text-align: left; font-weight: 600;
}
.quiz-option:active { background: var(--neon-purple); color: white; transform: scale(0.98); border-color: var(--neon-purple); }
.quiz-timer-bar { height: 6px; background: linear-gradient(90deg, #ff4d4d, #ff9f43); width: 100%; margin-bottom: 15px; border-radius: 3px; transition: width 1s linear; }

/* Кейсы (Рулетка) */
.case-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; width: 100%; }
.roulette-window {
  width: 100%; height: 140px; background: rgba(0,0,0,0.8); 
  border-top: 2px solid var(--neon-gold); border-bottom: 2px solid var(--neon-gold);
  position: relative; overflow: hidden; margin: 30px 0;
  display: flex; align-items: center;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
}
.roulette-strip { display: flex; position: absolute; left: 0; height: 100px; align-items: center; transition: transform 5s cubic-bezier(0.1, 0.8, 0.1, 1); will-change: transform; }
.roulette-item {
  min-width: 110px; height: 100px; margin: 0 5px; background: rgba(255,255,255,0.05);
  border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px solid transparent; font-size: 13px; color: white; font-weight: bold;
  box-sizing: border-box;
}
.roulette-marker {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 4px; height: 100%; background: var(--neon-red); z-index: 10;
  box-shadow: 0 0 10px var(--neon-red);
}


/* === ОНБОРДИНГ V2 (Spotlight) === */
.onboarding-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 9998;
  pointer-events: auto; /* ИЗМЕНЕНО: Блокирует клики по ферме */
  background: transparent;
  transition: all 0.4s ease;
}

/* Элемент подсветки (дырка в темноте) */
.onboarding-spotlight {
  position: absolute;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85); /* Затемнение всего вокруг */
  border: 2px solid var(--neon-cyan); /* Неоновая рамка */
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: auto;
  z-index: 9998;
  animation: spotlightPulse 2s infinite;
}

/* Плашка с текстом */
.onboarding-popover {
  position: absolute;
  width: 280px;
  background: rgba(18, 22, 36, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid var(--neon-cyan);
  border-radius: 16px;
  padding: 20px;
  z-index: 9999;
  color: white;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8), 0 0 20px rgba(0, 255, 204, 0.2);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(10px);
}
.onboarding-popover.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Стрелочка у плашки */

.onboarding-arrow {
  position: absolute;
  width: 12px; height: 12px;
  background: rgba(18, 22, 36, 0.95);
  border-left: 1px solid var(--neon-cyan);
  border-top: 1px solid var(--neon-cyan);
  transform: rotate(45deg);
}


.onboarding-step-count {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 5px;
}
.onboarding-title {
  font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 8px;
}
.onboarding-text {
  font-size: 13px; line-height: 1.5; color: #e2e8f0; margin-bottom: 15px;
}
.onboarding-actions {
  display: flex; gap: 10px; justify-content: flex-end;
}
.onboarding-btn {
  padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; border: none;
}
.onboarding-btn.next { background: var(--neon-cyan); color: #000; box-shadow: 0 0 10px rgba(0,255,204,0.4); }
.onboarding-btn.skip { background: transparent; color: var(--text-secondary); }

@keyframes spotlightPulse {
  0% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85), 0 0 10px var(--neon-cyan); }
  50% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85), 0 0 25px var(--neon-cyan); }
  100% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85), 0 0 10px var(--neon-cyan); }
}



/* === STAGE 2: VISUAL UPDATE === */

/* Опасная зона (Mines, Cases) */
.game-card-risk {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(20, 20, 20, 0.9));
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
}
.game-card-risk:hover {
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
}
.game-card-risk h3 { color: #ff4d4d; text-shadow: 0 0 10px rgba(255, 77, 77, 0.3); }

/* Зона Скилла (Arcade) */
.game-card-skill {
  background: linear-gradient(135deg, rgba(0, 204, 255, 0.1), rgba(20, 20, 20, 0.9));
  border: 1px solid rgba(0, 204, 255, 0.3);
}
.game-card-skill:hover {
  box-shadow: 0 0 20px rgba(0, 204, 255, 0.3);
  border-color: var(--neon-cyan);
}

/* Модальное окно предупреждения */
.risk-modal-content {
  background: linear-gradient(180deg, #1a0505 0%, #0c0e1a 100%);
  border: 2px solid #ff4d4d;
  text-align: center;
}
.risk-icon {
  font-size: 40px;
  margin-bottom: 10px;
  animation: pulse 1s infinite;
}


/* ACADEMY STYLES */
.academy-btn { margin-left: 15px; width: 36px; height: 36px; background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05)); border: 1px solid var(--neon-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; box-shadow: 0 0 15px rgba(0, 204, 255, 0.3); animation: pulse 3s infinite; transition: transform 0.2s; } .academy-btn:active { transform: scale(0.9); }
.lesson-card { background: rgba(30, 34, 51, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; padding: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 15px; position: relative; overflow: hidden; }
.lesson-card.unlocked { cursor: pointer; border-left: 3px solid var(--neon-cyan); background: linear-gradient(90deg, rgba(0, 204, 255, 0.05), transparent); }
.lesson-card.locked { opacity: 0.6; border-left: 3px solid #555; filter: grayscale(0.8); }
.lesson-icon { font-size: 24px; width: 40px; height: 40px; background: rgba(0,0,0,0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.lesson-info { flex: 1; }
.lesson-title { font-weight: bold; font-size: 15px; color: white; margin-bottom: 4px; }
.lesson-desc { font-size: 12px; color: var(--text-secondary); }
.lesson-req { font-size: 10px; font-weight: bold; padding: 3px 8px; border-radius: 10px; background: rgba(0,0,0,0.5); border: 1px solid #555; color: #aaa; position: absolute; top: 10px; right: 10px; }
.lesson-card.unlocked .lesson-req { border-color: var(--neon-cyan); color: var(--neon-cyan); }


/* LEADERBOARD PRO STYLES */
.lb-btn { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.6); border: 1px solid var(--gold); color: var(--gold); border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; z-index: 20; transition:0.2s; }
.lb-btn:hover { transform: scale(1.1); background: var(--gold); color: black; }
.lb-row { display: flex; justify-content: space-between; padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13px; align-items: center; }
.lb-rank { width: 30px; font-weight: 900; font-size: 14px; color: var(--text-secondary); }
.lb-rank.top-1 { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.lb-rank.top-2 { color: #c0c0c0; }
.lb-rank.top-3 { color: #cd7f32; }
.lb-name { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: white; }
.lb-score { font-weight: bold; color: var(--neon-cyan); font-family: monospace; font-size: 14px; }
.new-record-anim { animation: recordPop 0.5s ease-out; }
@keyframes recordPop { 0% { transform: scale(0.5); opacity:0; } 50% { transform: scale(1.2); } 100% { transform: scale(1); opacity:1; } }



/* === SETTINGS & ECO MODE === */
.settings-btn {
  background: rgba(255,255,255,0.1);
  color: #aaa;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  margin-right: 10px;
  transition: all 0.3s;
}
.settings-btn:active { transform: rotate(90deg); }

/* Меню настроек */
.settings-panel {
  position: absolute; top: 60px; right: 15px;
  background: rgba(20, 24, 40, 0.95);
  border: 1px solid var(--neon-blue);
  border-radius: 12px;
  padding: 15px;
  z-index: 6000;
  display: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  width: 200px;
}
.settings-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; font-size: 13px; color: white;
}
/* Переключатель (Toggle) */
.toggle-switch {
  position: relative; width: 40px; height: 20px;
  background: #333; border-radius: 20px; cursor: pointer; transition: 0.3s;
}
.toggle-switch.active { background: var(--neon-cyan); }
.toggle-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; background: white; border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch.active::after { left: 22px; }

/* ECO MODE STYLES (Применяются к body) */
body.eco-mode * {
  box-shadow: none !important; /* Убираем тяжелые тени */
  backdrop-filter: none !important; /* Убираем блюр (самое тяжелое) */
  animation: none !important; /* Останавливаем анимации CSS */
  transition: none !important;
}
body.eco-mode canvas { display: none !important; } /* Отключаем тяжелые канвасы */
body.eco-mode .g2048-tile { border-radius: 4px; border: 2px solid #333; } /* Упрощаем плитки */

/* Fix 2048 Grid */
.g2048-tile {
  /* Удаляем фиксированные размеры, они будут заданы JS */
  transition: transform 0.1s ease-in-out; /* Только трансформ для скорости */
}
/* Красивая подсветка доски */
.g2048-board-glow {
  position: absolute; top: -10px; left: -10px; right: -10px; bottom: -10px;
  background: radial-gradient(circle, rgba(0,204,255,0.2) 0%, transparent 70%);
  z-index: -1;
  animation: boardPulse 4s infinite alternate;
}
@keyframes boardPulse { 0% { opacity: 0.5; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1.05); } }



/* ================================================= */
/* 🛑 FIX: СВАЙПЫ И БЛОКИРОВКА СВОРАЧИВАНИЯ V2 */
/* ================================================= */

/* Основной контейнер на весь экран */
#game-stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5000;
  background: #0c0e1a;
  display: none; /* Скрыт по умолчанию */
  flex-direction: column;
  
  /* 🔥 ЭТО ЗАПРЕЩАЕТ СВОРАЧИВАНИЕ И СКРОЛЛ: */
  touch-action: none;
  -ms-touch-action: none;
  overscroll-behavior: none;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Контейнер самой игры */
.g2048-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  touch-action: none; /* Дублируем для надежности */
}



/* === КНОПКА МАГАЗИНА === */
.shop-icon-btn {
  position: relative;
  width: 42px; height: 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--gold);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
  transition: transform 0.2s;
  animation: floatShop 4s ease-in-out infinite;
}
.shop-icon-btn:active { transform: scale(0.9); }
@keyframes floatShop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

.shop-badge {
  position: absolute; top: -6px; right: -6px;
  background: #4cff7a; color: black;
  font-size: 10px; font-weight: 900;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
  animation: badgePulse 2s infinite;
}
@keyframes badgePulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* === УМНЫЕ БУСТЕРЫ (In-Game Logic) === */

/* 1. GHOST (Прозрачный, нужно купить) */
.ability-btn.ghost {
  opacity: 0.5;
  filter: grayscale(1);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
}
.ability-btn.ghost::after {
  content: attr(data-cost); /* Цена берется из HTML */
  position: absolute; bottom: -18px;
  font-size: 9px; color: #aaa; font-weight: 700;
  width: 140%; left: -20%; text-align: center;
}

/* 2. READY (Куплено, готово к использованию) */
.ability-btn.ready {
  opacity: 1;
  filter: none;
  border-color: var(--neon-cyan);
  background: linear-gradient(135deg, rgba(0, 255, 204, 0.2), rgba(0, 204, 255, 0.05));
  box-shadow: 0 0 15px var(--neon-cyan);
  animation: pulseReady 2s infinite;
}
.ability-btn.ready::after {
  content: 'READY';
  position: absolute; bottom: -18px;
  font-size: 9px; color: var(--neon-cyan);
  font-weight: 900; letter-spacing: 1px; width: 100%; text-align: center;
}
@keyframes pulseReady { 0% { box-shadow: 0 0 10px var(--neon-cyan); } 50% { box-shadow: 0 0 25px var(--neon-cyan); } 100% { box-shadow: 0 0 10px var(--neon-cyan); } }

/* 3. USED (Использовано в этой партии) */
.ability-btn.used {
  opacity: 0.3;
  background: rgba(50, 0, 0, 0.5);
  border-color: #333;
  color: #555;
  cursor: not-allowed;
  box-shadow: none;
  animation: none;
}
.ability-btn.used::after {
  content: '❌';
  position: absolute; bottom: -18px; font-size: 10px; width: 100%; text-align: center;
}