* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: Arial, sans-serif;
  background: linear-gradient(#87ceeb, #fdf6d8);
}

#game {
  position: fixed;
  inset: 0;
}

#topBar {
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
  pointer-events: none;
}

.badge {
  background: white;
  border-radius: 24px;
  padding: 12px 20px;
  font-size: 28px;
  font-weight: bold;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

#questionBox {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 30px;
  padding: 14px 28px;
  font-size: 32px;
  font-weight: bold;
  z-index: 5;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  text-align: center;
  white-space: nowrap;
}

#cards {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 25px;
  display: flex;
  justify-content: center;
  gap: 24px;
  z-index: 10;
}

.card {
  width: 120px;
  height: 150px;
  border-radius: 28px;
  border: 6px solid #ffffff;
  background: linear-gradient(135deg, #ffdf64, #ff9f43);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 74px;
  font-weight: bold;
  color: #333;
  box-shadow: 0 12px 0 #c46b13, 0 14px 24px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s;
}

.card:active {
  transform: translateY(8px);
  box-shadow: 0 4px 0 #c46b13, 0 8px 18px rgba(0, 0, 0, 0.2);
}

.correct {
  animation: pop 0.45s ease;
  background: linear-gradient(135deg, #74ff9b, #1dd66f);
}

.wrong {
  animation: shake 0.35s ease;
  background: linear-gradient(135deg, #ff7474, #ff3838);
}

#startScreen {
  position: fixed;
  inset: 0;
  background: linear-gradient(#6dd5fa, #fff6b7);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 25px;
}

.logoBubble {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 999px;
  font-size: 58px;
  margin-bottom: 20px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

#startScreen h1 {
  font-size: 48px;
  margin: 0 0 20px;
}

#startScreen p {
  font-size: 24px;
  max-width: 600px;
  margin: 0 0 35px;
}

#startBtn {
  font-size: 42px;
  font-weight: bold;
  border: none;
  border-radius: 35px;
  padding: 24px 50px;
  background: #ffcc00;
  box-shadow: 0 10px 0 #c99800;
  cursor: pointer;
}

#startBtn:active {
  transform: translateY(8px);
  box-shadow: 0 3px 0 #c99800;
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-12px); }
  50% { transform: translateX(12px); }
  75% { transform: translateX(-12px); }
  100% { transform: translateX(0); }
}

@media (max-width: 600px) {
  .card {
    width: 92px;
    height: 125px;
    font-size: 58px;
  }

  #cards {
    gap: 12px;
    bottom: 18px;
  }

  #questionBox {
    font-size: 24px;
    top: 82px;
  }

  .badge {
    font-size: 22px;
    padding: 10px 14px;
  }

  #startScreen h1 {
    font-size: 36px;
  }

  #startScreen p {
    font-size: 20px;
  }

  #startBtn {
    font-size: 34px;
    padding: 20px 42px;
  }
}
