/**
 * Estilos do Jogo da Esteira dos Elementos Químicos
 * Design Futurista / Laboratório Cyberpunk / Layout Responsivo
 */

:root {
  --bg-dark: #090c13;
  --bg-panel: #141b2d;
  --belt-color: #1a2236;
  --belt-treads: #101624;
  --neon-cyan: #00f0ff;
  --neon-green: #00f59b;
  --neon-pink: #ff007f;
  --neon-yellow: #ffe600;
  --neon-red: #ff3344;
  --text-main: #f0f4f8;
  --text-muted: #8892b0;
  --hazard-yellow: #ffcc00;
  --hazard-black: #111111;
  --phone-width: 440px;
  --phone-height: 860px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

button, input, select {
  font-family: inherit;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  background: radial-gradient(circle at center, #131929 0%, #06080d 100%);
  color: var(--text-main);
  font-family: 'Montserrat', 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Container centralizado responsivo com proporção mobile/desktop */
.phone-wrapper {
  position: relative;
  width: 100vw;
  width: 100%;
  height: 100%;
  height: var(--app-height, 100dvh);
  max-width: var(--phone-width);
  max-height: var(--phone-height);
  background: #0d121f;
  border-radius: 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 240, 255, 0.15);
  border: 4px solid #202a42;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 640px) {
  body {
    background: #0d121f !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .phone-wrapper {
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    height: var(--app-height, 100dvh) !important;
    max-height: 100% !important;
    max-height: var(--app-height, 100dvh) !important;
  }

  /* Ampliação da esteira para os lados zerando bordas */
  .conveyor-track {
    width: 74% !important;
    border-left-width: 4px !important;
    border-right-width: 4px !important;
  }

  .conveyor-watermark {
    font-size: 10px !important;
    letter-spacing: 1.5px !important;
  }

  /* Redução de zoom / escala compacta para caber 100% na tela do celular */
  .modal-backdrop {
    padding: 10px 14px;
    padding-top: max(8px, calc(6px + env(safe-area-inset-top, 0px)));
    padding-bottom: max(12px, calc(8px + env(safe-area-inset-bottom, 0px)));
    justify-content: center;
  }

  .menu-modal-content {
    max-width: 100%;
  }

  .top-corner-lang {
    margin-bottom: 2px !important;
  }

  .lang-select-wrapper {
    padding: 3px 8px 3px 6px !important;
    border-radius: 14px !important;
  }

  .lang-select-box {
    font-size: 11px !important;
    padding-right: 14px !important;
  }

  .lang-globe-icon {
    font-size: 12px !important;
    margin-right: 4px !important;
  }

  .game-title {
    font-size: 20px;
    margin-bottom: 2px;
    letter-spacing: -0.3px;
  }

  .game-subtitle {
    font-size: 11px;
    margin-bottom: 8px;
    line-height: 1.25;
  }

  .instructions-card {
    padding: 8px 10px;
    margin-bottom: 8px;
    gap: 5px;
    border-radius: 12px;
  }

  .instruction-step {
    font-size: 11px;
    gap: 8px;
  }

  .step-icon {
    font-size: 15px;
  }

  .section-title {
    font-size: 10.5px;
    margin-bottom: 4px;
  }

  .difficulty-selector {
    gap: 5px;
    margin-bottom: 8px;
  }

  .diff-option {
    padding: 6px 10px;
    border-radius: 10px;
  }

  .diff-title {
    font-size: 12px;
  }

  .diff-desc {
    font-size: 9.5px;
  }

  .mode-selector {
    gap: 6px;
    margin-bottom: 8px;
  }

  .mode-option {
    padding: 6px 4px;
    font-size: 10.5px;
    border-radius: 10px;
  }

  .btn-primary {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 12px;
  }

  /* Outros modais compactados para caber perfeitamente no celular */
  .game-loading-card {
    padding: 14px 14px;
    border-radius: 18px;
    max-width: 340px;
  }

  .game-loading-icon {
    font-size: 28px;
    margin-bottom: 4px;
  }

  .game-loading-title {
    font-size: 16px;
    margin-bottom: 2px;
  }

  .game-loading-status {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .game-progress-percent {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .game-loading-warnings {
    padding: 10px 12px;
    gap: 6px;
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .warning-icon {
    font-size: 15px;
  }

  .warning-text {
    font-size: 11px;
  }

  .loading-start-btn {
    padding: 11px 16px;
    font-size: 14px;
  }

  .go-title {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .defeated-by-box {
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .defeated-symbol {
    font-size: 32px;
  }

  .defeated-name {
    font-size: 16px;
  }

  .gameover-stats-grid {
    gap: 8px;
    margin-bottom: 12px;
  }

  .go-stat-card {
    padding: 8px;
  }

  .go-stat-val {
    font-size: 20px;
  }

  .gameover-actions {
    gap: 8px;
    margin-top: 10px;
  }

  .btn-share, .btn-secondary {
    padding: 10px 14px;
    font-size: 13.5px;
    border-radius: 12px;
  }
}

/* Telas móveis com altura reduzida (ex: teclado virtual, barras de navegação do navegador) */
@media (max-height: 700px) and (max-width: 640px) {
  .modal-backdrop {
    padding: 6px 10px;
    padding-top: max(6px, calc(4px + env(safe-area-inset-top, 0px)));
    padding-bottom: max(8px, calc(4px + env(safe-area-inset-bottom, 0px)));
  }

  .game-subtitle {
    display: none;
  }

  .instructions-card {
    padding: 6px 8px;
    gap: 3px;
    margin-bottom: 6px;
  }

  .instruction-step {
    font-size: 10px;
    gap: 6px;
  }

  .difficulty-selector {
    gap: 3px;
    margin-bottom: 5px;
  }

  .diff-option {
    padding: 5px 8px;
  }

  .diff-title {
    font-size: 11px;
  }

  .diff-desc {
    font-size: 9px;
  }

  .mode-selector {
    margin-bottom: 5px;
    gap: 4px;
  }

  .mode-option {
    padding: 5px 3px;
    font-size: 10px;
  }

  .btn-primary {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* ============================================================
   TOP CONTROLS & HUD (LINHA ÚNICA COMPACTA)
   ============================================================ */
.hud-header {
  padding: 8px 12px;
  padding-top: max(8px, calc(6px + env(safe-area-inset-top, 0px)));
  background: linear-gradient(180deg, rgba(13, 18, 31, 0.96) 0%, rgba(13, 18, 31, 0.75) 100%);
  backdrop-filter: blur(10px);
  z-index: 20;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 46px;
}

.hud-left-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item.compact {
  line-height: 1.1;
}

.stat-item.compact .stat-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 700;
}

.stat-item.compact .stat-num {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
}

.stat-item.compact .stat-num.highlight {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.hud-center-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-right-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: #1e2840;
  border: 1px solid #324163;
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: #2b395b;
  transform: scale(1.05);
}

.icon-btn.active {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 12px var(--neon-cyan);
}

.lang-dropdown {
  background: #1e2840;
  border: 1px solid #324163;
  color: #fff;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

/* Indicador do Microfone (Compacto sem texto) */
.mic-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: default;
}

.mic-pill .mic-glyph {
  font-size: 13px;
  line-height: 1;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.mic-on .status-dot {
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  animation: pulse-dot 1.2s infinite;
}

.mic-off .status-dot {
  background: #666;
}

.mic-error .status-dot {
  background: var(--neon-red);
}

@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* Placar e Combos Legados / Fallback */
.stats-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
}

.stat-num {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
}

.stat-num.highlight {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.lives-pill {
  background: rgba(255, 51, 68, 0.15);
  border: 1px solid rgba(255, 51, 68, 0.4);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 12px rgba(255, 51, 68, 0.3);
  letter-spacing: 2px;
}

.lives-pill.hidden {
  display: none;
}

.combo-pill {
  background: linear-gradient(135deg, #ff007f, #ff7300);
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.5);
  animation: bounce-combo 0.4s ease;
}

.combo-pill.super-combo {
  background: linear-gradient(135deg, #ffe600, #ff0055);
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.8);
  font-size: 16px;
}

.combo-pill.ultra-combo {
  background: linear-gradient(135deg, #00f0ff, #00f59b, #ffe600);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.9), 0 0 15px rgba(255, 230, 0, 0.7);
  font-size: 16.5px;
  animation: bounce-combo 0.4s ease, pulse-glow 1.5s infinite alternate;
}

@keyframes pulse-glow {
  0% { filter: brightness(1) drop-shadow(0 0 5px rgba(0, 240, 255, 0.6)); }
  100% { filter: brightness(1.25) drop-shadow(0 0 15px rgba(255, 230, 0, 0.9)); }
}

@keyframes bounce-combo {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ============================================================
   ESTEIRA ROLANTE (CONVEYOR BELT)
   ============================================================ */
.conveyor-container {
  flex: 1;
  position: relative;
  background: #0f1422;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

/* Trilho da esteira (Estreito e alongado para dar sensação de esteira longa) */
.conveyor-track {
  position: relative;
  width: 60%;
  flex-shrink: 0;
  height: 100%;
  background: var(--belt-color);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 0, 0, 0.6);
  border-left: 6px solid #283552;
  border-right: 6px solid #283552;
  overflow: hidden;
}

/* Laterais / Flancos da Esteira com Marca d'água */
.conveyor-flank {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  position: relative;
  z-index: 4;
  overflow: hidden;
}

.conveyor-watermark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-family: 'Montserrat', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(0, 240, 255, 0.42);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
  opacity: 0.88;
}

.watermark-left {
  transform: rotate(-90deg);
}

.watermark-right {
  transform: rotate(90deg);
}

/* Animação das ranhuras/esteira descendo */
.belt-treads-bg {
  position: absolute;
  top: -100px;
  left: 0;
  width: 100%;
  height: calc(100% + 200px);
  background: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 28px,
    rgba(0, 0, 0, 0.4) 28px,
    rgba(0, 0, 0, 0.4) 34px,
    rgba(255, 255, 255, 0.03) 34px,
    rgba(255, 255, 255, 0.03) 36px
  );
  animation: belt-scroll 1.4s linear infinite;
}

@keyframes belt-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(36px); }
}

/* Roletes e engrenagens laterais */
.belt-side-rails {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
}

.rail-left, .rail-right {
  width: 8px;
  height: 100%;
  background: repeating-linear-gradient(
    180deg,
    #ffcc00 0px,
    #ffcc00 15px,
    #222 15px,
    #222 30px
  );
  opacity: 0.6;
}

/* Camada onde os cartões dos elementos deslizam */
.items-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============================================================
   CARTÃO DO ELEMENTO QUÍMICO (ELEMENT CARD COMPACTO & CENTRALIZADO)
   ============================================================ */
.element-card {
  position: absolute;
  left: 50%;
  margin-left: -56px; /* metade de 112px */
  width: 112px;
  height: 112px;
  background: linear-gradient(145deg, #182035, #0c111e);
  border: 3px solid var(--cat-color, #00f0ff);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7), 0 0 14px var(--cat-bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px;
  transition: transform 0.05s linear;
  cursor: default;
  z-index: 5;
}

.card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  justify-content: space-between;
  align-items: stretch;
  position: relative;
  z-index: 2;
}

.element-card.is-active-target {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.8), 0 0 20px var(--cat-color);
  border-width: 3px;
}

.element-card.crushed {
  transform: scale(0.7) translateY(40px) !important;
  filter: brightness(0.4) saturate(2) hue-rotate(-40deg);
  opacity: 0;
  transition: all 0.35s ease-in;
}

.element-card.skipped {
  transform: scale(0.85) translateX(80px) !important;
  opacity: 0;
  transition: all 0.3s ease-in;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.atomic-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--cat-color, #fff);
  line-height: 1;
}

.category-tag {
  font-size: 7.5px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--cat-bg);
  color: var(--cat-color);
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid var(--cat-color);
  line-height: 1.1;
}

.symbol-display {
  font-size: 50px;
  font-weight: 900;
  text-align: center;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
  letter-spacing: -1px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.element-name-revealed {
  font-size: 10.5px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  color: var(--neon-green);
  opacity: 0;
  transform: translateY(2px);
  transition: all 0.2s ease;
  line-height: 1;
}

.element-name-revealed.show-name {
  opacity: 1;
  transform: translateY(0);
}

.card-tier-stars {
  font-size: 8px;
  text-align: center;
  opacity: 0.8;
  line-height: 1;
}

/* Telas maiores / Desktop: Proporções ligeiramente ampliadas */
@media (min-width: 481px) {
  .conveyor-track {
    width: 64%;
  }

  .conveyor-watermark {
    font-size: 12px;
    letter-spacing: 2.2px;
  }

  .element-card {
    width: 126px;
    height: 126px;
    margin-left: -63px;
    border-radius: 16px;
    padding: 8px 10px;
  }

  .atomic-num {
    font-size: 13px;
  }

  .category-tag {
    font-size: 8.5px;
    padding: 1px 5px;
    border-radius: 4px;
  }

  .symbol-display {
    font-size: 58px;
  }

  .element-name-revealed {
    font-size: 12px;
  }

  .card-tier-stars {
    font-size: 9px;
  }
}

/* Animação de Acerto Explosivo */
.element-card.success-burst {
  transform: scale(1.15) !important;
  border-color: var(--neon-green) !important;
  box-shadow: 0 0 40px var(--neon-green) !important;
  background: #003623 !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.element-card.skipped {
  opacity: 0.2;
  transform: translateX(100px) rotate(12deg) scale(0.75) !important;
  filter: grayscale(1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* ============================================================
   ZONA DE PERIGO E TRITURADOR (DANGER & CRUSHER)
   ============================================================ */
.danger-zone {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 86px;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.danger-laser-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #ff0055, #ff3344, #ff0055, transparent);
  box-shadow: 0 0 15px #ff0055, 0 0 30px #ff3344;
  opacity: 0.5;
  animation: laser-pulse 1s infinite alternate;
}

@keyframes laser-pulse {
  0% { opacity: 0.3; transform: scaleY(1); }
  100% { opacity: 1; transform: scaleY(2); }
}

/* Caldeira Fervente Industrial */
.boiler-hazard,
.crusher-hazard {
  height: 72px;
  background: radial-gradient(ellipse at 50% 0%, #3d1400 0%, #1a0800 65%, #0d0400 100%);
  border-top: 3px solid #ff4500;
  box-shadow: 
    0 -10px 28px rgba(255, 69, 0, 0.5),
    0 -4px 12px rgba(255, 140, 0, 0.4),
    inset 0 4px 18px rgba(255, 100, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  overflow: visible;
  transition: transform 0.2s ease-out, filter 0.2s ease-out;
}

/* Borda metálica da caldeira industrial com rebites */
.boiler-rim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 14px;
  background: linear-gradient(180deg, #505565 0%, #2b2f3d 60%, #151820 100%);
  border-top: 2px solid #ff9900;
  border-bottom: 1px solid #ff3300;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  z-index: 4;
}

.boiler-rivets {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #ffcc00 22%, transparent 28%);
  background-size: 24px 14px;
  opacity: 0.7;
}

/* Núcleo de lava e magma fervente */
.boiler-magma-core {
  position: absolute;
  top: 12px;
  left: 0;
  width: 100%;
  height: calc(100% - 12px);
  background: radial-gradient(ellipse at 50% 30%, #ff5500 0%, #c41800 50%, #4a0900 95%);
  overflow: hidden;
  z-index: 2;
}

.boiler-fire-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 200, 0, 0.4) 0%, transparent 70%);
  animation: magma-pulse 1.4s ease-in-out infinite alternate;
}

@keyframes magma-pulse {
  0% { opacity: 0.5; filter: brightness(0.9); }
  100% { opacity: 1; filter: brightness(1.3); }
}

/* Bolhas ferventes subindo e estourando na caldeira */
.boiler-bubble {
  position: absolute;
  bottom: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff7d6 0%, #ff8800 60%, #cc2200 100%);
  box-shadow: 0 0 10px #ff6600;
  opacity: 0.85;
}

.boiler-bubble.b1 { left: 12%; width: 14px; height: 14px; animation: bubble-pop 1.2s infinite ease-in; }
.boiler-bubble.b2 { left: 32%; width: 22px; height: 22px; animation: bubble-pop 1.7s 0.3s infinite ease-in; }
.boiler-bubble.b3 { left: 54%; width: 18px; height: 18px; animation: bubble-pop 1.4s 0.6s infinite ease-in; }
.boiler-bubble.b4 { left: 74%; width: 24px; height: 24px; animation: bubble-pop 2.1s 0.2s infinite ease-in; }
.boiler-bubble.b5 { left: 88%; width: 13px; height: 13px; animation: bubble-pop 1.5s 0.8s infinite ease-in; }

@keyframes bubble-pop {
  0% { transform: translateY(0) scale(0.6); opacity: 0.3; }
  60% { transform: translateY(-16px) scale(1.15); opacity: 0.95; }
  90% { transform: translateY(-24px) scale(1.3); opacity: 1; }
  100% { transform: translateY(-26px) scale(1.6); opacity: 0; }
}

/* Partículas de vapor saindo continuamente da caldeira */
.boiler-steam-wrap {
  position: absolute;
  top: -45px;
  left: 0;
  width: 100%;
  height: 55px;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}

.steam-particle {
  position: absolute;
  bottom: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 220, 0.45) 0%, rgba(255, 120, 0, 0.18) 50%, transparent 75%);
  filter: blur(5px);
  animation: steam-rise 2s infinite ease-out;
}

.steam-particle.s1 { left: 10%; animation-duration: 1.8s; animation-delay: 0s; }
.steam-particle.s2 { left: 30%; animation-duration: 2.2s; animation-delay: 0.4s; }
.steam-particle.s3 { left: 50%; animation-duration: 1.7s; animation-delay: 0.8s; }
.steam-particle.s4 { left: 70%; animation-duration: 2.4s; animation-delay: 0.2s; }
.steam-particle.s5 { left: 86%; animation-duration: 1.9s; animation-delay: 0.6s; }

@keyframes steam-rise {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  25% { opacity: 0.7; }
  75% { opacity: 0.4; }
  100% { transform: translateY(-50px) scale(1.9); opacity: 0; }
}

/* Badge de aviso da caldeira */
.hazard-text {
  background: rgba(18, 5, 0, 0.92);
  color: #ffaa00;
  padding: 3px 8px;
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 1px;
  border-radius: 5px;
  border: 1.5px solid #ff4500;
  box-shadow: 0 0 12px rgba(255, 69, 0, 0.6);
  z-index: 6;
  margin-bottom: 6px;
  text-shadow: 0 0 8px #ff4500;
  animation: hazard-glow 1s infinite alternate ease-in-out;
  white-space: nowrap;
}

@keyframes hazard-glow {
  0% { text-shadow: 0 0 5px #ff3300; border-color: #ff3300; }
  100% { text-shadow: 0 0 14px #ffaa00; border-color: #ffaa00; }
}

/* Estado de Perigo Ativo na Esteira */
.conveyor-track.danger-state .danger-laser-line {
  opacity: 1;
  background: #ff0000;
  box-shadow: 0 0 30px #ff0000;
  animation: laser-fast 0.2s infinite alternate;
}

.conveyor-track.danger-state {
  border-color: #ff3344;
  box-shadow: inset 0 0 30px rgba(255, 0, 60, 0.5);
}

@keyframes laser-fast {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Reação da Caldeira ao Engolir Elemento / Explosão */
.boiler-hazard.boiler-erupt,
.crusher-hazard.crush-action {
  transform: translateY(-24px) scale(1.05);
  filter: brightness(1.8) drop-shadow(0 0 35px #ff3300);
  box-shadow: 0 -25px 65px #ff3300, inset 0 0 40px #ffcc00;
}

/* ============================================================
   LEGENDA DE FALA EM TEMPO REAL (TRANSCRIPT PILL)
   Posicionada logo abaixo do gráfico da caldeira
   ============================================================ */
.live-speech-container {
  position: relative;
  width: 100%;
  padding: 6px 14px;
  background: #090e1a;
  border-top: 1.5px solid rgba(255, 69, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 15;
  box-sizing: border-box;
}

.speech-pill {
  background: rgba(14, 20, 36, 0.95);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(0, 240, 255, 0.45);
  border-radius: 25px;
  padding: 6px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 95%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 240, 255, 0.15);
  transition: all 0.2s ease;
}

.speech-icon {
  font-size: 15px;
  animation: mic-shake 1s infinite;
}

@keyframes mic-shake {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.speech-text {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.speech-pill.pulse {
  border-color: var(--neon-green);
  box-shadow: 0 0 20px rgba(0, 245, 155, 0.5);
  transform: scale(1.04);
}

/* ============================================================
   BOTTOM ACTIONS BAR (PULAR, DIGITAR)
   ============================================================ */
.bottom-controls {
  padding: 10px 16px;
  padding-bottom: max(16px, calc(10px + env(safe-area-inset-bottom, 0px)));
  background: #0d121f;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 20;
}

@media (max-width: 480px) {
  .live-speech-container {
    padding: 3px 10px;
  }

  .bottom-controls {
    padding: 8px 12px;
    padding-bottom: max(16px, calc(10px + env(safe-area-inset-bottom, 0px)));
    gap: 8px;
  }

  .action-btn {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
}

.action-btn {
  background: #1e2840;
  border: 1px solid #324163;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #2b395b;
}

.action-btn.btn-skip {
  background: rgba(255, 0, 100, 0.15);
  border-color: rgba(255, 0, 100, 0.4);
  color: #ff5e9c;
}

.action-btn.btn-skip:hover {
  background: rgba(255, 0, 100, 0.3);
}

.action-btn.btn-hold-mic {
  display: none !important;
}

.action-btn.btn-hold-mic:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.35), rgba(0, 245, 155, 0.35));
  border-color: var(--neon-green);
}

.action-btn.btn-hold-mic.is-holding,
.action-btn.btn-hold-mic:active {
  background: linear-gradient(135deg, #00f0ff, #00f59b) !important;
  color: #060910 !important;
  border-color: #00f59b !important;
  box-shadow: 0 0 25px rgba(0, 245, 155, 0.8), 0 0 10px #00f0ff !important;
  transform: scale(1.05);
  animation: hold-pulse 0.7s infinite alternate;
}

@keyframes hold-pulse {
  0% { transform: scale(1.03); box-shadow: 0 0 15px rgba(0, 245, 155, 0.6); }
  100% { transform: scale(1.07); box-shadow: 0 0 30px rgba(0, 240, 255, 0.9); }
}

.manual-input {
  flex: 1;
  min-width: 0;
  background: #151d2e;
  border: 1px solid #283654;
  color: #fff;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.manual-input:focus {
  border-color: var(--neon-cyan);
}

/* ============================================================
   CÂMERA WEBCAM (PICTURE IN PICTURE - FORMATO 9:16)
   ============================================================ */
.camera-pip {
  position: absolute;
  top: 90px;
  right: 14px;
  width: 104px;
  height: 185px;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 16px rgba(0, 240, 255, 0.45);
  overflow: hidden;
  z-index: 40;
  cursor: grab;
  background: #0a0e17;
  touch-action: none;
  user-select: none;
}

.camera-pip:active {
  cursor: grabbing;
}

.camera-pip.hidden {
  display: none;
}

#camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* espelha como selfie camera */
  display: block;
}

.cam-close-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.15s ease;
}

.cam-close-btn:hover {
  background: rgba(255, 51, 68, 0.85);
  border-color: rgba(255, 51, 68, 1);
  transform: scale(1.1);
}

@media (max-width: 480px) {
  .camera-pip {
    top: 72px;
    right: 10px;
    width: 88px;
    height: 156px;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
  }
}

/* ============================================================
   MODAIS (MENU, GAME OVER, CONTAGEM)
   ============================================================ */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 16, 0.92);
  backdrop-filter: blur(14px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  padding-top: max(20px, calc(16px + env(safe-area-inset-top, 0px)));
  padding-bottom: max(28px, calc(16px + env(safe-area-inset-bottom, 0px)));
  text-align: center;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-backdrop.hidden {
  display: none;
}

.menu-modal-content {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
}

.game-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #00f0ff, #00f59b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.4;
}

.instructions-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.instruction-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
}

.step-icon {
  font-size: 20px;
}

.mode-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  width: 100%;
}

.mode-option {
  flex: 1;
  background: #182136;
  border: 2px solid #2b3a5d;
  padding: 12px 8px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.mode-option input {
  display: none;
}

.mode-option:has(input:checked) {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.15);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #00f0ff, #00f59b);
  color: #050b14;
  border: none;
  padding: 16px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 245, 155, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 245, 155, 0.6);
}

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

/* Modal de Contagem Regressiva */
.countdown-number {
  font-size: 110px;
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 40px var(--neon-cyan);
  animation: countdown-pop 0.9s infinite;
}

@keyframes countdown-pop {
  0% { transform: scale(0.6); opacity: 0.2; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

/* Modal de Game Over */
.go-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--neon-red);
  text-shadow: 0 0 20px rgba(255, 51, 68, 0.6);
  margin-bottom: 12px;
}

.defeated-by-box {
  background: #182035;
  border: 2px dashed #ff3344;
  border-radius: 16px;
  padding: 16px;
  width: 100%;
  margin-bottom: 20px;
}

.defeated-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}

.defeated-card-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.defeated-symbol {
  font-size: 42px;
  font-weight: 900;
  color: #fff;
}

.defeated-details {
  text-align: left;
}

.defeated-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--neon-cyan);
}

.defeated-category {
  font-size: 12px;
  color: var(--text-muted);
}

.gameover-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-bottom: 24px;
}

.go-stat-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px;
}

.go-stat-title {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.go-stat-val {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
}

/* Floating Pontos */
.floating-score-popup {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: 900;
  color: var(--neon-green);
  text-shadow: 0 0 15px var(--neon-green);
  pointer-events: none;
  animation: float-up 0.8s ease forwards;
  z-index: 30;
}

.floating-score-popup.skip-popup {
  color: var(--neon-yellow);
  text-shadow: 0 0 15px rgba(255, 230, 0, 0.85);
  font-size: 20px;
}

.floating-score-popup.damage-popup {
  color: #ff3344;
  text-shadow: 0 0 18px rgba(255, 51, 68, 0.95);
  font-size: 20px;
}

@keyframes float-up {
  0% { transform: translate(-50%, 0) scale(0.8); opacity: 0; }
  20% { transform: translate(-50%, -15px) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -60px) scale(1); opacity: 0; }
}

/* Tremor de Tela e Efeito de Explosão Violenta */
.screen-shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Explosão violenta da tela quando o elemento explode na caldeira */
.screen-explode {
  animation: violent-explosion-shake 0.85s cubic-bezier(0.2, 0.9, 0.3, 1) both !important;
}

@keyframes violent-explosion-shake {
  0% { transform: scale(1.05) translate3d(0, 0, 0) rotate(0deg); }
  10% { transform: scale(1.04) translate3d(-14px, 12px, 0) rotate(-2deg); }
  20% { transform: scale(1.03) translate3d(14px, -12px, 0) rotate(2.5deg); }
  30% { transform: scale(1.03) translate3d(-12px, -14px, 0) rotate(-1.5deg); }
  40% { transform: scale(1.02) translate3d(12px, 12px, 0) rotate(1.8deg); }
  50% { transform: scale(1.01) translate3d(-8px, -6px, 0) rotate(-1deg); }
  60% { transform: scale(1.01) translate3d(7px, 8px, 0) rotate(0.8deg); }
  75% { transform: scale(1.005) translate3d(-4px, 3px, 0) rotate(-0.5deg); }
  90% { transform: scale(1.002) translate3d(2px, -2px, 0) rotate(0.2deg); }
  100% { transform: scale(1) translate3d(0, 0, 0) rotate(0deg); }
}

/* Camada de Explosão Total da Tela */
.screen-explosion-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.explosion-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 80%, #ffffff 0%, #ff8800 35%, #ff1100 70%, rgba(25, 0, 0, 0.95) 100%);
  opacity: 0;
  pointer-events: none;
}

