/* Mirrors game-template/styles.css for the title screen only (first page of the real game). */
@font-face {
  font-family: 'SAKURATA';
  src: url('../fonts/SAKURATA.ttf') format('truetype');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #2c3e50;
  font-family: Arial, sans-serif;
}

#game-container {
  position: relative;
  width: min(80vw, calc((100vh - 24px) * 1984 / 1088), 1984px);
  max-width: 1984px;
  aspect-ratio: 1984 / 1088;
  overflow: hidden;
  background-color: #87ceeb;
  border: 3px solid #fff;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  container-type: inline-size;
  container-name: game;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 20px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
}

#title-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url('../Intro_image.jpg');
  background-color: #87ceeb;
  background-size: cover;
  background-position: center;
  padding: 12px;
  z-index: 15;
}

.title-content {
  text-align: center;
  padding: clamp(16px, 3vh, 40px) clamp(16px, 4vw, 40px);
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  max-width: min(92%, 920px);
  max-height: 94%;
  overflow-y: auto;
  margin: 0;
}

.game-title {
  font-family: 'SAKURATA', sans-serif;
  font-size: 72px;
  color: #ffa500;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.credits {
  font-size: 16px;
  color: #000;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 30px;
  line-height: 1.5;
}

.game-button {
  padding: 15px 40px;
  font-size: 1.3em;
  background-color: #27ae60;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: default;
  transition: all 0.3s ease;
  margin-top: 20px;
  pointer-events: none;
}

@media (max-width: 1024px) {
  body {
    padding: max(4px, env(safe-area-inset-top)) max(4px, env(safe-area-inset-right))
      max(4px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    align-items: center;
    justify-content: center;
  }

  .screen {
    padding: 12px 14px;
    border-radius: 6px;
  }

  #game-container {
    --gc-pad: 12px;
    width: min(
      calc(100vw - var(--gc-pad)),
      calc((100dvh - var(--gc-pad)) * 1984 / 1088)
    );
    max-width: none;
    max-height: calc(100dvh - var(--gc-pad));
    border-width: 2px;
  }

  .game-title {
    font-size: clamp(1.5rem, 6vmin, 72px);
  }

  .title-content {
    margin-top: 0;
    padding: clamp(12px, 2.5vmin, 28px) clamp(12px, 3vw, 28px);
    max-width: min(96%, 900px);
    max-height: min(92dvh, 92vh);
  }
}

@media (max-width: 1024px) and (orientation: landscape) {
  body {
    padding: max(2px, env(safe-area-inset-top)) max(4px, env(safe-area-inset-right))
      max(2px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
  }

  #game-container {
    --gc-pad: 8px;
    width: min(
      calc(100vw - var(--gc-pad)),
      calc((100dvh - var(--gc-pad)) * 1984 / 1088)
    );
    max-height: calc(100dvh - var(--gc-pad));
  }

  .title-content {
    max-height: min(96dvh, 96vh);
    padding: 12px 18px;
  }

  .credits {
    font-size: clamp(13px, 2.5vmin, 16px);
  }
}
