/* ===== BASE STYLES ===== */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --accent: #f72585;
    --success: #4cc9f0;
    --warning: #f8961e;
    --danger: #f94144;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --gradient: linear-gradient(135deg, #4361ee, #7209b7);
    --gradient-light: linear-gradient(135deg, #4cc9f0, #4361ee);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(-45deg, #f8f9fa, #e9ecef, #dee2e6, #ced4da);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== ANIMATIONS ===== */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* ===== BACKGROUND ANIMATION ===== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    opacity: 0.1;
    animation: float 20s infinite linear;
}

.circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-duration: 25s;
}

.circle:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    animation-duration: 20s;
    animation-delay: 2s;
}

.circle:nth-child(3) {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 20%;
    animation-duration: 30s;
    animation-delay: 1s;
}

.circle:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 20%;
    animation-duration: 15s;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.8s ease-out;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeIn 1s ease-out;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s infinite;
}

.header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.tagline {
    font-size: 1.1rem;
    color: var(--gray);
    font-weight: 300;
}

/* ===== SECTION CARDS ===== */
.section-card {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeIn 0.6s ease-out;
}

.section-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-light);
}

.section-header i {
    font-size: 1.8rem;
    color: var(--primary);
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--dark);
    flex-grow: 1;
}

/* ===== INPUT STYLES ===== */
.input-group {
    margin-bottom: 25px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--dark);
}

.input-label i {
    color: var(--primary);
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 20px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    resize: vertical;
    transition: var(--transition);
    background: #fafafa;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    background: white;
}

.char-counter {
    text-align: right;
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 5px;
}

/* ===== FILE UPLOAD ===== */
.file-upload-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.upload-option {
    position: relative;
}

.upload-option input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-box {
    border: 3px dashed var(--primary);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(67, 97, 238, 0.05);
    transition: var(--transition);
}

.upload-box:hover {
    background: rgba(67, 97, 238, 0.1);
    transform: translateY(-3px);
}

.upload-box i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.upload-box p {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
}

.file-types {
    font-size: 0.9rem;
    color: var(--gray);
}

.upload-info {
    background: rgba(76, 201, 240, 0.1);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid var(--success);
}

.upload-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
    margin: 0;
}

.upload-info i {
    color: var(--success);
}

/* ===== RECRUITER JD INLINE UPLOAD ===== */
.jd-upload-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.jd-upload-inline input[type="file"] {
    display: none;
}

.jd-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--primary);
    color: var(--primary);
    background: rgba(67, 97, 238, 0.08);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.jd-upload-btn:hover {
    background: rgba(67, 97, 238, 0.15);
}

.jd-upload-types {
    font-size: 0.85rem;
    color: var(--gray);
}

.jd-upload-count {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

.jd-file-list {
    margin-top: 10px;
    list-style: none;
    display: grid;
    gap: 8px;
    max-height: 140px;
    overflow: auto;
}

.jd-file-list li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.86rem;
    color: var(--dark);
}

.jd-file-list li i {
    color: var(--primary);
}

.jd-file-name {
    overflow-wrap: anywhere;
}

.jd-file-size {
    color: var(--gray);
    white-space: nowrap;
}

.candidate-jd-upload {
    margin-top: 10px;
}

.candidate-jd-selector {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid var(--gray-light);
    border-radius: 10px;
    background: #f8faff;
}

.candidate-jd-selector .input-label {
    margin-bottom: 8px;
}

.candidate-jd-selector select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 2px solid var(--gray-light);
    background: white;
    font-family: 'Poppins', sans-serif;
}

.candidate-jd-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

#jdText {
    overflow-y: auto;
}

/* Keep recruiter JD and resume drop zone visually equal */
#recruiterView #jdText,
#recruiterView #dropArea {
    height: 300px;
    min-height: 300px;
}

#recruiterView #dropArea {
    display: flex;
    align-items: center;
    justify-content: center;
}

#recruiterView #dropArea .drop-content {
    width: 100%;
}

/* Hide native file input button and use full drop zone as click target */
#recruiterView #resumeInput {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.recruiter-upload-label {
    min-height: 32px;
}

/* Keep candidate setup cards visually symmetric like recruiter */
#candidateView #candidateJD,
#candidateView .upload-option .upload-box {
    height: 300px;
    min-height: 300px;
}

