/* ===================================================
   INTERVIEW PREP — BUTTON IN HEADER
   =================================================== */
.btn-interview {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  background: linear-gradient(135deg, #7c5ce8, #4f7ef8);
  color: white;
  letter-spacing: 0.2px;
}
.btn-interview:hover {
  background: linear-gradient(135deg, #6b4fd6, #3d6de0);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124,92,232,0.35);
}

/* ===================================================
   INTERVIEW MODAL OVERLAY
   =================================================== */
#interview-modal {
  position: fixed;
  inset: 0;
  background: rgba(10,14,26,0.75);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(4px);
}
#interview-modal.open {
  opacity: 1;
  pointer-events: all;
}

.iw-container {
  width: 760px;
  max-width: 96vw;
  height: 82vh;
  max-height: 680px;
  background: #111827;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  transform: scale(0.97) translateY(8px);
  transition: transform 0.2s ease;
  border: 1px solid rgba(255,255,255,0.07);
}
#interview-modal.open .iw-container { transform: scale(1) translateY(0); }

/* ── Header bar ── */
.iw-header {
  height: 52px;
  background: #0d1117;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.iw-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.iw-header-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, #7c5ce8, #4f7ef8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.iw-header-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.iw-header-subtitle {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.38);
  margin-top: 1px;
}

.iw-close-btn {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.iw-close-btn:hover { background: rgba(255,90,90,0.15); color: #ff7070; }

/* ===================================================
   SETUP SCREEN
   =================================================== */
#iw-setup {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  color: white;
}

.iw-setup-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 4px;
}
.iw-setup-sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.38);
  margin-bottom: 24px;
}

.iw-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 10px;
}