.screen-explosion-overlay.active-flash .explosion-flash {
  animation: flash-fade 0.85s ease-out forwards;
}

@keyframes flash-fade {
  0% { opacity: 0.95; filter: brightness(2); }
  20% { opacity: 0.85; filter: brightness(1.6); }
  50% { opacity: 0.4; filter: brightness(1.2); }
  100% { opacity: 0; filter: brightness(1); }
}

/* Camada de faíscas e brasas expelidas da caldeira */
.explosion-sparks-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.magma-spark {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px #ff8800, 0 0 24px #ff1100;
  pointer-events: none;
  animation: spark-fly 0.85s cubic-bezier(0.12, 0.8, 0.32, 1) forwards;
}

@keyframes spark-fly {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx, 0px), var(--dy, -250px)) scale(0.2);
    opacity: 0;
  }
}

/* Efeito de Afundamento na Caldeira */
.element-card.sunk-in-boiler {
  transform: translateY(70px) scale(0.55) rotate(8deg) !important;
  filter: brightness(2) contrast(1.5) hue-rotate(-30deg) !important;
  opacity: 0 !important;
  transition: all 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19) !important;
}

/* Efeito de Resposta Errada (Tremer o cartão com som negativo) */
.element-card.wrong-shake {
  animation: card-wrong-wobble 0.55s ease-in-out !important;
  border-color: #ff1744 !important;
  box-shadow: 0 0 35px rgba(255, 23, 68, 0.9), inset 0 0 15px rgba(255, 23, 68, 0.5) !important;
}

