:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #4E4E4E;
  --accent: #00a2ff;
  --msdos-bg: #000080;
  --msdos-fg: #ffffff;
  --msdos-border: #c0c0c0;
  --msdos-shadow: #808080;
  --pixel-font: 'Press Start 2P', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: #000000;
  font-family: var(--pixel-font);
}

#app { 
  position: relative; 
  width: 100vw; 
  height: 100vh; 
  overflow: hidden; 
  display: flex;
  align-items: center;
  justify-content: center;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  image-rendering: pixelated;
  transition: all 0.3s ease;
  position: absolute;
  top: 0;
  left: 0;
}

/* Desktop: centralizar e limitar tamanho */
@media (min-width: 769px) {
  #game {
    position: relative;
    margin: 0;
  }
}

/* HUD Principal - Sempre atrás dos modais */
#hud {
  position: absolute;
  top: 16px;
  right: 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 5;
}

#hud .score {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: bold;
  color: var(--fg);
}

.mute-btn {
  width: 32px;
  height: 32px;
  border: 2px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border-radius: 0;
  box-shadow: 2px 2px 0 0 var(--fg);
  transition: all 0.1s ease;
  font-family: var(--pixel-font);
}

.mute-btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--fg);
}

.mute-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.mute-btn.muted {
  background: var(--bg);
  color: var(--fg);
}

/* Media queries para responsividade do HUD */
@media (max-width: 480px) {
  #players-info {
    position: absolute;
    top: clamp(12px, 2vh, 24px);
    left: clamp(4px, 0vw, 32px);
    user-select: none;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.5vh, 12px);
    z-index: 0;
  }
  
  .player-info {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.5vw, 12px);
    font-size: clamp(10px, 1.5vw, 18px);
    line-height: 1.2;
  }
  
  .player-label {
    color: #000000;
    font-weight: bold;
    white-space: nowrap;
  }
  
  #hud #highScoreLabel {
    color: #000000;
    margin-right: clamp(6px, 1.5vw, 12px);
  }
  
  #hud #highScore {
    color: #000000;
    margin-right: clamp(12px, 3vw, 24px);
  }
  
  #hud {
    top: clamp(6px, 1.2vh, 14px);
    right: clamp(10px, 2vw, 18px);
    gap: clamp(4px, 1.2vh, 10px);
  }
  
  .mute-btn {
    width: clamp(28px, 6vw, 44px);
    height: clamp(28px, 6vw, 44px);
    font-size: clamp(12px, 3vw, 18px);
  }
}

/* Dispositivos muito pequenos (smartphones em modo retrato) */
@media (max-width: 360px) {
  #players-info {
    top: clamp(4px, 1vh, 12px);
    left: clamp(8px, 1.5vw, 16px);
    gap: clamp(2px, 0.6vh, 5px);
  }
  
  .player-info {
    font-size: clamp(6px, 1.5vw, 10px);
    gap: clamp(2px, 0.6vw, 5px);
  }
  
  #hud {
    top: clamp(4px, 1vh, 12px);
    right: clamp(8px, 1.5vw, 16px);
    gap: clamp(3px, 1vh, 8px);
  }
  
  #hud .score {
    font-size: clamp(8px, 2vw, 12px);
  }
  
  .mute-btn {
    width: clamp(24px, 5vw, 40px);
    height: clamp(24px, 5vw, 40px);
    font-size: clamp(10px, 2.5vw, 16px);
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  #players-info {
    top: clamp(10px, 1.8vh, 20px);
    left: clamp(1px, 2.8vw, 24px);
  }
  
  .player-info {
    font-size: clamp(9px, 1.5vw, 16px);
  }
  
  #hud {
    top: clamp(10px, 1.8vh, 20px);
    right: clamp(14px, 2.8vw, 24px);
  }
  
  #hud .score {
    font-size: clamp(11px, 2.8vw, 18px);
  }
}

@media (min-width: 1200px) {
  #players-info {
    top: clamp(18px, 2.5vh, 28px);
    left: clamp(20px, 3.5vw, 36px);
  }
  
  .player-info {
    font-size: clamp(12px, 1.5vw, 20px);
  }
  
  #hud {
    top: clamp(18px, 2.5vh, 28px);
    right: clamp(20px, 3.5vw, 36px);
  }
  
  #hud .score {
    font-size: clamp(14px, 3.2vw, 22px);
  }
}

/* Status do Backend */
.status {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8em;
  font-weight: bold;
  margin-left: 10px;
}

.status.online {
  background: #d4edda;
  color: #155724;
}

.status.offline {
  background: #f8d7da;
  color: #721c24;
}