/* Project picker */
.iw-projects {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.iw-project-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.iw-project-option:hover { border-color: rgba(79,126,248,0.4); background: rgba(79,126,248,0.05); }
.iw-project-option input[type="radio"] { accent-color: #4f7ef8; }
.iw-project-option input:checked ~ .iw-project-info { opacity: 1; }

.iw-project-info { flex: 1; }
.iw-project-title { font-size: 0.83rem; font-weight: 600; color: rgba(255,255,255,0.85); }
.iw-project-dates { font-size: 0.7rem; color: rgba(255,255,255,0.38); margin-top: 2px; }

.iw-no-exp {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
}

.iw-resume-upload-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.iw-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: rgba(79,126,248,0.15);
  border: 1.5px solid rgba(79,126,248,0.4);
  border-radius: 7px;
  color: #7fa8fb;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.iw-upload-btn:hover { background: rgba(79,126,248,0.25); border-color: #4f7ef8; color: #fff; }

.iw-upload-status {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}
.iw-upload-parsing { color: #7fa8fb; }
.iw-upload-error   { color: #f87878; }

/* Target fields */
.iw-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.iw-fields-1col { grid-template-columns: 1fr; }

.iw-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  margin-bottom: 5px;
}

.iw-field input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 7px;
  color: white;
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
.iw-field input:focus { outline: none; border-color: #4f7ef8; background: rgba(79,126,248,0.06); }
.iw-field input::placeholder { color: rgba(255,255,255,0.2); }

.iw-skill-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 7px;
  color: white;
  font-size: 0.85rem;
  font-family: inherit;
  line-height: 1.55;
  resize: none;
  overflow-y: hidden;
  transition: border-color 0.15s;
}
.iw-skill-textarea:focus { outline: none; border-color: #4f7ef8; background: rgba(79,126,248,0.06); }
.iw-skill-textarea::placeholder { color: rgba(255,255,255,0.2); }

.iw-validation {
  font-size: 0.75rem;
  color: #ff7070;
  margin-bottom: 12px;
  min-height: 18px;
}

.iw-start-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: linear-gradient(135deg, #7c5ce8, #4f7ef8);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.iw-start-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,126,248,0.35); }
.iw-start-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===================================================
   CHAT SCREEN
   =================================================== */
#iw-chat {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

/* Research ticker */
.iw-research-bar {
  background: rgba(79,126,248,0.1);
  border-bottom: 1px solid rgba(79,126,248,0.15);
  padding: 8px 20px;
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: rgba(79,126,248,0.9);
  flex-shrink: 0;
}
.iw-research-bar.visible { display: flex; }

.iw-research-dot {
  width: 7px;
  height: 7px;
  background: #4f7ef8;
  border-radius: 50%;
  animation: pulse-dot 1s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

.iw-search-queries {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.iw-search-tag {
  background: rgba(79,126,248,0.15);
  border: 1px solid rgba(79,126,248,0.25);
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 0.68rem;
  color: rgba(79,126,248,0.9);
}

/* Messages */
.iw-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}
.iw-messages::-webkit-scrollbar { width: 4px; }
.iw-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.iw-msg {
  display: flex;
  gap: 12px;
  max-width: 92%;
  animation: msg-in 0.2s ease;
}
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.iw-msg.user { align-self: flex-end; flex-direction: row-reverse; }

.iw-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.iw-msg.ai   .iw-msg-avatar { background: linear-gradient(135deg, #7c5ce8, #4f7ef8); color: white; }
.iw-msg.user .iw-msg-avatar { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); }

.iw-msg-body { flex: 1; min-width: 0; }

.iw-msg-name {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 5px;
}
.iw-msg.ai   .iw-msg-name { color: rgba(124,92,232,0.8); }
.iw-msg.user .iw-msg-name { color: rgba(255,255,255,0.35); text-align: right; }

.iw-msg-text {
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.iw-msg.ai   .iw-msg-text {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.88);
  border-top-left-radius: 3px;
}
.iw-msg.user .iw-msg-text {
  background: rgba(79,126,248,0.18);
  border: 1px solid rgba(79,126,248,0.25);
  color: rgba(255,255,255,0.9);
  border-top-right-radius: 3px;
}

/* Typing indicator */
.iw-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 6px 2px;
}
.iw-typing span {
  width: 6px; height: 6px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.iw-typing span:nth-child(2) { animation-delay: 0.2s; }
.iw-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%,60%,100% { transform: translateY(0); opacity: 0.4; }
  30%         { transform: translateY(-6px); opacity: 1; }
}

/* Progress bar */
.iw-progress {
  padding: 10px 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.iw-progress-label {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.3);
  white-space: nowrap;
}

.iw-progress-track {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}
.iw-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c5ce8, #4f7ef8);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.iw-phase-label {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.3);
  white-space: nowrap;
}

/* Input area */
.iw-input-area {
  padding: 14px 20px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
}

#iw-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: white;
  font-size: 0.85rem;
  font-family: inherit;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color 0.15s;
}
#iw-input:focus { outline: none; border-color: rgba(79,126,248,0.5); background: rgba(79,126,248,0.05); }
#iw-input::placeholder { color: rgba(255,255,255,0.2); }
#iw-input:disabled { opacity: 0.4; cursor: not-allowed; }

.iw-send-btn {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #7c5ce8, #4f7ef8);
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.iw-send-btn:hover:not(:disabled) { transform: scale(1.05); box-shadow: 0 4px 12px rgba(79,126,248,0.4); }
.iw-send-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.iw-hint {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.18);
  text-align: center;
  padding: 0 20px 8px;
  flex-shrink: 0;
}

/* ===================================================
   MODE PICKER
   =================================================== */
.iw-mode-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.iw-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.iw-mode-card input[type="radio"] { display: none; }
.iw-mode-card:hover { border-color: rgba(79,126,248,0.3); background: rgba(79,126,248,0.04); }
.iw-mode-card.active {
  border-color: #4f7ef8;
  background: rgba(79,126,248,0.08);
}

.iw-mode-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.15s;
}
.iw-mode-card.active .iw-mode-icon {
  background: linear-gradient(135deg, #7c5ce8, #4f7ef8);
}

.iw-mode-title {
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin-bottom: 3px;
}
.iw-mode-desc {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.45;
}

.iw-optional-tag {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.45;
  font-size: 0.65rem;
}

/* Teach Me mode card */
.iw-mode-card-teach {
  grid-column: span 2;
}
.iw-mode-card-teach:hover  { border-color: rgba(20,184,166,0.4); background: rgba(20,184,166,0.04); }
.iw-mode-card-teach.active { border-color: #14b8a6; background: rgba(20,184,166,0.08); }
.iw-mode-card-teach.active .iw-mode-icon { background: linear-gradient(135deg, #14b8a6, #06b6d4); }

.iw-mode-tag {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(20,184,166,0.18);
  color: #2dd4bf;
  margin-left: 5px;
  vertical-align: middle;
}
.iw-mode-card.active .iw-mode-tag { background: rgba(20,184,166,0.25); }

/* Teach Me section header & intro */
.iw-section-title-teach { color: rgba(45,212,191,0.7); }

.iw-teach-intro {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.55;
  margin-bottom: 14px;
  padding: 10px 13px;
  background: rgba(20,184,166,0.06);
  border: 1px solid rgba(20,184,166,0.12);
  border-radius: 8px;
}

/* ===================================================
   FEEDBACK VERDICT LABELS
   =================================================== */
.iw-verdict           { font-size: 0.82rem; padding: 1px 0; }
.iw-verdict-excellent { color: #4ade80 !important; }
.iw-verdict-good      { color: #60a5fa !important; }
.iw-verdict-improve   { color: #fbbf24 !important; }
.iw-verdict-offtarget { color: #f87171 !important; }

.iw-fb-good    { color: #86efac !important; }
.iw-fb-improve { color: #fde68a !important; }
.iw-fb-impress { color: #c4b5fd !important; }

/* ===================================================
   MANASWI LAUNCHER MODAL
   =================================================== */
.launcher-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 18, 0.88);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}
.launcher-overlay[hidden] { display: none; }

.launcher-card {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 18px;
  padding: 44px 40px 52px;
  width: 600px;
  max-width: 95vw;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
}

.launcher-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #484f58;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.launcher-close:hover { color: #c9d1d9; background: #161b22; }

.launcher-title-box {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 14px 28px;
  width: 100%;
  text-align: center;
}
.launcher-title {
  color: #c9d1d9;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.launcher-btns {
  display: flex;
  gap: 20px;
  width: 100%;
}

.launcher-btn {
  flex: 1;
  background: #0d1117;
  border: 1.5px solid #30363d;
  border-radius: 12px;
  padding: 26px 20px 24px;
  color: #c9d1d9;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.launcher-btn:hover {
  border-color: #58a6ff;
  background: #161b22;
  transform: translateY(-2px);
}
.launcher-btn:active { transform: translateY(0); }

.launcher-btn-icon {
  width: 48px;
  height: 48px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.launcher-btn:hover .launcher-btn-icon {
  border-color: #58a6ff;
  background: #1c2333;
}

.launcher-btn-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #f0f6fc;
}

.launcher-btn-desc {
  font-size: 12.5px;
  color: #484f58;
  line-height: 1.55;
}
.launcher-btn:hover .launcher-btn-desc { color: #8b949e; }

@media (max-width: 500px) {
  .launcher-btns { flex-direction: column; }
  .launcher-card  { padding: 32px 20px 40px; }
}

/* ===================================================
   JD-FOCUS FIELDS
   =================================================== */
.iw-jd-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.iw-jd-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #1e2740;
  border: 1.5px solid #3a4870;
  border-radius: 8px;
  color: #a0aec8;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.iw-jd-upload-btn:hover { background: #273358; border-color: #4f7ef8; color: #d0dcff; }

.iw-jd-or {
  font-size: 12px;
  color: #4a5580;
}

.iw-jd-filename {
  font-size: 12px;
  color: #4f7ef8;
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iw-jd-textarea {
  width: 100%;
  background: #141928;
  border: 1.5px solid #2a3352;
  border-radius: 10px;
  color: #c8d4f0;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
  min-height: 160px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.iw-jd-textarea:focus {
  outline: none;
  border-color: #4f7ef8;
}
.iw-jd-textarea::placeholder { color: #3a4870; }

.iw-jd-counter {
  text-align: right;
  font-size: 11.5px;
  color: #3a4870;
  margin-top: 5px;
}

.iw-mode-card-jd { grid-column: span 2; }
.iw-mode-card-jd:hover  { border-color: rgba(167,139,250,0.4); background: rgba(167,139,250,0.04); }
.iw-mode-card-jd.active { border-color: #a78bfa; background: rgba(167,139,250,0.08); }
.iw-mode-card-jd.active .iw-mode-icon { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

/* ── Language toggle ── */
.iw-lang-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.iw-lang-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
  user-select: none;
}
.iw-lang-opt input { display: none; }
.iw-lang-opt.active {
  border-color: #7c5ce8;
  background: rgba(124,92,232,0.12);
  color: white;
}
.iw-lang-name { font-weight: 500; }
.iw-lang-badge {
  font-size: 0.67rem;
  background: rgba(124,92,232,0.3);
  color: #c4b5fd;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
