/* ============================================
   Testimony Phase Styles
   ============================================ */

#screen-testimony {
  background: linear-gradient(180deg, var(--color-bg-cool) 0%, var(--color-bg) 100%);
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Character Area (top ~25%) */
.testimony-header {
  flex-shrink: 0;
  padding: var(--space-md);
  padding-top: calc(var(--safe-top) + var(--space-md));
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 26, 46, 0.8), transparent);
}

.character-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.character-sprite-img {
  width: 180px;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  margin-bottom: var(--space-xs);
  transition: all var(--transition-normal);
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.6));
}

.character-sprite-img.shake {
  animation: characterShake 0.5s ease;
}

.character-sprite-img.shatter {
  animation: characterShatter 0.6s ease forwards;
}

@keyframes characterShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px) rotate(-2deg); }
  40% { transform: translateX(10px) rotate(2deg); }
  60% { transform: translateX(-6px) rotate(-1deg); }
  80% { transform: translateX(6px) rotate(1deg); }
}

@keyframes characterShatter {
  0% { transform: scale(1); filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.6)); }
  30% { transform: scale(1.05); filter: drop-shadow(0 4px 16px rgba(231, 76, 60, 0.4)) brightness(1.3); }
  100% { transform: scale(0.95) translateY(10px); filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3)) brightness(0.8); }
}

.character-name {
  font-size: var(--font-size-sm);
  color: var(--color-text-dim);
  font-weight: 600;
}

/* Testimony Panel (middle) */
.testimony-panel {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  -webkit-overflow-scrolling: touch;
}

.testimony-round-label {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-accent-dim);
  margin-bottom: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--color-accent-dim);
  border-radius: 99px;
  display: inline-block;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.testimony-lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Individual testimony line */
.testimony-line {
  background: var(--color-surface);
  border: 2px solid var(--color-card-border);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  font-family: var(--font-testimony);
  font-size: var(--font-size-base);
  line-height: 1.8;
  transition: all var(--transition-fast);
  position: relative;
  cursor: pointer;
}

.testimony-line::before {
  content: attr(data-index);
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-family: var(--font-main);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-surface-light);
}

.testimony-line.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.2);
}

.testimony-line.pressed {
  border-left: 3px solid var(--color-accent-dim);
}

.testimony-line.shattered {
  animation: lineShatter 0.5s ease forwards;
}

@keyframes lineShatter {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.98); }
  100% { opacity: 0.3; transform: scale(0.95); text-decoration: line-through; }
}

.testimony-line-text {
  padding-left: var(--space-lg);
}

.testimony-line-text.updated {
  animation: textUpdate 0.5s ease;
}

@keyframes textUpdate {
  0% { color: var(--color-accent); }
  100% { color: var(--color-text); }
}

/* Action buttons (bottom) */
.testimony-actions {
  flex-shrink: 0;
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  padding-bottom: calc(var(--safe-bottom) + var(--space-md));
  background: var(--color-bg);
  border-top: 1px solid var(--color-card-border);
  align-items: center;
}

/* Evidence selection overlay */
.evidence-select-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  padding-top: calc(var(--safe-top) + var(--space-lg));
}

.evidence-select-overlay[hidden] {
  display: none;
}

.evidence-select-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.evidence-select-header h3 {
  font-size: var(--font-size-lg);
  color: var(--color-accent);
}

.evidence-select-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow-y: auto;
  flex: 1;
}

.evidence-selectable {
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.evidence-selectable:active {
  border-color: var(--color-primary);
  transform: scale(0.98);
}

/* Press response overlay */
.press-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl);
}

.press-overlay[hidden] {
  display: none;
}

.press-response {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.press-player-line {
  background: #1a4a2e;
  padding: var(--space-md);
  border-radius: var(--border-radius);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  max-width: 85%;
  font-size: var(--font-size-sm);
}

.press-npc-response {
  background: var(--color-surface-light);
  padding: var(--space-md);
  border-radius: var(--border-radius);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  max-width: 85%;
  font-size: var(--font-size-sm);
}

.press-thought {
  color: var(--color-text-dim);
  font-style: italic;
  text-align: center;
  font-size: var(--font-size-sm);
  padding: var(--space-sm);
}

.press-dismiss-hint {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  margin-top: var(--space-md);
  animation: pulse 2s ease-in-out infinite;
}

/* Hint overlay */
.hint-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-xl);
}

.hint-overlay[hidden] {
  display: none;
}

.hint-bubble {
  background: var(--color-surface);
  border: 1px dashed var(--color-accent-dim);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  max-width: 320px;
  text-align: center;
}

.hint-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.hint-text {
  font-style: italic;
  color: var(--color-text-dim);
  line-height: 1.6;
}

.hint-dismiss {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  margin-top: var(--space-md);
  animation: pulse 2s ease-in-out infinite;
}

/* Present fail flash */
.present-fail-flash {
  position: fixed;
  inset: 0;
  background: rgba(231, 76, 60, 0.3);
  z-index: 60;
  pointer-events: none;
  animation: failFlash 0.4s ease forwards;
}

@keyframes failFlash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
