#quiz-screen {
  background: #0A0813;
  flex-direction: column;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

#result-screen {
  z-index: 20;
}

.quiz-question-area {
  position: relative;
  z-index: 20;
  pointer-events: auto;
}

.question-card {
  position: relative;
  z-index: 25;
  pointer-events: auto;
}

.option-btn {
  position: relative;
  z-index: 30;
  pointer-events: auto !important;
  cursor: pointer;
}

.quiz-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: linear-gradient(180deg, #1B1428, #12101C);
  border-bottom: 2px solid #6F2DA8;
  z-index: 50;
  min-height: 60px;
  pointer-events: auto;
  position: relative;
}

.hud-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud-progress {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(14px, 1.8vw, 20px);
  color: #F4A900;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.hud-difficulty {
  font-size: clamp(11px, 1.2vw, 14px);
  color: #9B4DDA;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hud-center {
  text-align: center;
}

.hud-title {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(14px, 1.8vw, 20px);
  color: #D8D1E4;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  letter-spacing: 1px;
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.hud-currency, .hud-score {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(14px, 1.8vw, 20px);
}

.coin-icon { color: #F4A900; }
.hud-coins { color: #FFC928; }
.score-icon { color: #9B4DDA; }
.hud-points { color: #D8D1E4; }

.hud-pause-btn {
  width: 40px;
  height: 40px;
  background: linear-gradient(145deg, #2A1E3C, #1B1428);
  border: 2px solid #6F2DA8;
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.hud-pause-btn:hover {
  background: linear-gradient(145deg, #3A1E5C, #2A1E3C);
  border-color: #9B4DDA;
}

.quiz-main {
  flex: 1;
  display: flex;
  padding: 10px 20px;
  gap: 15px;
  overflow: hidden;
}

.quiz-question-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-card {
  background: linear-gradient(145deg, #1B1428, #12101C);
  border: 2px solid #6F2DA8;
  border-radius: 20px;
  padding: 25px 30px;
  width: 100%;
  max-width: 700px;
  box-shadow: 0 0 30px rgba(111,45,168,0.3), inset 0 0 20px rgba(111,45,168,0.05);
  animation: cardAppear 0.4s ease;
}

@keyframes cardAppear {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.question-category {
  font-size: clamp(12px, 1.3vw, 16px);
  color: #9B4DDA;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  font-weight: 600;
}

.question-text {
  font-size: clamp(16px, 2vw, 24px);
  color: #FFFFFF;
  line-height: 1.4;
  margin-bottom: 20px;
  font-weight: 500;
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 14px;
  border: 2px solid;
  font-family: 'Fredoka', 'Baloo 2', sans-serif;
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 500;
  color: #FFFFFF;
  text-align: left;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.option-a {
  background: linear-gradient(145deg, #1E3A0F, #0F1A08);
  border-color: #4A8F16;
}

.option-a:hover {
  background: linear-gradient(145deg, #2A5A15, #1E3A0F);
  border-color: #79C528;
  transform: translateX(5px);
  box-shadow: 0 0 20px rgba(74,143,22,0.3);
}

.option-b {
  background: linear-gradient(145deg, #2A1E3C, #1B1428);
  border-color: #6F2DA8;
}

.option-b:hover {
  background: linear-gradient(145deg, #3A1E5C, #2A1E3C);
  border-color: #9B4DDA;
  transform: translateX(5px);
  box-shadow: 0 0 20px rgba(111,45,168,0.3);
}

.option-c {
  background: linear-gradient(145deg, #0F2A3A, #081A1F);
  border-color: #1476B8;
}

.option-c:hover {
  background: linear-gradient(145deg, #1A3A5A, #0F2A3A);
  border-color: #2EA8E6;
  transform: translateX(5px);
  box-shadow: 0 0 20px rgba(20,118,184,0.3);
}

.option-d {
  background: linear-gradient(145deg, #3A0F12, #1F080A);
  border-color: #C91E2E;
}

.option-d:hover {
  background: linear-gradient(145deg, #5A1A18, #3A0F12);
  border-color: #FF344D;
  transform: translateX(5px);
  box-shadow: 0 0 20px rgba(201,30,46,0.3);
}

.option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Luckiest Guy', cursive;
  font-size: 16px;
  flex-shrink: 0;
  border: 2px solid currentColor;
}

.option-a .option-letter { background: #4A8F16; color: #FFFFFF; }
.option-b .option-letter { background: #6F2DA8; color: #FFFFFF; }
.option-c .option-letter { background: #1476B8; color: #FFFFFF; }
.option-d .option-letter { background: #C91E2E; color: #FFFFFF; }

.option-text {
  flex: 1;
}

.option-btn.selected {
  transform: scale(0.98);
  filter: brightness(0.8);
}

.option-btn.correct {
  border-color: #79C528 !important;
  background: linear-gradient(145deg, #2A5A15, #1E3A0F) !important;
  box-shadow: 0 0 30px rgba(121,197,40,0.4) !important;
}

.option-btn.incorrect {
  border-color: #FF344D !important;
  background: linear-gradient(145deg, #5A1A18, #3A0F12) !important;
  box-shadow: 0 0 30px rgba(255,52,77,0.4) !important;
}

.option-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.quiz-sidebar {
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex-shrink: 0;
}

.timer-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(0deg);
}

.timer-bg {
  opacity: 0.5;
}

.timer-progress {
  transition: stroke-dashoffset 0.3s linear, stroke 0.3s ease;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.timer-number {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(28px, 3vw, 36px);
  color: #FFFFFF;
  display: block;
  line-height: 1;
  transition: color 0.3s ease;
}

.timer-number.warning {
  color: #FF344D;
  animation: timerPulse 0.5s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.timer-number.danger {
  color: #FF344D;
  animation: timerPulse 0.25s ease-in-out infinite;
}

.timer-label {
  font-size: clamp(8px, 1vw, 10px);
  color: #D8D1E4;
  letter-spacing: 1px;
}

.dragon-distance {
  background: linear-gradient(145deg, #1B1428, #12101C);
  border: 2px solid #6F2DA8;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.distance-title {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(11px, 1.2vw, 14px);
  color: #F4A900;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(244,169,0,0.3);
}

.distance-bar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.distance-dragon-icon {
  width: 50px;
  height: 50px;
}

.distance-dragon-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.distance-bar {
  position: relative;
  width: 20px;
  height: 160px;
  background: #1B1428;
  border: 2px solid #4B4358;
  border-radius: 10px;
  overflow: hidden;
}

.distance-segment {
  position: absolute;
  left: 0;
  right: 0;
  height: 25%;
  transition: opacity 0.3s ease;
}

.distance-s1 { top: 0; background: #4A8F16; opacity: 0.2; }
.distance-s2 { top: 25%; background: #79C528; opacity: 0.2; }
.distance-s3 { top: 50%; background: #E86A17; opacity: 0.2; }
.distance-s4 { top: 75%; background: #C91E2E; opacity: 0.2; }

.distance-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to top, #C91E2E, #E86A17, #79C528, #4A8F16);
  border-radius: 8px;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.6;
}

.distance-player-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-icon-shield {
  font-size: 20px;
  color: #F4A900;
}

.distance-status {
  font-size: clamp(10px, 1vw, 12px);
  color: #D8D1E4;
  margin-top: 6px;
  font-weight: 600;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 8px 20px;
  background: linear-gradient(0deg, #1B1428, #12101C);
  border-top: 2px solid #6F2DA8;
  z-index: 10;
  min-height: 60px;
}

.dragon-preview, .door-preview {
  width: 60px;
  height: 60px;
}

.dragon-preview img, .door-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: all 0.5s ease;
}

.streak-display {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(16px, 2vw, 22px);
  color: #F4A900;
  display: flex;
  align-items: center;
  gap: 8px;
}

.streak-label {
  color: #D8D1E4;
  font-size: clamp(10px, 1.2vw, 14px);
}

.streak-count {
  text-shadow: 0 0 15px rgba(244,169,0,0.5);
  transition: all 0.3s ease;
}

.streak-count.active {
  animation: streakGlow 0.5s ease-in-out infinite alternate;
}

@keyframes streakGlow {
  from { text-shadow: 0 0 10px rgba(244,169,0,0.5); }
  to { text-shadow: 0 0 30px rgba(244,169,0,0.8), 0 0 60px rgba(244,169,0,0.4); }
}

#paused-screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200;
  display: none;
}

#paused-screen.active {
  display: flex;
}

.paused-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10,8,19,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.paused-panel {
  background: linear-gradient(145deg, #1B1428, #12101C);
  border: 2px solid #6F2DA8;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 0 50px rgba(111,45,168,0.4);
  min-width: 300px;
}

.paused-title {
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(32px, 5vw, 48px);
  color: #F4A900;
  text-shadow: 3px 3px 0 #4C1D78;
  margin-bottom: 25px;
}

.paused-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.paused-btn {
  padding: 14px 30px;
  background: linear-gradient(145deg, #2A1E3C, #1B1428);
  border: 2px solid #6F2DA8;
  border-radius: 14px;
  color: #FFFFFF;
  font-family: 'Luckiest Guy', cursive;
  font-size: clamp(16px, 2vw, 20px);
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.paused-btn:hover {
  transform: translateY(-2px);
  border-color: #9B4DDA;
  box-shadow: 0 4px 20px rgba(111,45,168,0.4);
}

.paused-btn-resume {
  background: linear-gradient(145deg, #4A8F16, #2A5A15) !important;
  border-color: #79C528 !important;
}