#candidateView .upload-option .upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ===== DROP ZONE ===== */
.drop-zone {
    border: 3px dashed var(--secondary);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    background: rgba(114, 9, 183, 0.05);
    transition: var(--transition);
    margin-bottom: 25px;
    position: relative;
}

.drop-zone.dragover {
    background: rgba(114, 9, 183, 0.15);
    border-color: var(--accent);
    transform: scale(1.02);
}

.drop-content i {
    font-size: 4rem;
    color: var(--secondary);
    margin-bottom: 20px;
    animation: float 3s infinite;
}

.drop-content h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.drop-content p {
    color: var(--gray);
    margin-bottom: 10px;
}

.file-support {
    font-size: 0.9rem;
    color: var(--gray);
    display: block;
}

/* ===== FILE LIST ===== */
.file-list-container {
    margin-bottom: 25px;
}

.file-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.file-list-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
}

.file-count {
    color: var(--gray);
    font-size: 0.9rem;
}

.file-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

.file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 15px;
    background: var(--gray-light);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: var(--transition);
    animation: slideIn 0.3s ease-out;
}

.file-list li:hover {
    background: #e2e6ea;
    transform: translateX(5px);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.file-info > div {
    min-width: 0;
}

.file-icon {
    color: var(--primary);
    font-size: 1.2rem;
}

.file-name {
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.file-size {
    color: var(--gray);
    font-size: 0.9rem;
}

.remove-file {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    flex-shrink: 0;
    border-radius: 4px;
    transition: var(--transition);
}

.remove-file:hover {
    background: rgba(249, 65, 68, 0.1);
}

/* ===== BUTTONS ===== */
.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-primary, .btn-secondary, .btn-export {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 180px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
    background: var(--gradient-light);
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #dee2e6;
    transform: translateY(-3px);
}

.btn-export {
    background: var(--success);
    color: white;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-export:hover {
    background: #3ab8d9;
    transform: translateY(-2px);
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== RESULTS SECTION ===== */
.results-section {
    animation: fadeIn 0.8s ease-out;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
    align-items: start;
}

.summary-card {
    background: var(--light);
    border-radius: 12px;
    padding: 25px;
    border-left: 5px solid var(--primary);
}

.summary-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.summary-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--dark);
}

#skillsContainer.skills-container {
    display: block;
}

.skills-insights {
    display: grid;
    gap: 14px;
}

.skills-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.skills-kpi {
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: 10px;
    padding: 10px 12px;
    display: grid;
    gap: 4px;
}

.skills-kpi-label {
    font-size: 0.75rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.skills-kpi strong {
    color: var(--dark);
    font-size: 0.95rem;
    line-height: 1.3;
}

.skills-progress-list {
    display: grid;
    gap: 10px;
    max-height: 300px;
    overflow: auto;
    padding-right: 4px;
}

.skill-progress-item {
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: 10px;
    padding: 10px 12px;
}

.skill-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
}

.skill-progress-name {
    font-weight: 600;
    color: var(--dark);
    overflow-wrap: anywhere;
}

.skill-progress-score {
    font-size: 0.82rem;
    color: var(--gray);
    flex-shrink: 0;
}

.skill-progress-track {
    height: 8px;
    background: var(--gray-light);
    border-radius: 999px;
    overflow: hidden;
}

.skill-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.skill-progress-fill.tone-strong {
    background: linear-gradient(90deg, #2fbf71, #57d993);
}

.skill-progress-fill.tone-moderate {
    background: linear-gradient(90deg, #f4a938, #f8c35d);
}

.skill-progress-fill.tone-gap {
    background: linear-gradient(90deg, #f46262, #f78e8e);
}

.skill-progress-meta {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--gray);
}

.skills-insights-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--gray-light);
    background: white;
    color: var(--gray);
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 8px 16px;
    background: var(--gradient-light);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeIn 0.5s ease-out;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

.jd-result-block {
    background: #f7f9ff;
    border: 1px solid rgba(67, 97, 238, 0.18);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
}

.jd-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.jd-result-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--dark);
}

.jd-result-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.jd-result-meta span {
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
    color: var(--gray);
}

