/* ========================================
   Career Roadmap — Form + Infographic Styles
   ======================================== */

/* ===== FORM PHASE ===== */
.cr-page { padding: 100px 0 60px; min-height: 100vh; }
.cr-container { max-width: 720px; margin: 0 auto; padding: 0 20px; }

.cr-header { text-align: center; margin-bottom: 36px; }
.cr-header-icon { font-size: 48px; margin-bottom: 12px; }
.cr-header h1 { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 800; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cr-header p { color: var(--text-secondary); font-size: 1.05rem; }

/* Progress */
.cr-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 32px; }
.cr-progress-step { flex: 1; height: 5px; border-radius: 3px; background: var(--border-subtle); transition: background 0.4s; }
.cr-progress-step.active { background: var(--primary); }
.cr-progress-step.done { background: var(--secondary); }
.cr-step-label { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 24px; }

/* Form Card */
.cr-form-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 32px; }
.cr-form-card h2 { font-family: var(--font-heading); font-size: 1.4rem; margin-bottom: 6px; }
.cr-form-card .cr-form-desc { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 24px; }

/* Steps */
.cr-step { display: none; }
.cr-step.active { display: block; animation: crFadeIn 0.35s ease; }
@keyframes crFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Inputs */
.cr-field { margin-bottom: 18px; }
.cr-field label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.cr-field input, .cr-field select, .cr-field textarea {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.03); color: var(--text-primary); font-family: var(--font-body); font-size: 0.95rem;
  outline: none; transition: border-color 0.2s; }
.cr-field input:focus, .cr-field select:focus, .cr-field textarea:focus { border-color: var(--primary); }
.cr-field select option { background: #1a1a2e; color: #fff; }
.cr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Degree Cards */
.cr-degree-card { background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 20px; margin-bottom: 14px; position: relative; }
.cr-degree-card .cr-remove-deg { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--accent); font-size: 1.2rem; cursor: pointer; opacity: 0.6; transition: opacity 0.2s; }
.cr-degree-card .cr-remove-deg:hover { opacity: 1; }
.cr-add-degree { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 50px; background: rgba(108,99,255,0.1); border: 1px dashed rgba(108,99,255,0.3); color: var(--primary-light); font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all 0.2s; margin-top: 4px; }
.cr-add-degree:hover { background: rgba(108,99,255,0.18); border-color: var(--primary); }

/* Goal Tags */
.cr-goal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cr-goal-tag { padding: 8px 18px; border-radius: 50px; background: rgba(255,255,255,0.05); border: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.cr-goal-tag:hover { border-color: var(--primary); color: var(--primary-light); }
.cr-goal-tag.selected { background: rgba(108,99,255,0.15); border-color: var(--primary); color: var(--primary-light); }

/* Skip Button */
.cr-skip-btn { display: block; margin: 12px auto 0; background: none; border: none; color: var(--text-muted); font-size: 0.85rem; cursor: pointer; text-decoration: underline; transition: color 0.2s; }
.cr-skip-btn:hover { color: var(--text-secondary); }

/* Nav Buttons */
.cr-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; }
.cr-nav-back { padding: 10px 24px; border-radius: 50px; background: var(--bg-glass); border: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: 0.9rem; cursor: pointer; transition: all 0.2s; }
.cr-nav-back:hover { background: var(--bg-glass-strong); color: var(--text-primary); }
.cr-nav-back.hidden { visibility: hidden; }
.cr-nav-next, .cr-generate-btn { padding: 12px 28px; border-radius: 50px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border: none; color: #fff; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 20px rgba(108,99,255,0.3); }
.cr-nav-next:hover, .cr-generate-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,99,255,0.5); }
.cr-nav-next:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.cr-generate-btn { width: 100%; padding: 16px; font-size: 1.05rem; margin-top: 8px; }

