/* Game library */
.game-library {
  --game-accent: #6655dd;
}
.game-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8f86d9;
}
.game-library-header {
  padding: 1.5rem 0 2.5rem;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}
.game-library-header h1 {
  letter-spacing: -0.045em;
  line-height: 1.08;
}
.game-intro {
  max-width: 36rem;
  font-size: 1.1rem;
  color: var(--bs-secondary-color, #647080);
}
.game-library-count,
.game-library-note {
  color: var(--bs-secondary-color, #647080);
  font-size: 0.875rem;
}
.game-library-count {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 2rem;
  padding: 0.65rem 1rem;
}
.game-card {
  border-color: var(--bs-border-color, #dee2e6);
  border-radius: 1.1rem;
  overflow: hidden;
  background: var(--ab-surface-1);
}
.game-art-link {
  position: relative;
  display: block;
  background: #121625;
}
.game-art {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.2s ease;
}
.game-art-link:hover .game-art {
  transform: scale(1.025);
}
.game-art-play {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: #ffffff;
  color: #24243f;
  border-radius: 50%;
  font-size: 0.8rem;
}
.game-genre {
  color: var(--game-accent);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  font-weight: 700;
}
html[data-theme='dark'] .game-genre {
  color: #aaa1ff;
}
.game-description {
  color: var(--bs-secondary-color, #647080);
  line-height: 1.65;
}
.game-play-link {
  display: flex;
  justify-content: space-between;
  width: 100%;
  background: var(--ab-surface-2);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color, #dee2e6);
  padding: 0.65rem 1rem;
  border-radius: 0.65rem;
  font-weight: 600;
}
.game-play-link:hover,
.game-play-link:focus {
  background: #6655dd;
  border-color: #6655dd;
  color: #fff;
}
/* Shared launch screen and canvas host */
.game-player {
  margin: 0;
  background: #0c1019;
  color: #edf0fa;
  font:
    16px/1.6 system-ui,
    sans-serif;
}
.game-player * {
  box-sizing: border-box;
}
.game-toolbar {
  height: 64px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #121826;
  border-bottom: 1px solid #2a3345;
}
.game-back {
  color: #d6dced;
  text-decoration: none;
  white-space: nowrap;
}
.game-back:hover {
  color: #fff;
}
.game-toolbar-title {
  font-size: 0.9rem;
  font-weight: 600;
}
.game-tool-button {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  background: #1c2536;
  border: 1px solid #3d4962;
  border-radius: 0.5rem;
  color: #edf0fa;
  cursor: pointer;
}
.game-stage {
  position: relative;
  height: calc(100vh - 64px);
}
#canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  touch-action: none;
}
#canvas:focus {
  outline: none;
}
#cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 2rem 1rem;
  background: radial-gradient(ellipse at 50% 10%, #252044, #0c1019 75%);
}
.game-launch-panel {
  width: 100%;
  max-width: 820px;
  display: grid;
  grid-template-columns: 38% 62%;
  border: 1px solid #353b56;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #161d2d;
  box-shadow: 0 24px 80px #0006;
}
.game-launch-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-launch-content {
  padding: 2.25rem;
}
.game-launch-content h1 {
  font-size: 2.4rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
}
.game-launch-description {
  color: #bdc6d9;
}
.game-controls {
  padding: 1rem;
  background: #20293b;
  border-radius: 0.65rem;
  margin: 1.5rem 0;
}
.game-controls h2 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #aca4ff;
  margin: 0 0 0.5rem;
}
.game-controls p {
  font-size: 0.85rem;
  margin: 0;
  color: #d6dced;
}
.game-start {
  display: flex;
  width: 100%;
  justify-content: space-between;
  border: 0;
  border-radius: 0.65rem;
  background: #8170f2;
  color: #fff;
  padding: 0.85rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.game-start:hover {
  background: #7160e2;
}
.game-start:disabled {
  background: #3e465c;
  color: #b8c1d5;
  cursor: wait;
}
#status {
  min-height: 1.6em;
  font-size: 0.8rem;
  text-align: center;
  color: #bdb4ff;
}
.game-save-note {
  font-size: 0.75rem;
  color: #a6b0c5;
  margin-bottom: 0;
}
#notice {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  padding: 1rem;
  background: #702b3c;
  border: 1px solid #b45c72;
  color: #fff;
  border-radius: 0.7rem;
  z-index: 5;
}
#notice:empty {
  display: none;
}
.game-player a:focus-visible,
.game-player button:focus-visible,
.game-art-link:focus-visible {
  outline: 3px solid #b6acff;
  outline-offset: 3px;
}
@media (max-width: 650px) {
  .game-toolbar {
    padding: 0 0.75rem;
    gap: 0.5rem;
  }
  .game-toolbar-title {
    display: none;
  }
  .game-launch-panel {
    max-width: 440px;
    grid-template-columns: 1fr;
  }
  .game-launch-art {
    height: 145px;
  }
  .game-launch-content {
    padding: 1.5rem;
  }
  #cover {
    align-items: start;
    padding: 1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .game-art {
    transition: none;
  }
}