.jd-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 16px;
}

.jd-profile-strip {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--gray-light);
    font-size: 0.85rem;
    color: var(--dark);
}

.jd-selector-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: #eef3ff;
    border: 1px solid rgba(67, 97, 238, 0.22);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.jd-selector-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
    font-weight: 600;
}

.jd-selector-title i {
    color: var(--primary);
}

.jd-selector-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jd-selector-control label {
    font-size: 0.86rem;
    color: var(--gray);
    font-weight: 500;
}

.jd-selector-control select {
    min-width: 280px;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--gray-light);
    background: white;
    font-family: 'Poppins', sans-serif;
}

/* ===== COMPARISON TABLE ===== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.results-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options select {
    padding: 8px 15px;
    border-radius: 6px;
    border: 2px solid var(--gray-light);
    background: white;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.sort-options select:focus {
    outline: none;
    border-color: var(--primary);
}

.candidate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.candidate-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
    animation: fadeIn 0.6s ease-out;
}

.candidate-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.candidate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.candidate-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.candidate-name i {
    color: var(--primary);
}

.fit-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.fit-bar-container {
    margin: 20px 0;
}

.fit-bar {
    height: 10px;
    background: var(--gray-light);
    border-radius: 5px;
    overflow: hidden;
}

.fit-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 5px;
    transition: width 1.5s ease-out;
}

.fit-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.9rem;
    color: var(--gray);
}

.skills-section {
    margin: 20px 0;
}

.skills-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--dark);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-chip {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.matched {
    background: rgba(76, 201, 240, 0.2);
    color: #0c8599;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

.missing {
    background: rgba(248, 149, 30, 0.2);
    color: #e67700;
    border: 1px solid rgba(248, 149, 30, 0.3);
}

.extra {
    background: rgba(114, 9, 183, 0.2);
    color: var(--secondary);
    border: 1px solid rgba(114, 9, 183, 0.3);
}

.view-details {
    width: 100%;
    padding: 12px;
    background: var(--gray-light);
    border: none;
    border-radius: 8px;
    color: var(--dark);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 15px;
}

.view-details:hover {
    background: #dee2e6;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: fadeIn 0.4s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid var(--gray-light);
}

.modal-header h3 {
    color: var(--dark);
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--danger);
}

.modal-body {
    padding: 25px;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--gray);
    font-size: 0.9rem;
    border-top: 1px solid var(--gray-light);
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .section-card {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
    }
    
    .candidate-grid {
        grid-template-columns: 1fr;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }

    .skills-kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .jd-upload-inline {
        align-items: stretch;
    }

    .jd-upload-btn {
        width: 100%;
        justify-content: center;
    }

    .jd-selector-panel {
        align-items: stretch;
    }

    .jd-selector-control {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .jd-selector-control select {
        width: 100%;
        min-width: 0;
    }

    #recruiterView #jdText,
    #recruiterView #dropArea {
        height: 240px;
        min-height: 240px;
    }

    #candidateView #candidateJD,
    #candidateView .upload-option .upload-box {
        height: 240px;
        min-height: 240px;
    }
}

/* ===== FIX FOR TEXT OVERFLOW ===== */

/* Fix for candidate names in cards */
.candidate-name h3 {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.1rem;
}

