:root {
  color-scheme: dark;
  --bg: #050507;
  --panel: rgba(18, 18, 24, 0.78);
  --panel-strong: rgba(25, 25, 32, 0.94);
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f6f7fb;
  --muted: #9ea4b5;
  --soft: #c9cedb;
  --accent: #f5f5f7;
  --accent-2: #9bbcff;
  --danger: #ff7a7a;
  --warning: #ffd27a;
  --success: #8ee7b0;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(84, 112, 255, 0.22), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.08), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.36;
}

.orb-one { width: 18rem; height: 18rem; background: #5c79ff; top: 7rem; right: 16%; }
.orb-two { width: 16rem; height: 16rem; background: #ffffff; bottom: 6rem; left: 10%; opacity: 0.08; }

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
  position: relative;
}

.topbar, .hero-card, .panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(25, 25, 32, 0.86), rgba(12, 12, 16, 0.74));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.topbar {
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand-block { display: flex; align-items: center; gap: 14px; }
.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f5f5f7, #868d9d);
  color: #07070a;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
}

h1, h2, h3 { margin: 0; letter-spacing: -0.045em; }
h1 { font-size: clamp(18px, 3vw, 28px); }
h2 { font-size: clamp(26px, 4vw, 50px); line-height: 0.98; max-width: 900px; }
h3 { font-size: 20px; }

.status-pill {
  color: var(--soft);
  border: 1px solid var(--line-strong);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  font-size: 13px;
}

.hero-card {
  border-radius: var(--radius-xl);
  padding: clamp(22px, 4vw, 46px);
  margin: 18px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}

.hero-copy { color: var(--soft); max-width: 760px; font-size: 16px; line-height: 1.65; }
.hero-stats {
  min-width: 310px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.hero-stats div {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
}
.hero-stats span { display: block; font-size: 24px; font-weight: 800; }
.hero-stats small { color: var(--muted); }

.grid-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 20px;
  min-width: 0;
}

.interview-panel { min-height: 640px; }
.panel-heading { margin-bottom: 18px; }
.row-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.mini-heading { margin-top: 8px; }

.field-label {
  display: block;
  color: var(--soft);
  font-weight: 700;
  font-size: 13px;
  margin: 14px 0 8px;
}

.field, .answer-box {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  outline: none;
  padding: 13px 14px;
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field:focus, .answer-box:focus {
  border-color: rgba(155, 188, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(155, 188, 255, 0.12);
  background: rgba(255, 255, 255, 0.075);
}

select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.answer-box { min-height: 210px; resize: vertical; line-height: 1.55; }
.answer-box::placeholder, .field::placeholder { color: rgba(201, 206, 219, 0.48); }

.primary-btn, .ghost-btn, .danger-btn {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
  transition: transform 160ms ease, border 160ms ease, background 160ms ease, opacity 160ms ease;
}
.primary-btn {
  color: #050507;
  background: linear-gradient(145deg, #f8f9ff, #aeb7c9);
  border-color: rgba(255, 255, 255, 0.5);
}
.ghost-btn { color: var(--text); background: rgba(255, 255, 255, 0.055); }
.danger-btn { color: #ffd4d4; background: rgba(255, 122, 122, 0.08); border-color: rgba(255, 122, 122, 0.24); }
.primary-btn:hover, .ghost-btn:hover, .danger-btn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.35); }
.primary-btn:disabled, .ghost-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.small { padding: 9px 13px; font-size: 12px; }
.button-stack { display: grid; gap: 10px; margin-top: 18px; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 18px; }

.hint-card, .question-card, .feedback-card, .weakness-item, .timeline-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.045);
}
.hint-card { margin-top: 18px; padding: 15px; color: var(--soft); line-height: 1.55; }
.hint-card p { margin: 8px 0 0; }
code { color: var(--accent-2); }

.question-card { padding: 20px; margin-bottom: 18px; }
.question-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; }
#questionText { font-size: clamp(20px, 3vw, 30px); line-height: 1.25; margin: 18px 0 0; letter-spacing: -0.035em; }

.feedback-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feedback-card { padding: 16px; min-height: 160px; }
.feedback-output { color: var(--soft); line-height: 1.58; }
.feedback-output ul { padding-left: 20px; margin: 8px 0 0; }
.feedback-output strong { color: var(--text); }

.weakness-list, .timeline-list { display: grid; gap: 10px; max-height: 460px; overflow: auto; padding-right: 4px; }
.weakness-list::-webkit-scrollbar, .timeline-list::-webkit-scrollbar, .answer-box::-webkit-scrollbar { width: 8px; }
.weakness-list::-webkit-scrollbar-thumb, .timeline-list::-webkit-scrollbar-thumb, .answer-box::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.18); border-radius: 999px; }

.weakness-item { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 14px; }
.weakness-item strong { display: block; font-size: 14px; }
.weakness-item small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.weakness-item span { color: #050507; background: var(--warning); border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 900; }

.timeline-item { padding: 14px; }
.timeline-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.timeline-top strong { font-size: 14px; }
.timeline-top span { color: var(--success); font-size: 12px; font-weight: 800; }
.timeline-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.empty-state { color: var(--muted); border: 1px dashed var(--line-strong); padding: 18px; border-radius: var(--radius-lg); text-align: center; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

@media (max-width: 1180px) {
  .grid-layout { grid-template-columns: 1fr 1fr; }
  .interview-panel { grid-column: 1 / -1; order: -1; }
}

@media (max-width: 820px) {
  .app-shell { width: min(100% - 20px, 1480px); padding-top: 10px; }
  .topbar, .hero-card { border-radius: 22px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-stats { min-width: 0; width: 100%; }
  .grid-layout { grid-template-columns: 1fr; }
  .feedback-grid { grid-template-columns: 1fr; }
  .row-heading { align-items: flex-start; flex-direction: column; }
  .status-pill { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; }
  .panel { padding: 16px; border-radius: 22px; }
  .question-meta { flex-direction: column; }
  .primary-btn, .ghost-btn, .danger-btn { width: 100%; }
}
