/* ══════════════════════════════════════════════════════════
   AI Resume Screener — Design System
   Dark mode, glassmorphism, violet-cyan gradient palette
   ══════════════════════════════════════════════════════════ */

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #09090f;
  --surface:   #111120;
  --surface2:  #181830;
  --border:    rgba(255,255,255,0.07);
  --border-h:  rgba(255,255,255,0.15);

  --primary:   #8b5cf6;
  --primary-h: #7c3aed;
  --accent:    #06b6d4;
  --accent-h:  #0891b2;

  --green:  #22c55e;
  --yellow: #eab308;
  --red:    #ef4444;

  --text-1: #f4f4f8;
  --text-2: #a1a1b5;
  --text-3: #6b6b85;

  --radius:   12px;
  --radius-lg: 20px;
  --shadow:   0 4px 32px rgba(0,0,0,0.5);
  --glow:     0 0 40px rgba(139,92,246,0.15);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Background Orbs ───────────────────────────────────── */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  animation: floatOrb 12s ease-in-out infinite alternate;
}
.bg-orb-1 { width: 600px; height: 600px; background: var(--primary); top: -200px; left: -200px; animation-duration: 14s; }
.bg-orb-2 { width: 500px; height: 500px; background: var(--accent); top: 40%; right: -150px; animation-duration: 10s; animation-delay: 2s; }
.bg-orb-3 { width: 400px; height: 400px; background: #ec4899; bottom: 10%; left: 30%; animation-duration: 16s; animation-delay: 4s; }

@keyframes floatOrb {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, -30px) scale(1.08); }
}

