/* Reset default styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Custom properties */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #f1f1f1;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --vh: 1vh;
}

/* Base styles */
html, body {
    height: 100%;
    font-family: var(--font-family);
    background-color: #f9f9f9;
    background-image: url('images/Balloons.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #333;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Override fixed positioning for results page */
body.results-page {
    position: static;
    overflow: auto;
}

#root {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    background-color: rgba(255, 255, 255, 0.85);
}

/* Survey container */
.survey-container {
    max-width: 800px;
    min-height: 100%;
    height: auto;
    margin: 0 auto;
    padding: 10px 15px 70px;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.survey-container h1 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}

#survey-content {
    flex: 1;
    position: relative;
    height: calc(100% - 55px);
    overflow: hidden;
}

/* Question container */
#question-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* Question content */
.question-content {
    min-height: 160px;
    height: auto;
    margin-bottom: 2px;
    overflow: visible;
    max-height: none;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.question-content h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.question-content #questionText {
    font-size: 26px;
    line-height: 1.4;
    padding-bottom: 20px;
    font-weight: 600;
    color: #222;
    letter-spacing: -0.3px;
    overflow: visible;
}

/* Options container */
.options-container {
    flex: 1;
    overflow: visible;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 105px; /* Increased padding to ensure room for all content */
    display: flex;
    flex-direction: column;
}

/* Likert scale */
.likert-container {
    width: 100%;
    height: auto;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.instructions {
    font-size: 14px;
    margin-top: 20px;
    margin-bottom: 5px;
    color: #666;
    font-weight: 500;
}

.likert-scale {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 2px;
    width: 100%;
}

/* Likert options */
.likert-option {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    min-height: 36px;
    margin-bottom: 2px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
}

.likert-option:last-child {
    margin-bottom: 10px;
}

.likert-option:hover {
    background-color: #f9f9f9;
}

.likert-option input[type="radio"] {
    margin-right: 10px;
}

.likert-option label {
    flex: 1;
    cursor: pointer;
}

.likert-option:has(input[type="radio"]:checked) {
    background-color: #e8f0fe;
    border-color: var(--primary-color);
}

/* Don't understand checkbox */
.dont-understand-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 0;
    margin: 0;
    margin-bottom: 0 !important;
    padding: 5px 5px;
    line-height: 1.3;
    height: auto;
    margin-top: 5px;
}

.dont-understand-container input {
    margin-right: 8px;
}

.dont-understand-container label {
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.3;
}

.dont-understand-container .note {
    width: 100%;
    font-size: 11px;
    color: #777;
    padding-left: 23px;
    margin-top: 1px;
    line-height: 1.2;
    margin-bottom: 0;
}

/* Navigation wrapper for precise positioning */
.navigation-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    margin-top: 10px;
    padding-top: 0;
}

/* Navigation buttons */
.navigation-buttons {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 10px 30px;
    z-index: 100;
    background-color: #fff;
    border-top: none;
    margin: 0;
    margin-top: 15px;
    height: auto;
    min-height: 55px;
}

.nav-button {
    padding: 5px 15px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    min-width: 80px;
    height: 36px;
    transition: all 0.2s;
}

.nav-button:hover:not(:disabled) {
    opacity: 0.9;
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#nextButton {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

#prevButton {
    background-color: var(--secondary-color);
    color: #333;
}

