/**
 * 共通スタイル
 */

:root {
  --game-bg-color: #222;
  --game-mg-color: #666;
  --game-fg-color: #fff;
  --size-font-16: 1rem;
  --size-font-20: 1.25rem;
  --size-font-24: 1.5rem;
  --size-font-28: 1.75rem;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  background-color: var(--game-bg-color);
  font-family: "Press Start 2P", system-ui;
  font-weight: 408;
  font-style: normal;
}

/* 共通ボタンスタイル */
.submit-button,
.ranking-button,
.action-button {
  font-family: "Press Start 2P", system-ui;
  background-color: var(--game-bg-color);
  text-transform: uppercase;
  color: var(--game-fg-color);
  font-size: var(--size-font-20);
  line-height: 1;
  border: none;
  cursor: pointer;
  outline: none;
  padding: 0;
}

.submit-button:disabled,
.ranking-button:disabled,
.action-button:disabled {
  color: var(--game-mg-color);
  cursor: not-allowed;
}

.submit-button:focus:not(:disabled),
.ranking-button:focus:not(:disabled),
.action-button:focus:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.3);
}

/* エラーメッセージ */
.error-message {
  text-align: center;
  color: #ff6b6b;
  font-family: "Press Start 2P", system-ui;
  font-size: 16px;
  padding: 20px;
}

.submit-error {
  font-size: 12px;
  color: #ff6b6b;
  text-align: center;
  width: fit-content;
}

/* 共通レスポンシブ */
@media screen and (max-width: 640px),
  (max-width: 896px) and (max-height: 414px) and (orientation: landscape) {
  .submit-button,
  .ranking-button,
  .action-button {
    font-size: var(--size-font-16);
  }
}
