/* AED Training Test - Design System */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: #E8F1F7;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #5BA3D0;
    color: white;
    padding: 16px 20px;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 24px;
    font-weight: 600;
}

.card-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* Screen visibility */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Welcome Screen */
.welcome-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #5BA3D0 0%, #7DB8DD 100%);
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    overflow: hidden;
}

.welcome-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.welcome-text {
    text-align: center;
    margin-bottom: 24px;
}

.welcome-text h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 16px;
}

.welcome-text p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Step Screen */
.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.step-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-indicator {
    font-size: 14px;
    color: #5BA3D0;
    font-weight: 600;
}

.step-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 16px;
}

.step-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.check-for-section {
    background-color: #D4E8F7;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.check-for-title {
    font-size: 12px;
    color: #5BA3D0;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.check-for-item {
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.check-for-item::before {
    content: "✓";
    color: #5BA3D0;
    font-weight: bold;
    margin-right: 12px;
}

.check-for-item:last-child {
    margin-bottom: 0;
}

.common-mistake {
    background-color: #FFF3CD;
    border-left: 4px solid #FF9800;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.mistake-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #FF9800;
    font-size: 14px;
    margin-bottom: 8px;
}

.mistake-title::before {
    content: "⚠";
    margin-right: 8px;
    font-size: 16px;
}

.mistake-text {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.key-tips {
    margin-bottom: 24px;
}

.key-tip {
    color: #333;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 500;
}

.key-tip:last-child {
    margin-bottom: 0;
}

/* Quick Check Screen */
.quick-check-header {
    text-align: center;
    margin-bottom: 24px;
}

.quick-check-progress {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

.progress-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ddd;
}

.progress-dot.completed {
    background-color: #5BA3D0;
}

.progress-dot.current {
    background-color: #5BA3D0;
}

.quick-check-title {
    font-size: 24px;
    color: #333;
    margin-top: 16px;
}

.quick-check-question {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.question-tip {
    text-align: center;
    color: #999;
    font-size: 13px;
    font-style: italic;
    margin-bottom: 24px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.option {
    border: 2px solid #ddd;
    padding: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
    font-size: 14px;
    color: #333;
    text-align: left;
    display: flex;
    align-items: center;
}

.option:hover {
    border-color: #5BA3D0;
    background-color: #f5f9fc;
}

.option.selected {
    border-color: #5BA3D0;
    background-color: #E8F1F7;
}

.option-icon {
    margin-right: 12px;
    font-size: 16px;
}

.feedback {
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    display: none;
}

.feedback.show {
    display: block;
}

.feedback.correct {
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.feedback.incorrect {
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.why-matters {
    text-align: center;
    color: #999;
    font-size: 13px;
    font-style: italic;
    margin-top: 12px;
}

/* Final Quiz Screen */
.final-quiz-header {
    text-align: center;
    margin-bottom: 24px;
}

.final-quiz-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 12px;
}

.final-quiz-instruction {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

.draggable-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.draggable-item {
    display: flex;
    align-items: center;
    border: 2px solid #5BA3D0;
    padding: 16px;
    border-radius: 6px;
    background-color: white;
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
}

.draggable-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.draggable-item.drag-over {
    background-color: #E8F1F7;
    border-color: #7DB8DD;
}

.item-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #5BA3D0;
    color: white;
    font-weight: 600;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}

.item-title {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.drag-handle {
    color: #999;
    margin-right: 8px;
    font-size: 16px;
    cursor: grab;
}

/* Results Screen */
.results-header {
    text-align: center;
    margin-bottom: 32px;
}

.results-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 16px;
}

.score {
    font-size: 36px;
    color: #5BA3D0;
    font-weight: 600;
    margin-bottom: 12px;
}

.results-message {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

.review-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f9f9f9;
    border-radius: 6px;
    font-size: 14px;
}

.review-item-text {
    color: #333;
}

.review-status {
    font-weight: 600;
    font-size: 13px;
}

.review-status.correct {
    color: #27AE60;
}

.review-status.incorrect {
    color: #E74C3C;
}

/* Buttons */
.button-group {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
}

button.btn-primary {
    background-color: #5BA3D0;
    color: white;
}

button.btn-primary:hover:not(:disabled) {
    background-color: #4A90B8;
}

button.btn-secondary {
    background-color: #7DB8DD;
    color: white;
}

button.btn-secondary:hover:not(:disabled) {
    background-color: #5BA3D0;
}

button:disabled {
    background-color: #ccc;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

button.btn-back {
    background-color: #5BA3D0;
    color: white;
    flex: 0;
}

button.btn-next {
    background-color: #5BA3D0;
    color: white;
    flex: 1;
    max-width: 150px;
}

.button-group.center {
    justify-content: center;
    gap: 16px;
}

.button-group.space-between {
    justify-content: space-between;
}

.button-group.center-right {
    justify-content: flex-end;
    gap: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .card-container {
        margin: 20px;
        padding: 20px;
    }

    header h1 {
        font-size: 20px;
    }

    .step-title,
    .final-quiz-title,
    .welcome-text h2 {
        font-size: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}