@keyframes card-wrong-wobble {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-14px) rotate(-3.5deg); }
  35% { transform: translateX(14px) rotate(3.5deg); }
  55% { transform: translateX(-9px) rotate(-2deg); }
  75% { transform: translateX(9px) rotate(2deg); }
  90% { transform: translateX(-4px) rotate(-1deg); }
}

/* Popup Flutuante para Resposta Incorreta */
.floating-score-popup.wrong-popup {
  color: #ff1744;
  text-shadow: 0 0 16px rgba(255, 23, 68, 0.95), 0 2px 4px #000;
  font-size: 15px;
  font-weight: 900;
  background: rgba(35, 5, 10, 0.88);
  border: 1.5px solid #ff1744;
  border-radius: 20px;
  padding: 4px 14px;
  box-shadow: 0 4px 20px rgba(255, 23, 68, 0.5);
}

/* ============================================================
   GRAVADOR DE VÍDEO & BOTÃO REC
   ============================================================ */
.rec-btn {
  width: auto !important;
  border-radius: 16px !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  background: rgba(255, 51, 68, 0.15) !important;
  border: 1px solid rgba(255, 51, 68, 0.5) !important;
  color: #ff3344 !important;
}

.rec-btn.recording {
  background: #ff3344 !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(255, 51, 68, 0.8) !important;
  animation: rec-pulse 1s infinite alternate;
}