/* ===== LOADING STATE ===== */
.cr-loading { text-align: center; padding: 80px 20px; }
.cr-loading-icon { font-size: 56px; margin-bottom: 20px; animation: crPulse 2s infinite; }
@keyframes crPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.cr-loading h2 { font-family: var(--font-heading); margin-bottom: 12px; }
.cr-loading p { color: var(--text-muted); margin-bottom: 24px; }
.cr-loading-dots { display: inline-flex; gap: 8px; }
.cr-loading-dots span { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); animation: crBlink 1.4s infinite both; }
.cr-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.cr-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes crBlink { 0% { opacity: 0.2; transform: scale(0.8); } 20% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0.2; transform: scale(0.8); } }
.cr-loading-steps { max-width: 400px; margin: 30px auto 0; text-align: left; }
.cr-loading-step { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--text-muted); font-size: 0.9rem; transition: color 0.3s; }
.cr-loading-step.active { color: var(--primary-light); }
.cr-loading-step.done { color: var(--secondary); }

/* ===== ROADMAP OUTPUT ===== */
.cr-roadmap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Banner */
.cr-banner { background: linear-gradient(135deg, #1a1060 0%, #2d1b8e 30%, #4527a0 60%, #1a237e 100%); border-radius: var(--radius-lg); padding: 36px 40px; margin-bottom: 28px; display: flex; justify-content: space-between; align-items: center; position: relative; overflow: hidden; }
.cr-banner::before { content: ''; position: absolute; top: -50%; right: -10%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(108,99,255,0.3), transparent 70%); border-radius: 50%; }
.cr-banner-left { position: relative; z-index: 1; }
.cr-banner-brand { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.cr-banner-brand strong { color: #fff; font-size: 1.1rem; }
.cr-banner h1 { font-family: var(--font-heading); font-size: 2rem; font-weight: 900; color: #fff; line-height: 1.2; }
.cr-banner h1 span { display: block; background: linear-gradient(90deg, #ffd54f, #ffab40); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cr-banner-sub { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin-top: 6px; }
.cr-banner-right { text-align: right; position: relative; z-index: 1; }
.cr-banner-tagline { color: rgba(255,255,255,0.85); font-size: 0.95rem; line-height: 1.6; font-weight: 500; }
.cr-banner-tagline strong { color: #ffd54f; }

/* Section Headers */
.cr-section { margin-bottom: 28px; }
.cr-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--border-subtle); }
.cr-section-number { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; flex-shrink: 0; }
.cr-section-title { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

/* Profile Summary */
.cr-profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 20px; }
.cr-profile-data { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 20px; }
.cr-profile-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.88rem; }
.cr-profile-row:last-child { border-bottom: none; }
.cr-profile-label { color: var(--text-muted); font-weight: 600; }
.cr-profile-value { color: var(--text-primary); text-align: right; max-width: 160px; }
.cr-profile-summary-text { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 24px; display: flex; align-items: center; }
.cr-profile-summary-text p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.8; }

/* Career Fit Scores */
.cr-scores-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cr-score-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 24px; text-align: center; position: relative; }
.cr-score-rank { position: absolute; top: 12px; left: 14px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; }
.cr-score-rank.rank-1 { background: rgba(255,215,0,0.2); color: #ffd700; }
.cr-score-rank.rank-2 { background: rgba(192,192,192,0.2); color: #c0c0c0; }
.cr-score-rank.rank-3 { background: rgba(205,127,50,0.2); color: #cd7f32; }
.cr-score-title { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; }
.cr-score-ring { width: 90px; height: 90px; margin: 0 auto 14px; position: relative; }
.cr-score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cr-score-ring circle { fill: none; stroke-width: 6; }
.cr-score-ring .ring-bg { stroke: rgba(255,255,255,0.08); }
.cr-score-ring .ring-fg { stroke-linecap: round; transition: stroke-dashoffset 1.5s ease; }
.cr-score-ring .ring-fg.high { stroke: var(--secondary); }
.cr-score-ring .ring-fg.mid { stroke: var(--warning); }
.cr-score-ring .ring-fg.low { stroke: var(--accent); }
.cr-score-value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cr-score-num { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; }
.cr-score-of { font-size: 0.7rem; color: var(--text-muted); }
.cr-score-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.06); margin-bottom: 12px; }
.cr-score-bar-fill { height: 100%; border-radius: 2px; transition: width 1.5s ease; }
.cr-score-reason { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; }
.cr-score-caveat { font-size: 0.78rem; color: var(--warning); display: flex; align-items: flex-start; gap: 4px; text-align: left; }

/* Primary Roadmap Timeline */
.cr-timeline { display: flex; gap: 0; overflow-x: auto; padding-bottom: 16px; scrollbar-width: thin; }
.cr-timeline::-webkit-scrollbar { height: 4px; }
.cr-timeline::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 2px; }
.cr-phase-card { flex: 0 0 220px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 20px; position: relative; }
.cr-phase-card::after { content: '→'; position: absolute; right: -16px; top: 50%; transform: translateY(-50%); color: var(--primary); font-size: 1.2rem; font-weight: 700; z-index: 1; }
.cr-phase-card:last-child::after { display: none; }
.cr-phase-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(108,99,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 1rem; margin-bottom: 10px; }
.cr-phase-name { font-family: var(--font-heading); font-size: 0.92rem; font-weight: 700; margin-bottom: 4px; }
.cr-phase-time { display: inline-block; padding: 3px 10px; border-radius: 50px; background: rgba(0,212,170,0.12); color: var(--secondary); font-size: 0.72rem; font-weight: 600; margin-bottom: 12px; }
.cr-phase-actions { list-style: none; padding: 0; margin: 0 0 12px; }
.cr-phase-actions li { font-size: 0.78rem; color: var(--text-secondary); padding: 3px 0; padding-left: 14px; position: relative; line-height: 1.4; }
.cr-phase-actions li::before { content: '•'; position: absolute; left: 0; color: var(--primary-light); }
.cr-phase-exams { margin-bottom: 10px; }
.cr-phase-exams-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; }
.cr-phase-exam-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cr-phase-exam-tag { padding: 2px 8px; border-radius: 4px; background: rgba(255,255,255,0.06); font-size: 0.7rem; color: var(--text-secondary); }
.cr-phase-salary { padding: 8px 12px; border-radius: var(--radius-sm); background: rgba(0,212,170,0.08); border: 1px solid rgba(0,212,170,0.15); }
.cr-phase-salary-label { font-size: 0.7rem; color: var(--text-muted); }
.cr-phase-salary-value { font-size: 0.85rem; font-weight: 700; color: var(--secondary); }
.cr-roadmap-goal-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 50px; background: rgba(0,212,170,0.12); border: 1px solid rgba(0,212,170,0.25); color: var(--secondary); font-size: 0.85rem; font-weight: 600; margin-bottom: 16px; }

