/* Button Mashing — test-specific overrides */
:root { --test-accent: #d9465a; }
.t-intro-icon::before {
  content: 'touch_app';
}


/* ── MASH AREA ── */
.mash-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 24px;
  background: color-mix(in srgb, var(--test-accent) 4%, var(--color-surface-container-low));
  border: 2.5px solid color-mix(in srgb, var(--test-accent) 25%, var(--color-outline));
  border-radius: 22px;
  min-height: 320px;
}

.mash-stats {
  display: flex;
  gap: 32px;
  align-items: center;
}

.mash-stat {
  text-align: center;
}

.mash-stat-val {
  font-family: 'Manrope', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
}

.mash-stat-lbl {
  font-family: 'Lexend', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── MASH BUTTON ── */
.mash-btn {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--test-accent), #c22c3f);
  border: none;
  color: white;
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.06s, box-shadow 0.06s;
  box-shadow: 0 6px 24px rgba(217,70,90,0.25);
}

.mash-btn:hover { transform: scale(1.03); }
.mash-btn:active, .mash-btn.mash-hit {
  transform: scale(0.93);
  box-shadow: 0 2px 8px rgba(217,70,90,0.3);
}

.mash-btn.mash-active {
  animation: mash-pulse 0.3s infinite alternate;
}

@keyframes mash-pulse {
  from { box-shadow: 0 6px 24px rgba(217,70,90,0.25); }
  to   { box-shadow: 0 6px 36px rgba(217,70,90,0.4); }
}

/* ── STATUS ── */
.mash-status {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  min-height: 32px;
  text-align: center;
}

/* ── PROGRESS ── */
.mash-progress {
  width: 100%;
  max-width: 300px;
  height: 8px;
  background: var(--color-outline);
  border-radius: 4px;
  overflow: hidden;
}

.mash-progress-fill {
  height: 100%;
  background: var(--test-accent);
  border-radius: 4px;
  transition: width 0.05s linear;
}

/* ── SCORE RANGE TABLE ── */
.rt-range-table { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.rt-range-row { display: grid; grid-template-columns: 10px 100px 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-family: 'Lexend', sans-serif; font-size: 13px; }
.rt-range-dot { width: 10px; height: 10px; border-radius: 50%; }
.rt-range-label { font-weight: 700; color: var(--text); }
.rt-range-val { color: var(--text-muted); }
.rt-range-pct { font-weight: 700; text-align: right; }
.rt-range-row.elite  { background: #f0fdf4; } .rt-range-row.elite  .rt-range-dot { background: #2ecc71; } .rt-range-row.elite  .rt-range-pct { color: #2ecc71; }
.rt-range-row.fast   { background: #f0f9ff; } .rt-range-row.fast   .rt-range-dot { background: #0ea5e9; } .rt-range-row.fast   .rt-range-pct { color: #0ea5e9; }
.rt-range-row.avg    { background: #fafafa; } .rt-range-row.avg    .rt-range-dot { background: #f5a623; } .rt-range-row.avg    .rt-range-pct { color: #f5a623; }
.rt-range-row.slow   { background: #fef2f1; } .rt-range-row.slow   .rt-range-dot { background: #e74c3c; } .rt-range-row.slow   .rt-range-pct { color: #e74c3c; }

@media (max-width: 480px) {
  .mash-btn { width: 150px; height: 150px; font-size: 18px; }
  .mash-arena { min-height: 280px; padding: 24px 16px; }
}

/* ── INTRO VISUAL EXAMPLE ── */
.bm-preview-arena {
  position: relative;
  width: 280px;
  height: 120px;
  background: color-mix(in srgb, var(--test-accent) 2%, rgba(0,0,0,0.35));
  border: 1.5px solid var(--color-outline);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 auto 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

html.light .bm-preview-arena {
  background: color-mix(in srgb, var(--test-accent) 4%, rgba(0,0,0,0.04));
}

.bm-preview-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--test-accent), color-mix(in srgb, var(--test-accent) 80%, #000));
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-h);
  font-size: 10px;
  font-weight: 900;
  color: #ffffff;
  user-select: none;
  animation: bmCirclePress 4.5s infinite linear;
}

@keyframes bmCirclePress {
  0%, 14% { transform: scale(1); }
  15%, 17% { transform: scale(0.9); }
  18%, 24% { transform: scale(1); }
  25%, 27% { transform: scale(0.9); }
  28%, 34% { transform: scale(1); }
  35%, 37% { transform: scale(0.9); }
  38%, 44% { transform: scale(1); }
  45%, 47% { transform: scale(0.9); }
  48%, 54% { transform: scale(1); }
  55%, 57% { transform: scale(0.9); }
  58%, 64% { transform: scale(1); }
  65%, 67% { transform: scale(0.9); }
  68%, 100% { transform: scale(1); }
}

.bm-preview-stats {
  font-family: var(--font-b);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.bm-preview-count::after {
  content: '0';
  animation: bmCountText 4.5s infinite steps(1);
}

@keyframes bmCountText {
  0%, 15% { content: '0'; }
  16%, 25% { content: '1'; }
  26%, 35% { content: '2'; }
  36%, 45% { content: '3'; }
  46%, 55% { content: '4'; }
  56%, 65% { content: '5'; }
  66%, 86% { content: '6'; }
  87%, 100% { content: '0'; }
}

.bm-preview-cps::after {
  content: '0.0';
  animation: bmCpsText 4.5s infinite steps(1);
}

@keyframes bmCpsText {
  0%, 15% { content: '0.0'; }
  16%, 25% { content: '5.0'; }
  26%, 35% { content: '6.5'; }
  36%, 45% { content: '7.2'; }
  46%, 55% { content: '7.8'; }
  56%, 65% { content: '8.1'; }
  66%, 86% { content: '8.4'; color: #10b981; }
  87%, 100% { content: '0.0'; }
}

.bm-preview-click {
  position: absolute;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  pointer-events: none;
  z-index: 10;
  animation: bmClickAnimate 4.5s infinite linear;
}

.bm-preview-click span {
  font-size: 20px;
  line-height: 1;
  display: block;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

@keyframes bmClickAnimate {
  0% { left: 140px; top: 90px; opacity: 0; transform: translate(-35%, -15%) scale(1.2); }
  6% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.2); }
  
  /* Tap 1 */
  14% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.2); }
  16% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(0.8); }
  18% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.1); }
  
  /* Tap 2 */
  24% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.2); }
  26% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(0.8); }
  28% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.1); }
  
  /* Tap 3 */
  34% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.2); }
  36% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(0.8); }
  38% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.1); }
  
  /* Tap 4 */
  44% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.2); }
  46% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(0.8); }
  48% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.1); }
  
  /* Tap 5 */
  54% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.2); }
  56% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(0.8); }
  58% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.1); }
  
  /* Tap 6 */
  64% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.2); }
  66% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(0.8); }
  68% { left: 140px; top: 60px; opacity: 1; transform: translate(-35%, -15%) scale(1.1); }
  
  74% { left: 140px; top: 90px; opacity: 0; transform: translate(-35%, -15%) scale(1.2); }
  100% { left: 140px; top: 90px; opacity: 0; }
}

.bm-preview-caption {
  font-family: var(--font-b);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  line-height: 1.4;
  margin-bottom: 16px;
}

.bm-preview-caption .bm-highlight {
  color: var(--test-accent);
  font-weight: 700;
}