@keyframes rec-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.08); opacity: 0.8; }
}

/* ============================================================
   SELETOR DE IDIOMA NO CANTO SUPERIOR DIREITO
   ============================================================ */
.top-corner-lang {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 10px;
  top: auto;
  right: auto;
  z-index: 60;
}

.lang-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(20, 28, 46, 0.95);
  border: 1.5px solid rgba(0, 240, 255, 0.45);
  border-radius: 20px;
  padding: 6px 14px 6px 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 240, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.lang-select-wrapper:hover,
.lang-select-wrapper:focus-within {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.45);
}

.lang-globe-icon {
  font-size: 14px;
  margin-right: 6px;
  pointer-events: none;
}

.lang-select-box {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  padding-right: 16px;
  outline: none;
}

.lang-select-box option {
  background: #101626;
  color: #ffffff;
  font-weight: 700;
}

.lang-arrow-icon {
  position: absolute;
  right: 10px;
  font-size: 9px;
  color: var(--neon-cyan);
  pointer-events: none;
}

/* ============================================================
   SELETOR DE DIFICULDADE (FÁCIL / MÉDIO / HARDCORE)
   ============================================================ */
.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 800;
  margin-bottom: 8px;
  text-align: left;
  width: 100%;
}

.difficulty-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 16px;
}

