/* Spark wrapper */
.spark-wrap {
  position: relative;
  display: inline-block;
}

.spark-svg {
  position: absolute;
  top: -16px;
  left: -16px;
  width: calc(100% + 32px);
  height: calc(100% + 32px);
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}

/* ===== Power Button (matches home hero CTA) ===== */
.vrt-page .mn-btn--power {
  background-color: var(--accent);
  color: #0A332F;
  font-weight: 700;
  border: none;
  padding: 1rem 2.25rem;
  border-radius: var(--radius);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}

.vrt-page .mn-btn--power:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(71, 212, 202, 0.3);
  color: #0A332F;
}

.vrt-page .mn-btn--power:active {
  background-color: var(--accent-active);
  transform: translateY(0);
}

.vrt-page .mn-btn--power.mn-btn--large {
  padding: 1.1rem 2.75rem;
  font-size: 1.15rem;
}

/* ===== Vocal Range Test Page ===== */

.vrt-page {
  min-height: 80vh;
  padding: 60px 0;
}

/* Step transitions */
.vrt-step {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.vrt-step--active {
  display: block;
  opacity: 1;
}

/* ===== STEP 1: Intro ===== */
#vrt-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding-top: 60px;
}

.vrt-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.vrt-lead {
  color: rgba(255,255,255,0.7);
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 0;
}

.vrt-start-btn {
  font-size: 1.2rem;
  padding: 16px 48px;
}

/* Empty gauge (pre-test) */
.vrt-empty-gauge {
  margin: 32px auto 28px;
  max-width: 480px;
}

.vrt-empty-gauge__frame {
  display: flex;
  gap: 2px;
  height: 48px;
  padding: 4px;
  background: #1a1a1a;
  border: 1px solid rgba(93,202,165,0.3);
  border-radius: 4px;
}

.vrt-empty-gauge__cell {
  flex: 1;
  background: rgba(95,94,90,0.08);
  border: 1px dashed rgba(95,94,90,0.15);
  border-radius: 2px;
}

/* Reassurance line */
.vrt-reassurance {
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Result gauge (Branch B — previous result) */
.vrt-result-gauge {
  position: relative;
  margin: 28px auto 24px;
  max-width: 480px;
}

.vrt-result-gauge__frame {
  display: flex;
  gap: 2px;
  height: 48px;
  padding: 4px;
  background: #1a1a1a;
  border: 1px solid #5DCAA5;
  border-radius: 4px;
}

.vrt-result-gauge__cell {
  flex: 1;
  background: rgba(95,94,90,0.08);
  border: 1px dashed rgba(95,94,90,0.15);
  border-radius: 2px;
}

.vrt-result-gauge__cell--filled {
  border: none;
  border-radius: 2px;
}

.vrt-result-gauge__labels {
  position: relative;
  height: 24px;
  margin-top: 8px;
}

.vrt-result-gauge__label-you {
  position: absolute;
  transform: translateX(-50%);
  font-size: 12px;
  color: #9FE1CB;
  font-weight: 500;
  white-space: nowrap;
}

.vrt-result-gauge__label-dream {
  position: absolute;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  font-weight: 400;
  white-space: nowrap;
}

/* ===== STEP 2: Song Selection ===== */
#vrt-song-select {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  padding-top: 40px;
}

.vrt-step-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.vrt-step-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* Song Cards */
.vrt-songs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.vrt-song-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 28px 20px;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-align: center;
  color: var(--text-primary);
  font-family: inherit;
  font-size: inherit;
}