.candidate-name h3:hover {
    white-space: normal;
    overflow: visible;
    position: relative;
    background: white;
    z-index: 10;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Fix for file names in file list */
.file-name {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}

.file-name:hover {
    white-space: normal;
    overflow: visible;
    position: absolute;
    background: white;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    z-index: 100;
    max-width: 400px;
}

/* Fix for skill chips - prevent overflow */
.skill-chip {
    display: inline-flex;
    align-items: center;
    max-width: 180px;
    padding: 6px 12px;
    margin: 3px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
}

.skill-chip:hover {
    max-width: none;
    white-space: normal;
    word-break: break-word;
    z-index: 10;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    position: absolute;
    background: white;
}

/* Container for skill chips to handle hover positioning */
.skill-list {
    position: relative;
    min-height: 40px;
}

/* Alternative: Wrap long skill names */
.skill-chip.wrap {
    white-space: normal;
    word-break: break-word;
    max-width: 200px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    text-align: center;
    line-height: 1.2;
}

/* Fix for file list items */
.file-list li {
    position: relative;
    overflow: visible;
}

/* Fix for buttons with long text */
.btn-primary, .btn-secondary {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fix for modal content */
.modal-body {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fix for textarea */
textarea {
    resize: vertical;
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
}

/* Fix for summary cards */
.summary-card {
    overflow: hidden;
}

/* ===== CANDIDATE COMPARISON (ATS STYLE) ===== */
.results-content {
    overflow: visible;
}

.candidate-comparison-board {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.6fr 1.6fr 2fr;
    column-gap: 14px;
}

.candidate-comparison-header {
    padding: 10px 14px;
    border-radius: 10px;
    background: #f4f7ff;
    border: 1px solid rgba(67, 97, 238, 0.18);
    color: var(--gray);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.candidate-comparison-card {
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.candidate-comparison-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.comparison-cell {
    min-width: 0;
}

.resume-name-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--dark);
}

.resume-name-wrap i {
    color: var(--primary);
}

.resume-name {
    overflow-wrap: anywhere;
}

.score-cell {
    display: grid;
    gap: 8px;
    align-content: start;
}

.score-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}

.score-track {
    height: 8px;
    background: var(--gray-light);
    border-radius: 999px;
    overflow: hidden;
}

.score-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.skill-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-content: flex-start;
}

.comparison-skill-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.2;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.comparison-skill-chip.matched {
    background: rgba(76, 201, 240, 0.18);
    color: #0c8599;
    border: 1px solid rgba(76, 201, 240, 0.32);
}

.comparison-skill-chip.missing {
    background: rgba(248, 149, 30, 0.18);
    color: #e67700;
    border: 1px solid rgba(248, 149, 30, 0.32);
}

.comparison-empty-text {
    color: var(--gray);
    font-size: 0.83rem;
    font-style: italic;
}

.recommendation-cell {
    display: grid;
    gap: 6px;
}

.recommendation-list {
    margin: 0;
    padding-left: 18px;
    color: var(--dark);
}

.recommendation-list li {
    margin-bottom: 4px;
    line-height: 1.35;
    font-size: 0.84rem;
}

@media (max-width: 1100px) {
    .candidate-comparison-header {
        display: none;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }

    .candidate-comparison-card {
        padding: 14px 12px;
    }

    .comparison-cell::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--gray);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
}
/* ===== NEW STYLES FOR CANDIDATE VIEW ===== */

/* Mode Toggle */
.mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toggle-container {
    display: flex;
    background: white;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 2px solid var(--gray-light);
}

.mode-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: var(--gray);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-btn.active {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.mode-btn:hover:not(.active) {
    background: var(--gray-light);
}

/* Current Mode Indicator */
.current-mode {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 50px;
    color: var(--primary);
    font-weight: 500;
    margin-top: 10px;
    border: 2px solid rgba(67, 97, 238, 0.2);
}

/* View Content */
.view-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.view-content.active {
    display: block;
}

/* Recruiter view side-by-side layout */
#recruiterView.view-content.active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
    row-gap: 34px;
    margin-top: 14px;
    align-items: stretch;
}

#recruiterView .section-card {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#recruiterView .section-body {
    flex: 1;
}

/* Recruiter symmetry: keep left/right card internals vertically aligned */
#recruiterView .section-card:first-child .section-body {
    display: flex;
    flex-direction: column;
}

#recruiterView .section-card:first-child .input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

#recruiterView .section-card:first-child .char-counter {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#recruiterView .section-card:first-child .jd-upload-inline {
    margin-top: auto;
    padding-top: 10px;
}

#recruiterView .section-card:nth-child(2) .file-list-container {
    margin-bottom: 12px;
}

