/* Общие стили для страницы */
body {
  margin: 0;
  padding: 0;
  background-color: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: sans-serif;

}

/* Контейнер для игры (canvas) */
.game-container {
  display: block;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* Адаптивный canvas: сохраняем пропорции NES (256x240) */
#nes-canvas {
  width: 100%;
  aspect-ratio: 256 / 240;
  display: block;
  margin: 0 auto;
  max-width: 512px;
  image-rendering: pixelated;
}

@font-face {
  font-family: '8bitWonder';
  src: url('/static/8bitwonderrusbylyajka_nominal.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

#emu-screen {
  width: 98%;
  max-width: 512px;
  max-height: 512px;
  aspect-ratio: 256 / 240;
  image-rendering: pixelated;
  border: 2px solid rgba(255, 255, 255, 0.34);
  background: #000;
  margin: 0 auto;
  display: flex;
  position: relative; /* задаем относительное позиционирование для потомков */
  overflow: hidden;   /* скрываем контент, выходящий за пределы */
}

/* Стили для списка игр */
#games-list {
  list-style: none;
  padding: 10px;
  margin: 0;
  text-align: left;
  color: #808080;
  overflow-y: auto;
  box-sizing: border-box;
  font-family: '8bitWonder', 'sans-serif';
}

/* Стили для элементов списка */
#games-list li {
  padding: 10px;
  border-bottom: 1px solid rgba(0, 78, 134, 0.55);
  cursor: pointer;
}

/* Стили для выделенного элемента */
#games-list li.selected {
  background-color: rgba(0, 78, 134, 0.55);
  font-weight: bold;
  color: #f8f8f8;
}