
/* HumanPro Tools Suite - unified product UI */
:root{
  --hp-bg-0:#03061a;
  --hp-bg-1:#061035;
  --hp-glow:#00f5ff;
  --hp-accent:#4f39f6;
  --hp-accent2:#00d4ff;
  --hp-text:#eaf0ff;
  --hp-muted:rgba(234,240,255,.75);
  --hp-card:rgba(8,18,55,.55);
  --hp-card2:rgba(8,18,55,.35);
  --hp-border:rgba(255,255,255,.10);
  --hp-border2:rgba(0,245,255,.22);
  --hp-radius:22px;
  --hp-radius2:16px;
  --hp-shadow: 0 20px 60px rgba(0,0,0,.45);
}

body.hp-tool-page{
  background: radial-gradient(1200px 700px at 20% 10%, rgba(0,245,255,.18), transparent 60%),
              radial-gradient(900px 600px at 80% 20%, rgba(79,57,246,.18), transparent 55%),
              linear-gradient(180deg, var(--hp-bg-1), var(--hp-bg-0));
  color: var(--hp-text);
}

.hp-tool-wrap{ max-width: 1220px; margin: 0 auto; padding: 28px 18px 64px; position: relative; z-index: 2;}
@media (min-width: 768px){ .hp-tool-wrap{ padding: 42px 22px 80px; } }

.hp-tool-hero{
  border:1px solid var(--hp-border);
  background: linear-gradient(180deg, rgba(10,20,60,.55), rgba(6,12,40,.35));
  border-radius: calc(var(--hp-radius) + 6px);
  padding: 22px 18px;
  box-shadow: var(--hp-shadow);
  backdrop-filter: blur(12px);
  overflow: hidden;
  position: relative;
}
.hp-tool-hero:before{
  content:"";
  position:absolute; inset:-2px;
  background: radial-gradient(500px 220px at 15% 20%, rgba(0,245,255,.20), transparent 60%),
              radial-gradient(520px 240px at 85% 10%, rgba(79,57,246,.18), transparent 60%);
  pointer-events:none;
}
.hp-tool-hero > *{ position: relative; }

.hp-tool-badge{
  display:inline-flex; gap:8px; align-items:center;
  padding: 7px 10px;
  border-radius: 999px;
  border:1px solid rgba(0,245,255,.25);
  background: rgba(0,0,0,.25);
  font-size: 12px;
  color: var(--hp-muted);
  margin-bottom: 10px;
}
.hp-tool-hero h1{ font-size: 34px; line-height:1.05; margin: 2px 0 10px; letter-spacing: -.6px;}
@media (min-width: 768px){ .hp-tool-hero h1{ font-size: 42px; } }
.hp-tool-hero p{ margin:0 0 12px; color: var(--hp-muted); max-width: 60ch; }
.hp-tool-chips{ display:flex; flex-wrap:wrap; gap:10px; margin-top: 10px; }
.hp-chip{
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(234,240,255,.85);
}

.hp-tool-grid{
  margin-top: 18px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 992px){
  .hp-tool-grid{ grid-template-columns: 420px 1fr; gap: 18px; align-items:start; }
}

.hp-panel{
  border:1px solid var(--hp-border);
  background: linear-gradient(180deg, var(--hp-card), var(--hp-card2));
  border-radius: var(--hp-radius);
  box-shadow: var(--hp-shadow);
  backdrop-filter: blur(14px);
  overflow: visible;
  position: relative;
  padding: 16px;
}
@media (min-width: 768px){ .hp-panel{ padding: 18px; } }

.hp-panel-title{
  display:flex; align-items:center; gap:10px;
  font-size: 14px; color: rgba(234,240,255,.88);
  margin: 2px 0 12px;
  letter-spacing: .2px;
}
.hp-panel-title .dot{
  width:10px; height:10px; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, var(--hp-accent2), var(--hp-accent));
  box-shadow: 0 0 0 6px rgba(0,245,255,.08);
}

.hp-panel .upload-zone,
.hp-panel .upload-area,
.hp-panel .file-upload,
.hp-panel form{
  margin: 0 !important;
}

.hp-output-empty{
  display:flex; flex-direction:column; gap:10px;
  padding: 14px;
  border: 1px dashed rgba(0,245,255,.25);
  border-radius: var(--hp-radius2);
  background: rgba(0,0,0,.18);
  color: rgba(234,240,255,.78);
}