#hud {
  position: absolute;
  top: clamp(12px, 2vh, 24px);
  right: clamp(16px, 3vw, 32px);
  user-select: none;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: clamp(8px, 2vh, 16px);
}
#hud .score { 
  font-variant-numeric: tabular-nums; 
  letter-spacing: clamp(0.5px, 0.2vw, 2px);
  font-size: clamp(9px, 1.5vw, 18px);
}
#hud #highScoreLabel { 
  color: black; 
  margin-right: clamp(6px, 1.5vw, 12px); 
}
#hud #highScore { 
  color: black; 
  margin-right: clamp(12px, 3vw, 24px); 
}

#players-info {
  position: absolute;
  top: clamp(8px, 0vh, 24px);
  left: clamp(8px, -2vw, 32px);
  user-select: none;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.5vh, 12px);
  z-index: 0;
}

.player-info {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.5vw, 12px);
  font-size: clamp(9px, 0.5vw, 18px);
  line-height: 1.2;
}

.player-label {
  color: black;
  font-weight: bold;
  white-space: nowrap;
}

.player-name {
  color: black;
  font-weight: bold;
  white-space: nowrap;
}

.mute-btn {
  position: relative;
  width: clamp(36px, 8vw, 56px);
  height: clamp(36px, 8vw, 56px);
  padding: 0;
  font-size: clamp(16px, 4vw, 24px);
  border-radius: 0;
  background: var(--bg);
  color: var(--fg);
  border: clamp(1px, 0.3vw, 3px) solid var(--fg);
  cursor: pointer;
  transition: all 0.1s ease;
  box-shadow: clamp(1px, 0.3vw, 3px) clamp(1px, 0.3vw, 3px) 0 0 var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-family: var(--pixel-font);
  font-weight: bold;
}

.mute-btn:hover {
  background: var(--fg);
  color: var(--bg);
  transform: translate(clamp(0.5px, 0.2vw, 2px), clamp(0.5px, 0.2vw, 2px));
  box-shadow: clamp(0.5px, 0.2vw, 2px) clamp(0.5px, 0.2vw, 2px) 0 0 var(--fg);
}

.mute-btn:active {
  transform: translate(clamp(1px, 0.4vw, 4px), clamp(1px, 0.4vw, 4px));
  box-shadow: none;
}

.mute-btn.muted {
  background: var(--muted);
  border-color: var(--muted);
  box-shadow: clamp(1px, 0.3vw, 3px) clamp(1px, 0.3vw, 3px) 0 0 var(--muted);
}

.mute-btn.muted:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  box-shadow: clamp(1px, 0.3vw, 3px) clamp(1px, 0.3vw, 3px) 0 0 var(--fg);
}





#overlay, #gameover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.7);
}

#overlay.hidden, #gameover.hidden { display: none; }
#overlay.show { display: grid; }

.panel {
  background: var(--bg);
  color: var(--fg);
  border: 2px solid var(--fg);
  padding: 20px;
  border-radius: 0;
  width: min(560px, 92vw);
  box-shadow: 4px 4px 0 0 var(--fg);
  font-family: var(--pixel-font);
  font-size: 14px;
  line-height: 1.4;
  position: relative;
}

/* Barra de título estilo MS-DOS */
.panel::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 20px;
  background: var(--fg);
  z-index: 1;
}

/* Botões de janela */
.window-controls {
  position: absolute;
  top: 2px;
  right: 4px;
  display: flex;
  gap: 2px;
  z-index: 2;
}

.window-btn {
  width: 12px;
  height: 12px;
  border: 1px solid var(--bg);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: bold;
  color: var(--fg);
  transition: all 0.1s ease;
  font-family: var(--pixel-font);
}

.window-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.window-btn.close {
  background: #ff0000;
  color: white;
  border-color: #cc0000;
}

.window-btn.close:hover {
  background: #cc0000;
  color: white;
}

/* Ajustar padding do painel para acomodar a barra de título */
.panel {
  padding-top: 30px;
}

.panel h1, .panel h2 { 
  margin: 0 0 12px 0; 
  color: var(--fg);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 8px;
}

.panel .subtitle { 
  margin: 0 0 16px 0; 
  color: var(--fg); 
  font-style: italic;
}

.panel .instructions { 
  color: var(--fg); 
  margin-bottom: 12px; 
}

/* Estilos para o formulário */
.form-container {
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.form-row label {
  font-weight: bold;
  margin-bottom: 6px;
  color: var(--fg);
  font-family: var(--pixel-font);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}

.form-row input {
  padding: 10px 12px;
  border: 2px solid var(--fg);
  border-radius: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--pixel-font);
  font-size: 14px;
  font-weight: bold;
  transition: all 0.1s ease;
  box-shadow: 2px 2px 0 0 var(--fg);
}

.form-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 2px 2px 0 0 var(--accent);
}

.form-row input::placeholder {
  color: var(--muted);
  font-style: italic;
}

/* Explicação do jogo */
.game-explanation {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg);
  border: 2px solid var(--fg);
  border-radius: 0;
  box-shadow: 2px 2px 0 0 var(--fg);
}

.game-explanation p {
  margin: 0 0 8px 0;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.4;
}

