/* =========================
   GENERAL RESET
   To remove default browser styling and set base sizing
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* To set 1rem = 10px for easier scaling */
  font-size: 62.5%;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden; /* To prevent unwanted scrolling */
  font-family: "Courier New", Courier, monospace;
}

/* =========================
   LANDING PAGE
   To style the initial hero section
   ========================= */
.landing {
  width: 100%;
  height: 100%;
}

.hero {
  /* To set the background image and center it */
  background-image: url("img/landing_bg.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.content__logo {
  width: 180px;
  border-radius: 50%;
  margin-bottom: 3rem;
}

.content__slogan {
  font-size: 2rem;
  color: #001f3f;
  letter-spacing: 2px;
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

/* START BUTTON: To create the retro branded CTA button */
.button__cta {
  background-color: #feda42;
  color: #4b4b4b;
  padding: 1rem 2.4rem;
  border-radius: 8px;
  border: 2px solid #4b4b4b;
  cursor: pointer;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  font-family: "Courier New", Courier, monospace;
  box-shadow: 0 4px 0 #bfae36;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.2s;
}

.button__cta:hover {
  background-color: #ffe46b;
  transform: translateY(-2px);
}

.button__cta:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #bfae36;
}

/* =========================
   GAME BOY UI
   To build the handheld console interface
   ========================= */
.game-wrapper {
  display: none; /* To hide by default until START is clicked */
  width: 100%;
  height: 100%;
  background-color: #ffe792;
  position: relative;
}

.game-screen {
  /* To center the Game Boy frame on the screen */
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 82vw;
  max-width: 980px;
  height: 68vh;
  background-color: #3f3f3f;
  border-radius: 14px;
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.35) inset,
    0 12px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.game-lcd {
  /* To define the greenish LCD inner display */
  width: 90%;
  height: 88%;
  background-color: #d6d6cf;
  border-radius: 10px;
  padding: 16px;
  position: relative;
  box-shadow:
    0 0 0 3px #b0b0aa inset,
    0 4px 10px rgba(0, 0, 0, 0.25) inset;
}

.screen-logo {
  /* To style the "AWS GAME COLOR" text below the screen */
  margin-top: 6px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  user-select: none;
  font-family: Arial, Helvetica, sans-serif;
  transform: skewX(-10deg);
  align-self: flex-start;
  margin-left: 8%;
}

.screen-logo .aws-game {
  color: #f3f3f3;
  margin-right: 8px;
}
.screen-logo .c {
  color: #a442ff;
}
.screen-logo .o {
  color: #ff3366;
}
.screen-logo .l {
  color: #ffd23f;
}
.screen-logo .o2 {
  color: #00c46a;
}
.screen-logo .r {
  color: #29a3ff;
}

.start-screen {
  /* To show initial messages on top of the LCD */
  position: absolute;
  inset: 0;
  background-color: #cfcfca;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  text-align: center;
  padding: 20px;
}

.start-box {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 26px 28px;
  max-width: 480px;
  box-shadow:
    0 3px 6px rgba(255, 255, 255, 0.4) inset,
    0 6px 10px rgba(0, 0, 0, 0.25);
}

.start-box p {
  font-size: 1.6rem;
  line-height: 1.5;
}

/* HERO AVATAR: To define the size of the guide cat */
.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  background-color: #e6eadf;
  padding: 6px;
  box-shadow:
    0 0 0 2px #9fb18e,
    0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-avatar.final {
  width: 150px;
  height: 150px;
  margin-bottom: 18px;
}

.hint {
  margin-top: 10px;
  font-size: 1.3rem;
  opacity: 0.8;
}

.lcd-content {
  display: none; /* Displayed via JS when game starts */
  height: 100%;
  gap: 26px;
  align-items: center;
  justify-content: center;
}

.path {
  /* To create the vertical progress bar with dots */
  width: 70px;
  height: 90%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.path-node {
  /* To style the individual progress dots */
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #b3b3b3;
  position: relative;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.6),
    0 3px 4px rgba(0, 0, 0, 0.25);
}

.path-node::after {
  /* To create the line connecting the dots */
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 38px;
  background: #989898;
}

.path-node:last-child::after {
  display: none;
}
.path-node.current {
  background: #f2f2f2;
}
.path-node.visited {
  background: #d0d0d0;
}

.question-panel {
  /* To contain the quiz text area */
  flex: 1;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 18px;
  box-shadow:
    0 2px 4px rgba(255, 255, 255, 0.4) inset,
    0 5px 8px rgba(0, 0, 0, 0.2);
}

.question-text {
  font-size: 1.6rem;
  line-height: 1.4;
  white-space: pre-line;
}

/* =========================
   CONTROLS AREA
   To style the physical buttons on the console
   ========================= */
.bottom-area {
  position: absolute;
  bottom: 55px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.reset-button {
  /* To style the SELECT/START style reset bar */
  width: 90px;
  height: 12px;
  border-radius: 8px;
  background-color: #cfc3a8;
  border: none;
  font-size: 10px;
  letter-spacing: 1px;
  color: #6b5c48;
  text-transform: uppercase;
  margin-right: 170px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(130, 115, 95, 0.9);
}

.buttons-right {
  position: absolute;
  right: 90px;
  bottom: 0;
  display: flex;
  gap: 26px;
}

.round-btn {
  /* To create the classic A/B round buttons */
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #5b514c, #3a312d);
  color: #cfcfcf;
  font-size: 2.8rem;
  font-weight: bold;
  border: none;
  cursor: pointer;
  box-shadow:
    -2px -2px 4px rgba(255, 255, 255, 0.18),
    0 7px 0 #2a221f,
    0 9px 14px rgba(0, 0, 0, 0.35);
}

.btn-true {
  margin-top: 10px;
}
.btn-false {
  margin-top: -8px;
}

/* =========================
   FOOTER
   Trabajo grupal / créditos
   ========================= */
.site-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  color: #f3f3f3;
  text-align: center;
  padding: 8px 12px;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  z-index: 999;
}

.site-footer strong {
  color: #feda42;
}

/* =========================
   RESPONSIVE - TABLET
   ========================= */
@media (max-width: 900px) {
  .game-screen {
    width: 88vw;
    height: 62vh;
    top: 22px;
  }

  .bottom-area {
    bottom: 72px;
  }

  .reset-button {
    margin-right: 120px;
  }

  .buttons-right {
    right: 60px;
  }

  .round-btn {
    width: 62px;
    height: 62px;
    font-size: 2.5rem;
  }
}

/* =========================
   RESPONSIVE - MOBILE
  
   ========================= */
@media (max-width: 600px) {
  body {
    height: 100dvh;
    overflow: hidden;
  }

  .landing {
    height: 100dvh;
  }

  .game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100dvh;
    padding-bottom: 72px;
  }

  .game-screen {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    width: 92vw;
    height: 50vh;
    margin: 8px auto 24px;
  }

  .game-lcd {
    height: 80%;
    padding: 10px;
  }

  .start-box {
    max-width: 80%;
    padding: 12px 14px;
  }

  .start-box p {
    font-size: 1.3rem;
    line-height: 1.35;
  }

  .hero-avatar {
    width: 86px;
    height: 86px;
    margin-bottom: 8px;
  }

  .hero-avatar.final {
    width: 96px;
    height: 96px;
  }

  .hint {
    font-size: 1.15rem;
  }

  .screen-logo {
    font-size: 1.2rem;
    margin-left: 6%;
  }

  .bottom-area {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .reset-button {
    margin-right: 0;
    width: 100px;
    height: 14px;
    font-size: 1.1rem;
  }

  .buttons-right {
    position: static;
    display: flex;
    gap: 16px;
  }

  .round-btn {
    width: 50px;
    height: 50px;
    font-size: 2rem;
    box-shadow:
      -2px -2px 3px rgba(255, 255, 255, 0.18),
      0 5px 0 #2a221f,
      0 7px 10px rgba(0, 0, 0, 0.35);
  }

  .btn-true {
    margin-top: 4px;
  }

  .btn-false {
    margin-top: -3px;
  }
}
