/* ============================================================
   GAME MODE BAR — спокойная серая полоса сверху
   Discord-style: тёмный фон, тонкая граница, аккуратный индикатор.
   ============================================================ */

.game-mode-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  z-index: 99999;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0 6px 0 14px;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #e5e5e7;

  /* Плоский тёмный фон как у карточек Discord */
  background: #18181b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);

  user-select: none;
}

.game-mode-bar.visible {
  display: flex;
  animation: gameModeSlideIn 0.32s cubic-bezier(.2, .9, .3, 1);
}

/* ── Красная точка-индикатор слева ── */
.game-mode-dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #ef4444;
}

/* Пульсирующее кольцо */
.game-mode-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #ef4444;
  animation: gameModeDotPulse 1.8s cubic-bezier(.2, .9, .3, 1) infinite;
}

/* ── Лейбл «GAME MODE» ── */
.game-mode-label {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #d4d4d8;
  flex-shrink: 0;
}

/* ── Название игры по центру ── */
.game-mode-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  font-size: 12px;
  color: #a1a1a8;
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Кнопка закрытия справа ── */
.game-mode-close {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;

  border: none;
  border-radius: 6px;
  background: transparent;
  color: #7a7a80;
  cursor: pointer;

  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.game-mode-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e5e7;
}
.game-mode-close:active {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(0.94);
}
.game-mode-close svg {
  width: 12px;
  height: 12px;
}

/* ── Анимации ── */
@keyframes gameModeSlideIn {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
@keyframes gameModeDotPulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(2.4); opacity: 0;   }
  100% { transform: scale(2.4); opacity: 0;   }
}

/* ============================================================
   ОПТИМИЗАЦИИ — Game Mode
   ============================================================ */

body.game-mode .app-container {
  padding-top: 32px;
  box-sizing: border-box;
}

/* Убиваем ВСЕ анимации внутри приложения (кроме самой полоски) */
body.game-mode .app-container *,
body.game-mode .player * {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.05s !important;
}

/* Скрываем тяжёлые визуальные элементы */
body.game-mode #heroCanvas,
body.game-mode #ambient-canvas,
body.game-mode .hero-orb,
body.game-mode .hero-glitch::before,
body.game-mode .hero-glitch::after,
body.game-mode .player-video,
body.game-mode .player-video-overlay,
body.game-mode .download-hero-glow {
  display: none !important;
}

/* Убираем blur'ы — они дорогие на GPU */
body.game-mode .hero-animated::before,
body.game-mode .modal,
body.game-mode .auth-overlay {
  backdrop-filter: none !important;
}

/* Отключаем box-shadow у карточек при hover */
body.game-mode .card:hover,
body.game-mode .mix-card:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================================
   DEEP MODE — окно потеряло фокус (alt-tab в игру)
   ============================================================ */

body.game-mode-deep .app-container {
  opacity: 0.98;
}

body.game-mode-deep * {
  transition: none !important;
}

body.game-mode-deep .mobile-burger,
body.game-mode-deep .android-audio-btn,
body.game-mode-deep .download-toast,
body.game-mode-deep .hero-settings-panel {
  display: none !important;
}

/* ============================================================
   Мобилка — компактнее
   ============================================================ */
@media (max-width: 480px) {
  .game-mode-bar {
    font-size: 11.5px;
    padding: 0 4px 0 10px;
    height: 30px;
    gap: 8px;
  }
  .game-mode-dot { width: 7px; height: 7px; }
  .game-mode-label { font-size: 10px; letter-spacing: 1px; }
  .game-mode-name  { font-size: 11.5px; padding-left: 8px; }
  body.game-mode .app-container { padding-top: 30px; }
}