@media (max-width: 1024px) {
    #recruiterView.view-content.active {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Recruiter one-screen layout (before results) */
@media (min-width: 1025px) {
    body.recruiter-compact,
    body.candidate-compact {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    body.recruiter-compact .container,
    body.candidate-compact .container {
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        display: grid;
        grid-template-rows: auto 1fr auto;
        gap: 8px;
        width: 100%;
        padding-top: 12px;
        padding-bottom: 8px;
    }

    body.recruiter-compact .header,
    body.candidate-compact .header {
        margin-bottom: 0;
    }

    body.recruiter-compact .header h1,
    body.candidate-compact .header h1 {
        line-height: 1.15;
        font-size: clamp(2rem, 3vw, 2.6rem);
    }

    body.recruiter-compact .tagline,
    body.candidate-compact .tagline {
        font-size: 1rem;
        margin-top: 2px;
    }

    body.recruiter-compact .current-mode,
    body.candidate-compact .current-mode {
        margin-top: 8px;
        padding: 6px 16px;
    }

    body.recruiter-compact .section-header h2,
    body.candidate-compact .section-header h2 {
        line-height: 1.25;
    }

    body.recruiter-compact #recruiterView.view-content.active {
        height: 100%;
        margin-top: 0;
        column-gap: 30px;
        row-gap: 10px;
        align-content: stretch;
    }

    body.recruiter-compact #recruiterView .section-card {
        padding: 14px 16px;
        min-height: 0;
    }

    body.recruiter-compact #recruiterView .section-card:hover,
    body.candidate-compact .candidate-setup-grid .section-card:hover {
        transform: none;
    }

    body.recruiter-compact #recruiterView .section-header {
        margin-bottom: 8px;
        padding-bottom: 7px;
    }

    body.recruiter-compact #recruiterView .section-header h2 {
        font-size: 1.2rem;
    }

    body.recruiter-compact #recruiterView .section-body {
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    body.recruiter-compact #recruiterView .input-group {
        margin-bottom: 8px;
    }

    body.recruiter-compact #recruiterView .section-card:first-child .input-group {
        margin-bottom: 0;
    }

    body.recruiter-compact #recruiterView #jdText,
    body.recruiter-compact #recruiterView #dropArea {
        height: clamp(180px, 26vh, 230px);
        min-height: 0;
    }

    body.recruiter-compact #recruiterView #jdText {
        padding: 10px;
    }

    body.recruiter-compact #recruiterView .drop-zone {
        padding: 14px 12px;
        margin-bottom: 8px;
    }

    body.recruiter-compact #recruiterView .section-card:first-child .jd-upload-inline {
        padding-top: 8px;
    }

    body.recruiter-compact #recruiterView .drop-content i {
        font-size: 1.85rem;
        margin-bottom: 5px;
    }

    body.recruiter-compact #recruiterView .drop-content h3 {
        font-size: 0.98rem;
        margin-bottom: 3px;
    }

    body.recruiter-compact #recruiterView .drop-content p {
        margin-bottom: 3px;
    }

    body.recruiter-compact #recruiterView .file-support {
        font-size: 0.78rem;
    }

    body.recruiter-compact #recruiterView .file-list {
        max-height: min(24vh, 180px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    body.recruiter-compact #recruiterView .section-card:nth-child(2) .file-list-container {
        margin-bottom: 8px;
    }

    body.recruiter-compact #recruiterView .file-list li {
        padding: 6px 8px;
    }

    body.recruiter-compact #recruiterView .action-buttons {
        margin-top: auto;
        gap: 8px;
    }

    body.recruiter-compact #recruiterView .btn-primary,
    body.recruiter-compact #recruiterView .btn-secondary {
        min-width: 118px;
        padding: 9px 12px;
    }

    body.candidate-compact #candidateView.view-content.active {
        display: block;
        height: 100%;
        min-height: 0;
    }

    body.candidate-compact .candidate-setup-grid {
        height: 100%;
        margin-top: 0;
        margin-bottom: 0;
        column-gap: 30px;
        row-gap: 10px;
        align-content: stretch;
    }

    body.candidate-compact .candidate-setup-grid .section-card {
        padding: 14px 16px;
        min-height: 0;
    }

    body.candidate-compact .candidate-setup-grid .section-header {
        margin-bottom: 8px;
        padding-bottom: 7px;
    }

    body.candidate-compact .candidate-setup-grid .section-header h2 {
        font-size: 1.2rem;
    }

    body.candidate-compact .candidate-setup-grid .section-body {
        min-height: 0;
        overflow: hidden;
    }

    body.candidate-compact .candidate-setup-grid .input-group {
        margin-bottom: 8px;
    }

    body.candidate-compact .candidate-setup-grid .upload-box {
        padding: 14px 12px;
    }

    body.candidate-compact .candidate-setup-grid .upload-box i {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }

    body.candidate-compact #candidateJD {
        height: clamp(180px, 26vh, 230px);
        min-height: 0;
        padding: 10px;
    }

    body.candidate-compact #candidateView .upload-option {
        height: clamp(180px, 26vh, 230px);
    }

    body.candidate-compact #candidateView .upload-option .upload-box {
        height: 100%;
    }

    body.candidate-compact .candidate-resume-preview {
        margin-top: 6px;
        padding: 6px 8px;
        font-size: 0.84rem;
    }

    body.candidate-compact .candidate-setup-grid .btn-primary {
        min-width: 118px;
        padding: 9px 12px;
    }

    body.recruiter-compact .footer,
    body.candidate-compact .footer {
        margin-top: 0;
        padding: 8px 10px 10px;
        border-top-width: 1px;
        font-size: 0.84rem;
    }

    body.recruiter-compact .footer-links,
    body.candidate-compact .footer-links {
        margin-top: 8px;
        gap: 14px;
        flex-wrap: wrap;
    }

    body.recruiter-compact .footer-links a,
    body.candidate-compact .footer-links a {
        line-height: 1.1;
    }
}