.hp-kpi-row{ display:flex; flex-wrap:wrap; gap:10px; margin-top: 10px; }
.hp-kpi{
  flex: 1 1 160px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  border-radius: 14px;
  padding: 10px 12px;
}
.hp-kpi .k{ font-size:12px; color: rgba(234,240,255,.70); }
.hp-kpi .v{ font-size:18px; font-weight: 800; letter-spacing:-.4px; margin-top:3px; }

/* Buttons: keep sizes moderate inside tools */
.hp-panel button,
.hp-panel .btn,
.hp-panel a.btn,
.hp-panel input[type="submit"],
.hp-panel input[type="button"]{
  font-size: 14px !important;
  padding: 12px 16px !important;
  border-radius: 999px !important;
}

/* Result container fixes */
#analysisSection, .analysis-section, .result-section, #resultContainer, .results-container{
  overflow: visible !important;
}

/* Prevent weird clipping from legacy transforms */
.analyzer-section, .analyzer-page, .tool-section, main{
  overflow: visible !important;
}

/* Loading overlay for tools */
.hp-loading{
  display:none;
  position:absolute; inset:0;
  border-radius: var(--hp-radius);
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(10px);
  align-items:center; justify-content:center;
  z-index: 10;
}
.hp-loading.active{ display:flex; }
.hp-loading .box{
  width: min(520px, 92%);
  border:1px solid rgba(0,245,255,.25);
  border-radius: 18px;
  background: rgba(6,12,40,.65);
  padding: 18px;
  text-align:center;
}
.hp-loading .box h3{ margin: 0 0 6px; font-size: 18px; }
.hp-loading .box p{ margin: 0; color: rgba(234,240,255,.75); font-size: 13px; }
.hp-progress{
  height:10px; border-radius: 999px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  overflow:hidden;
  margin-top: 14px;
}
.hp-progress > span{
  display:block; height:100%;
  width: 35%;
  background: linear-gradient(90deg, var(--hp-accent), var(--hp-accent2));
  animation: hpProg 1.2s ease-in-out infinite alternate;
}
@keyframes hpProg{ from{ width: 18%; } to{ width: 78%; } }

