body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #212529;
}

h1,
h2,
h3 {
    text-align: center;
    color: #343a40;
}

h1 {
    border-bottom: 2px solid #007bff;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

h2 {
    border-top: 2px solid #e9ecef;
    padding-top: 40px;
    margin-top: 40px;
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s, opacity 0.3s;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#results {
    margin-top: 40px;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

#results.visible {
    opacity: 1;
}

.form-container {
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

.form-container.fade-out {
    opacity: 0;
}

.survey-question-card {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 20px;
    transition: box-shadow 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.survey-question-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.question-text {
    flex: 1;
    margin: 0;
    padding-right: 20px;
    font-size: 17px;
}

.survey-options {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.survey-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 70px;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease-in-out;
}

.survey-option.selected {
    background-color: #e7f3ff;
}

.survey-option input[type="radio"] {
    cursor: pointer;
    transform: scale(1.3);
    margin-bottom: 8px;
}

.survey-option .option-label {
    font-size: 13px;
    color: #495057;
}

.survey-table {
    display: none;
}

.question-error {
    border: 2px solid #d9534f !important;
    box-shadow: 0 0 8px rgba(217, 83, 79, 0.5);
}

.cat-r {
    border-left: 5px solid #63bce4;
}

.cat-i {
    border-left: 5px solid #62d4a4;
}

.cat-a {
    border-left: 5px solid #f9c26b;
}

.cat-s {
    border-left: 5px solid #f48c7c;
}

.cat-e {
    border-left: 5px solid #d192e8;
}

.cat-c {
    border-left: 5px solid #9ea9b3;
}


#survey-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

#survey-navigation button {
    width: 120px;
}

#nav-back {
    background-color: #6c757d;
}

#nav-back:hover {
    background-color: #5a6268;
}

#validation-message {
    color: #d9534f;
    font-weight: bold;
    visibility: hidden;
}

#progress-bar-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 5px;
    margin: 30px 0;
}

#progress-bar {
    width: 0%;
    height: 20px;
    background-color: #007bff;
    border-radius: 5px;
    text-align: center;
    line-height: 20px;
    color: white;
    transition: width 0.4s ease-in-out;
}

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

.chart-block {
    flex: 1;
    max-width: 48%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-wrapper {
    width: 100%;
    text-align: center;
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
}

.chart-wrapper img {
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.results-table th,
.results-table td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}

.similarity-bar-container {
    width: 100%;
    height: 24px;
    background-color: #e9ecef;
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.similarity-bar {
    height: 100%;
    background-color: #28a745;
    border-radius: 4px 0 0 4px;
    transition: width 0.5s ease-in-out;
}

.similarity-bar-container span {
    position: absolute;
    left: 10px;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.similarity-percentage {
    display: none;
}


.results-table th {
    background-color: #f8f9fa;
}

.details-btn {
    background-color: #6c757d;
    color: white;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.details-btn:hover {
    background-color: #5a6268;
}

.details-row>td {
    padding: 0 !important;
    border: 0;
}

.details-content {
    background-color: #f8f9fa;
    padding: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    overflow: hidden;
    max-height: 1000px;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
}

.details-row.hidden .details-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}


.details-content h4 {
    margin-top: 0;
    border-bottom: 1px solid #ced4da;
    padding-bottom: 5px;
}

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

.details-content>div {
    flex: 1;
    min-width: 200px;
}

.hidden {
    display: none;
}

.details-row.hidden {
    display: table-row;
}


#chat-container {
    margin-top: 50px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #dee2e6;
}

#chat-header {
    background-color: #f8f9fa;
    padding: 12px 20px;
    border-bottom: 1px solid #dee2e6;
}

#chat-header h2 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 18px;
    text-align: left;
}

#chat-messages {
    height: auto;
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.chat-message {
    padding: 10px 16px;
    border-radius: 20px;
    max-width: 85%;
    line-height: 1.5;
    word-wrap: break-word;
    animation: slideInUp 0.4s ease-out;
}

.user-message {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background-color: #e9ecef;
    color: #212529;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

#suggested-questions-container {
    padding: 10px 15px 0;
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggested-question {
    background-color: transparent;
    color: #007bff;
    border: 1px solid #007bff;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 20px;
    cursor: pointer;
}

.suggested-question:hover {
    background-color: #e7f3ff;
}


.chat-disclaimer {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    padding: 0 15px 10px;
    margin: 0;
}

#chat-form-container {
    padding: 15px;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

#chat-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 16px;
    resize: none;
    overflow-y: hidden;
    min-height: 24px;
    line-height: 1.5;
}

