:root {
    --primary: #2A4B7C;
    --secondary: #f1f3ff;
    --muted: #4a5877;
    --radius: 8px;
    font-family: 'Exo', sans-serif;
}

/* --- Modern UI for CV & JD Matcher --- */
html,
body {
    height: 100%;
}

body {
    background: #f4f6fb;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: #2a4b7c;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.cv-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--secondary);
    padding: 18px 10px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(42, 75, 124, 0.15);
}

/* tiêu đề chính */
.cv-header h1 {
    font-size: 2.1rem;
    font-weight: 800;
    background: linear-gradient(90deg, #2A4B7C, #496BB8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

/* mô tả phụ */
.cv-header p {
    color: var(--muted);
    font-size: 1rem;
    margin: 0;
}

/* Footer style - full width bottom of screen */
.footer-fixed {
    width: 100vw;
    /* full screen width */
    text-align: center;
    padding: 14px 0;
    font-size: 14px;
    color: var(--secondary);
    background: var(--primary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    margin-top: auto;
    position: relative;
    bottom: 0;
    left: 0;
}

.upload-flex-container {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: stretch;
    margin-top: 32px;
    flex-wrap: wrap;
}

.upload-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 6px 32px rgba(44, 62, 80, 0.10);
    padding: 36px 32px 28px 32px;
    min-width: 340px;
    max-width: 420px;
    flex: 1 1 340px;
    position: relative;
    transition: box-shadow 0.3s, transform 0.2s;
    border: 1px solid #eaf0ff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    min-height: 341px;
    padding-top: 38px;
    /* make room for step number */
}

.upload-card:hover {
    box-shadow: 0 12px 40px rgba(44, 62, 80, 0.18);
    transform: translateY(-4px) scale(1.02);
}

/* --- Card body style --- */
.upload-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 8px;
}

.upload-step-number {
    position: absolute;
    top: 32px;
    left: 32px;
    background: linear-gradient(90deg, #2A4B7C, #496BB8);
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.10);
    border: 2px solid #fff;
    z-index: 2;
    transition: background 0.2s;
}

.upload-title {
    margin-left: 70px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #2a4b7c;
    margin-bottom: 18px;
    margin-top: -2px;
    display: flex;
    align-items: center;
    min-height: 38px;
}

.upload-label {
    position: relative;
    cursor: pointer;
    background: #eaf0ff;
    color: #2980b9;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 8px;
    transition: background 0.2s, color 0.2s;
    border: 1.5px solid #bfc9e3;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
    display: inline-block;
}

.upload-label:hover {
    background: #5b5be6;
    color: #fff;
}

.upload-drop-area {
    border: 2px dashed #bfc9e3;
    border-radius: 14px;
    padding: 32px 0 24px 0;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    margin-bottom: 8px;
    background: #f8faff;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-drop-area.dragover {
    border-color: #5b5be6;
    background: #eaf0ff;
}

.upload-drop-area .upload-icon {
    background: linear-gradient(90deg, #2A4B7C, #496BB8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 38px;
    margin-bottom: 10px;
}

.upload-drop-area.dragover .upload-icon {
    color: #5b5be6;
}

.upload-drop-area .upload-instruction {
    font-size: 17px;
    color: #2a4b7c;
    font-weight: 600;
    margin-bottom: 4px;
}

.upload-drop-area .upload-note {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 0;
}

.jd-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    justify-content: flex-start;
}

.jd-tab {
    background: #f8faff;
    border: none;
    color: #2a4b7c;
    font-weight: 500;
    padding: 10px 22px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s, color 0.2s;
    outline: none;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
}

.jd-tab-active {
    background: #eaf0ff;
    color: #2a4b7c;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.10);
}

.jd-tab-content {
    width: 100%;
    min-height: 210px;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    animation: fadeInTab 0.4s;
    box-sizing: border-box;
}

.jd-tab-content[style*="display: flex"] {
    display: flex !important;
}

.jd-tab-content-file,
.jd-tab-content-text,
.jd-tab-content-url {
    border: 1.5px solid #eaf0ff;
    border-top: none;
    border-radius: 0 0 12px 12px !important;
    background: #fff;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    padding-top: 0;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jd-tab-content textarea {
    width: auto;
    border-radius: 10px;
    border: 1.5px solid #bfc9e3;
    background: #f8faff;
    color: #2a4b7c;
    font-size: 16px;
    padding: 14px;
    transition: border-color 0.2s;
    resize: vertical;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
    min-height: 120px;
    margin-top: 4px;
}

.jd-tab-content textarea:focus {
    border-color: #5b5be6;
    outline: none;
}

.jd-tab-content textarea::-webkit-scrollbar {
    width: 8px;
    background: #eaf0ff;
    border-radius: 8px;
}

.jd-tab-content textarea::-webkit-scrollbar-thumb {
    background: #bfc9e3;
    border-radius: 8px;
}

.jd-tab-content-file {
    background: #f8faff;
    border-radius: 10px;
    padding: 15px 12px;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
    margin-bottom: 8px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.jd-tab-content-text,
.jd-tab-content-url {
    background: #f8faff;
    border-radius: 10px;
    padding: 18px 12px;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
    margin-bottom: 8px;
    width: 100%;
}

.jd-tab-content label {
    font-weight: 600;
    color: #2980b9;
    margin-bottom: 6px;
    display: block;
}

input[type="file"] {
    display: none;
}

#jd-file-name {
    font-size: 14px;
    color: #2a4b7c;
    margin-bottom: 8px;
    margin-left: 4px;
    display: inline-block;
}

input[type="url"] {
    width: auto;
    font-size: 15px;
    color: #2a4b7c;
    background: #f8faff;
    border-radius: 8px;
    border: 1px solid #bfc9e3;
    padding: 10px;
    margin-bottom: 8px;
    margin-top: 4px;
}

.btn-upload {
    background: linear-gradient(90deg, #2A4B7C, #496BB8);
    color: #fff;
    font-weight: 700;
    font-size: 22px;
    border: none;
    border-radius: 36px;
    padding: 18px 54px;
    margin-top: 12px;
    box-shadow: 0 2px 12px rgba(44, 62, 80, 0.10);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.btn-upload:hover {
    background: linear-gradient(90deg, #2a4b7c 60%, #2980b9 100%);
    box-shadow: 0 8px 24px rgba(44, 62, 80, 0.18);
    transform: scale(1.03);
}

.btn-upload:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
}

.note-text {
    color: #7f8c8d;
    font-size: 15px;
    margin-top: 10px;
}

/* Progress Bar Styles */
.progress-bar-container {
    width: 100%;
    height: 13px;
    background: #eaf0ff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(42, 75, 124, 0.1);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2A4B7C, #496BB8, #2A4B7C);
    background-size: 200% 100%;
    border-radius: 10px;
    width: 0%;
    animation: fillProgress 0.6s ease-out;
    box-shadow: 0 0 12px rgba(75, 107, 184, 0.4);
}

@keyframes fillProgress {
    0% {
        width: 0%;
        background-position: 0% center;
    }

    100% {
        background-position: 100% center;
    }
}

#loading-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f8faff;
    border: 2.5px dashed #bfc9e3;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(44, 62, 80, 0.06);
    padding: 36px 18px 32px 18px;
    margin: 60px auto 0 auto;
    max-width: 1200px;
    width: 100%;
    min-width: 200px;
    /* Centered, medium rectangle, visually distinct */
}

@media (max-width: 600px) {
    #loading-page {
        max-width: 98vw;
        padding: 18px 4vw 18px 4vw;
        margin: 32px auto 0 auto;
    }
}

#loading-message {
    font-size: 1.08rem;
    font-weight: 500;
    color: #3576e6;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-top: 18px;
    text-align: center;
    display: inline-block;
    max-width: 90vw;
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 900px) {
    .upload-flex-container {
        flex-direction: column;
        gap: 22px;
        align-items: stretch;
    }

    .upload-card {
        max-width: 100%;
        margin-bottom: 18px;
    }

    .cv-header h1 {
        font-size: 1.5rem;
    }

    .upload-title {
        margin-left: 54px;
        font-size: 1.1rem;
        min-height: 38px;
        margin-top: -17px;
    }

    .upload-step-number {
        top: 18px;
        left: 18px;
    }
}