/* Alternative Path */
.cr-alt-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cr-alt-goal { font-size: 0.95rem; font-weight: 700; color: var(--warning); }
.cr-alt-timeline { display: flex; gap: 0; overflow-x: auto; padding-bottom: 8px; }
.cr-alt-card { flex: 0 0 200px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px; position: relative; }
.cr-alt-card::after { content: '→'; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); color: var(--warning); font-size: 1rem; z-index: 1; }
.cr-alt-card:last-child::after { display: none; }
.cr-alt-phase { font-family: var(--font-heading); font-size: 0.85rem; font-weight: 700; margin-bottom: 4px; }
.cr-alt-time { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 8px; }
.cr-alt-actions { list-style: none; padding: 0; }
.cr-alt-actions li { font-size: 0.75rem; color: var(--text-secondary); padding: 2px 0 2px 12px; position: relative; }
.cr-alt-actions li::before { content: '•'; position: absolute; left: 0; color: var(--warning); }
.cr-alt-salary { margin-top: 8px; font-size: 0.78rem; font-weight: 600; color: var(--secondary); }

/* Gaps */
.cr-gaps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cr-gap-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 18px; display: flex; gap: 14px; }
.cr-gap-icon { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.cr-gap-icon.severity-high { background: rgba(255,107,107,0.15); }
.cr-gap-icon.severity-medium { background: rgba(255,179,71,0.15); }
.cr-gap-icon.severity-low { background: rgba(0,212,170,0.15); }
.cr-gap-name { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.cr-gap-fix { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* Quick Wins */
.cr-wins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cr-win-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 20px; text-align: center; }
.cr-win-num { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; margin: 0 auto 12px; }
.cr-win-action { font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.cr-win-detail { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }

/* Resources */
.cr-resources-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cr-resource-col { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 18px; }
.cr-resource-col h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 10px; color: var(--primary-light); }
.cr-resource-col ul { list-style: none; padding: 0; }
.cr-resource-col li { font-size: 0.78rem; color: var(--text-secondary); padding: 4px 0; padding-left: 14px; position: relative; }
.cr-resource-col li::before { content: '•'; position: absolute; left: 0; color: var(--primary); }

/* Motivational Footer */
.cr-motivation { background: linear-gradient(135deg, #1a1060, #4527a0 50%, #1a237e); border-radius: var(--radius-lg); padding: 32px 40px; margin-top: 8px; margin-bottom: 40px; display: flex; justify-content: space-between; align-items: center; }
.cr-motivation-text { font-size: 0.92rem; color: rgba(255,255,255,0.8); line-height: 1.6; max-width: 70%; }
.cr-motivation-cta { text-align: right; }
.cr-motivation-cta span { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; color: #ffd54f; }

/* Action Buttons Below Roadmap */
.cr-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 60px; }
.cr-action-btn { padding: 12px 28px; border-radius: 50px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.3s; border: none; }
.cr-action-btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 4px 20px rgba(108,99,255,0.3); }
.cr-action-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(108,99,255,0.5); }
.cr-action-btn.secondary { background: var(--bg-glass-strong); color: var(--text-primary); border: 1px solid var(--border-medium); }
.cr-action-btn.secondary:hover { border-color: var(--primary); }

/* Error */
.cr-error { text-align: center; padding: 60px 20px; }
.cr-error-icon { font-size: 48px; margin-bottom: 16px; }
.cr-error h3 { margin-bottom: 8px; }
.cr-error p { color: var(--text-secondary); margin-bottom: 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .cr-scores-grid { grid-template-columns: 1fr; }
  .cr-resources-grid { grid-template-columns: 1fr 1fr; }
  .cr-profile-grid { grid-template-columns: 1fr; }
  .cr-banner { flex-direction: column; text-align: center; gap: 16px; }
  .cr-banner-right { text-align: center; }
}
@media (max-width: 600px) {
  .cr-wins-grid { grid-template-columns: 1fr; }
  .cr-gaps-grid { grid-template-columns: 1fr; }
  .cr-resources-grid { grid-template-columns: 1fr; }
  .cr-row { grid-template-columns: 1fr; }
  .cr-motivation { flex-direction: column; text-align: center; gap: 16px; }
  .cr-motivation-text { max-width: 100%; }
  .cr-banner h1 { font-size: 1.5rem; }
  .cr-phase-card { flex: 0 0 180px; }
  .cr-alt-card { flex: 0 0 170px; }
}

/* Print */
@media print {
  .navbar, .footer, .cr-actions, .cr-nav { display: none !important; }
  .cr-page { padding-top: 0; }
  .cr-roadmap { max-width: 100%; }
  .cr-banner { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .cr-phase-card, .cr-alt-card { break-inside: avoid; }
  .cr-timeline, .cr-alt-timeline { flex-wrap: wrap; }
}
