/* --- Wrapper i ekran startowy --- */
#wrapper {
  position: absolute;
  top: 110px;
  left: 50px;
  width: 900px;
  height: 638px;
  background: pink;
  overflow: hidden;
  bo--rder: solid 1px;
  border-radius: 25px;
}

#startScreen {
  position: absolute;
  top: 0;
  left: 0;
  background: url(../gf3/cba.png);
  width: 900px;
  height: 638px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 10;
  transition: opacity 1s ease-in-out;
  pointer-events: auto;
}

#startScreen.fade-out {
  opacity: 0;
}

#introContent {
  text-align: center;
  font-family: Arial, sans-serif;
  color: transparent;
}

#startBtn {
  font-size: 24px;
  padding: 12px 24px;
  margin-top: 280px;
  cursor: pointer;
  background: #ff9600;
  border-radius: 8px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background 0.3s ease;
}

#startBtn:hover {
  background: #affa33;
  transform: scale(1.05);
}

/* --- Canvas --- */
#flapCanvas {
  position: absolute;
  top: 0px;
  left: 0px;
  background: transparent;
  z-index: 1;
}

/* --- Quiz --- */
#quiz-container {
  position: absolute;
  top: 140px;
  left: 250px;
  width: 400px;
  z-index: 10;
}

#quiz-box {
  margin-top: 12px;
  padding: 20px;
  font-family: sans-serif;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  background: #dd0;
  border: solid 1px #eee;
  border-radius: 25px;
  box-shadow: inset 9px 9px 15px #888, inset -9px -9px 15px #FFF;
  min-height: 240px;
  box-sizing: border-box;
  overflow: hidden;
}

#quiz-box.final {
  height: 345px;
  padding: 20px;
  overflow: hidden;
}

#quiz-box.lifted {
  transform: translateY(-20px) !important;
  transition: transform 0.5s ease-in-out;
}

/* --- Pytania i odpowiedzi --- */
.question {
  font-size: 25px;
  font-weight: 700;
  color: navy;
  margin-bottom: 20px;
}

.option {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  width: 80%;
  font-size: 26px;
  background-color: #ccf5cc;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: inset 4px 4px 6px #ffffff, inset -4px -4px 6px #88a888;
}

.option:hover {
  background-color: #b0e6b0;
  transform: scale(1.02);
}

/* --- Feedback --- */
#feedback {
  margin-top: 0px;
}

#feedbackOverlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: Arial;
  font-size: 56px;
  font-weight: bold;
  color: navy;
  z-index: 90;
  text-align: center;
  display: none;
}

#feedbackOverlay.good {
  background-color: #0F0;
  color: white;
  border-radius: 50%;
  padding: 40px 60px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

#feedbackOverlay.bad {
  min-width: 300px;
  white-space: nowrap;
  background-color: #00BFFF;
  color: white;
  border-radius: 50%;
  padding: 40px 60px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* --- Animacje i efekty --- */
@keyframes zoomScore {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.5);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

#restart {
  display: none;
  margin-top: -35px;
  margin-bottom: 10px;
  font-size: 22px;
  padding: 10px 20px;
  background: #88cc88;
  border-radius: 90px;
  cursor: pointer;
  z-index: 5;
  margin-top: 0px;
  position: relative;
  top: -6px;
}

.hidden {
  display: none !important;
}

#scoreValue {
  display: inline-block;
  color: #FFF;
  font-size: 172px;
  font-weight: bold;
  text-align: center;
  -webkit-text-stroke: 3px red;
  margin-top: 60px;
  transform-origin: center;
  animation: zoomScore 0.8s ease-out;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
  z-index: 9999;
}

.scale-out {
  animation: scaleOut 0.4s forwards ease-in-out;
}

@keyframes scaleOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}