/* Loader */
.loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Media queries for mobile */
@media (max-width: 480px) {
    body {
        display: flex;
        flex-direction: column;
    }
    
    .survey-container {
        padding: 0;
        display: flex;
        flex-direction: column;
        height: 100vh;
    }
    
    /* Top section for question - reduced height */
    .question-content {
        min-height: auto;
        height: auto;
        margin-bottom: 0;
        max-height: none;
        overflow: visible;
        padding: 10px 15px 10px;
        position: relative;
        flex: 0 0 auto;
        /* Reduced from 40vh to 35vh to give more space to options */
        min-height: 35vh;
    }
    
    .question-content h2 {
        margin-top: 0;
    }
    
    /* Smaller question text on mobile */
    .question-content #questionText {
        font-size: 20px;
        line-height: 1.3;
        font-weight: 600;
        color: #222;
        letter-spacing: -0.2px;
        padding-bottom: 8px;
        overflow: visible;
    }
    
    /* Bottom section for options and buttons - increased height */
    .options-container {
        overflow: visible;
        padding: 0 15px 15px;
        background-color: #f7f7f7;
        border-top: 1px solid #ddd;
        border-radius: 20px 20px 0 0;
        margin-top: 0;
        position: relative;
        flex: 1 1 auto;
        /* Increased from 50vh to 55vh to have more space */
        min-height: 55vh;
        display: flex;
        flex-direction: column;
    }
    
    /* Add extra space at top of options container */
    .instructions {
        margin-top: 15px;
        margin-bottom: 5px;
        font-size: 13px;
        padding-bottom: 5px;
    }
    
    /* Make the options more compact */
    .likert-option {
        padding: 8px;
        min-height: 32px;
        margin-bottom: 5px;
    }
    
    .likert-option:last-child {
        margin-bottom: 8px;
    }
    
    /* Adjust "I Don't Understand" for mobile */
    .dont-understand-container {
        padding: 3px 3px;
        margin-top: 2px;
    }
    
    .dont-understand-container label {
        font-size: 13px;
    }
    
    .dont-understand-container .note {
        font-size: 10px;
        padding-left: 20px;
    }
    
    /* Navigation buttons at the very bottom */
    .navigation-wrapper {
        margin-top: auto;
        padding-top: 10px;
    }
    
    .navigation-buttons {
        padding: 8px 15px;
        margin-top: 5px;
        position: relative;
        display: flex;
        justify-content: space-between;
        background-color: transparent;
    }
    
    .nav-button {
        min-width: 70px;
        padding: 5px 10px;
        font-size: 13px;
        height: 32px;
    }
    
    /* Make sure the survey title is visible and compact */
    .survey-container h1 {
        font-size: 20px;
        margin: 5px 0;
        padding: 5px 15px;
    }
    
    /* Make question number more compact */
    .question-content h2 {
        font-size: 16px;
        margin-top: 0;
        margin-bottom: 5px;
    }
    
    /* Make sure the root element takes full viewport height */
    #root {
        height: 100vh;
        overflow: hidden;
    }
    
    html, body {
        overflow: hidden;
        height: 100%;
        position: fixed;
        width: 100%;
    }
    
    /* Make sure navigation sticks to bottom */
    .navigation-wrapper {
        margin-top: auto;
        padding-top: 10px;
        margin-bottom: 5px;
    }
    
    /* Adjust width for Likert labels to fit smaller screens */
    .likert-option label {
        font-size: 14px;
        flex: 1;
        padding-right: 5px;
    }
    
    .learn-more-btn {
        width: 100%;
        font-size: 13px;
    }
    
    .statement-text {
        font-size: 14px;
    }
    
    .perspective-statement {
        padding: 15px;
        margin: 15px 0;
    }
    
    .perspective-statement p {
        font-size: 16px;
        line-height: 1.5;
    }
    
    .statement-responses {
        margin-top: 20px;
    }
    
    .statement-responses h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .statement-response {
        padding: 15px;
    }
    
    .continuum-left, .continuum-right {
        font-size: 12px;
        padding: 2px 6px;
    }
    
    .detail-scale .continuum-left,
    .detail-scale .continuum-right {
        font-size: 13px;
    }
    
    .continuum-scale {
        height: 30px;
        margin-bottom: 22px; /* Adjusted for smaller arrow */
    }
    
    .continuum-marker {
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 8px solid #333;
        bottom: -12px;
    }
    
    .continuum-details {
        padding: 10px;
        padding-top: 85px; /* Increased from 70px to 85px for more space on mobile */
    }
    
    .continuum-details h2 {
        font-size: 20px; /* Slightly smaller font on mobile */
        padding-top: 20px; /* Increased from 15px to 20px for more space */
    }
    
    .back-button-top {
        top: 15px;
        left: 15px;
        padding: 3px 10px;
        font-size: 12px;
    }
    
    .back-button {
        font-size: 14px;
        padding: 8px 15px;
        margin-bottom: 15px;
    }
    
    .results-actions button {
        width: 100%;
    }
    
    /* Make continuum labels more compact on mobile */
    .results-container .continuum-left,
    .results-container .continuum-right {
        font-size: 12px;
        padding: 2px 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 40%;
    }
    
    /* Adjust marker size for better mobile display */
    .results-container .continuum-marker {
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 8px solid #333;
    }
    
    /* Better vertical spacing between results on mobile */
    .results-container .continuum-grid {
        gap: 15px;
    }
}