.game-explanation p:last-child {
  margin-bottom: 0;
}

.game-explanation strong {
  color: var(--fg);
  font-weight: bold;
}

.panel .actions { 
  display: flex; 
  gap: 12px; 
  justify-content: center; 
  margin-top: 20px;
}

button {
  appearance: none;
  background: var(--fg);
  color: var(--bg);
  border: 2px solid var(--fg);
  padding: 10px 16px;
  border-radius: 0;
  font-weight: bold;
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 2px 2px 0 0 var(--fg);
  transition: all 0.1s ease;
}

button:hover { 
  background: var(--bg);
  color: var(--fg);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--fg);
}

button:active { 
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Tema invertido (aplicado via classe .dark no body) */
body.dark { --bg: #4E4E4E; --fg: #ffffff; --muted: #4E4E4E; }

/* Debug */
#debug { position: absolute; left: 16px; bottom: 16px; z-index: 5; }
#debugBtn { 
  padding: 8px 12px; 
  font-size: 14px; 
  background: var(--accent);
  color: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 0;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.1s ease;
  box-shadow: 2px 2px 0 0 var(--accent);
  font-family: var(--pixel-font);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#debugBtn:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--accent);
  background: var(--bg);
  color: var(--accent);
}

#debugBtn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

#debugPanel {
  margin-top: 8px;
  display: none;
  background: var(--bg);
  color: var(--fg);
  border: 2px solid var(--fg);
  border-radius: 0;
  padding: 16px;
  padding-top: 30px;
  min-width: 300px;
  max-width: 350px;
  box-shadow: 4px 4px 0 0 var(--fg);
  font-size: 13px;
  line-height: 1.4;
  max-height: 80vh;
  overflow-y: auto;
  font-family: var(--pixel-font);
  position: relative;
}

/* Barra de título para o debug panel */
#debugPanel::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 20px;
  background: var(--fg);
  z-index: 1;
}

/* Ajustar posição dos botões de janela no debug */
#debugPanel .window-controls {
  top: 2px;
  right: 4px;
  z-index: 2;
}

#debugPanel.show { display: block; }

.debug-row { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  margin-bottom: 10px; 
}

.debug-row label { 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  font-weight: 600;
  min-width: 60px;
}

.debug-row input[type="number"] {
  width: 70px;
  padding: 5px 7px;
  border: 2px solid var(--fg);
  border-radius: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 12px;
  text-align: center;
  transition: all 0.1s ease;
  font-family: var(--pixel-font);
  font-weight: bold;
}

.debug-row input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 2px 2px 0 0 var(--accent);
}

.debug-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.debug-row select {
  padding: 4px 6px;
  border: 2px solid var(--fg);
  border-radius: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.1s ease;
  font-family: var(--pixel-font);
  font-weight: bold;
}

.debug-row select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 2px 2px 0 0 var(--accent);
}

.debug-row button {
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 0;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.1s ease;
  font-family: var(--pixel-font);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.debug-row button:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--fg);
}

.debug-row strong {
  color: var(--fg);
  font-weight: bold;
  font-size: 12px;
}

.debug-row code {
  background: var(--fg);
  color: var(--bg);
  padding: 2px 6px;
  border-radius: 0;
  font-family: var(--pixel-font);
  font-size: 11px;
  font-weight: bold;
  border: 1px solid var(--fg);
}

.debug-section {
  margin-bottom: 14px;
  padding: 14px;
  background: var(--bg);
  color: var(--fg);
  border-radius: 0;
  border: 2px solid var(--fg);
}

.debug-section h4 {
  margin: 0 0 8px 0;
  color: var(--fg);
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.debug-section .debug-row {
  margin-bottom: 6px;
}

.debug-section .debug-row:last-child {
  margin-bottom: 0;
}

.debug-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--fg);
}

.debug-actions button {
  flex: 1;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 0;
  transition: all 0.1s ease;
  font-family: var(--pixel-font);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.debug-actions button:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--fg);
}

.debug-hint { 
  color: var(--bg); 
  font-size: 11px; 
  text-align: center;
  margin-top: 12px;
  padding: 8px;
  background: var(--fg);
  border-radius: 0;
  border: 2px solid var(--fg);
  font-family: var(--pixel-font);
  font-weight: bold;
}

/* Estilos para o Debug com Abas */
.debug-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--fg);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 4px;
}