@media (max-width: 1024px) {
    body.recruiter-compact,
    body.candidate-compact {
        overflow: auto;
    }

    body.recruiter-compact .container,
    body.candidate-compact .container {
        height: auto;
        max-height: none;
        display: block;
        gap: 0;
    }

    body.recruiter-compact .header,
    body.candidate-compact .header {
        margin-bottom: 30px;
    }
}

/* Candidate setup side-by-side layout */
.candidate-setup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
    row-gap: 34px;
    align-items: stretch;
    margin-top: 14px;
    margin-bottom: 30px;
}

.candidate-setup-grid .section-card {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.candidate-setup-grid .section-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.candidate-setup-grid .action-buttons {
    margin-top: auto;
}

.candidate-resume-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    background: var(--light);
    color: var(--dark);
    font-size: 0.95rem;
    word-break: break-word;
}

.candidate-resume-preview i {
    color: var(--primary);
}

@media (max-width: 1024px) {
    .candidate-setup-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Candidate Score Section */
.candidate-score-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--radius);
}

.fit-score-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) 0%, var(--gray-light) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.2);
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 130px;
    height: 130px;
    background: white;
    border-radius: 50%;
}

.score-circle span {
    position: relative;
    z-index: 1;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.score-details {
    text-align: left;
    max-width: 400px;
}

.score-details h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--dark);
}

#fitFeedback {
    color: var(--gray);
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Skills Analysis Grid */
.skills-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.analysis-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 5px solid;
}

.analysis-card.matched {
    border-color: var(--success);
}

.analysis-card.missing {
    border-color: var(--warning);
}

.analysis-card.extra {
    border-color: var(--secondary);
}

.analysis-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--dark);
}

.analysis-card.matched h4 i {
    color: var(--success);
}

.analysis-card.missing h4 i {
    color: var(--warning);
}

.analysis-card.extra h4 i {
    color: var(--secondary);
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-light);
}

/* ===== Candidate Dashboard (Product Style) ===== */
.candidate-dashboard {
    display: grid;
    gap: 18px;
}

.candidate-score-section {
    margin-bottom: 0;
    padding: 22px;
    border-radius: 12px;
    border: 1px solid rgba(67, 97, 238, 0.16);
    background: linear-gradient(135deg, #f7f9ff, #ffffff);
}

.fit-score-card {
    gap: 24px;
}

.score-circle {
    width: 128px;
    height: 128px;
}

.score-circle::before {
    width: 108px;
    height: 108px;
}

.score-circle span {
    font-size: 2rem;
}

.score-details h3 {
    font-size: 1.35rem;
    margin-bottom: 6px;
}

#fitFeedback {
    font-size: 0.98rem;
    line-height: 1.4;
    color: var(--dark);
}

.skills-analysis-grid.compact-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 0;
}

.skills-analysis-grid.compact-two .analysis-card {
    border-top: none;
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    box-shadow: none;
    padding: 18px;
}

