/* Physics phenomenon quiz · game page styles (en/zh share this file) */
[hidden] { display: none !important; }

.quiz {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.quiz-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 8px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}
.quiz-topbar .score { color: #2563eb; }
.bar {
  height: 6px;
  background: #e3e9f2;
  margin: 0 20px 4px;
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  background: #2563eb;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.qbody { padding: 20px 20px 22px; }
.qtext {
  font-size: 16px;
  line-height: 1.5;
  color: #1e293b;
  font-weight: 600;
  margin-bottom: 14px;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.opt {
  text-align: left;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  color: #475569;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.4;
}
.opt:hover:not(.locked) {
  border-color: #93c5fd;
  background: #eff6ff;
}
.opt.locked { cursor: default; }
.opt.correct {
  background: #dcfce7;
  border-color: #16a34a;
  color: #047857;
  font-weight: 700;
}
.opt.wrong {
  background: #fee2e2;
  border-color: #be123c;
  color: #be123c;
  font-weight: 700;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.feedback {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
}
.feedback.ok { color: #047857; }
.feedback.no { color: #be123c; }
.explain {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #5b6472;
  background: #f8fafc;
  border-left: 3px solid #2563eb;
  border-radius: 6px;
  padding: 10px 12px;
}
.qactions { margin-top: 16px; display: flex; justify-content: flex-end; }
.next {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 10px 24px;
  font-family: inherit;
  transition: all 0.2s;
}
.next:hover { opacity: 0.88; transform: translateY(-1px); }
.next:active { transform: translateY(0); }

.result {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  padding: 34px 20px;
  text-align: center;
}
.result h2 { font-size: 20px; color: #1e293b; margin-bottom: 8px; }
.result .big { font-size: 40px; font-weight: 800; color: #2563eb; margin: 10px 0; }
.result .sub { font-size: 14px; color: #5b6472; margin-bottom: 20px; }
.again {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 11px 28px;
  font-family: inherit;
  transition: all 0.2s;
}
.again:hover { opacity: 0.88; transform: translateY(-1px); }

.controls {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}
#resetBtn {
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 10px 24px;
  font-family: inherit;
  transition: all 0.2s;
}
#resetBtn:hover { opacity: 0.88; transform: translateY(-1px); }

@media (max-width: 600px) {
  .qtext { font-size: 15px; }
  .opt { font-size: 14px; padding: 11px 12px; }
  .quiz-topbar { padding: 12px 16px 8px; }
  .bar { margin: 0 16px 4px; }
  .qbody { padding: 16px 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .bar-fill { transition: none; }
  .opt { transition: none; }
  .opt.wrong { animation: none; }
  .next, .again, #resetBtn { transition: none; }
}