.diff-option {
  background: #141c2e;
  border: 2px solid #23304c;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  text-align: left;
}

.diff-option input {
  display: none;
}

.diff-option:has(input:checked) {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
}

.diff-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.diff-title {
  font-size: 14px;
  font-weight: 800;
}

.diff-title.green { color: #00f59b; }
.diff-title.yellow { color: #ffca3a; }
.diff-title.red { color: #ff3344; }

.diff-desc {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ============================================================
   AÇÕES DO GAME OVER (JOGAR NOVAMENTE / MENU INICIAL)
   ============================================================ */
.gameover-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  margin-top: 18px;
}

#restart-btn {
  margin-top: 0;
}

.btn-secondary {
  width: 100%;
  background: #162035;
  color: #ffffff;
  border: 2px solid #334870;
  padding: 16px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
  font-family: 'Montserrat', 'Inter', system-ui, sans-serif;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.btn-secondary:hover {
  background: #202d4a;
  border-color: var(--neon-cyan);
  color: #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(1px);
  background: #1a253d;
}

/* ============================================================
   MODAL DE CARREGAMENTO DO JOGO (PROGRESSO INICIAL)
   ============================================================ */
.game-loading-card {
  background: #111827;
  border: 2px solid var(--neon-cyan);
  border-radius: 24px;
  padding: 24px 20px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 40px rgba(0, 240, 255, 0.35);
  animation: modal-fade-in 0.3s ease;
}

.game-loading-icon {
  font-size: 38px;
  margin-bottom: 8px;
  animation: pulse-icon 1s infinite alternate;
}

@keyframes pulse-icon {
  0% { transform: scale(1); filter: drop-shadow(0 0 5px var(--neon-cyan)); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 18px var(--neon-cyan)); }
}

.game-loading-title {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.game-loading-status {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  min-height: 18px;
  text-align: center;
}

.game-progress-track {
  width: 100%;
  height: 10px;
  background: #1f293d;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 6px;
  position: relative;
}

.game-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f0ff, #00f59b);
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 245, 155, 0.8);
  transition: width 0.15s ease-out;
}

.game-progress-percent {
  font-size: 13px;
  font-weight: 800;
  color: var(--neon-cyan);
  margin-bottom: 12px;
}

.game-loading-warnings {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  text-align: left;
}

.loading-warning-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.warning-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.warning-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.35;
}