.skills-analysis-grid.compact-two .analysis-card h4 {
    margin-bottom: 12px;
}

.dashboard-card.compact-card {
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.dashboard-card.compact-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    color: var(--dark);
    margin-bottom: 12px;
}

.dashboard-card.compact-card h3 i {
    color: var(--primary);
}

.compact-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 7px;
    color: var(--dark);
}

.compact-list li {
    line-height: 1.35;
    font-size: 0.9rem;
}

.compact-empty {
    list-style: none;
    margin-left: -20px;
    color: var(--gray);
    font-style: italic;
}

.priority-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.priority-card {
    border: 1px solid var(--gray-light);
    border-radius: 10px;
    padding: 12px;
    background: #fafbff;
}

.priority-card h4 {
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.priority-card.high {
    border-left: 4px solid #f94144;
}

.priority-card.high h4 {
    color: #c92a2a;
}

.priority-card.medium {
    border-left: 4px solid #f8961e;
}

.priority-card.medium h4 {
    color: #d97706;
}

.priority-card.optional {
    border-left: 4px solid #43aa8b;
}

.priority-card.optional h4 {
    color: #0f766e;
}

.role-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.role-mini-card {
    border: 1px solid var(--gray-light);
    border-radius: 10px;
    padding: 12px;
    background: #fbfcff;
}

.role-mini-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.role-mini-top h4 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--dark);
}

.role-mini-top span {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
    border-radius: 999px;
    padding: 3px 8px;
}

.role-mini-card p {
    margin: 0;
    font-size: 0.86rem;
    color: var(--gray);
    line-height: 1.35;
}

.role-empty {
    font-size: 0.88rem;
}

.quick-plan-lines {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.quick-plan-line {
    padding: 10px 12px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    background: #fafcff;
    font-size: 0.9rem;
    color: var(--dark);
}

/* Recommendations Section */
.recommendations-section {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 40px;
    border: 2px solid var(--gray-light);
}

.recommendations-section h3 {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    color: var(--dark);
}

.recommendations-section h3 i {
    color: var(--accent);
}

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.recommendation-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.rec-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.rec-icon i {
    font-size: 1.8rem;
    color: white;
}

.recommendation-card h4 {
    margin-bottom: 15px;
    color: var(--dark);
}

.rec-content {
    color: var(--gray);
    line-height: 1.6;
}

.rec-content ul {
    padding-left: 20px;
    margin: 10px 0;
}

.rec-content li {
    margin-bottom: 8px;
    position: relative;
}

.rec-content li::before {
    content: '✓';
    position: absolute;
    left: -20px;
    color: var(--success);
    font-weight: bold;
}

/* Action Plan */
.action-plan {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    border: 2px solid var(--success);
}

.action-plan h3 {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    color: var(--dark);
}

.action-plan h3 i {
    color: var(--success);
}

.plan-steps {
    counter-reset: step-counter;
    margin-bottom: 30px;
}

.plan-step {
    position: relative;
    padding-left: 50px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
}

.plan-step:last-child {
    border-bottom: none;
}

.plan-step::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 35px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.plan-step h4 {
    margin-bottom: 8px;
    color: var(--dark);
}

.plan-step p {
    color: var(--gray);
    line-height: 1.6;
}

/* Progress Bar Animation */
@keyframes progressFill {
    from { transform: rotate(0deg); }
    to { transform: rotate(var(--progress, 0deg)); }
}

/* Responsive Design for New Elements */
@media (max-width: 768px) {
    .mode-toggle {
        position: static;
        margin-bottom: 20px;
    }
    
    .toggle-container {
        width: 100%;
        justify-content: center;
    }
    
    .fit-score-card {
        flex-direction: column;
        text-align: center;
    }
    
    .score-details {
        text-align: center;
    }
    
    .skills-analysis-grid,
    .recommendation-grid,
    .skills-analysis-grid.compact-two,
    .priority-grid {
        grid-template-columns: 1fr;
    }

    .candidate-dashboard {
        gap: 14px;
    }

    .dashboard-card.compact-card {
        padding: 14px;
    }

    .role-card-grid {
        grid-template-columns: 1fr;
    }
    
    .candidate-score-section {
        padding: 16px;
    }
}