.debug-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1;
  min-width: 60px;
  padding: 8px 12px;
  background: var(--bg);
  color: var(--fg);
  border: 2px solid var(--fg);
  border-bottom: none;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.1s ease;
  white-space: nowrap;
  position: relative;
  font-family: var(--pixel-font);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tab-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.tab-btn.active {
  background: var(--accent);
  color: var(--bg);
  font-weight: bold;
  box-shadow: 2px 2px 0 0 var(--accent);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.tab-content {
  display: none;
  animation: fadeIn 0.2s ease;
  padding: 8px 0;
}

.tab-content.active {
  display: block;
}

.tab-content h4 {
  margin: 0 0 12px 0;
  color: var(--fg);
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Melhorias para Mobile */
@media (max-width: 768px) {
  .panel {
    padding: 20px 16px;
    width: min(480px, 94vw);
  }
  
  .form-row {
    margin-bottom: 12px;
  }
  
  .form-row label {
    font-size: 11px;
    margin-bottom: 4px;
  }
  
  .form-row input {
    padding: 8px 10px;
    font-size: 13px;
  }
  
  .game-explanation {
    padding: 12px;
    margin-bottom: 16px;
  }
  
  .game-explanation p {
    font-size: 12px;
    margin-bottom: 6px;
  }
  
  #hud {
    top: 12px;
    right: 16px;
    font-size: 14px;
    gap: 10px;
  }
  
  .mute-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-width: 2px;
  }
  
  #debug {
    left: 12px;
    bottom: 12px;
  }
  
  #debugBtn {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  #debugPanel {
    min-width: 280px;
    max-width: 320px;
    padding: 12px;
    font-size: 12px;
  }
  
  /* Botões responsivos para mobile */
  .btn-primary, .btn-secondary, #startBtn, #restartBtn, #newPlayerBtn {
    padding: 12px 20px;
    font-size: 13px;
    min-width: 160px;
  }
  
  .btn-music-center {
    padding: 15px 20px;
    font-size: 14px;
    min-width: 180px;
  }
  
  /* Botões gerais responsivos para mobile */
  button {
    padding: 8px 14px;
    font-size: 13px;
  }
  
  #debugBtn {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .debug-section {
    margin-bottom: 12px;
    padding: 8px;
  }
  
  .debug-section h4 {
    font-size: 12px;
    margin-bottom: 6px;
    gap: 5px;
  }
  
  .debug-section h5 {
    font-size: 11px;
    margin-bottom: 4px;
  }
  
  .debug-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 6px;
  }
  
  .debug-row label {
    font-size: 11px;
    min-width: 55px;
  }
  
  .debug-row input[type="number"] {
    width: 100%;
    max-width: 80px;
    padding: 3px 5px;
    font-size: 11px;
  }
  
  .debug-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
  
  .debug-row select {
    padding: 3px 5px;
    font-size: 11px;
  }
  
  .debug-row button {
    padding: 4px 8px;
    font-size: 10px;
  }
  
  .debug-row strong {
    font-size: 11px;
  }
  
  .debug-row code {
    font-size: 10px;
    padding: 2px 5px;
  }
  
  .debug-actions {
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    padding-top: 14px;
  }
  
  .debug-actions button {
    width: 100%;
    padding: 8px 10px;
    font-size: 12px;
  }
  
  .debug-hint {
    font-size: 10px;
    margin-top: 10px;
    padding: 8px;
  }

  .debug-tabs {
    gap: 1px;
    margin-bottom: 12px;
    padding: 0 2px;
  }
  
  .tab-btn {
    min-width: 50px;
    padding: 6px 8px;
    font-size: 12px;
  }
  
  .debug-row {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .input-group {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .input-group label {
    min-width: 40px;
    font-size: 12px;
  }
  
  .input-group input {
    flex: 1;
    min-width: 0;
  }
  
  .debug-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .debug-actions button {
    width: 100%;
  }
  
  .reset-btn {
    align-self: flex-end;
    margin-top: 8px;
  }
  
  .tab-content {
    padding: 4px 0;
  }
  
  .tab-content h4 {
    font-size: 14px;
    margin-bottom: 8px;
  }
}

/* Responsividade para dispositivos muito pequenos */
@media (max-width: 480px) {
  .panel {
    padding: 16px 12px;
    width: min(400px, 96vw);
    padding-top: 26px;
  }
  
  .panel h1, .panel h2 {
    font-size: 18px;
    margin-bottom: 10px;
    padding-bottom: 6px;
  }
  
  .form-row {
    margin-bottom: 10px;
  }
  
  .form-row label {
    font-size: 10px;
    margin-bottom: 3px;
  }
  
  .form-row input {
    padding: 6px 8px;
    font-size: 12px;
  }
  
  .game-explanation {
    padding: 10px;
    margin-bottom: 12px;
  }
  
  .game-explanation p {
    font-size: 11px;
    margin-bottom: 4px;
  }
  
  #hud {
    top: 8px;
    right: 12px;
    font-size: 12px;
    gap: 8px;
    z-index: 0;
  }
  
  .mute-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  #debug {
    left: 8px;
    bottom: 8px;
  }
  
  #debugBtn {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  #debugPanel {
    min-width: 260px;
    max-width: 300px;
    padding: 10px;
    font-size: 11px;
  }
  
  /* Botões responsivos para dispositivos muito pequenos */
  .btn-primary, .btn-secondary, #startBtn, #restartBtn, #newPlayerBtn {
    padding: 10px 16px;
    font-size: 12px;
    min-width: 140px;
  }
  
  .btn-music-center {
    padding: 12px 16px;
    font-size: 13px;
    min-width: 160px;
  }
  
  /* Botões gerais responsivos para dispositivos muito pequenos */
  button {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  #debugBtn {
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* Classes de botões */
.btn-primary {
  background: var(--accent) !important;
  color: var(--bg) !important;
  border: 2px solid var(--accent) !important;
}

.btn-secondary {
  background: var(--bg) !important;
  color: var(--fg) !important;
  border: 2px solid var(--fg) !important;
}

.reset-btn {
  background: var(--bg);
  color: var(--fg);
  border: 2px solid var(--fg);
  padding: 4px 12px;
  border-radius: 0;
  cursor: pointer;
  font-size: 12px;
  font-family: var(--pixel-font);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reset-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

/* Melhorias visuais para as abas */
.debug-tabs .tab-btn:first-child {
  margin-left: 0;
}

.debug-tabs .tab-btn:last-child {
  margin-right: 0;
}

/* Indicador de aba ativa mais visível */
.tab-btn.active {
  transform: translateY(-1px);
}

/* Transição suave entre abas */
.tab-content {
  transition: opacity 0.2s ease;
}

/* Ajustes para inputs em grupos */
.input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.input-group:last-child {
  margin-bottom: 0;
}

/* Notificações do jogo */
.game-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  font-family: var(--pixel-font);
}

.game-notification-success {
  background: #2ed573;
  color: white;
}

.game-notification-error {
  background: #ff4757;
  color: white;
}

.game-notification-warning {
  background: #ffa502;
  color: white;
}

.game-notification-info {
  background: #3742fa;
  color: white;
}

/* Ranking Global - Estilo Monocromático */
.leaderboard h3 {
  margin: 0 0 15px 0;
  color: var(--fg);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  border-bottom: 2px solid var(--fg);
  padding-bottom: 10px;
  font-family: var(--pixel-font);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tabela de Ranking (Local e Global) */
.lb, .database-ranking {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
  font-family: var(--pixel-font);
  border: 2px solid var(--fg);
  box-shadow: 2px 2px 0 0 var(--fg);
}

.lb th, .database-ranking th {
  background: var(--fg);
  color: var(--bg);
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  border: 1px solid var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lb td, .database-ranking td {
  padding: 10px 8px;
  border: 1px solid var(--fg);
  color: var(--fg);
  background: var(--bg);
}

.lb tr:nth-child(even) td, .database-ranking tr:nth-child(even) td {
  background: var(--bg);
}

.lb tr:hover td, .database-ranking tr:hover td {
  background: var(--muted);
  color: var(--bg);
}

/* Posições especiais - Estilo monocromático */
.lb tr:nth-child(1) td:first-child, .database-ranking tr:nth-child(1) td:first-child {
  background: var(--fg);
  color: var(--bg);
  font-weight: bold;
  border: 2px solid var(--fg);
}

.lb tr:nth-child(2) td:first-child, .database-ranking tr:nth-child(2) td:first-child {
  background: var(--muted);
  color: var(--bg);
  font-weight: bold;
  border: 2px solid var(--fg);
}

.lb tr:nth-child(3) td:first-child, .database-ranking tr:nth-child(3) td:first-child {
  background: var(--muted);
  color: var(--bg);
  font-weight: bold;
  border: 2px solid var(--fg);
}

/* Jogador atual destacado */
.lb tr.current-player td {
  background: var(--muted) !important;
  color: var(--bg) !important;
  font-weight: bold;
  border: 2px solid var(--muted);
  position: relative;
}

.lb tr.current-player:hover td {
  background: var(--accent) !important;
  color: var(--bg) !important;
  border: 2px solid var(--accent);
}

/* Indicador visual para o jogador atual no top 5 */

/* Linha especial do jogador atual (quando não está no top 10) */
.lb tr.special-player-row td {
  background: #1c1c1c !important;
  color: var(--bg) !important;
  font-weight: bold;
  border: 2px solid #1c1c1c;
  font-style: italic;
}

.lb tr.special-player-row:hover td {
  background: var(--muted) !important;
  color: var(--bg) !important;
  border: 2px solid var(--muted);
}



/* Seção de posição do jogador atual */
.current-player-info {
  background: var(--bg);
  border: 2px solid var(--fg);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 3px 3px 0 0 var(--fg);
  text-align: center;
}

.current-player-info h4 {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.current-player-info p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.4;
}

.current-player-info strong {
  color: var(--accent);
  font-weight: bold;
}

/* Responsividade para dispositivos móveis - Ranking */
@media (max-width: 768px) {
  .leaderboard h3 {
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }
  
  /* Estilos para teste de ranking */
  #rankingTestOutput {
    font-size: 12px;
  }
  
  #rankingTestOutput h5 {
    font-size: 14px;
  }
  
  #rankingTestOutput ul {
    font-size: 11px;
  }
  
  .current-player-info {
    padding: 12px;
    margin-bottom: 16px;
    border-width: 1px;
    box-shadow: 2px 2px 0 0 var(--fg);
  }
  
  .current-player-info h4 {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .current-player-info p {
    font-size: 13px;
    margin: 6px 0;
  }
  
  .lb, .database-ranking {
    font-size: 12px;
    margin-top: 8px;
    border-width: 1px;
    box-shadow: 1px 1px 0 0 var(--fg);
  }
  
  .lb th, .database-ranking th {
    padding: 8px 4px;
    font-size: 10px;
    letter-spacing: 0.3px;
  }
  
  .lb td, .database-ranking td {
    padding: 6px 4px;
    font-size: 11px;
  }
  
  /* Reduzir espaçamento entre colunas */
  .lb th:nth-child(1), .database-ranking th:nth-child(1),
  .lb td:nth-child(1), .database-ranking td:nth-child(1) {
    width: 15%;
    text-align: center;
  }
  
  .lb th:nth-child(2), .database-ranking th:nth-child(2),
  .lb td:nth-child(2), .database-ranking td:nth-child(2) {
    width: 50%;
  }
  
  .lb th:nth-child(3), .database-ranking th:nth-child(3),
  .lb td:nth-child(3), .database-ranking td:nth-child(3) {
    width: 35%;
    text-align: right;
  }
}

/* Bloqueio de orientação landscape */
@media screen and (orientation: landscape) and (max-width: 900px) {
  #orientationWarning {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  #game, #hud, #players-info {
    visibility: hidden;
  }
}