/* Dark select dropdown readability */
select{
  color: var(--hp-text) !important;
  background-color: rgba(0,0,0,.28) !important;
}
select option{ color:#111; }


/* --- HumanPro WOW Chat (Interview Simulator) --- */
.hp-chat{display:flex;flex-direction:column;gap:12px;min-height:520px}
.hp-chat-thread{flex:1;min-height:320px;max-height:520px;overflow:auto;padding:14px;border-radius:18px;background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.10)}
.hp-msg{display:flex;margin:10px 0}
.hp-msg .bubble{max-width:min(82%,560px);padding:12px 14px;border-radius:16px;line-height:1.35;font-size:14px}
.hp-msg.ai{justify-content:flex-start}
.hp-msg.ai .bubble{background:rgba(255,255,255,0.10);border:1px solid rgba(255,255,255,0.12);border-top-left-radius:8px}
.hp-msg.user{justify-content:flex-end}
.hp-msg.user .bubble{background:rgba(0,245,255,0.14);border:1px solid rgba(0,245,255,0.22);border-top-right-radius:8px}
.hp-msg .meta{opacity:.72;font-size:11px;margin-top:6px}
.hp-chat-typing{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:16px;background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.10)}
.hp-chat-typing .dot{width:6px;height:6px;border-radius:99px;background:rgba(255,255,255,0.75);display:inline-block;animation:hpDot 1.2s infinite}
.hp-chat-typing .dot:nth-child(2){animation-delay:.15s}
.hp-chat-typing .dot:nth-child(3){animation-delay:.3s}
.hp-chat-typing .txt{font-size:12px;opacity:.8}
@keyframes hpDot{0%,80%,100%{transform:translateY(0);opacity:.55}40%{transform:translateY(-4px);opacity:1}}
.hp-chat-composer{display:flex;gap:10px;align-items:center}
.hp-chat-input{flex:1;border-radius:14px;padding:12px 12px;border:1px solid rgba(255,255,255,0.12);background:rgba(0,0,0,0.25);color:#fff;outline:none}
.hp-chat-input::placeholder{color:rgba(255,255,255,0.55)}
.hp-chat-send{border-radius:14px;padding:12px 14px;border:1px solid rgba(0,245,255,0.25);background:rgba(0,245,255,0.12);color:#fff;font-weight:700;cursor:pointer;transition:transform .15s ease, box-shadow .2s ease}
.hp-chat-send:hover{transform:translateY(-1px);box-shadow:0 14px 30px rgba(0,245,255,0.14)}
.hp-coach{padding:12px 14px;border-radius:16px;background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.10)}
.hp-coach h4{margin:0 0 6px;font-size:13px}
.hp-coach .pill{display:inline-block;margin:6px 6px 0 0;padding:6px 10px;border-radius:999px;font-size:12px;border:1px solid rgba(255,255,255,0.12);background:rgba(255,255,255,0.06)}
.hp-seg{display:grid;grid-template-columns:1fr;gap:10px}
.hp-seg-btn{width:100%;text-align:left;border-radius:16px;padding:14px 14px;border:1px solid rgba(255,255,255,0.14);background:rgba(0,0,0,0.22);color:#fff;font-weight:800;cursor:pointer;min-height:48px;transition:transform .15s ease, background .2s ease, border-color .2s ease}
.hp-seg-btn.active{background:rgba(0,245,255,0.14);border-color:rgba(0,245,255,0.22)}
@media (max-width: 720px){
  .hp-chat{min-height:auto}
  .hp-chat-thread{max-height:380px}
}

/* --- WOW Tool Components (Interview + Salary + New Tools) --- */
.hp-panel-head{display:flex;flex-direction:column;gap:4px;margin-bottom:14px}
.hp-panel-head .hp-panel-title{margin:0;font-size:15px;font-weight:700}
.hp-panel-sub{color:rgba(234,240,255,.70);font-size:12.5px;line-height:1.35}

.hp-form{display:flex;flex-direction:column;gap:12px}
.hp-row{display:grid;grid-template-columns:1fr;gap:12px}
@media (min-width: 640px){.hp-row{grid-template-columns:repeat(2,minmax(0,1fr));}}
.hp-col{display:flex;flex-direction:column;gap:6px}

.hp-label{font-size:12px;color:rgba(234,240,255,.80);letter-spacing:.2px}
.hp-hint{font-size:11.5px;color:rgba(234,240,255,.60);line-height:1.35}

.hp-input,.hp-select,.hp-chat-input,textarea.hp-input{
  width:100%;
  background: rgba(6,10,20,.55);
  border:1px solid rgba(120,140,190,.22);
  border-radius:14px;
  color:rgba(234,240,255,.92);
  padding:12px 12px;
  outline:none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.hp-input::placeholder,.hp-chat-input::placeholder{color:rgba(234,240,255,.45)}
.hp-input:focus,.hp-select:focus,.hp-chat-input:focus{
  border-color: rgba(0,245,255,.45);
  box-shadow: 0 0 0 4px rgba(0,245,255,.10);
}
.hp-select{appearance:none;background-image: linear-gradient(45deg, transparent 50%, rgba(234,240,255,.75) 50%), linear-gradient(135deg, rgba(234,240,255,.75) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat:no-repeat;
  padding-right: 34px;
}

.hp-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:4px}
.hp-actions .hp-btn{flex:1 1 180px}
@media (max-width: 420px){.hp-actions .hp-btn{flex:1 1 100%}}

.hp-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  border-radius:999px;
  padding:12px 14px;
  font-weight:800;
  font-size:13px;
  line-height:1;
  cursor:pointer;
  user-select:none;
  min-height:44px;
}
.hp-btn-primary{background: rgba(12,16,28,.92); color:#fff}
.hp-btn-ghost{background: rgba(255,255,255,.06); color:rgba(234,240,255,.92); border:1px solid rgba(255,255,255,.12)}
.hp-btn:active{transform: scale(.98)}
.hp-btn-primary:hover,.hp-btn-ghost:hover{filter:brightness(1.05)}

.hp-seg{display:grid;grid-template-columns:1fr;gap:10px}
.hp-seg-btn{width:100%;text-align:left;border-radius:16px;padding:14px 14px;border:1px solid rgba(255,255,255,0.14);background:rgba(0,0,0,0.22);color:#fff;font-weight:800;cursor:pointer;min-height:48px;transition:transform .15s ease, background .2s ease, border-color .2s ease}
.hp-seg-btn.active{
  background: rgba(0,245,255,.12);
  border-color: rgba(0,245,255,.35);
  color: rgba(234,240,255,.98);
}

.hp-kpis{display:grid;grid-template-columns:1fr;gap:12px;margin-top:10px}
@media (min-width: 640px){.hp-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}}
.hp-kpi{border:1px solid rgba(120,140,190,.18);border-radius:16px;padding:12px;background: rgba(5,9,18,.35)}
.hp-kpi .t{font-size:12px;color:rgba(234,240,255,.70);margin-bottom:6px}
.hp-kpi .v{font-size:22px;font-weight:900;letter-spacing:-.02em}
.hp-kpi .bar{height:9px;border-radius:999px;background: rgba(255,255,255,.08);overflow:hidden;margin-top:8px}
.hp-kpi .bar>span{display:block;height:100%;width:30%;background: linear-gradient(90deg,#00F5FF,#4F39F6,#E0724A)}

.hp-card{border:1px solid rgba(120,140,190,.16);border-radius:18px;padding:14px;background: rgba(5,9,18,.32)}
.hp-card h3{margin:0 0 8px;font-size:14px}
.hp-card p{margin:0;color:rgba(234,240,255,.72);font-size:12.5px;line-height:1.5}

/* Chat */
.hp-chat{display:flex;flex-direction:column;gap:10px;height:100%}
.hp-chat-thread{
  flex:1;
  border:1px solid rgba(120,140,190,.16);
  border-radius:18px;
  background: rgba(5,9,18,.28);
  padding:12px;
  overflow:auto;
  max-height: 520px;
}
@media (max-width: 640px){.hp-chat-thread{max-height: 56vh}}
.hp-bubble{
  max-width:min(520px, 92%);
  padding:10px 12px;
  border-radius:16px;
  margin:8px 0;
  font-size:13px;
  line-height:1.45;
}
.hp-bubble.ai{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color:rgba(234,240,255,.92);
}
.hp-bubble.user{
  margin-left:auto;
  background: rgba(0,245,255,.10);
  border:1px solid rgba(0,245,255,.22);
  color:rgba(234,240,255,.95);
}
.hp-chat-typing{font-size:12px;color:rgba(234,240,255,.55);margin-top:6px}
.hp-chat-composer{display:flex;gap:10px;align-items:flex-end}
.hp-chat-send{min-width:110px}

/* Results spacing */
.hp-output-stack{display:flex;flex-direction:column;gap:12px}

/* Salary/Result blocks */
.hp-divider{height:1px;background:rgba(255,255,255,.10);margin:14px 0}
.hp-score-row{display:grid;grid-template-columns:1fr;gap:12px}
@media (min-width: 640px){.hp-score-row{grid-template-columns:repeat(2,minmax(0,1fr));}}
.hp-score-card{border:1px solid rgba(120,140,190,.16);border-radius:18px;padding:14px;background: rgba(5,9,18,.30)}
.hp-score-label{font-size:12px;color:rgba(234,240,255,.68);margin-bottom:8px}
.hp-score-value{font-size:20px;font-weight:900;letter-spacing:-.02em}
@media(min-width:768px){.hp-score-value{font-size:24px}}
.hp-score-sub{font-size:12px;color:rgba(234,240,255,.60);margin-top:6px;line-height:1.4}

.hp-list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}
.hp-list li{display:flex;gap:10px;align-items:flex-start;border:1px solid rgba(120,140,190,.12);background: rgba(255,255,255,.04);border-radius:14px;padding:10px}
.hp-list .ic{width:20px;height:20px;border-radius:10px;background: rgba(0,245,255,.12);border:1px solid rgba(0,245,255,.25);flex:0 0 auto;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:12px;color:rgba(234,240,255,.92)}
.hp-list p{margin:0;font-size:12.5px;color:rgba(234,240,255,.78);line-height:1.45}

/* Make global button shine not oversized in tight spots */
.hp-actions button, .hp-actions .hp-btn{max-width:100%}

.hp-seg-btn:hover{transform:translateY(-1px);border-color:rgba(0,245,255,0.45)}

@media (min-width: 700px){
  .hp-seg{grid-template-columns:1fr 1fr}
}
