/* Quiz Interface Styles */

/* Quiz Container */
.quiz-container {
    width: 100vw;
    min-height: 100vh;
    background: var(--background-white);
    color: var(--text-dark);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Logo Styles */
.quiz-logo {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    background: white;
    flex-shrink: 0;
}

.logo-image {
    height: 100px;
    width: auto;
    object-fit: contain;
}

/* Progress Bar */
.quiz-progress {
    height: 4px;
    background: var(--border-light);
    z-index: 1000;
    flex-shrink: 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-pink) 100%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Quiz Content Container */
.quiz-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    min-height: 0;
    width: 100%;
    overflow-x: hidden;
    position: relative; /* Ensure stacking context for pseudo-elements */
}

/* Prevent scroll bars and layout shifts during loading */
.loading-screen {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(44, 60, 169, 0.02) 0%, rgba(230, 53, 115, 0.02) 100%);
    border-radius: 16px;
    position: relative;
    overflow: hidden; /* Prevent scroll bars during loading */
}

/* Ensure quiz content container prevents layout shifts */
.quiz-content {
    min-height: 60vh;
    position: relative;
    overflow: hidden; /* Prevent layout shifts */
    transition: none; /* Remove transitions that might cause blank screens */
}

/* Only apply slide transitions to non-processing states */
.quiz-content:not(.processing) {
    transition: transform 0.3s ease-out;
}

.quiz-content.processing {
    transform: none !important;
}

/* Slide Animations */
.quiz-content.slide-right {
    transform: translateX(100%);
    opacity: 0;
}

.quiz-content.slide-left {
    transform: translateX(-100%);
    opacity: 0;
}

/* Welcome Screen */
.welcome-screen {
    text-align: center;
    max-width: 600px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out;
    box-sizing: border-box;
    padding: 0 1rem;
}

.welcome-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
}

.welcome-description {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: var(--text-light);
    line-height: 1.6;
    word-wrap: break-word;
}

.welcome-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    width: 100%;
}

/* Field Container */
.field-container {
    max-width: 700px;
    width: 100%;
    animation: fadeInUp 0.6s ease-out;
    box-sizing: border-box;
}

.field-content {
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.field-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    color: var(--text-dark);
    animation: slideInLeft 0.6s ease-out;
    word-wrap: break-word;
}

.field-description {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Validation Screen Specific Styles */
.validation-screen {
    max-width: 800px;
}

.validation-screen .field-header {
    text-align: center;
    margin-bottom: 3rem;
}

.validation-screen .field-title {
    font-size: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.validation-inputs {
    max-width: 500px;
    margin: 0 auto 2rem;
}

.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.validation-inputs .text-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    background: var(--background-white);
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.validation-inputs .text-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(44, 60, 169, 0.1);
}

.validation-inputs .text-input.error {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 3px rgba(230, 53, 115, 0.1);
}

.help-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-style: italic;
}

.validation-loading {
    text-align: center;
    padding: 2rem;
    background: var(--background-card);
    border-radius: 12px;
    margin: 2rem 0;
}

.validation-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.validation-result {
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.validation-result.success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(44, 60, 169, 0.1) 100%);
    border: 2px solid #4caf50;
    color: var(--text-dark);
}

.validation-result.error {
    background: linear-gradient(135deg, rgba(230, 53, 115, 0.1) 0%, rgba(244, 67, 54, 0.1) 100%);
    border: 2px solid var(--primary-pink);
    color: var(--text-dark);
}

.validation-result .result-content p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.validation-screen .field-actions {
    justify-content: center;
    margin-top: 3rem;
}

/* Duplicate Detection Screen Styles */
.duplicate-detection-screen {
    max-width: 800px;
}

.duplicate-detection-screen .field-header {
    text-align: center;
    margin-bottom: 2rem;
}

.duplicate-detection-screen .field-title {
    font-size: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.duplicate-info {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.duplicate-result {
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: left;
    animation: fadeInUp 0.5s ease-out;
}

.duplicate-result.warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(230, 53, 115, 0.1) 100%);
    border: 2px solid #ff9800;
    color: var(--text-dark);
}

.duplicate-result.success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(44, 60, 169, 0.1) 100%);
    border: 2px solid #4caf50;
    color: var(--text-dark);
}