/* Responsividade para dispositivos muito pequenos */
@media (max-width: 480px) {
  .leaderboard h3 {
    font-size: 14px;
    margin-bottom: 10px;
    padding-bottom: 6px;
  }
  
  .current-player-info {
    padding: 10px;
    margin-bottom: 12px;
    border-width: 1px;
    box-shadow: 1px 1px 0 0 var(--fg);
  }
  
  .current-player-info h4 {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  .current-player-info p {
    font-size: 11px;
    margin: 4px 0;
  }
  
  .lb, .database-ranking {
    font-size: 10px;
    margin-top: 6px;
  }
  
  .lb th, .database-ranking th {
    padding: 6px 2px;
    font-size: 9px;
    letter-spacing: 0.2px;
  }
  
  .lb td, .database-ranking td {
    padding: 4px 2px;
    font-size: 9px;
  }
  
  /* Ajustar larguras das colunas para telas muito pequenas */
  .lb th:nth-child(1), .database-ranking th:nth-child(1),
  .lb td:nth-child(1), .database-ranking td:nth-child(1) {
    width: 12%;
  }
  
  .lb th:nth-child(2), .database-ranking th:nth-child(2),
  .lb td:nth-child(2), .database-ranking td:nth-child(2) {
    width: 53%;
  }
  
  .lb th:nth-child(3), .database-ranking th:nth-child(3),
  .lb td:nth-child(3), .database-ranking td:nth-child(3) {
    width: 35%;
  }
}

/* Tela de Game Over - Estilo Monocromático Pixel Art */
.score-celebration {
  text-align: center;
  margin-bottom: 20px;
}

.score-celebration h2 {
  color: var(--fg);
  font-size: 24px;
  font-weight: bold;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--pixel-font);
}

