/* CPS Test Tool v1.1 — vibrant, mobile-friendly, clickspersecond-style (no dependencies) */
.cps-wrap {
  --cps-a: #6c5ce7;
  --cps-b: #00cec9;
  max-width: 720px;
  margin: 0 auto;
  font-family: inherit;
  line-height: 1.4;
}
.cps-modes {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.cps-mode {
  border: 2px solid #e5e7eb;
  background: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  color: #333;
}
.cps-mode:hover { border-color: var(--cps-a); }
.cps-mode.is-active {
  background: linear-gradient(135deg, var(--cps-a), var(--cps-b));
  color: #fff;
  border-color: transparent;
}
.cps-stage {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(108, 92, 231, 0.15);
  padding: 20px;
  border: 1px solid #eef0ff;
}
.cps-topbar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.cps-stat { text-align: center; flex: 1; }
.cps-label {
  display: block;
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.cps-value { font-size: 26px; font-weight: 800; color: #222; }
.cps-bar {
  height: 8px;
  background: #f1f2f6;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}
.cps-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cps-a), var(--cps-b));
  border-radius: 99px;
}
.cps-pad {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  border: none;
  cursor: pointer;
  border-radius: 16px;
  padding: 64px 20px;
  background: linear-gradient(135deg, #6c5ce7, #a55eea 55%, #00cec9);
  color: #fff;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.05s ease;
}
.cps-pad:active { transform: scale(0.985); }
.cps-pad.is-live { background: linear-gradient(135deg, #00b894, #00cec9); }
.cps-pad-text { display: block; font-size: 34px; font-weight: 800; }
.cps-pad-sub { display: block; font-size: 15px; opacity: 0.9; margin-top: 6px; }
.cps-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: scale(0);
  animation: cps-ripple 0.45s ease-out forwards;
  pointer-events: none;
}
@keyframes cps-ripple {
  to { transform: scale(6); opacity: 0; }
}
.cps-result {
  text-align: center;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(108, 92, 231, 0.15);
  padding: 28px 20px;
  margin-top: 16px;
  border: 1px solid #eef0ff;
}
.cps-rank-emoji { font-size: 52px; }
.cps-score {
  font-size: 64px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cps-a), var(--cps-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cps-score small {
  font-size: 20px;
  margin-left: 6px;
  color: #888;
  -webkit-text-fill-color: #888;
}
.cps-rank { font-size: 24px; font-weight: 800; margin-top: 4px; color: #222; }
.cps-detail { color: #666; margin: 8px 0 0; }
.cps-best { margin-top: 10px; font-weight: 700; color: #6c5ce7; }
.cps-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.cps-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: #f1f2f6;
  color: #333;
}
.cps-restart {
  background: linear-gradient(135deg, var(--cps-a), var(--cps-b));
  color: #fff;
}
.cps-share {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  color: #888;
  font-size: 14px;
}
.cps-share-btn {
  background: #f1f2f6;
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
  color: #333;
  font-weight: 700;
  font-size: 14px;
}
.cps-share-btn:hover { background: #e5e7eb; }
.cps-history {
  margin-top: 16px;
  text-align: left;
  background: #f8f9ff;
  border-radius: 12px;
  padding: 12px 16px;
}
.cps-history-title { font-weight: 800; font-size: 14px; margin-bottom: 6px; color: #555; }
.cps-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cps-history-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
}
.cps-history-list li b { color: #6c5ce7; }
.cps-history-list li span { color: #888; font-size: 13px; }
@media (max-width: 520px) {
  .cps-pad { padding: 48px 16px; }
  .cps-pad-text { font-size: 28px; }
  .cps-score { font-size: 52px; }
  .cps-value { font-size: 22px; }
}