/* ── Layout ────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Header ────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px);
  background: rgba(9,9,15,0.75);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 1.4rem; }
.logo-text { font-size: 1.1rem; font-weight: 800; color: var(--text-1); }
.logo-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 2px 6px;
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 6px;
}
.header-nav { display: flex; align-items: center; gap: 12px; }

/* ── Buttons ───────────────────────────────────────────── */
button { cursor: pointer; font-family: var(--font); border: none; outline: none; }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-ghost:hover { background: var(--surface2); color: var(--text-1); border-color: var(--border-h); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

.btn-accent {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(139,92,246,0.45); }
.btn-icon { font-size: 0.9rem; }

.btn-accent-sm {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-accent-sm:hover { transform: translateY(-1px); }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-block;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  color: var(--primary);
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  animation: fadeUp 0.6s ease;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.12;
  margin-bottom: 20px;
  animation: fadeUp 0.6s ease 0.1s both;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  color: var(--text-2);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto 36px;
  animation: fadeUp 0.6s ease 0.2s both;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 32px;
  display: inline-flex;
  animation: fadeUp 0.6s ease 0.3s both;
}
.hero-stat { text-align: center; padding: 0 24px; }
.stat-num { display: block; font-size: 1.6rem; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 0.75rem; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.hero-stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ── Workflow Section ──────────────────────────────────── */
.workflow-section {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.section-subtitle { color: var(--text-2); margin-bottom: 32px; }

.workflow-pipeline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}
.workflow-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-align: center;
  min-width: 130px;
  transition: all 0.25s;
}
.workflow-node:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(139,92,246,0.15); }
.wf-output { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.05); }
.wf-icon { font-size: 1.8rem; margin-bottom: 8px; }
.wf-label { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.wf-desc { font-size: 0.72rem; color: var(--text-2); line-height: 1.4; }
.wf-arrow { color: var(--text-3); font-size: 1.4rem; }

.tool-stack { margin-top: 24px; }
.tool-stack-title { font-size: 0.85rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-chip { padding: 5px 14px; border-radius: 100px; font-size: 0.78rem; font-weight: 600; }
.chip-purple { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.25); }
.chip-blue   { background: rgba(59,130,246,0.12); color: #93c5fd; border: 1px solid rgba(59,130,246,0.25); }
.chip-green  { background: rgba(34,197,94,0.12);  color: #86efac; border: 1px solid rgba(34,197,94,0.25); }
.chip-orange { background: rgba(251,146,60,0.12); color: #fdba74; border: 1px solid rgba(251,146,60,0.25); }
.chip-red    { background: rgba(239,68,68,0.12);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }
.chip-teal   { background: rgba(6,182,212,0.12);  color: #67e8f9; border: 1px solid rgba(6,182,212,0.25); }

/* ── Main App ──────────────────────────────────────────── */
.app-main { padding: 0 0 80px; position: relative; z-index: 1; }

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 20px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.step-card:hover { border-color: var(--border-h); }

.step-header { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.step-number {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  min-width: 48px;
}
.step-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.step-desc { color: var(--text-2); font-size: 0.9rem; }

/* JD Input */
.jd-input-area { position: relative; }
.jd-textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 16px;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.jd-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139,92,246,0.12); }
.jd-textarea::placeholder { color: var(--text-3); }
.jd-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.jd-char-count { font-size: 0.75rem; color: var(--text-3); }

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  transition: all 0.25s;
  cursor: pointer;
  background: rgba(255,255,255,0.015);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(139,92,246,0.05);
  box-shadow: 0 0 0 4px rgba(139,92,246,0.08);
}
.upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-primary { font-size: 1rem; font-weight: 500; margin-bottom: 6px; }
.upload-link { background: none; border: none; color: var(--primary); font-weight: 600; cursor: pointer; padding: 0; font-size: 1rem; }
.upload-link:hover { text-decoration: underline; }
.upload-secondary { font-size: 0.82rem; color: var(--text-3); }

/* File List */
.file-list {
  margin-top: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
}
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  margin-bottom: 8px;
  animation: fadeIn 0.25s ease;
}
.file-icon { font-size: 1.3rem; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 0.75rem; color: var(--text-3); }
.file-status { font-size: 0.75rem; font-weight: 600; }
.file-status.ready { color: var(--green); }
.file-remove { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: 1rem; padding: 2px 6px; border-radius: 4px; }
.file-remove:hover { color: var(--red); background: rgba(239,68,68,0.1); }

/* Text resume */
.text-resume-toggle { margin-top: 16px; }
.text-resume-area { margin-top: 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.text-resume-footer { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.text-name-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-1);
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 8px 12px;
}
.text-name-input:focus { outline: none; border-color: var(--primary); }
.text-name-input::placeholder { color: var(--text-3); }

/* ── Evaluate Button ───────────────────────────────────── */
.evaluate-section { text-align: center; padding: 32px 0; }
.btn-evaluate {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--primary) 0%, #a855f7 50%, var(--accent) 100%);
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
  color: white;
  padding: 22px 56px;
  border-radius: 16px;
  font-family: var(--font);
  box-shadow: 0 8px 32px rgba(139,92,246,0.4), 0 0 0 0 rgba(139,92,246,0.4);
  transition: all 0.25s;
  cursor: pointer;
}
.btn-evaluate:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 48px rgba(139,92,246,0.55), 0 0 0 8px rgba(139,92,246,0.1);
}
.btn-evaluate:active { transform: translateY(0); }
.evaluate-icon { font-size: 1.8rem; }
.evaluate-text { font-size: 1.1rem; font-weight: 800; letter-spacing: 0.02em; }
.evaluate-sub { font-size: 0.75rem; opacity: 0.75; font-weight: 400; }

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Progress ──────────────────────────────────────────── */
.progress-section { margin-bottom: 24px; }
.progress-card {
  background: var(--surface);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 0 40px rgba(139,92,246,0.08);
}
.progress-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-weight: 600; }
.progress-spinner {
  width: 22px; height: 22px;
  border: 3px solid rgba(139,92,246,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-bar-track { height: 6px; background: rgba(255,255,255,0.06); border-radius: 100px; overflow: hidden; margin-bottom: 14px; }
.progress-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 100px; transition: width 0.5s ease; }
.progress-steps { display: flex; flex-direction: column; gap: 6px; }
.progress-step { font-size: 0.82rem; color: var(--text-2); display: flex; align-items: center; gap: 8px; animation: fadeIn 0.3s ease; }
.progress-step.done { color: var(--green); }
.progress-step::before { content: '○'; font-size: 0.6rem; }
.progress-step.done::before { content: '✓'; color: var(--green); }

/* ── Results ───────────────────────────────────────────── */
.results-section { animation: fadeUp 0.5s ease; }
.results-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.results-title { font-size: 1.6rem; font-weight: 800; }
.results-meta { color: var(--text-2); font-size: 0.875rem; margin-top: 4px; }
.results-actions { display: flex; gap: 10px; }

.summary-chips { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.summary-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid;
}
.chip-strong { background: rgba(34,197,94,0.08); color: var(--green); border-color: rgba(34,197,94,0.25); }
.chip-moderate { background: rgba(234,179,8,0.08); color: var(--yellow); border-color: rgba(234,179,8,0.25); }
.chip-notfit { background: rgba(239,68,68,0.08); color: var(--red); border-color: rgba(239,68,68,0.25); }
.chip-total { background: rgba(139,92,246,0.08); color: var(--primary); border-color: rgba(139,92,246,0.25); }

/* ── Table ─────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 16px; }
.results-table { width: 100%; border-collapse: collapse; }
.results-table thead { background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border); }
.results-table th {
  padding: 14px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  text-align: left;
  white-space: nowrap;
}
.results-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  animation: fadeIn 0.35s ease;
}
.results-table tbody tr:last-child { border-bottom: none; }
.results-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.results-table td { padding: 16px; vertical-align: top; font-size: 0.875rem; }

/* Rank cell */
.rank-cell { text-align: center; font-weight: 800; }
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 900;
}
.rank-1 { background: rgba(251,191,36,0.15); color: #fbbf24; border: 2px solid rgba(251,191,36,0.4); }
.rank-2 { background: rgba(148,163,184,0.12); color: #94a3b8; border: 2px solid rgba(148,163,184,0.3); }
.rank-3 { background: rgba(180,128,103,0.12); color: #cd7c5a; border: 2px solid rgba(180,128,103,0.3); }
.rank-n { background: rgba(255,255,255,0.05); color: var(--text-3); border: 2px solid var(--border); }

/* Name cell */
.name-cell { font-weight: 600; }
.exp-label { font-size: 0.72rem; color: var(--text-3); margin-top: 3px; }

/* Score cell */
.score-cell { min-width: 110px; }
.score-number {
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.score-bar-track { height: 5px; background: rgba(255,255,255,0.06); border-radius: 100px; margin-top: 6px; overflow: hidden; }
.score-bar { height: 100%; border-radius: 100px; width: 0%; transition: width 1s ease 0.3s; }

/* Breakdown cell */
.breakdown-cell { min-width: 160px; }
.breakdown-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 0.75rem; }
.breakdown-label { color: var(--text-3); width: 62px; flex-shrink: 0; }
.breakdown-bar-track { flex: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 100px; overflow: hidden; }
.breakdown-bar { height: 100%; border-radius: 100px; width: 0%; transition: width 1s ease 0.3s; }
.breakdown-val { color: var(--text-2); min-width: 28px; text-align: right; font-weight: 600; }

/* Strengths / Gaps */
.points-list { list-style: none; padding: 0; margin: 0; }
.points-list li { font-size: 0.8rem; color: var(--text-2); margin-bottom: 6px; display: flex; gap: 7px; align-items: flex-start; line-height: 1.35; }
.point-dot { flex-shrink: 0; margin-top: 3px; font-size: 0.55rem; }
.strength-dot { color: var(--green); }
.gap-dot { color: var(--red); }
.th-strengths, .th-gaps { min-width: 180px; }

/* Recommendation badge */
.rec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.rec-strong   { background: rgba(34,197,94,0.12); color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.rec-moderate { background: rgba(234,179,8,0.12); color: var(--yellow); border: 1px solid rgba(234,179,8,0.3); }
.rec-notfit   { background: rgba(239,68,68,0.1);  color: var(--red);   border: 1px solid rgba(239,68,68,0.25); }

/* Score Legend */
.score-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--text-2); }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-green  { background: var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-red    { background: var(--red); }

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  position: relative;
  z-index: 1;
}
.footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.footer-logo { font-weight: 800; font-size: 0.95rem; margin-bottom: 6px; }
.footer-desc { color: var(--text-3); font-size: 0.78rem; }

/* ── Animations ────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 56px 16px 40px; }
  .hero-stats { padding: 14px 12px; gap: 0; }
  .hero-stat { padding: 0 14px; }
  .stat-num { font-size: 1.2rem; }
  .step-card { padding: 22px 18px; }
  .step-header { flex-direction: column; gap: 10px; }
  .step-number { font-size: 1.8rem; }
  .btn-evaluate { padding: 18px 36px; }
  .results-header { flex-direction: column; }
  .workflow-pipeline { gap: 4px; }
  .workflow-node { min-width: 100px; padding: 14px 12px; }
  .wf-arrow { display: none; }
  .results-table th, .results-table td { padding: 10px 12px; }
}
