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

.game-frame svg { font-family: inherit; }

.network {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 16px;
}
.network svg { display: block; width: 100%; height: auto; }
.flow {
  fill: none;
  stroke: #60a5fa;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 10 12;
  animation: dashmove 1.1s linear infinite;
}
@keyframes dashmove { to { stroke-dashoffset: -22; } }

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

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  padding: 16px;
  margin-top: 16px;
}
.stat .k { font-size: 12px; color: #5b6472; margin-bottom: 4px; }
.stat .v { font-size: 18px; font-weight: 700; color: #475569; }
.stat .v.good { color: #047857; }
.stat .v.warn { color: #b91c1c; }

.dec {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  padding: 18px;
  margin-top: 16px;
}
.dec-tag {
  display: inline-block;
  font-size: 12px;
  color: #1e40af;
  background: #eef4ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 2px 10px;
}
.dec-q { margin: 10px 0 14px; font-size: 15px; color: #1e293b; font-weight: 600; line-height: 1.5; }

.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: block;
  text-align: left;
  width: 100%;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: #1e293b;
  font-weight: 600;
  transition: all 0.2s;
}
.opt:hover { border-color: #93c5fd; background: #eff6ff; transform: translateY(-1px); }
.opt:active { transform: translateY(0); }

.fb { padding: 2px 0 4px; }
.fb .res { font-size: 16px; font-weight: 700; }
.fb .res.ok { color: #047857; }
.fb .res.no { color: #b91c1c; }
.fb .why { font-size: 14px; color: #5b6472; margin-top: 8px; line-height: 1.6; }
.fb-next { margin-top: 14px; }

.end { text-align: center; padding: 8px 0 4px; }
.end .big { font-size: 22px; font-weight: 700; }
.end.lose .big { color: #b91c1c; }
.end.win .big { color: #047857; }
.end .sub { font-size: 14px; color: #5b6472; margin-top: 8px; line-height: 1.6; }

.statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  padding: 14px 18px;
  margin-top: 16px;
}
#status-text { font-size: 14px; color: #475569; font-weight: 500; }
#status-text .hl { color: #2563eb; font-weight: 700; }

.game-frame button {
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 10px 22px;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.game-frame button:hover { opacity: 0.88; transform: translateY(-1px); }
.game-frame button:active { transform: translateY(0); }
#restartBtn { background: #e2e8f0; color: #334155; }
#againBtn { background: #2563eb; color: #ffffff; margin-top: 14px; }
#nextBtn { background: #2563eb; color: #ffffff; }

#health-marker { animation: markerPulse 1.6s ease-in-out infinite; }
@keyframes markerPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .opt { transition: none; }
  .flow { animation: none; }
  #health-marker { animation: none; opacity: 1; }
}

@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .statusbar { flex-direction: column; align-items: stretch; text-align: center; }
  #restartBtn { width: 100%; }
}