/* Layout em colunas para Game Over */
.game-over-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 20px;
}

.left-column {
  flex: 1;
  max-width: 300px;
}

.center-column {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.final-score {
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bg);
  border: 3px solid var(--fg);
  box-shadow: 4px 4px 0 0 var(--fg);
  color: var(--fg);
}

.score-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--pixel-font);
}

.score-value {
  display: block;
  font-size: 32px;
  font-weight: bold;
  font-family: var(--pixel-font);
  color: var(--fg);
}

.game-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: var(--bg);
  border: 2px solid var(--fg);
  box-shadow: 2px 2px 0 0 var(--fg);
  color: var(--fg);
}

.stat-value {
  font-size: 11px;
  font-weight: bold;
  color: var(--fg);
  margin-bottom: 3px;
  font-family: var(--pixel-font);
}

.stat-label {
  font-size: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  font-family: var(--pixel-font);
  text-align: center;
}

/* Botão de música centralizado */
.btn-music-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 30px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  border: 3px solid var(--fg);
  font-weight: bold;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 4px 4px 0 0 var(--fg);
  transition: all 0.1s ease;
  cursor: pointer;
  font-family: var(--pixel-font);
  min-width: 200px;
  text-align: center;
}

.btn-music-center:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 0 var(--fg);
}

.btn-music-center:active {
  transform: translateY(0);
  box-shadow: 2px 2px 0 0 var(--fg);
}

