/* TryLab — 無意識の反射診断 (reflex.css) */

.reflex-main {
  padding-top: 24px;
  padding-bottom: 60px;
}

.reflex-stage {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.reflex-stage.hidden {
  display: none !important;
}

/* イントロ画面 */
.intro-box {
  background: radial-gradient(circle at 50% 20%, #1c2538 0%, #0c1220 100%);
  border: 1px solid #2a3b59;
  border-radius: 18px;
  padding: 48px 28px;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.intro-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.intro-box h2 {
  font-size: 1.8rem;
  color: #f8fafc;
  margin-bottom: 14px;
  font-weight: 800;
}

.intro-box p {
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 32px;
}

.pulse-btn {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4); }
  70% { box-shadow: 0 0 0 14px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

/* テスト画面 */
.reflex-timer-bar-wrap {
  width: 100%;
  height: 8px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.timer-countdown-display {
  text-align: right;
  font-size: 0.88rem;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
}

.timer-countdown-display strong {
  font-size: 1.15rem;
  color: #38bdf8;
  font-weight: 700;
}

.reflex-timer-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #38bdf8);
  transition: width 0.05s linear;
}

.reflex-timer-fill.danger {
  background: #ef4444;
}

.reflex-card-wrap {
  perspective: 800px;
  min-height: 260px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reflex-card {
  width: 100%;
  background: radial-gradient(circle at 50% 10%, #202b3f 0%, #101726 100%);
  border: 1.5px solid #334466;
  border-radius: 20px;
  padding: 40px 24px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.2s;
  user-select: none;
}

.reflex-card.flick-left {
  transform: translateX(-120px) rotate(-15deg);
  opacity: 0;
}

.reflex-card.flick-right {
  transform: translateX(120px) rotate(15deg);
  opacity: 0;
}

.reflex-num {
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 20px;
}

.reflex-word {
  font-size: 2.4rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.reflex-sub {
  font-size: 0.95rem;
  color: #94a3b8;
}

/* 操作ボタン */
.reflex-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ctrl-btn {
  background: #141c2c;
  border: 2px solid #27364f;
  border-radius: 14px;
  padding: 20px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #f8fafc;
  font-family: inherit;
  transition: all 0.15s ease;
}

@media (hover: hover) {
  .ctrl-btn:hover {
    transform: translateY(-2px);
  }
  .btn-no:hover {
    border-color: #f43f5e;
    background: rgba(244, 63, 94, 0.15);
    box-shadow: 0 4px 16px rgba(244, 63, 94, 0.3);
  }
  .btn-yes:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  }
}

.btn-no.active {
  border-color: #f43f5e;
  background: rgba(244, 63, 94, 0.25);
  box-shadow: 0 0 0 2px #f43f5e, 0 4px 16px rgba(244, 63, 94, 0.4);
  transform: scale(0.96);
}

.btn-yes.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 0 2px #10b981, 0 4px 16px rgba(16, 185, 129, 0.4);
  transform: scale(0.96);
}

.ctrl-text {
  font-size: 1.15rem;
  font-weight: 700;
}

.ctrl-key {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

/* 結果画面 */
.result-container {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid #2d3e5a;
  border-radius: 18px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.result-header {
  text-align: center;
}

.result-badge {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #38bdf8;
  font-weight: 800;
}

.result-title {
  font-size: 1.85rem;
  color: #f8fafc;
  margin: 8px 0;
}

.result-lead {
  font-size: 1.05rem;
  color: #cbd5e1;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

.result-card-visual {
  display: flex;
  justify-content: center;
}

#result-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  background: #090e18;
  border: 1px solid #1e293b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.reaction-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .reaction-stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-box {
  background: #111a2c;
  border: 1px solid #1f2e47;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 600;
}

.stat-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: #38bdf8;
  font-family: ui-monospace, monospace;
}

.stat-sub {
  font-size: 0.78rem;
  color: #64748b;
}

.result-deep-dive {
  background: rgba(30, 41, 59, 0.5);
  border-left: 4px solid #38bdf8;
  border-radius: 8px;
  padding: 18px 20px;
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.7;
}

.result-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.reflex-btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.reflex-btn.primary {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.reflex-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.6);
}

.reflex-btn.secondary {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #475569;
}

.reflex-btn.secondary:hover {
  background: #334155;
}

.reflex-btn.tertiary {
  background: transparent;
  color: #94a3b8;
  text-decoration: underline;
}
