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

.panel {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  width: 100%;
  margin-top: 16px;
}

.assembly {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.assembly svg { display: block; width: 100%; height: auto; }

/* translucent outer shell of the valve body (drawn last, on top) */
.shell-layer { opacity: 0.4; pointer-events: none; }

/* highlight marker: hidden by default, shown per question via .is-shown */
.marker { display: none; }
.marker.is-shown { display: block; }

.quiz-panel { padding: 18px 20px 20px; }

.progress {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  text-align: center;
}
.progress .hl { color: #2563eb; font-weight: 700; }

.question {
  margin-top: 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.opt {
  padding: 14px 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
}
.opt:hover:not(:disabled) {
  border-color: #93c5fd;
  background: #eff6ff;
  transform: translateY(-2px);
}
.opt:disabled { cursor: default; }
.opt.correct {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #047857;
}
.opt.wrong {
  background: #fef2f2;
  border-color: #be123c;
  color: #be123c;
  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); }
}

.status-bar {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  min-height: 22px;
}

/* result view */
.result-view { text-align: center; padding: 8px 0 4px; }
.result-score { font-size: 20px; color: #475569; font-weight: 600; }
.result-score strong { font-size: 34px; color: #2563eb; }
.result-msg {
  margin-top: 12px;
  font-size: 15px;
  color: #475569;
  line-height: 1.6;
}
.result-view button { margin-top: 18px; }

.action-panel {
  display: flex;
  justify-content: center;
  padding: 16px 20px;
}
.controls { display: flex; gap: 12px; }

button.act {
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 10px 24px;
  transition: all 0.2s;
  font-family: inherit;
  background: #f1f5f9;
  color: #475569;
}
button.act.primary { background: #2563eb; color: #ffffff; }
button.act:hover { opacity: 0.88; transform: translateY(-1px); }
button.act:active { transform: translateY(0); }

/* SVG highlight & flow */
.part.pulse {
  animation: partPulse 1.1s ease-in-out infinite;
}
@keyframes partPulse {
  0%, 100% { filter: drop-shadow(0 0 1px #2563eb); }
  50% { filter: drop-shadow(0 0 11px #2563eb); }
}
.flow {
  stroke-dasharray: 8 8;
  animation: flowDash 0.9s linear infinite;
}
@keyframes flowDash {
  to { stroke-dashoffset: -16; }
}
.marker circle {
  animation: badgePulse 1.1s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes badgePulse {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .part.pulse { animation: none; filter: drop-shadow(0 0 6px #2563eb); }
  .flow { animation: none; }
  .marker circle { animation: none; opacity: 0.95; }
  .opt.wrong { animation: none; }
  .opt { transition: none; }
  button.act { transition: none; }
}

@media (max-width: 480px) {
  .options { gap: 10px; }
  .opt { font-size: 14px; padding: 12px 8px; }
}