/**
 * ゲーム画面専用スタイル
 */

body {
  height: 100dvh;
}

.wrapper {
  width: 100%;
  height: 100%;
  max-width: 90dvw;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  visibility: hidden;
}

.wrapper.loaded {
  visibility: visible;
}

#gameCanvas {
  border: 4px solid var(--game-fg-color);
  cursor: none;
}

#score,
#highScore,
#gameOver {
  user-select: none;
  position: absolute;
}

#score {
  color: var(--game-fg-color);
  font-size: var(--size-font-24);
  line-height: 1;
}

#highScore {
  color: var(--game-fg-color);
  font-size: var(--size-font-20);
  line-height: 1;
}

#gameOver {
  color: var(--game-fg-color);
  font-size: var(--size-font-24);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 10;
  right: 0;
  left: 0;
}

.game-over-title {
  font-size: var(--size-font-24);
}

.ranking-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background-color: var(--game-bg-color);
  border: 3px solid var(--game-fg-color);
  outline: 8px solid var(--game-bg-color);
}

.ranking-message {
  font-size: var(--size-font-20);
  text-align: center;
}

.name-input-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

.name-input-char {
  font-family: "Press Start 2P", system-ui;
  font-size: var(--size-font-20);
  color: var(--game-fg-color);
  background-color: transparent;
  border: none;
  border-bottom: 4px solid var(--game-mg-color);
  padding: 10px 0;
  text-align: center;
  width: 20px;
  text-transform: uppercase;
  outline: none;
  caret-color: transparent;
}

.name-input-char:focus {
  border-color: var(--game-fg-color);
}

#gyroControl {
  color: var(--game-fg-color);
  font-size: var(--size-font-20);
  margin: 32px;
  flex-shrink: 0;
  user-select: none;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
  display: none;
}

/* Responsive design */
@media screen and (orientation: portrait) {
  .game-over-title {
    background-color: var(--game-bg-color);
    padding: 16px;
  }
}

@media screen and (max-width: 640px),
  (max-width: 896px) and (max-height: 414px) and (orientation: landscape) {
  #score,
  #highScore,
  #gameOver,
  #gyroControl {
    font-size: var(--size-font-16);
  }

  .game-over-title {
    font-size: var(--size-font-16);
  }

  .ranking-message {
    font-size: var(--size-font-16);
  }

  .name-input-char {
    font-size: var(--size-font-16);
    width: 16px;
    padding: 8px 0;
  }

  .name-input-container {
    gap: 6px;
    margin-bottom: 10px;
  }

  .ranking-form {
    padding: 15px;
    gap: 10px;
    outline-width: 12px;
  }
}

@media screen and (max-width: 896px) and (max-height: 414px) and (orientation: landscape) {
  #gyroControl {
    padding: 16px 32px;
  }
}

@media all and (display-mode: fullscreen) {
  #gyroControl {
    display: block;
  }
}

@media all and (display-mode: standalone) {
  #gyroControl {
    display: block;
  }
}