.vrt-song-card:hover {
  transform: translateY(-4px);
  border-color: rgba(71, 212, 202, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.vrt-song-card--selected {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(71, 212, 202, 0.25), 0 8px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
}

.vrt-song-card__level {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 600;
}

.vrt-song-card__name-en {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 4px;
}

.vrt-song-card__name-jp {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.vrt-song-card__artist {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.vrt-song-card__stars {
  font-size: 1.1rem;
  color: var(--accent);
  margin-top: 8px;
  letter-spacing: 2px;
}

/* Bring it on! button */
.vrt-bring-btn {
  font-size: 1.2rem;
  padding: 16px 48px;
}

.vrt-bring-btn:disabled {
  background-color: #333;
  color: #666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.vrt-bring-btn:disabled:hover {
  background-color: #333;
  transform: none;
  box-shadow: none;
}

/* ===== STEP 3: Instruction + Countdown ===== */
#vrt-countdown {
  text-align: center;
  padding: 80px 0;
  max-width: 600px;
  margin: 0 auto;
}

.vrt-instruction-text {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
}

.vrt-instruction-text strong {
  color: var(--text-primary);
}

.vrt-countdown__number {
  font-size: 8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  animation: vrt-pulse 1s ease-in-out infinite;
}

@keyframes vrt-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
}

/* ===== Measuring ===== */
#vrt-measuring {
  text-align: center;
}

/* ===== Zone Label ===== */
.vrt-gauge-zone {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 8px;
  min-height: 16px;
}

.vrt-gauge-zone--stable { color: var(--text-dim); }
.vrt-gauge-zone--warming { color: #E8A04B; }
.vrt-gauge-zone--heating { color: #EF6F4B; }
.vrt-gauge-zone--overload { color: var(--accent-urgent); }

/* ===== Energy Gauge Bar ===== */
.vrt-gauge-note {
  font-family: 'Courier New', monospace;
  font-size: 44px;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  line-height: 1;
  margin-bottom: 24px;
  min-height: 44px;
}

.vrt-gauge-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.vrt-gauge {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding-top: 28px;
}

.vrt-gauge__frame {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-primary);
  position: relative;
  transition: border-color 0.2s;
}

.vrt-gauge__cell {
  flex: 1;
  height: 28px;
  border-radius: 2px;
  background-color: var(--bg-secondary);
  opacity: 0.3;
  transition: background-color 0.15s ease-out, opacity 0.15s ease-out;
}

.vrt-gauge__marker {
  position: absolute;
  top: 20px;
  bottom: -8px;
  width: 2px;
  background: var(--text-primary);
  opacity: 0.6;
  z-index: 2;
  pointer-events: none;
}

.vrt-gauge__marker-label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--text-primary);
  opacity: 0.7;
  white-space: nowrap;
  margin-bottom: 4px;
}

.vrt-gauge-scale {
  display: flex;
  justify-content: space-between;
  max-width: 600px;
  margin: 6px auto 0;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.5;
}

/* ===== Spark SVG ===== */
.vrt-spark-svg {
  position: absolute;
  left: 0;
  right: 0;
  top: -20px;
  bottom: -20px;
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}

/* ===== Noise Canvas ===== */
.vrt-noise-canvas {
  position: absolute;
  left: 0;
  right: 0;
  top: 28px;
  height: 34px;
  pointer-events: none;
  mix-blend-mode: screen;
  border-radius: 4px;
  z-index: 1;
  transition: opacity 0.15s;
}

/* ===== Pulse / Flicker / Jitter Animations ===== */
.vrt-pulse-slow {
  animation: vrtPulseSlow 0.8s ease-in-out infinite;
}

.vrt-pulse-fast {
  animation: vrtPulseFast 0.4s ease-in-out infinite;
}

.vrt-flicker {
  animation: vrtFlicker 0.3s steps(3, end) infinite;
}

@keyframes vrtPulseSlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes vrtPulseFast {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes vrtFlicker {
  0% { opacity: 1; }
  33% { opacity: 0.3; }
  66% { opacity: 0.9; }
  100% { opacity: 0.6; }
}

.vrt-jitter-subtle {
  animation: vrtJitter 0.2s linear infinite;
}

.vrt-jitter-strong {
  animation: vrtJitterStrong 0.1s linear infinite;
}

@keyframes vrtJitter {
  0% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  50% { transform: translateX(0); }
  75% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

@keyframes vrtJitterStrong {
  0% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  50% { transform: translateX(1px); }
  75% { transform: translateX(-1px); }
  100% { transform: translateX(0); }
}

/* ===== Result Gauge (single bar) ===== */
.vrt-results__gauge {
  margin-bottom: 24px;
}

.vrt-gauge--static {
  padding-top: 32px;
  padding-bottom: 28px;
}

.vrt-gauge--static .vrt-gauge__marker {
  top: 24px;
  bottom: 20px;
}

/* ===== Brackets ===== */
.vrt-bracket {
  position: absolute;
  height: 10px;
  pointer-events: none;
}

.vrt-bracket--above {
  top: 4px;
  border-top: 1px solid #EF9F27;
  border-left: 1px solid #EF9F27;
  border-right: 1px solid #EF9F27;
}

.vrt-bracket--below {
  bottom: 0;
  border-bottom: 1px solid var(--text-secondary);
  border-left: 1px solid var(--text-secondary);
  border-right: 1px solid var(--text-secondary);
  opacity: 0.5;
}

.vrt-bracket__label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier New', monospace;
  font-size: 11px;
  white-space: nowrap;
}

.vrt-bracket--above .vrt-bracket__label {
  bottom: 100%;
  margin-bottom: 2px;
  color: #EF9F27;
}

.vrt-bracket--below .vrt-bracket__label {
  top: 100%;
  margin-top: 2px;
  color: var(--text-secondary);
}

/* Silence Bar */
.vrt-silence-bar {
  width: 200px;
  height: 4px;
  background: var(--bg-card);
  border-radius: 2px;
  margin: 16px auto 8px;
  overflow: hidden;
}

.vrt-silence-bar__fill {
  height: 100%;
  background: var(--accent-urgent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.vrt-silence-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.5;
}

/* ===== Results ===== */
#vrt-results {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 40px;
}

.vrt-results__title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.vrt-results__title--reached {
  color: var(--accent);
}

.vrt-results__title--not-reached {
  color: var(--text-primary);
}

/* Song info */
.vrt-results__song-info {
  margin-bottom: 32px;
}

.vrt-results__song-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-bottom: 4px;
}

