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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 700px;
    width: 100%;
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

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

header h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2em;
}

.intro-text {
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
}

.intro-text p {
    margin-bottom: 15px;
}

.info {
    background-color: #f5f5f5;
    padding: 15px;
    border-left: 4px solid #333;
    border-radius: 5px;
    margin-top: 20px;
}

.start-button-container {
    text-align: center;
    margin: 40px 0;
}

.btn-start {
    display: inline-block;
    background: #333;
    color: white;
    padding: 15px 50px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-start,
.btn-primary,
.btn-secondary,
.btn-submit,
button,
input[type="submit"],
input[type="button"] {
    -webkit-appearance: none; /* remove iOS/Chrome native styling */
    -moz-appearance: none; /* remove Firefox native styling */
    appearance: none;
    border: 2px solid transparent; /* explicit border baseline */
    background-clip: padding-box; /* ensure background doesn't bleed into border */
}

/* Explicit border colors for button variants */
.btn-primary,
.btn-start,
.btn-submit {
    border-color: transparent; /* keep gradient look without inconsistent border */
}

.btn-secondary {
    /* white background with colored outline - ensure consistent border color */
    border-color: #333;
}

/* When using white backgrounds, ensure subpixel aliasing doesn't create uneven edges by forcing a solid border color */
.btn-secondary,
.continue-section,
.question-section,
.completion-message {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: #444;
}

.btn-start:active {
    transform: translateY(-1px);
}

footer {
    text-align: center;
    color: #999;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 25px;
    }
    
    header h1 {
        font-size: 1.6em;
    }
    
    .btn-start {
        padding: 12px 35px;
        font-size: 1em;
    }
}

/* Question page styles */
.question-container {
    min-height: 100vh;
    padding: 20px;
}

.progress-bar {
    background-color: rgba(255, 255, 255, 0.3);
    height: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress {
    background-color: #4CAF50;
    height: 100%;
    transition: width 0.3s ease;
}

.question-header {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 0 auto;
}

#plotly-graph {
    width: 100%;
    height: 500px;
}

.question-section {
    background-color: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.question-section h3 {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 30px;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    border-color: #333;
    background-color: #f5f5f5;
}

.option input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-text {
    font-size: 1.1em;
    color: #555;
}

.btn-submit {
    background: #333;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: #444;
}

.btn-submit:active {
    transform: translateY(-1px);
}

/* Results page styles */
.results-summary {
    text-align: center;
    margin: 40px 0;
}

.score-circle {
    display: inline-block;
    margin: 20px 0;
    font-size: 3em;
    font-weight: bold;
    color: #333;
}

.score-total {
    font-size: 0.6em;
    color: #999;
}

.score-percentage {
    font-size: 2em;
    color: #4CAF50;
    margin-top: 10px;
}

.results-details {
    margin: 30px 0;
}

.answer-item {
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    border-left: 4px solid;
}

.answer-item.correct {
    background-color: #e8f5e9;
    border-color: #4CAF50;
}

.answer-item.incorrect {
    background-color: #ffebee;
    border-color: #f44336;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    #plotly-graph {
        height: 400px;
    }
}

.task-type {
    color: #333;
    font-size: 1.1em;
    margin-top: 10px;
    font-style: italic;
    font-weight: 400;
}

/* Continue Study Page Styles */
.results-summary {
    text-align: center;
    margin: 40px 0;
}

.info-text {
    font-size: 1.1em;
    margin-top: 15px;
    opacity: 0.9;
}

.continue-section {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
}

.continue-section h2 {
    color: #333;
    margin-bottom: 20px;
}

.continue-section p {
    color: #666;
    line-height: 1.8;
    margin: 15px 0;
    font-size: 1.1em;
}

.button-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: #333;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: #444;
}

.btn-secondary {
    background: white;
    color: #333;
    border: 2px solid #333;
}

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

/* Thank You Page Styles */
.thank-you-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.success-icon {
    margin: 30px 0;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.thank-you-content h2 {
    color: #4CAF50;
    font-size: 2em;
    margin: 20px 0;
}

.completion-message {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
}

.completion-message p {
    color: #666;
    line-height: 1.8;
    margin: 15px 0;
    font-size: 1.1em;
}

.score-summary {
    background: #333;
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 1.2em;
}

.final-message {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    text-align: left;
}

.final-message p {
    color: #333;
    font-weight: bold;
    margin-bottom: 15px;
}

.final-message ul {
    list-style: none;
    padding: 0;
}

.final-message li {
    color: #666;
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}

.final-message li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.2em;
}

/* Responsive */
@media (max-width: 768px) {
    .button-container {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }
}