/* Melhorias para mobile */
@media (max-width: 768px) {
  .score-celebration h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .game-over-layout {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
  
  .left-column {
    max-width: 100%;
  }
  
  .center-column {
    min-height: auto;
  }
  
  .final-score {
    padding: 12px;
    margin-bottom: 15px;
  }
  
  .score-value {
    font-size: 28px;
  }
  
  .game-stats {
    gap: 8px;
  }
  
  .stat {
    padding: 10px 6px;
  }
  
  .stat-value {
    font-size: 10px;
  }
  
  .stat-label {
    font-size: 8px;
  }
  
  .btn-music-center {
    padding: 15px 20px;
    font-size: 14px;
    min-width: 180px;
  }
}

/* Estilos para a tabela de estatísticas do jogo */
.game-stats-table {
  margin: 20px 0;
  background: var(--bg);
  border: 2px solid var(--fg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 4px 4px 0 0 var(--fg);
}

/* Estilos para os mini cards de prêmios */
.game-stats-cards {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 20px 0;
  width: 100%;
}

.stat-card {
  flex: 1;
  min-width: 0; /* Permite que o card encolha abaixo da sua largura de conteúdo */
}

.stat-card {
  background: var(--bg);
  border: 2px solid var(--fg);
  padding: 8px 4px;
  text-align: center;
  box-shadow: 2px 2px 0 0 var(--fg);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--fg);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
}

.stat-card img {
  width: clamp(24px, 6vw, 48px);
  height: clamp(24px, 6vw, 48px);
  margin-bottom: 4px;
  object-fit: contain;
}

.stat-value {
  font-size: clamp(8px, 1.5vw, 12px);
  font-weight: bold;
  color: var(--fg);
  margin-bottom: 2px;
  font-family: var(--pixel-font);
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-label {
  font-size: clamp(6px, 1.5vw, 10px);
  color: var(--fg);
  font-family: var(--pixel-font);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Cores específicas para cada tipo de card */
.score-card::before { background: #ffd700; }
.duration-card::before { background: #00a2ff; }
.obstacles-card::before { background: #ff6b6b; }
.items-card::before { background: #51cf66; }

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--pixel-font);
}

.stats-table th {
  background: var(--fg);
  color: var(--bg);
  padding: 12px 8px;
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  border-bottom: 2px solid var(--fg);
}

.stats-table td {
  padding: 12px 8px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid var(--muted);
}

.stats-table tbody tr:last-child td {
  border-bottom: none;
}

.stats-table th:first-child,
.stats-table td:first-child {
  text-align: left;
  padding-left: 16px;
}

.stats-table th:last-child,
.stats-table td:last-child {
  text-align: right;
  padding-right: 16px;
}

/* Seção PRE SAVE BUTTON */
.pre-save-section {
  margin: 20px 0;
  padding: 15px;
  background: var(--muted);
  border: 2px solid var(--fg);
  border-radius: 6px;
  text-align: center;
}

.pre-save-section h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
  .game-stats-table {
    margin: 15px 0;
  }
  
  .stats-table th,
  .stats-table td {
    padding: 8px 4px;
    font-size: 11px;
  }
  
  .stats-table th {
    font-size: 10px;
  }
  
  .pre-save-section {
    margin: 15px 0;
    padding: 12px;
  }
  
  .pre-save-section h3 {
    font-size: 14px;
  }
  
  /* Responsividade para os mini cards */
  .game-stats-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
  }
  
  .stat-card {
    padding: 12px 8px;
  }
  
  .stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
  }
  
  .stat-value {
    font-size: 14px;
    margin-bottom: 3px;
  }
  
  .stat-label {
    font-size: 10px;
  }
}

/* Responsividade para dispositivos muito pequenos - Estatísticas e Pré-save */
@media (max-width: 480px) {
  .game-stats-table {
    margin: 12px 0;
  }
  
  .stats-table th,
  .stats-table td {
    padding: 6px 2px;
    font-size: 10px;
  }
  
  .stats-table th {
    font-size: 9px;
  }
  
  .pre-save-section {
    margin: 12px 0;
    padding: 10px;
  }
  
  .pre-save-section h3 {
    font-size: 12px;
  }
  
  /* Responsividade para os mini cards em telas muito pequenas */
  .game-stats-cards {
    grid-template-columns: repeat(1, 1fr);
    gap: 8px;
    margin: 12px 0;
  }
  
  .stat-card {
    padding: 10px 6px;
  }
  
  .stat-icon {
    font-size: 28px;
    margin-bottom: 6px;
  }
  
  .stat-value {
    font-size: 10px;
    margin-bottom: 2px;
  }
  
  .stat-label {
    font-size: 8px;
    text-wrap-mode: wrap;

  }
}

/* Botão do Regulamento - Estilo MS-DOS */
.btn-regulamento {
  background: var(--fg);
  color: var(--bg);
  border: 2px solid var(--fg);
  padding: 12px 20px;
  font-family: var(--pixel-font);
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 0;
  box-shadow: 2px 2px 0 0 var(--fg);
  transition: all 0.1s ease;
  margin-top: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.btn-regulamento:hover {
  background: var(--bg);
  color: var(--fg);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--fg);
}

.btn-regulamento:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Modal do Regulamento - Estilo MS-DOS */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg);
  color: var(--fg);
  border: 2px solid var(--fg);
  border-radius: 0;
  box-shadow: 4px 4px 0 0 var(--fg);
  max-width: 90%;
  max-height: 90%;
  overflow: hidden;
  position: relative;
  font-family: var(--pixel-font);
  font-size: 14px;
  line-height: 1.4;
  animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Barra de título estilo MS-DOS */
.modal-content::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 20px;
  background: var(--fg);
  z-index: 1;
}