/* Login page styles */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
}

.login-container h1 {
    margin-bottom: 20px;
}

.login-container .input-group {
    margin-bottom: 15px;
    text-align: left;
}

.login-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.login-container input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
}

.login-container button {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

.login-container button:hover {
    opacity: 0.9;
}

.login-container .error {
    color: #e53935;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Thank you page styles */
.thank-you-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.thank-you-container h1 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.thank-you-container p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.5;
}

.thank-you-container .completion-code {
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: var(--border-radius);
}

.thank-you-container .button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.thank-you-container .button:hover {
    opacity: 0.9;
}

/* Auth Container */
.auth-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.auth-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

/* Auth Forms */
.auth-form {
    margin-bottom: 30px;
}

.auth-form h2 {
    color: #444;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

button {
    width: 100%;
    padding: 10px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #357abd;
}

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

/* Messages */
.message {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
}

.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* Survey Styles */
.survey-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px 30px 40px 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 600px;
    position: relative;
}

.survey-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

#survey-content {
    display: flex;
    flex-direction: column;
    height: calc(100% - 50px);
    position: relative;
    overflow: hidden;
}

#question-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.question-content {
    height: 120px;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
}

#question {
    color: #4a90e2;
    margin-bottom: 5px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

#questionText {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 15px;
    height: 120px;
    overflow-y: auto;
}

.options-container {
    height: calc(100% - 130px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

.likert-container {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.instructions {
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
    flex-shrink: 0;
}

.note {
    margin-top: 3px;
    color: #777;
    font-style: italic;
}

.likert-scale {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.likert-option {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.likert-option:last-child {
    margin-bottom: 0;
}

.likert-option:hover {
    background-color: #f5f5f5;
    border-color: #4a90e2;
}

.likert-option input[type="radio"] {
    margin-right: 12px;
}

.likert-option input[type="radio"]:checked + label {
    font-weight: bold;
    color: #4a90e2;
}

.likert-option:has(input[type="radio"]:checked) {
    background-color: #e8f0fe;
    border-color: #4a90e2;
}

.dont-understand-container {
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    min-height: 0;
    flex-shrink: 0;
}

.dont-understand-container input[type="checkbox"] {
    margin-right: 5px;
}

.dont-understand-container label {
    margin-right: 10px;
}

.dont-understand-container .note {
    margin-top: 0;
    width: 100%;
    font-size: 11px;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    border-top: none;
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    background-color: white;
    width: 100%;
    z-index: 10;
    box-sizing: border-box;
    padding: 5px 30px;
    border-radius: 0 0 8px 8px;
    height: 46px;
}

.nav-button {
    flex: 0 0 48%;
    max-width: 48%;
    padding: 8px 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .survey-container {
        margin: 10px auto;
        padding: 15px 15px 40px 15px;
        max-width: 95%;
        height: calc(100 * var(--vh) - 20px);
    }
    
    #survey-content {
        height: calc(100% - 40px);
    }
    
    .question-content {
        height: 100px;
    }
    
    #question {
        font-size: 1.1rem;
    }
    
    #questionText {
        font-size: 16px;
        height: 90px;
    }
    
    .options-container {
        height: calc(100% - 110px);
    }
    
    .likert-option {
        padding: 8px 10px;
        margin-bottom: 2px;
        min-height: 40px;
    }
    
    .navigation-buttons {
        padding: 3px 15px;
        height: 40px;
    }

    #nextButton {
        background-color: #4a90e2;
        order: 2;
    }
    
    #prevButton {
        background-color: #f1f1f1;
        color: #333;
        border: 1px solid #ddd;
        order: 1;
    }

    .navigation-buttons {
        flex-direction: row;
        gap: 10px;
        justify-content: space-between;
    }

    .dont-understand-container {
        margin-bottom: 0;
    }
}

/* Survey Code Container - Styles based on auth-container */
.survey-code-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.survey-code-container h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.survey-code-form {
    margin-top: 20px;
}

.survey-code-form h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.survey-code-form p {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

#continue-button {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
}

#continue-button:hover {
    background-color: #3a7bc8;
}

/* Responsive adjustments for mobile */
@media (max-width: 480px) {
    .survey-code-container {
        margin: 30px auto;
        padding: 20px;
        width: 90%;
    }
}