#chat-form button {
    width: auto;
    font-size: 16px;
    padding: 10px 15px;
    flex-shrink: 0;
    align-self: center;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loader {
    border: 6px solid #e9ecef;
    border-top: 6px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

    100% {
        transform: rotate(360deg);
    }
}


/* --- Responsive Design --- */
@media (max-width: 992px) {
    body {
        max-width: 900px;
    }
}


@media (max-width: 768px) {
    body {
        margin: 20px auto;
        padding: 0 15px;
        max-width: 100%;
    }

    h1 {
        font-size: 24px;
    }

    .survey-question-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .question-text {
        padding-right: 0;
        margin-bottom: 20px;
        font-size: 16px;
    }

    .survey-options {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
    }

    .survey-option {
        min-width: 0;
        flex-basis: 0;
        flex-grow: 1;
    }

    .survey-option .option-label {
        font-size: 11px;
        word-break: break-word;
    }

    .charts-container {
        flex-direction: column;
        gap: 30px;
    }

    .chart-block {
        max-width: 100%;
    }

    .results-table thead {
        display: none;
    }

    .results-table,
    .results-table tbody,
    .results-table tr,
    .results-table td {
        display: block;
        width: 100%;
    }

    .results-table tr {
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 5px;
        padding: 10px;
        box-sizing: border-box;
    }

    .results-table .result-row {
        display: block;
    }

    .results-table td {
        display: block;
        padding: 10px 5px;
        border: none;
        border-bottom: 1px solid #e9ecef;
        text-align: left;
    }

    .results-table td[data-label="Occupation"],
    .results-table td[data-label="Career Cluster"] {
        text-align: right;
    }

    .results-table tr td:last-child {
        border-bottom: none;
    }

    .results-table td[data-label="Details"] {
        text-align: center;
        padding-top: 15px;
    }

    .results-table td::before {
        content: attr(data-label);
        font-weight: bold;
        text-align: left;
        display: block;
        margin-bottom: 5px;
    }

    .results-table td[data-label="Similarity"] {
        text-align: left;
    }

    .results-table td[data-label="Similarity"]::before {
        margin-bottom: 8px;
    }

    .results-table td[data-label="Similarity"] .similarity-row {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .results-table td[data-label="Similarity"] .similarity-bar-container {
        flex: 1 1 auto;
        width: auto;
    }

    .results-table td[data-label="Similarity"] .similarity-percentage {
        display: inline-block;
        flex: 0 0 55px;
        width: 55px;
        text-align: right;
        line-height: 24px;
        font-weight: bold;
    }

    .similarity-bar-container span {
        display: none;
    }

    .results-table td[data-label="Details"]::before {
        display: none;
    }

    .details-row {
        border: none;
        padding: 0;
        margin-bottom: 0;
    }

    .details-content {
        flex-direction: column;
    }

    #chat-container {
        margin-top: 30px;
    }

    #chat-messages {
        max-height: 45vh;
    }
}

.landing-main {
    flex-grow: 1;
}

.hero-brand {
    color: #007bff;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.hero {
    text-align: center;
    padding: 30px 20px 40px 20px;
    background-color: #ffffff;
    border-radius: 12px;
}

.hero-title {
    font-size: 44px;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto 30px;
}

.cta-button {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.3s;
}

.cta-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 60px 0;
    flex-wrap: wrap;
}

.feature-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 320px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.feature-icon {
    margin-bottom: 20px;
    color: #007bff;
}

.feature-icon svg {
    width: 48px;
    height: 48px;
}

.feature-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-description {
    color: #6c757d;
    font-size: 16px;
}

.privacy-warning {
    padding: 20px 0;
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
    background-color: #fffcf0;
    padding: 25px; 
    border-radius: 12px;
    border: 1px solid #fdecc5;
}

.privacy-icon {
    flex-shrink: 0;
}

.privacy-icon svg {
    width: 32px;
    height: 32px;
    color: #f0ad4e;
}

.privacy-text {
    text-align: center; 
}

.privacy-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.privacy-description {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}



/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 40px;
    }
    .hero-subtitle {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    .features {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
}