.modal-header {
  background: var(--fg);
  color: var(--bg);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--fg);
  position: relative;
  z-index: 2;
  margin-top: 18px;
}

.modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-close {
  background: #ff0000;
  color: white;
  border: 1px solid #cc0000;
  font-size: 16px;
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
  font-weight: bold;
  font-family: var(--pixel-font);
  box-shadow: 2px 2px 0 0 #cc0000;
}

.modal-close:hover {
  background: #cc0000;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 #cc0000;
}

.modal-close:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.modal-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--bg);
  color: var(--fg);
}

.regulamento-section {
  margin-bottom: 20px;
  background: var(--bg);
  padding: 16px;
  border: 2px solid var(--fg);
  border-radius: 0;
  box-shadow: 2px 2px 0 0 var(--fg);
}

.regulamento-section h3 {
  color: var(--fg);
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: bold;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.regulamento-section ul {
  margin: 0;
  padding-left: 20px;
}

.regulamento-section li {
  margin-bottom: 8px;
  line-height: 1.4;
  font-size: 13px;
  color: var(--fg);
}

.regulamento-section strong {
  color: var(--fg);
  font-weight: bold;
}

/* Responsividade do Modal MS-DOS */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95%;
    max-height: 95%;
    margin: 10px;
    font-size: 13px;
  }
  
  .modal-header {
    padding: 15px;
    margin-top: 18px;
  }
  
  .modal-header h2 {
    font-size: 14px;
  }
  
  .modal-body {
    padding: 15px;
    max-height: 65vh;
  }
  
  .regulamento-section {
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .regulamento-section h3 {
    font-size: 13px;
  }
  
  .regulamento-section li {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    max-width: 98%;
    max-height: 98%;
    margin: 5px;
    font-size: 12px;
  }
  
  .modal-header {
    padding: 12px;
    margin-top: 18px;
  }
  
  .modal-header h2 {
    font-size: 12px;
  }
  
  .modal-body {
    padding: 12px;
    max-height: 60vh;
  }
  
  .regulamento-section {
    padding: 12px;
    margin-bottom: 15px;
  }
  
  .regulamento-section h3 {
    font-size: 12px;
  }
  
  .regulamento-section li {
    font-size: 11px;
  }
  
  .btn-regulamento {
    font-size: 11px;
    padding: 10px 16px;
    margin-top: 12px;
  }
}

/* Scrollbar personalizada para o modal MS-DOS */
.modal-body::-webkit-scrollbar {
  width: 12px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--bg);
  border: 1px solid var(--fg);
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--fg);
  border: 1px solid var(--bg);
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Estados de foco para acessibilidade */
.btn-regulamento:focus,
.modal-close:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Aviso de Segurança */
.security-warning {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ff3b4e;
  padding: 20px;
  border-radius: 0;
  text-align: center;
  font-family: var(--pixel-font);
  color: white;
  z-index: 10000;
  width: 80%;
  max-width: 600px;
  border: 2px solid white;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
  animation: warningPulse 2s infinite;
}

.security-warning h2 {
  font-size: 24px;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.security-warning p {
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 15px 0;
}

.security-warning .warning-icon {
  font-size: 32px;
  margin-bottom: 15px;
}

@keyframes warningPulse {
  0% { transform: translate(-50%, -50%) scale(0.98); }
  50% { transform: translate(-50%, -50%) scale(1.02); }
  100% { transform: translate(-50%, -50%) scale(0.98); }
}

@media (max-width: 768px) {
  .security-warning {
    width: 90%;
    padding: 15px;
  }
  
  .security-warning h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .security-warning p {
    font-size: 14px;
  }
  
  .security-warning .warning-icon {
    font-size: 28px;
  }
}

/* Animações de entrada e saída MS-DOS */
.modal.fade-out {
  opacity: 0;
  visibility: hidden;
}

.modal-content.fade-out {
  animation: modalSlideOut 0.2s ease;
}

@keyframes modalSlideOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-20px);
    opacity: 0;
  }
}

