/* Fonts */
@font-face {
  font-family: 'MINECRAFT';
  src: url('fonts/Minecraft.ttf') format('truetype');
}

@font-face {
  font-family: 'DAYDREAM';
  src: url('fonts/Daydream.ttf') format('truetype');
}

/* General */
body {
  margin: 0;
  font-family: 'MINECRAFT', sans-serif;
  background-image: url('images/moonsky.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  color: white;
  padding-bottom: 100px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: -1;
}

.story-container {
  text-align: center;
  padding: 60px 20px 30px;
}

h1 {
  font-family: 'DAYDREAM', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #ffd700;
}

.subtitle {
  color: whitesmoke;
  font-size: 1rem;
  margin-bottom: 40px;
}

/* === EDITED: Game Frame Styles === */
.game-frame-container {
  width: 90vw; /* Take up 90% of the viewport width */
  max-width: 1280px; /* Set a maximum size for large screens */
  margin: 0 auto 60px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #ffd700;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  /* === IMPORTANT: CHANGE THIS VALUE === */
  /* This value needs to match your game's native aspect ratio. */
  /* For example, for 4:3 it would be `4 / 3`, and for 16:9 it would be `16 / 9`. */
  aspect-ratio: 12 / 6;
}

.game-iframe {
  width: 80%;
  height: 100%;
  border-radius: 10px;
}
/* === END EDITED: Game Frame Styles === */

.dev-corner {
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(2px);
  max-width: 700px;
  margin: auto;
  border-left: 4px solid #ffd700;
}

.dev-corner h2 {
  color: #ffe066;
  font-family: 'DAYDREAM', sans-serif;
  margin-bottom: 20px;
}

.dev-corner p {
  line-height: 1.6;
  color: #eee;
  font-size: 1rem;
}

/* Bottom Navigation Bar */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  height: 80px;
  z-index: 10;
}

.circle-group {
  display: flex;
  gap: 20px;
}

.circle {
  width: 45px;
  height: 45px;
  background: white;
  color: #222;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-family: 'DAYDREAM', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.circle:hover {
  background: #ffd700;
  transform: scale(1.1);
}

.nav-icon {
  font-size: 24px;
  background: #ffd700;
  color: #222;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  line-height: 45px;
  text-align: center;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: background 0.2s;
}

.nav-icon:hover {
  background-color: #ffec80;
}

.help-wrapper {
  position: relative;
  margin-right: 50px;
}

.help-button {
  font-family: 'DAYDREAM', sans-serif;
  font-size: 24px;
  background: #ffd700;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  line-height: 45px;
  text-align: center;
  color: #222;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.help-button:hover {
  background-color: #ffec80;
}

.help-cloud {
  display: none;
  position: absolute;
  bottom: 60px;
  right: -10px;
  left: auto;
  background: #fff;
  color: #222;
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  width: 200px;
  text-align: center;
  z-index: 5;
}

.help-cloud::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 10px;
  border-width: 10px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

@media (max-width: 600px) {
  .help-wrapper {
    margin-right: 5px;
  }

  .help-cloud {
    width: 180px;
    font-size: 0.85rem;
  }
}

/* --- FIXED ANIMATIONS --- */

/* Hidden by default (before .loaded class) */
.fadein-1,
.fadein-2,
.fadein-3,
.fadein-4,
.fadein-5 {
  opacity: 0;
  transform: translateY(30px);
}

/* Triggered when body.loaded is applied */
body.loaded .fadein-1 {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.2s;
}
body.loaded .fadein-2 {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.4s;
}
body.loaded .fadein-3 {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.6s;
}
body.loaded .fadein-4 {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.8s;
}
body.loaded .fadein-5 {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 1s;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}