.duplicate-result .result-content p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.existing-result-display {
    background: var(--background-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    margin: 1.5rem 0;
    text-align: center;
    box-shadow: var(--shadow);
}

.existing-result-display h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.previous-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(44, 60, 169, 0.1) 0%, rgba(230, 53, 115, 0.1) 100%);
    border-radius: 8px;
}

.completion-date {
    font-size: 1rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.5rem;
}

.help-section {
    background: var(--background-light);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: left;
}

.help-section h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.help-section p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.help-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-section li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 1rem;
    line-height: 1.5;
}

.help-section li:last-child {
    border-bottom: none;
}

.help-section li strong {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Text Input Styling */
.text-input-container,
.email-input-container {
    margin-bottom: 3rem;
    width: 100%;
    box-sizing: border-box;
}

.text-input,
.email-input {
    width: 100%;
    padding: 1rem 0;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-light);
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.text-input::placeholder,
.email-input::placeholder {
    color: var(--text-light);
}

.text-input:focus,
.email-input:focus {
    border-bottom-color: var(--primary-blue);
}

.email-input.valid {
    border-bottom-color: var(--primary-blue);
}

.email-input.invalid {
    border-bottom-color: var(--primary-pink);
}

.validation-message {
    color: var(--primary-pink);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Multiple Choice Styling */
.choices-container {
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.choice-option {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: var(--background-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInRight 0.4s ease-out;
    animation-fill-mode: both;
    opacity: 0;
    box-shadow: var(--shadow);
    box-sizing: border-box;
    width: 100%;
}

/* Compact layout for short choices */
.choices-container.compact {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.choices-container.compact .choice-option {
    flex-direction: column;
    text-align: center;
    padding: 1rem 0.5rem;
    margin-bottom: 0;
    min-height: 80px;
    justify-content: center;
}

.choices-container.compact .choice-letter {
    margin-right: 0;
    margin-bottom: 0.5rem;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.choices-container.compact .choice-text {
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.2;
}

.choices-container.compact .choice-checkmark {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1rem;
}

/* Hover and selection states */
.choice-option:hover {
    background: var(--background-light);
    transform: translateX(8px);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-hover);
}

.choice-option.selected {
    background: linear-gradient(135deg, rgba(44, 60, 169, 0.08) 0%, rgba(230, 53, 115, 0.08) 100%);
    border-color: var(--primary-blue);
    transform: translateX(12px) scale(1.02);
    box-shadow: 0 4px 20px rgba(44, 60, 169, 0.15);
}

.choice-letter {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    border-radius: 50%;
    margin-right: 1rem;
    font-size: 1.1rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.choice-option.selected .choice-letter {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    color: white;
}

.choice-text {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--text-dark);
    word-wrap: break-word;
}

.choice-checkmark {
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 1.5rem;
    color: var(--primary-pink);
    flex-shrink: 0;
}

.choice-option.selected .choice-checkmark {
    opacity: 1;
    transform: scale(1);
}

/* Field Actions */
.field-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
}

/* Additional Button Styles for Quiz Components */
.btn-outline,
.btn-back {
    padding: 1rem 2rem;
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    outline: none;
    box-sizing: border-box;
    white-space: nowrap;
    background: var(--background-white);
    color: var(--primary-blue);
}

.btn-outline:hover,
.btn-back:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-back {
    border-color: var(--text-light);
    color: var(--text-light);
}

.btn-back:hover {
    background: var(--text-light);
    border-color: var(--text-light);
    color: white;
}

/* Disabled button states */
button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-outline:disabled,
.btn-back:disabled {
    background: var(--border-light) !important;
    color: var(--text-light) !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    border-color: var(--border-light) !important;
}

/* Loading Screen Styles */
.loading-screen {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(44, 60, 169, 0.02) 0%, rgba(230, 53, 115, 0.02) 100%);
    border-radius: 16px;
    position: relative;
    overflow: hidden; /* Prevent scroll bars during loading */
}

.loading-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

/* Animated Spinner */
.loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 3rem;
}

.spinner-ring {
    position: absolute;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.spinner-ring:nth-child(1) {
    width: 120px;
    height: 120px;
    border-top-color: var(--primary-blue);
    border-right-color: var(--primary-blue);
    animation-duration: 2s;
}

.spinner-ring:nth-child(2) {
    width: 90px;
    height: 90px;
    top: 15px;
    left: 15px;
    border-top-color: var(--primary-pink);
    border-left-color: var(--primary-pink);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 30px;
    left: 30px;
    border-top-color: #28a745;
    border-bottom-color: #28a745;
    animation-duration: 1s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading Text */
.loading-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-text {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(44, 60, 169, 0.1);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

/* Progress Steps */
.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(44, 60, 169, 0.1);
    transition: all 0.4s ease;
    opacity: 0.5;
    transform: translateX(-20px);
}

.step.completed {
    opacity: 1;
    transform: translateX(0);
    background: linear-gradient(135deg, rgba(44, 60, 169, 0.05) 0%, rgba(230, 53, 115, 0.05) 100%);
    border-color: var(--primary-blue);
    box-shadow: 0 4px 20px rgba(44, 60, 169, 0.1);
}

.step-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.step.completed .step-icon {
    transform: scale(1.1);
}

.step-text {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
    flex: 1;
    text-align: left;
}

.step.completed .step-text {
    color: var(--primary-blue);
}

/* Results Screen Base Styles */
.results-screen {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(44, 60, 169, 0.02) 0%, rgba(230, 53, 115, 0.02) 100%);
    border-radius: 16px;
    margin: 0 auto;
    max-width: 800px;
    box-sizing: border-box;
    overflow: hidden; /* Prevent unexpected scrollbars */
    animation: fadeInUp 0.8s ease-out;
}

.results-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
    min-height: auto; /* Ensure no fixed heights that cause issues */
}

.results-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: slideInDown 0.6s ease-out;
}

.category-display {
    background: linear-gradient(135deg, rgba(44, 60, 169, 0.05) 0%, rgba(230, 53, 115, 0.05) 100%);
    border: 1px solid rgba(44, 60, 169, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.category-name {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1.3;
    text-align: center;
}

.results-message {
    margin: 2rem 0;
    text-align: left;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(44, 60, 169, 0.05);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.results-message p {
    font-size: 1.15rem;
    color: var(--text-dark);
    line-height: 1.7;
    margin: 0;
    white-space: pre-line; /* Preserve line breaks from \n */
}

/* Enhanced styling for parent quiz results with next steps */
.results-message .next-steps {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(44, 60, 169, 0.1);
}

.results-message .next-steps strong {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.2rem;
}

.results-actions {
    text-align: center;
    margin: 3rem 0 2rem;
    animation: fadeInUp 0.8s ease-out 0.9s both;
}

.email-confirmation {
    background: linear-gradient(135deg, rgba(44, 60, 169, 0.03) 0%, rgba(230, 53, 115, 0.03) 100%);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-top: 2rem;
    border: 1px solid rgba(44, 60, 169, 0.08);
    position: relative;
    box-sizing: border-box; /* Ensure proper box model */
    animation: fadeInUp 0.8s ease-out 1.2s both;
}

.email-confirmation p {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0 0 1rem 0; /* Add bottom margin for spacing */
}

.email-confirmation strong {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Spam Notice Styling */
.spam-notice {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05) 0%, rgba(230, 53, 115, 0.05) 100%);
    border: 1px solid rgba(255, 152, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.spam-notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.spam-notice-content {
    flex: 1;
}

.spam-notice-content p {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.5;
    margin: 0;
}

.spam-notice-content strong {
    color: #ff6b00;
    font-weight: 700;
}

/* Responsive Design for Results Screen */
@media (max-width: 768px) {
    .results-screen {
        padding: 1.5rem 1rem;
        min-height: 50vh;
    }

    .results-header h1 {
        font-size: 2.2rem;
    }

    .category-name {
        font-size: 2rem;
    }

    .category-display {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    .results-message {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }

    .results-message p {
        font-size: 1.1rem;
    }

    .email-confirmation {
        padding: 1.25rem 1.5rem;
    }

    .spam-notice {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .spam-notice-icon {
        font-size: 1.25rem;
    }

    .spam-notice-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .results-screen {
        padding: 1rem 0.5rem;
    }

    .results-header h1 {
        font-size: 1.8rem;
    }

    .category-name {
        font-size: 1.6rem;
    }

    .category-display {
        padding: 1rem;
    }

    .results-message {
        padding: 1rem;
    }

    .results-message p {
        font-size: 1rem;
    }

    .spam-notice {
        padding: 0.5rem 0.75rem;
        flex-direction: column;
        text-align: center;
    }

    .spam-notice-icon {
        align-self: center;
        margin-bottom: 0.25rem;
    }

    .spam-notice-content p {
        font-size: 0.85rem;
    }
}

/* Score Results Screen Styles */
.score-results-screen {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(44, 60, 169, 0.02) 0%, rgba(230, 53, 115, 0.02) 100%);
    border-radius: 16px;
    margin: 0 auto;
    max-width: 900px;
    box-sizing: border-box;
    animation: fadeInUp 0.8s ease-out;
}

.score-results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.score-results-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: slideInDown 0.6s ease-out;
}

.current-score-display {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 1px solid rgba(44, 60, 169, 0.1);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
    font-weight: 800;
    position: relative;
}

.score-percentage {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.achievement-category {
    background: linear-gradient(135deg, rgba(44, 60, 169, 0.05) 0%, rgba(230, 53, 115, 0.05) 100%);
    border: 1px solid rgba(44, 60, 169, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.achievement-category h2 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-align: center;
}

/* Progress Comparison Section */
.progress-comparison {
    background: white;
    border: 1px solid rgba(44, 60, 169, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.progress-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 2rem;
}

.score-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.baseline-score, .current-score {
    flex: 1;
    text-align: center;
}

.baseline-score h4, .current-score h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    position: relative;
}

.baseline-score .mini-score-circle {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.current-score .mini-score-circle {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
}

.score-details {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.progress-arrow {
    font-size: 3rem;
    color: var(--primary-blue);
    animation: bounceX 2s infinite;
}

@keyframes bounceX {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(0);
    }
    40% {
        transform: translateX(-10px);
    }
    60% {
        transform: translateX(-5px);
    }
}

/* Improvement Badge */
.improvement-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin: 1rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.improvement-badge.positive {
    background: linear-gradient(135deg, #4caf50, #45a049);
}

.improvement-badge.neutral {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.improvement-badge.motivational {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
}

.improvement-text {
    background: linear-gradient(135deg, rgba(44, 60, 169, 0.03) 0%, rgba(230, 53, 115, 0.03) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    border: 1px solid rgba(44, 60, 169, 0.08);
}

.improvement-text p {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
}

.score-results-actions {
    text-align: center;
    margin: 3rem 0 2rem;
    animation: fadeInUp 0.8s ease-out 0.9s both;
}

/* Responsive Design for Score Results Screen */
@media (max-width: 768px) {
    .score-results-screen {
        padding: 1.5rem 1rem;
    }

    .score-results-header h1 {
        font-size: 2.2rem;
    }

    .score-comparison {
        flex-direction: column;
        gap: 1.5rem;
    }

    .progress-arrow {
        transform: rotate(90deg);
        font-size: 2rem;
        margin: 1rem 0;
    }

    .score-circle {
        width: 100px;
        height: 100px;
        font-size: 1.6rem;
    }

    .mini-score-circle {
        width: 70px;
        height: 70px;
        font-size: 1rem;
    }

    .progress-title {
        font-size: 1.5rem;
    }

    .achievement-category h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .score-results-screen {
        padding: 1rem 0.5rem;
    }

    .score-results-header h1 {
        font-size: 1.8rem;
    }

    .current-score-display {
        padding: 1.5rem;
    }

    .progress-comparison {
        padding: 1.5rem;
    }

    .score-circle {
        width: 90px;
        height: 90px;
        font-size: 1.4rem;
    }

    .mini-score-circle {
        width: 60px;
        height: 60px;
        font-size: 0.9rem;
    }

    .progress-title {
        font-size: 1.3rem;
    }

    .achievement-category h2 {
        font-size: 1.4rem;
    }

    .improvement-text {
        padding: 1rem;
    }
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Duplicate Detection Screen Button Fix */
.duplicate-detection-screen .field-actions {
    justify-content: center;
    margin-top: 3rem;
}