:root {
  --bg: #07070d;
  --bg-card: rgba(18, 18, 30, 0.6);
  --bg-card-hover: rgba(26, 26, 46, 0.8);
  --text: #e8e8ed;
  --text-secondary: #8888a0;
  --text-muted: #5a5a72;
  --accent: #6c6cf0;
  --accent2: #a855f7;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --border: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* NAV */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(7, 7, 13, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.logo { font-size: 1.3rem; font-weight: 800; }
.logo-accent { color: var(--accent); }

.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-size: 0.85rem; color: var(--text-secondary); transition: color 0.3s; }
.nav-links a:hover { color: var(--text); }

/* HERO */
#hero { padding: 8rem 0 3rem; text-align: center; }

.hero-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(108, 108, 240, 0.08);
  border: 1px solid rgba(108, 108, 240, 0.15);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero-title {
  display: block;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-title.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 1rem auto 0;
  font-size: 1.05rem;
}

/* FORM */
#analisis { padding: 3rem 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.form-card h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.3rem; }

.form-hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.75rem; }

.upload-zone {
  border: 2px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 0.75rem;
  position: relative;
  color: var(--text-muted);
}
.upload-zone:hover { border-color: var(--accent); background: rgba(108,108,240,0.04); color: var(--text-secondary); }
.upload-zone.drag-over { border-color: var(--accent); background: rgba(108,108,240,0.08); }
.upload-zone svg { display: block; margin: 0 auto 0.4rem; opacity: 0.5; }
.upload-zone:hover svg { opacity: 0.8; }
.upload-text { font-size: 0.85rem; font-weight: 600; }
.upload-hint { font-size: 0.75rem; margin-top: 0.15rem; }

.upload-filename {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--success);
  margin-top: 0.4rem;
}
.upload-filename[hidden] { display: none; }

.upload-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent);
}
.upload-loader[hidden] { display: none; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(108,108,240,0.2);
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

textarea {
  width: 100%;
  height: 260px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 1rem;
  resize: vertical;
  transition: border-color 0.3s;
}

textarea:focus { outline: none; border-color: var(--accent); }
textarea::placeholder { color: var(--text-muted); }

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
}

.char-count { font-size: 0.78rem; color: var(--text-muted); }

.analyze-wrap { text-align: center; margin-top: 2rem; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-family: inherit;
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  box-shadow: 0 4px 20px rgba(108, 108, 240, 0.3);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108, 108, 240, 0.4); }

.btn-large { padding: 1rem 2.5rem; font-size: 1rem; }

.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.dropdown { position: relative; display: inline-block; }

.dropdown-arrow { font-size: 0.65rem; margin-left: 0.3rem; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: #15152a;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem;
  z-index: 50;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.dropdown-opt {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.dropdown-opt:hover { background: rgba(108,108,240,0.1); color: var(--accent); }

/* RESULTS */
#resultados { padding: 2rem 0 5rem; }

.resultados-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.section-title { font-size: 1.6rem; font-weight: 800; }

/* SCORE */
.score-section {
  display: flex;
  align-items: center;
  gap: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.score-ring { position: relative; width: 180px; height: 180px; flex-shrink: 0; }

.score-ring svg { transform: rotate(-90deg); }

.score-bg { fill: none; stroke: rgba(255,255,255,0.04); stroke-width: 8; }
.score-progress { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }

.score-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#score-value { font-size: 2.8rem; font-weight: 800; }
#score-label { font-size: 0.8rem; color: var(--text-muted); }

.score-breakdown { flex: 1; display: flex; flex-direction: column; gap: 0.8rem; }

.breakdown-item { display: flex; align-items: center; gap: 1rem; }

.breakdown-label { font-size: 0.82rem; color: var(--text-secondary); width: 120px; flex-shrink: 0; }

.breakdown-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; }

.breakdown-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 1s ease; }

.breakdown-val { font-size: 0.82rem; font-weight: 700; color: var(--text); width: 35px; text-align: right; }

/* RESULTS GRID */
.results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s;
}

.result-card:hover { border-color: var(--border-hover); }

.result-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.result-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.result-icon.accent { background: rgba(108, 108, 240, 0.1); color: var(--accent); }
.result-icon.success { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.result-icon.info { background: rgba(59, 130, 246, 0.1); color: var(--info); }

.result-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; }

.result-card ul { list-style: none; }
.result-card ul li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}

.result-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.result-card ul li.ok::before { background: var(--success); }
.result-card ul li.warn::before { background: var(--warning); }
.result-card ul li.err::before { background: var(--danger); }

/* ATS */
.ats-summary { display: flex; gap: 1rem; margin-bottom: 0.75rem; font-size: 0.82rem; }
.ats-ok { color: var(--success); }
.ats-warn { color: var(--warning); }

.ats-contacto { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }

.contact-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
}
.contact-tag.ok { background: rgba(34,197,94,0.1); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.contact-tag.miss { background: rgba(239,68,68,0.1); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }

/* Skills */
.skill-category { margin-bottom: 1rem; }
.skill-category:last-child { margin-bottom: 0; }

.skill-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.skill-cat-header strong { color: var(--text); }

.skill-count { font-size: 0.75rem; color: var(--text-muted); }

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.skill-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.skill-tag.match {
  background: rgba(108,108,240,0.1);
  border-color: rgba(108,108,240,0.2);
  color: var(--accent);
}
.skill-tag.miss {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.15);
  color: var(--danger);
}

/* Matching */
.match-bar-wrap { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.match-bar { flex: 1; height: 10px; background: rgba(255,255,255,0.04); border-radius: 5px; overflow: hidden; }
.match-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 1s ease; }
.match-pct { font-size: 1.2rem; font-weight: 800; color: var(--accent); }

.match-stats { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.82rem; color: var(--text-secondary); }

/* Stats */
.stat-line { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.stat-line:last-child { border-bottom: none; }
.stat-line .label { color: var(--text-secondary); }
.stat-line .value { font-weight: 600; }

/* STEPS */
#como-funciona { padding: 5rem 0; text-align: center; }

#como-funciona .section-title { margin-bottom: 2.5rem; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.step-num {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  font-weight: 800;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* FOOTER */
footer { border-top: 1px solid var(--border); padding: 1.5rem 0; }

.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-inner p { font-size: 0.8rem; color: var(--text-muted); }
.footer-inner a { font-size: 0.8rem; color: var(--text-secondary); }
.footer-inner a:hover { color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .score-section { flex-direction: column; text-align: center; }
  .score-breakdown { width: 100%; }
  .breakdown-item { flex-wrap: wrap; }
  .breakdown-label { width: 100%; }
  .results-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
}