@media (min-width: 900px) {
    .upload-card {
        min-height: 341px;
        height: 100%;
    }
}

@media (max-width: 600px) {
    .upload-card {
        padding: 18px 8px 12px 8px;
    }

    .btn-upload {
        font-size: 16px;
        padding: 12px 24px;
    }

    .cv-header h1 {
        font-size: 1.1rem;
    }
}

.jd-tabs-modern {
    background: #f8faff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
    padding: 0;
    border: 1.5px solid #eaf0ff;
    border-bottom: none;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.jd-tabs-modern .jd-tab {
    background: none;
    border: none;
    color: #4a6286;
    font-weight: 600;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    padding: 12px 28px 10px 18px;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s, color 0.2s;
    outline: none;
    box-shadow: none;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: -1.5px;
    z-index: 2;
}

.jd-tabs-modern .jd-tab-active {
    background: #fff;
    color: #2a4b7c;
    border-bottom: 2.5px solid #5b5be6;
    box-shadow: none;
}

.jd-tabs-modern .jd-tab:not(.jd-tab-active):hover {
    background: #eaf0ff;
    color: #2980b9;
}

.jd-upload-drop {
    border: 2px dashed #bfc9e3;
    border-radius: 14px;
    padding: 32px 0 24px 0;
    text-align: center;
    cursor: pointer;
    background: #f8faff;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
    width: 100%;
}

.jd-upload-drop .upload-icon {
    background: linear-gradient(90deg, #2A4B7C, #496BB8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 38px;
    margin-bottom: 10px;
}

.jd-upload-drop .upload-instruction {
    font-size: 17px;
    color: #2a4b7c;
    font-weight: 600;
    margin-bottom: 4px;
}

.jd-upload-drop .upload-note {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 0;
}

.jd-textarea {
    border-radius: 10px;
    border: 1.5px solid #bfc9e3;
    background: #23272f;
    color: #eaf0ff;
    font-size: 16px;
    padding: 14px;
    transition: border-color 0.2s;
    resize: vertical;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
    min-height: 120px;
    width: 100%;
}

.jd-textarea::placeholder {
    color: #bfc9e3;
    opacity: 1;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    font-style: italic;
    letter-spacing: 0.2px;
}

.jd-url-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.jd-url-input {
    font-size: 16px;
    color: #23272f;
    background: #f8faff;
    border-radius: 10px;
    border: 1.5px solid #bfc9e3;
    padding: 12px 16px;
    width: 100%;
}

.jd-url-input::placeholder {
    color: #bfc9e3;
    opacity: 1;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    font-style: italic;
    letter-spacing: 0.2px;
}

.jd-url-note {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 2px;
}

.result-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(44, 62, 80, 0.08);
    padding: 28px 16px 24px 16px;
    margin: 32px auto;
    max-width: 900px;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

.result-card h2 {
    color: #1a2a3a;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.2px;
}

.result-card .result-score {
    font-size: 2rem;
    font-weight: 700;
    color: #2A4B7C;
    letter-spacing: 0.5px;
}

.result-card .result-level {
    font-size: 1rem;
    color: #2A4B7C;
    font-weight: 600;
    margin-top: 4px;
}

.result-card .result-summary {
    background: #f3f7fd;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 1rem;
    color: #222;
    line-height: 1.6;
    font-weight: 500;
}

.result-card .result-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-card .result-strengths,
.result-card .result-gaps {
    font-size: 1rem;
    color: #222;
    font-weight: 400;
    white-space: pre-line;
}

.result-card .result-strengths-box {
    background: #f7fff7;
    border-radius: 10px;
    padding: 14px 12px;
    box-shadow: 0 1px 8px rgba(44, 62, 80, 0.04);
    border: 1.5px solid #d4f5e9;
}

.result-card .result-gaps-box {
    background: #fff7f7;
    border-radius: 10px;
    padding: 14px 12px;
    box-shadow: 0 1px 8px rgba(44, 62, 80, 0.04);
    border: 1.5px solid #ffd6d6;
}

.result-card .result-recommendation-box {
    margin-top: 24px;
    background: linear-gradient(90deg, #3576e6 0%, #496BB8 100%);
    border-radius: 12px;
    padding: 18px 14px;
    box-shadow: 0 2px 16px rgba(44, 62, 80, 0.08);
    color: #fff;
}

.result-card .result-recommendation-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-card .result-recommendation {
    font-size: 1rem;
    font-weight: 400;
    white-space: pre-line;
}

.result-card .result-btn-reload {
    background: linear-gradient(90deg, #2A4B7C, #496BB8);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
    margin-top: 18px;
    transition: background 0.2s, transform 0.1s;
}

.result-card .result-btn-reload:hover {
    background: linear-gradient(90deg, #496BB8, #2A4B7C);
    transform: scale(1.04);
}

@media (max-width: 900px) {
    .result-card {
        padding: 16px 4px 12px 4px;
        margin: 18px auto;
        max-width: 100%;
    }
}