/* Button styles */
.button-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.primary-button {
    padding: 10px 20px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.primary-button:hover {
    background-color: #3a7bc8;
}

.primary-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.secondary-button {
    padding: 10px 20px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.secondary-button:hover {
    background-color: #e8e8e8;
}

.completion-screen {
    text-align: center;
    padding: 20px;
}

.completion-screen h2 {
    margin-bottom: 20px;
}

.completion-screen .button-container {
    justify-content: center;
    margin-top: 30px;
}

/* Required/Optional Indicators */
.required-indicator {
    color: #e74c3c;
    font-weight: bold;
    margin-top: 10px;
    font-size: 14px;
}

.optional-indicator {
    color: #7f8c8d;
    font-style: italic;
    margin-top: 10px;
    font-size: 14px;
}

/* Progress bar styles */
.progress-container {
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 8px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 5px;
}

/* Mobile adjustments for progress bar */
@media (max-width: 480px) {
    .progress-container {
        height: 10px;
        margin-bottom: 10px;
    }
}

/* Submit button color */
.submit-button {
    background-color: #e74c3c !important; /* Red color */
    color: white !important;
}

.submit-button:hover {
    background-color: #c0392b !important; /* Darker red on hover */
}

.submit-button:disabled {
    background-color: #e57373 !important; /* Lighter red when disabled */
    cursor: not-allowed;
}

/* Don't understand reminder popup */
.reminder-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.reminder-content {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.reminder-content h3 {
    margin-top: 0;
    font-size: 18px;
    color: #e74c3c;
    margin-bottom: 10px;
}

.reminder-content p {
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 15px;
}

#reminder-close-btn {
    padding: 8px 20px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    width: auto;
    display: inline-block;
}

#reminder-close-btn:hover {
    background-color: #357abd;
}

@media (max-width: 480px) {
    .reminder-content {
        padding: 20px;
        width: 85%;
    }
    
    .reminder-content p {
        font-size: 14px;
    }
}

/* Results page styles */
.results-container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.results-summary {
    margin-bottom: 30px;
}

.results-summary h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.continuum-result {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.continuum-result h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.continuum-scale {
    position: relative;
    height: 40px;
    width: 100%;
    background: linear-gradient(to right, #3498db, #fff, #f39c12);
    border-radius: 20px;
    margin: 15px 0 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

.continuum-left, .continuum-right {
    font-size: 14px;
    font-weight: bold;
    z-index: 5;
    position: relative;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    border-radius: 10px;
}

.continuum-left {
    text-align: left;
}

.continuum-right {
    text-align: right;
}

.continuum-marker {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #333;
    z-index: 2;
    transform: translateX(-50%);
    bottom: -15px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.continuum-score {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
}

.continuum-stats {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.results-actions button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
}

.results-actions button:hover {
    background-color: #3a7bc8;
}

.results-error {
    padding: 20px;
    background-color: #ffebee;
    border-radius: var(--border-radius);
    text-align: center;
}

.results-error h3 {
    color: #d32f2f;
    margin-bottom: 10px;
}

.loading {
    text-align: center;
    padding: 30px;
    font-size: 18px;
    color: #666;
}

/* Media queries for results page */
@media (max-width: 480px) {
    .results-container {
        padding: 10px;
        margin: 10px auto;
    }
    
    .results-container h1 {
        font-size: 18px;
        line-height: 1.3;
        margin-top: 15px;
        padding: 0 5px;
        word-wrap: break-word;
    }
    
    .results-container h2 {
        font-size: 20px;
        margin-bottom: 15px;
        padding-top: 10px;
    }
    
    /* Fix spacing at the top of the results page */
    .results-summary {
        margin-top: 10px;
    }
    
    .continuum-scale {
        height: 30px;
        margin-bottom: 22px; /* Adjusted for smaller arrow */
    }
    
    .continuum-marker {
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 8px solid #333;
        bottom: -12px;
    }
    
    .results-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .results-actions button {
        width: 100%;
    }
    
    .learn-more-btn {
        font-size: 13px;
        padding: 7px 14px;
        max-width: 90%;
    }
    
    .statement-text {
        font-size: 14px;
    }
    
    .continuum-details {
        padding: 10px;
        padding-top: 85px; /* Increased from 70px to 85px for more space on mobile */
    }
    
    .continuum-details h2 {
        font-size: 20px; /* Slightly smaller font on mobile */
        padding-top: 20px; /* Increased from 15px to 20px for more space */
    }
    
    .back-button-top {
        top: 15px;
        left: 15px;
        padding: 3px 10px;
        font-size: 12px;
    }
    
    .back-button {
        font-size: 14px;
        padding: 8px 15px;
        margin-bottom: 15px;
    }
    
    /* Specific mobile fixes for results page */
    .results-container .perspective-statement-brief {
        min-height: 50px;
        font-size: 14px;
        margin-bottom: 15px;
        line-height: 1.4;
        padding: 0 5px;
    }
    
    .results-container .continuum-result {
        margin-bottom: 20px;
        padding: 10px;
    }
    
    .results-container .continuum-result h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .results-container .continuum-scale {
        height: 35px;
        margin: 10px 0 20px 0;
    }
    
    /* Make continuum labels more compact on mobile */
    .results-container .continuum-left,
    .results-container .continuum-right {
        font-size: 12px;
        padding: 2px 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 40%;
    }
    
    /* Adjust marker size for better mobile display */
    .results-container .continuum-marker {
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 8px solid #333;
    }
    
    /* Better vertical spacing between results on mobile */
    .results-container .continuum-grid {
        gap: 15px;
    }
}

/* Group comparison placeholder */
.group-comparison {
    margin-top: 30px;
    padding: 15px;
    background-color: #f0f7ff;
    border-radius: var(--border-radius);
    border: 1px dashed var(--primary-color);
}

.group-comparison h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
    text-align: center;
}

.coming-soon-placeholder {
    padding: 15px;
    text-align: center;
    color: #666;
}

.coming-soon-placeholder p {
    font-style: italic;
}

.learn-more-btn {
    background-color: #4a90e2;
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    margin-top: 12px;
    transition: all 0.2s;
    display: inline-block;
    max-width: fit-content;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.learn-more-btn:hover {
    background-color: #3a7bc8;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Continuum details panel styles */
.continuum-details {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-top: 20px;
    position: relative;
    z-index: 100;
    transition: all 0.3s ease;
}

.continuum-details.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.continuum-details:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.continuum-details h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.continuum-details .distribution-bar {
    background: #f5f5f5;
    height: 20px;
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
    position: relative;
}

.continuum-details .distribution-bar .bar-segment {
    height: 100%;
    float: left;
    transition: width 0.3s ease;
}

.continuum-details .distribution-bar .bar-segment:nth-child(1) { background: #4CAF50; }
.continuum-details .distribution-bar .bar-segment:nth-child(2) { background: #8BC34A; }
.continuum-details .distribution-bar .bar-segment:nth-child(3) { background: #FFC107; }
.continuum-details .distribution-bar .bar-segment:nth-child(4) { background: #FF9800; }
.continuum-details .distribution-bar .bar-segment:nth-child(5) { background: #F44336; }

.continuum-details .dont-understand {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.continuum-details .summary {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.continuum-details .summary p {
    margin: 5px 0;
    color: #666;
}

.continuum-details .back-button {
    margin-top: 15px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.continuum-details .back-button:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

/* Distribution bar styles */
.distribution-bar {
    min-height: 40px;
    margin-bottom: 10px;
    border: 1px solid #eee;
    display: flex;
    height: 30px;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
}

.distribution-segment {
    min-height: 40px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    min-width: 30px;
}

.neg-two { background-color: #d32f2f; }
.neg-one { background-color: #f44336; }
.pos-one { background-color: #4caf50; }
.pos-two { background-color: #2e7d32; }

.distribution-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.8rem;
}

.dont-understand-stat {
    margin-top: 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.response-summary {
    margin-top: 20px;
}

/* Back button styles */
.back-button {
    background-color: #5e35b1;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 15px;
    margin-bottom: 20px;
    transition: all 0.2s;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.back-button:hover {
    background-color: #4527a0;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.continuum-details h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    padding-top: 40px; /* Increased from 30px to 40px for more space */
}

.detail-scale {
    margin-bottom: 45px; /* Increased margin to make room for the arrow */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.detail-scale .continuum-left,
.detail-scale .continuum-right {
    font-size: 15px;
    padding: 3px 10px;
}

.statement-responses {
    margin-top: 25px;
}

.statement-responses h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.statement-responses h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #5e35b1;
    border-radius: 3px;
}

.statement-response {
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.statement-response:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.statement-text {
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    color: #333;
    margin-top: 8px;
}

.response-value {
    font-size: 15px;
    color: #5e35b1;
    font-weight: 600;
    display: inline-block;
    padding: 4px 0;
    margin-bottom: 6px;
}

@media (max-width: 480px) {
    .results-actions button {
        width: 100%;
    }
}

.perspective-statement {
    background-color: #f5f7fd;
    padding: 18px;
    border-left: 4px solid #5e35b1;
    margin: 25px 0;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.perspective-statement p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.perspective-statement-brief {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    margin: 5px 0 20px;
    line-height: 1.6;
    font-size: 16px;
    text-align: center;
    white-space: normal;
}

.perspective-statement-brief strong {
    white-space: nowrap;
    display: inline;
    margin: 0 3px;
}

.perspective-statement-brief * {
    margin-right: 3px;
}

/* Fix spacing issues in perspective statements */
.perspective-statement-brief strong {
    margin: 0 2px; /* Add space around emphasized text */
    display: inline-block; /* Prevent breaking inside strong elements */
}

/* Add proper word spacing */
.perspective-statement-brief {
    word-spacing: 0.05em; /* Ensure consistent word spacing */
}

/* Prevent labels from being broken into multiple lines */
.continuum-left, .continuum-right {
    white-space: nowrap;
}

/* Ensure proper spacing between text and labels */
.continuum-result h3 {
    word-spacing: normal; /* Prevent excessive word spacing */
}

.continuum-description {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 3px solid var(--primary-color);
}

.continuum-description p {
    font-size: 16px;
    line-height: 1.5;
    color: #555;
    margin: 0;
}

.statement-responses {
    margin-top: 25px;
}

.supporting-responses h3 {
    color: #2e7d32; /* green */
}

.supporting-responses h3:after {
    background-color: #2e7d32;
}

.contradicting-responses h3 {
    color: #c62828; /* red */
}

.contradicting-responses h3:after {
    background-color: #c62828;
}

.dont-understand-responses h3 {
    color: #f57c00; /* orange */
}

.dont-understand-responses h3:after {
    background-color: #f57c00;
}

.statement-response.supporting {
    border-left: 4px solid #2e7d32;
}

.statement-response.contradicting {
    border-left: 4px solid #c62828;
}

.statement-response.dont-understand {
    border-left: 4px solid #f57c00;
}

.dont-understand-note {
    color: #f57c00;
    font-weight: 500;
    display: inline-block;
}

.with-dont-understand {
    border-left: 4px solid #f57c00;
}

.with-dont-understand.supporting {
    border-left: 4px solid #f57c00; /* Override the supporting green */
}

.continuum-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .continuum-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 0 20px;
    }
    
    .continuum-result {
        flex: 1;
        min-width: 0; /* Prevent overflow */
        max-width: 100%; /* Ensure equal width */
    }
}

@media (min-width: 1200px) {
    .continuum-grid {
        padding: 0 40px;
        gap: 40px;
    }
    
    .continuum-result {
        padding: 25px;
    }
    
    .continuum-scale {
        height: 45px;
    }
    
    .continuum-result h3 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .learn-more-btn {
        margin-top: 20px;
        padding: 10px 24px;
        font-size: 16px;
    }
    
    .continuum-details {
        padding: 50px;
    }
    
    .continuum-details h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .detail-scale {
        height: 50px;
        margin-bottom: 55px;
    }
    
    .detail-scale .continuum-left,
    .detail-scale .continuum-right {
        font-size: 16px;
        padding: 4px 12px;
    }
    
    .perspective-statement {
        padding: 25px;
        margin: 35px 0;
    }
    
    .perspective-statement p {
        font-size: 20px;
        line-height: 1.7;
    }
    
    .statement-responses h3 {
        font-size: 22px;
        margin-bottom: 25px;
    }
    
    .statement-response {
        padding: 25px;
        margin-bottom: 20px;
    }
    
    .statement-text {
        font-size: 18px;
        line-height: 1.6;
        margin-top: 10px;
    }
    
    .response-value {
        font-size: 16px;
        padding: 6px 0;
    }
    
    .back-button {
        padding: 12px 24px;
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    .results-actions {
        margin-top: 50px;
        gap: 25px;
    }
    
    .results-actions button {
        padding: 12px 30px;
        font-size: 18px;
        min-width: 200px;
    }
    
    .group-comparison {
        margin-top: 50px;
        padding: 25px;
    }
    
    .group-comparison h3 {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .coming-soon-placeholder p {
        font-size: 16px;
    }
    
    .back-button-container {
        margin-top: 60px;
        padding-bottom: 30px;
    }
    
    .back-button-top {
        top: 30px;
        left: 30px;
        padding: 5px 14px;
        font-size: 14px;
        width: auto;
    }
    
    .responses-container {
        gap: 40px;
    }
    
    .responses-column {
        padding: 0 20px;
    }
    
    .responses-list {
        gap: 20px;
    }
    
    .responses-column h3 {
        font-size: 20px;
        margin-bottom: 25px;
    }
}

@media (min-width: 1024px) {
    .survey-container {
        max-width: 1200px;
    }
    
    .auth-container {
        max-width: 600px;
        padding: 40px;
    }
    
    .login-container {
        max-width: 600px;
        padding: 40px;
    }
    
    .survey-code-container {
        max-width: 600px;
        padding: 40px;
    }
    
    .thank-you-container {
        max-width: 800px;
        padding: 50px;
    }
}

.back-button-container {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 20px;
}

.back-button-top {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #f1f1f1;
    border: none;
    color: #333;
    padding: 4px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 10;
    width: auto;
    min-width: 0;
}

.back-button-top:hover {
    background-color: #e0e0e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.responses-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 30px;
}

.responses-column {
    width: 100%;
}

.responses-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .responses-container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .responses-column {
        padding: 0 10px;
    }
    
    .responses-column.supporting-responses {
        border-right: 1px dashed #ccc;
    }
}

@media (min-width: 1200px) {
    .responses-container {
        gap: 40px;
    }
    
    .responses-column {
        padding: 0 20px;
    }
    
    .responses-list {
        gap: 20px;
    }
}

.responses-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.responses-column h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    border-radius: 3px;
}

.responses-column.supporting-responses h3 {
    color: #2e7d32; /* green */
}

.responses-column.supporting-responses h3:after {
    background-color: #2e7d32;
}

.responses-column.contradicting-responses h3 {
    color: #c62828; /* red */
}

.responses-column.contradicting-responses h3:after {
    background-color: #c62828;
}

@media (max-width: 767px) {
    .responses-container {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    .responses-column.supporting-responses {
        margin-bottom: 10px;
    }
    
    .responses-column.contradicting-responses {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px dashed #ccc;
    }
}

@media (min-width: 1200px) {
    .responses-column h3 {
        font-size: 20px;
        margin-bottom: 25px;
    }
}

/* Hidden elements */
.hidden {
    display: none;
}

/* No data message styling */
.no-data-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
}

.no-data-message h3 {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.no-data-message p {
    color: #6c757d;
    margin-bottom: 10px;
    line-height: 1.5;
}

.no-data-message ul {
    text-align: left;
    max-width: 400px;
    margin: 15px auto;
    color: #6c757d;
}

.no-data-message li {
    margin-bottom: 5px;
}

.no-data-message strong {
    color: #495057;
}

/* Centered text */
.text-center {
    text-align: center;
}

/* Message display styles */
#error-message, #success-message {
    display: none;
}

/* Pre-formatted code output */
.code-output {
    white-space: pre;
    font-family: monospace;
    background-color: #f0f0f0;
    padding: 20px;
}

/* Admin Dashboard Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#user-role {
    font-weight: 600;
    color: #555;
}

.dashboard-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-btn:hover:not(.active) {
    background-color: #f5f5f5;
    color: #333;
}

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

.btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn.primary {
    background: #007bff;
}

.btn.secondary {
    background: #6c757d;
}

.btn.small {
    padding: 5px 10px;
    font-size: 14px;
}

.btn:hover {
    opacity: 0.9;
}

.hidden {
    display: none;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group small {
    font-size: 12px;
    color: #777;
    display: block;
    margin-top: 5px;
}

.search-interface {
    margin-bottom: 20px;
}

.search-interface form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.stat-card h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.stat-card p {
    margin: 5px 0;
    color: #666;
}

.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cohort-results,
.continuum-details {
    margin-top: 30px;
}

.incomplete-surveys ul {
    list-style: none;
    padding: 0;
}

.incomplete-surveys li {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.student-identifier {
    font-weight: 600;
    color: #007bff;
}

.code-display {
    font-family: monospace;
    padding: 10px;
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 18px;
    text-align: center;
    margin: 15px 0;
}

#invite-result {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-interface form {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 10px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .user-info {
        width: 100%;
        justify-content: space-between;
    }
}

/* Add spinner animation for loading indicator */
.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

#loading-indicator {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Checkbox container styles */
.checkbox-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background-color: #f9f9f9;
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.checkbox-item:last-child {
    margin-bottom: 0;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.checkbox-item label {
    margin: 0;
    cursor: pointer;
}

/* Selected cohorts display */
.selected-cohorts {
    margin-top: 10px;
    padding: 8px;
    background-color: #e8f5e9;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Warning styles for incompatible surveys */
.selected-cohorts.warning {
    background-color: #fff3e0;
    border-left: 3px solid #ff9800;
}

.warning-message {
    margin-top: 8px;
    color: #e65100;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.warning-icon {
    margin-right: 5px;
    font-size: 1.1rem;
}

/* Additional styles for the detailed stats section in cohort results */
.detailed-stats {
    margin-top: 40px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.detailed-stats h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.stat-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

/* Add specific styling for the student results page */
.results-container .perspective-statement-brief {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    margin: 5px 0 20px;
    line-height: 1.6;
    font-size: 16px;
    text-align: center;
    white-space: normal;
}

.results-container .perspective-statement-brief strong {
    white-space: nowrap;
    display: inline;
    margin: 0 3px;
}

/* Add spacing between broken sentence parts */
.results-container .perspective-statement-brief * {
    margin-right: 3px;
}

/* Fix the alignment in the perspective statements */
.results-container .continuum-result {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Making the details button match learn-more-btn */
.details-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.details-btn:hover {
    background-color: #2980b9;
}

@media (max-width: 768px) {
    .stat-cards-container {
        grid-template-columns: 1fr;
    }
    
    .detailed-stats {
        margin-top: 30px;
        padding-top: 15px;
    }
}

/* Additional styles for the continuum average value */
.average-value {
    text-align: center;
    font-size: 14px;
    color: #555;
    margin: 10px 0;
    font-weight: 500;
}

/* Cohort action buttons styling */
.cohort-action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    padding: 15px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.action-btn {
    min-width: 150px;
    padding: 10px 20px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .cohort-action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Stats Table Styling */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    table-layout: fixed;
}

.stats-table thead {
    background-color: var(--primary-color);
    color: white;
}

.stats-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    word-wrap: break-word;
    font-size: 14px;
}

.stats-table th:first-child {
    width: 40%;
}

.stats-table th:not(:first-child) {
    width: 15%;
}

.stats-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.stats-table tbody tr:nth-of-type(even) {
    background-color: #f5f5f5;
}

.stats-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--primary-color);
}

.stats-table td {
    padding: 12px 15px;
    vertical-align: top;
    word-wrap: break-word;
    font-size: 14px;
}

/* Table container for scrollability */
.table-container {
    max-height: 500px;
    overflow-y: auto;
    margin: 20px 0;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow-x: auto; /* Add horizontal scrolling for wide tables */
}

/* Table header container */
.table-header-container {
    position: relative;
    margin-bottom: 20px;
    padding-top: 40px;
    text-align: center;
}

.back-button-top {
    position: absolute;
    top: 0;
    left: 0;
}

/* Info text below table */
.table-count-info {
    color: #666;
    font-style: italic;
    text-align: center;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .stats-table {
        font-size: 13px;
        table-layout: auto; /* Allow table to adjust on mobile */
    }
    
    .stats-table th, 
    .stats-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .stats-table th:first-child {
        width: 30%;
    }
    
    .table-container {
        max-height: 350px;
    }
    
    .table-header-container {
        padding-top: 30px;
    }
    
    .table-count-info {
        font-size: 13px;
    }
}

/* Fix specific display issues with continuum-details */
.continuum-details.card {
    display: block;
    visibility: visible;
    opacity: 1;
}

.continuum-details.card.hidden {
    display: none;
    visibility: hidden;
    opacity: 0;
} 