*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #f8f9fc;
  --card:     #ffffff;
  --border:   #e2e8f0;
  --accent:   #6366f1;
  --accent-h: #4f46e5;
  --text:     #0f172a;
  --muted:    #64748b;
  --dim:      #94a3b8;
  --green:    #10b981;
  --radius:   12px;
  --shadow:   0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --font:     'Inter', -apple-system, sans-serif;
}

body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; }

/* ── HEADER ── */
.header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 18px; font-weight: 800; color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 12px; }

.events-badge { font-size: 12px; font-weight: 600; background: #f0fdf4; color: var(--green); border: 1px solid #bbf7d0; padding: 4px 10px; border-radius: 20px; }
.events-badge.low { background: #fff7ed; color: #ea580c; border-color: #fed7aa; }

.btn-signin { background: var(--accent); color: #fff; border: none; padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s; }
.btn-signin:hover { background: var(--accent-h); }

.user-info { display: flex; align-items: center; gap: 8px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; }
.btn-signout { background: none; border: 1px solid var(--border); color: var(--muted); padding: 5px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.btn-signout:hover { border-color: var(--accent); color: var(--accent); }

/* ── HERO ── */
.hero { max-width: 760px; margin: 0 auto; padding: 60px 24px 40px; text-align: center; }

.banner { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; padding: 8px 20px; border-radius: 30px; font-size: 13px; font-weight: 600; margin-bottom: 28px; }
.banner-fine { font-size: 11px; opacity: 0.8; font-weight: 400; }

.hero-title { font-size: clamp(28px, 5vw, 44px); font-weight: 800; line-height: 1.2; margin-bottom: 14px; background: linear-gradient(135deg, #0f172a, #6366f1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { font-size: 16px; color: var(--muted); margin-bottom: 32px; line-height: 1.6; }

/* ── SEARCH FORM ── */
.search-form { display: flex; flex-direction: column; gap: 12px; }
.jd-input { width: 100%; padding: 16px 18px; border: 2px solid var(--border); border-radius: var(--radius); font-family: var(--font); font-size: 14px; color: var(--text); resize: vertical; min-height: 120px; transition: border-color .2s; background: var(--card); box-shadow: var(--shadow); }
.jd-input:focus { outline: none; border-color: var(--accent); }
.jd-input::placeholder { color: var(--dim); }

.btn-search { background: linear-gradient(135deg, var(--accent), #8b5cf6); color: #fff; border: none; padding: 14px 32px; border-radius: var(--radius); font-size: 15px; font-weight: 700; cursor: pointer; transition: opacity .2s, transform .1s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-search:hover { opacity: 0.92; }
.btn-search:active { transform: scale(0.98); }
.btn-search:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── QUICK STARTERS ── */
.quick-starters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.qs-label { font-size: 12px; color: var(--dim); }
.qs-btn { background: var(--card); border: 1px solid var(--border); color: var(--muted); padding: 5px 14px; border-radius: 20px; font-size: 12px; cursor: pointer; transition: border-color .2s, color .2s; }
.qs-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── SPINNER ── */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESULTS ── */
.results-section { max-width: 1100px; margin: 0 auto; padding: 0 24px 60px; }
.results-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.results-header h2 { font-size: 20px; font-weight: 700; }
.results-count { font-size: 13px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); padding: 3px 10px; border-radius: 20px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.results-table { width: 100%; border-collapse: collapse; background: var(--card); }
.results-table th { background: #f1f5f9; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.results-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: top; }
.results-table tr:last-child td { border-bottom: none; }
.results-table tr:hover td { background: #f8fafc; }

.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 800; font-size: 13px; }
.rank-1 { background: #fef3c7; color: #d97706; }
.rank-2 { background: #f1f5f9; color: #475569; }
.rank-3 { background: #fef3c7; color: #92400e; }
.rank-other { background: #f8fafc; color: var(--dim); }

.role-title { font-weight: 600; color: var(--text); }
.skills-wrap { display: flex; flex-wrap: wrap; gap: 4px; max-width: 200px; }
.skill-tag { background: #ede9fe; color: #6d28d9; font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 4px; }

.score-bar-wrap { display: flex; align-items: center; gap: 8px; }
.score-bar { width: 60px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--green), #34d399); }
.score-num { font-weight: 700; font-size: 13px; color: var(--green); }

.reasoning-text { font-size: 12px; color: var(--muted); line-height: 1.5; max-width: 260px; }

.pii-masked { color: var(--dim); font-style: italic; font-size: 12px; }
.btn-unmask { background: var(--accent); color: #fff; border: none; padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; transition: background .2s; white-space: nowrap; }
.btn-unmask:hover { background: var(--accent-h); }
.pii-revealed { font-size: 12px; line-height: 1.6; }
.pii-revealed span { display: block; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 200; backdrop-filter: blur(4px); }
.modal { background: var(--card); border-radius: 16px; padding: 40px 36px; max-width: 380px; width: 90%; text-align: center; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 18px; color: var(--dim); cursor: pointer; }
.modal-icon { font-size: 36px; margin-bottom: 12px; }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.modal-desc { font-size: 14px; color: var(--muted); margin-bottom: 24px; line-height: 1.5; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--card); font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.btn-google:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.1); }

.hidden { display: none !important; }
