:root { color-scheme: light dark; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.top {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(128,128,128,.3);
}

.title { font-weight: 700; font-size: 18px; }
.subtitle { opacity: .7; font-size: 13px; margin-top: 4px; }

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

input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(128,128,128,.35);
  min-width: 220px;
}

button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(128,128,128,.35);
  cursor: pointer;
}

main { padding: 16px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.card {
  border: 1px solid rgba(128,128,128,.35);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(128,128,128,.06);
}

.cover {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.cover.placeholder {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .6;
  background: rgba(128,128,128,.12);
}

.cardbody { padding: 12px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cardtitle { font-weight: 700; }

.cardsub { opacity: .75; font-size: 13px; margin-top: 4px; }
.badges { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.carddesc { opacity: .8; font-size: 13px; margin-top: 10px; min-height: 40px; }
.cardfooter { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.badge {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(128,128,128,.35);
  opacity: .9;
}

.player {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: flex;
  flex-direction: column;
}

.hidden { display: none; }

.playerbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(20,20,20,.9);
  color: white;
  gap: 16px;
}

.launchinfo {
  opacity: .75;
  font-size: 12px;
  margin-top: 2px;
  word-break: break-word;
}

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: black;
  overflow: hidden;
}

/* js-dos va dessiner dedans; la taille CSS est pilotée en inline par app.js */
canvas.dos {
  display: block;
  background: black;
  image-rendering: pixelated;
}
