/* === INTERVIEW SYSTEM === */
.interview-container {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
}

/* Character header */
.interview-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.character-portrait {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-light);
  border: 2px solid var(--accent-gold-dim);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6), inset 0 0 8px rgba(0, 0, 0, 0.4);
}

.character-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  filter: contrast(1.05);
}

/* Legacy silhouette fallback (in case no img) */
.character-portrait .silhouette {
  width: 30px;
  height: 30px;
  margin: 15px auto;
  background: var(--border);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.character-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--accent-gold);
}

.character-role {
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

/* Conversation log */
.conversation-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 85%;
  padding: 12px 16px;
  font-size: 1rem;
  line-height: 1.7;
}

.msg-player {
  align-self: flex-end;
  background: var(--surface-light);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 8px 8px 2px 8px;
}

.msg-character {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--accent-gold-dim);
  border-left: 3px solid var(--accent-gold);
  color: var(--text-primary);
  border-radius: 8px 8px 8px 2px;
}

.msg-system {
  align-self: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Newly appended messages (set by JS) play a brief enter animation.
   Existing history is rendered without this class. */
.msg.is-fresh.msg-player {
  animation: msg-in-right 0.45s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.msg.is-fresh.msg-character {
  animation: msg-in-left 0.45s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.msg.is-fresh.msg-system {
  animation: msg-in-fade 0.45s ease-out both;
}

@keyframes msg-in-right {
  from { opacity: 0; transform: translateX(18px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes msg-in-left {
  from { opacity: 0; transform: translateX(-18px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes msg-in-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .msg.is-fresh.msg-player,
  .msg.is-fresh.msg-character,
  .msg.is-fresh.msg-system {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* AI thinking indicator */
.msg-thinking {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  min-width: 60px;
}

.thinking-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-gold);
  opacity: 0.4;
  animation: thinking-bounce 1.4s infinite ease-in-out both;
}
.thinking-dot:nth-child(1) { animation-delay: -0.32s; }
.thinking-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes thinking-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* Suggested questions */
.suggested-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.suggestion-btn {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 100%;
}

.suggestion-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.suggestion-btn.used {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Input row */
.interview-input {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.interview-input input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.interview-input input:focus {
  border-color: var(--accent-gold);
}

.interview-input input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.interview-input .btn {
  padding: 10px 20px;
}

/* Interview list (hub screen) */
.interview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 700px;
}

.interview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 14px;
}

.interview-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.interview-card.interviewed {
  border-left: 3px solid var(--success);
}

.interview-card .card-portrait {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--accent-gold-dim);
  background: var(--surface-light);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
}

.interview-card .card-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.interview-card .card-info {
  flex: 1;
  min-width: 0;
}

.interview-card .card-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.interview-card .card-role {
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}