.loading-start-btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.8px;
  border-radius: 14px;
  background: linear-gradient(135deg, #00f0ff, #0077ff);
  color: #0b0f19;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-start-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.7);
  box-shadow: none;
  transform: none !important;
}

.loading-start-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 240, 255, 0.6);
  filter: brightness(1.1);
}

.loading-start-btn:not(:disabled):active {
  transform: translateY(0);
}

/* ============================================================
   BOTÃO DE COMPARTILHAMENTO E MODAL DE PRINT
   ============================================================ */
.btn-share {
  width: 100%;
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  color: #ffffff;
  border: none;
  padding: 16px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 900;
  font-family: 'Montserrat', system-ui, sans-serif;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(253, 29, 29, 0.45);
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(253, 29, 29, 0.65);
}

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

.share-card {
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  background: #111728;
  border: 2px solid #23304c;
  border-radius: 24px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.15);
  box-sizing: border-box;
}

.share-modal-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #00f0ff, #00f59b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.share-modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

.share-preview-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
}

.share-preview-img {
  width: auto;
  max-width: 250px;
  height: auto;
  max-height: 48vh;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  border-radius: 18px;
  border: 2px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.2);
  background: #070b14;
}

.share-watermark-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(0, 240, 255, 0.5);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  color: #00f0ff;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
  width: 100%;
  box-sizing: border-box;
}

.share-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