.vrt-results__song-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.vrt-results__try-again {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
}

.vrt-results__try-again:hover {
  color: var(--accent);
  opacity: 1;
}

.vrt-results__song-artist {
  display: block;
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Verdict badge */
.vrt-results__verdict {
  margin-bottom: 24px;
}

.vrt-verdict__badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 20px;
  border-radius: 50px;
  letter-spacing: 0.5px;
}

.vrt-verdict__badge--reached {
  background: rgba(71, 212, 202, 0.15);
  color: var(--accent);
  border: 1px solid rgba(71, 212, 202, 0.3);
}

.vrt-verdict__badge--gap {
  background: rgba(217, 74, 90, 0.1);
  color: var(--accent-urgent);
  border: 1px solid rgba(217, 74, 90, 0.25);
}

/* ===== Desire Checklist (inside results) ===== */
.vrt-fit {
  text-align: center;
  margin-top: 8px;
}

.vrt-fit__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.vrt-fit__questions {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.vrt-fit__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color 0.15s;
  user-select: none;
}

.vrt-fit__item:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.vrt-fit__item:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.vrt-fit__checkbox {
  display: none;
}

.vrt-fit__check-icon {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.8rem;
  color: transparent;
}

.vrt-fit__check-icon::after {
  content: '\2713';
}

.vrt-fit__checkbox:checked + .vrt-fit__check-icon {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.vrt-fit__checkbox:checked ~ .vrt-fit__text {
  color: var(--text-primary);
}

.vrt-fit__text {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.4;
  transition: color 0.2s;
}

/* Score */
.vrt-fit__score {
  text-align: center;
  margin: 2.5rem 0 1.5rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.vrt-fit__score #vrt-fit-score {
  color: var(--accent);
  font-size: 3rem;
}

#vrt-fit-grade {
  font-size: 1.25rem;
  font-weight: 600;
  margin-left: 0.25rem;
}

.vrt-fit-grade--possible { color: var(--text-secondary); }
.vrt-fit-grade--strong { color: #EF9F27; }
.vrt-fit-grade--perfect { color: var(--accent); }

/* CTA Section */
.vrt-cta {
  text-align: center;
  animation: vrtCtaFade 0.4s ease;
}

@keyframes vrtCtaFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.vrt-cta__course {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.vrt-cta__discount {
  font-size: 32px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 8px;
}

.vrt-cta__urgency {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.vrt-cta__btn {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
  font-family: inherit;
}

.vrt-cta__btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.vrt-cta__btn {
  animation: vrtBtnShimmer 2.5s ease-in-out infinite;
}

@keyframes vrtBtnShimmer {
  0%, 100% {
    border-color: var(--border-color);
    box-shadow: none;
  }
  50% {
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(71, 212, 202, 0.25), inset 0 0 12px rgba(71, 212, 202, 0.06);
  }
}

.vrt-cta__reassurance {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 12px;
  opacity: 0.7;
}

/* Previous measurement comparison */
.vrt-prev {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--accent);
  text-align: center;
  margin-top: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .vrt-title {
    font-size: 2rem;
  }

  .vrt-songs {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .vrt-gauge-note {
    font-size: 36px;
  }

  .vrt-gauge__cell {
    height: 22px;
  }

  #vrt-intro {
    padding-top: 30px;
  }

  .vrt-results__title {
    font-size: 1.8rem;
  }

  .vrt-bracket__label {
    font-size: 10px;
  }

  .vrt-fit__item {
    padding: 0.875rem 1rem;
    gap: 0.75rem;
  }

  .vrt-fit__text {
    font-size: 0.9rem;
  }

  .vrt-fit__score #vrt-fit-score {
    font-size: 2.5rem;
  }

  #vrt-fit-grade {
    font-size: 1rem;
  }
}
