* {
  box-sizing: border-box;
}

body {
  margin: 0;

  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  background:
    radial-gradient(circle at top, #293b68, #10172b);

  font-family: Arial, sans-serif;

  overflow: hidden;
}

#gameWrap {
  position: relative;

  width: min(900px, 96vw);

  border: 5px solid #111827;

  border-radius: 18px;

  overflow: hidden;

  box-shadow:
    0 20px 50px rgba(0,0,0,.5);
}

canvas {
  display: block;

  width: 100%;
  height: auto;
}

#hud {
  position: absolute;

  top: 10px;
  left: 10px;
  right: 10px;

  display: flex;

  justify-content: space-between;

  pointer-events: none;

  color: white;

  font-size: 18px;
  font-weight: bold;

  text-shadow:
    2px 2px 3px #000;

  z-index: 5;
}

#message {
  position: absolute;

  inset: 0;

  display: flex;

  flex-direction: column;

  justify-content: center;
  align-items: center;

  background: rgba(10,15,30,.75);

  color: white;

  text-align: center;

  z-index: 10;
}

#message h1 {
  margin: 0 0 10px;

  color: #ffd23f;

  font-size: 42px;

  text-shadow:
    3px 3px 0 #7a5200;
}

#message p {
  margin-bottom: 25px;

  font-size: 18px;
}

#startButton {
  border: none;

  padding: 14px 35px;

  border-radius: 12px;

  background: linear-gradient(
    #ffe066,
    #ffb703
  );

  color: #5a3b00;

  font-size: 20px;
  font-weight: bold;

  cursor: pointer;

  box-shadow:
    0 5px 0 #a86a00;
}

#startButton:active {
  transform: translateY(4px);

  box-shadow:
    0 1px 0 #a86a00;
}
#questionBox {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(5, 10, 25, 0.78);

    z-index: 9999;
}

.questionCard {
    width: 360px;
    max-width: 90vw;

    padding: 30px;

    background: white;

    border-radius: 22px;

    text-align: center;

    box-shadow:
        0 20px 50px rgba(0,0,0,.5);

    border: 5px solid #ffd23f;
}

.questionTitle {
    font-size: 14px;
    font-weight: bold;
    color: #777;

    letter-spacing: 2px;

    margin-bottom: 10px;
}

.question {
    font-size: 42px;
    font-weight: bold;

    color: #233047;

    margin-bottom: 25px;
}

.answers {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;
}

.answers button {
    border: none;

    background: #3b9bea;

    color: white;

    font-size: 26px;
    font-weight: bold;

    padding: 15px;

    border-radius: 14px;

    cursor: pointer;

    box-shadow: 0 5px 0 #2268a5;
}

.answers button:hover {
    background: #267dcc;
}

.answers button:active {
    transform: translateY(3px);

    box-shadow: 0 2px 0 #2268a5;
}

#levelMessage {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(5, 10, 25, 0.85);

    z-index: 9999;
}

.levelCard {
    width: 450px;
    max-width: 90vw;

    padding: 40px;

    background: white;

    border-radius: 22px;

    text-align: center;

    box-shadow:
        0 20px 50px rgba(0,0,0,.5);

    border: 5px solid #ffd23f;
}

.levelCard h1 {
    margin: 0 0 15px;

    font-size: 36px;

    color: #233047;
}

.levelCard h2 {
    margin: 15px 0;

    font-size: 28px;

    color: #ffd23f;
}

.levelCard p {
    margin: 10px 0 25px;

    font-size: 18px;

    color: #555;
}

#continueButton,
#restartButton {
    border: none;

    padding: 14px 35px;

    border-radius: 12px;

    background: linear-gradient(
        #ffe066,
        #ffb703
    );

    color: #5a3b00;

    font-size: 20px;
    font-weight: bold;

    cursor: pointer;

    box-shadow:
        0 5px 0 #a86a00;
}

#continueButton:active,
#restartButton:active {
    transform: translateY(4px);

    box-shadow:
        0 1px 0 #a86a00;
}