.copae-quiz-container {
    background-color: #21021c;
    color: #ffffff;
    font-family: sans-serif;
    padding: 30px;
    border-radius: 12px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
}

/* Progress Tracker */
.copae-quiz-progress-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.copae-quiz-step-count {
    font-size: 14px;
    font-weight: 600;
    color: #e2a0d8;
    min-width: 45px;
}

.copae-quiz-progress-bar-wrapper {
    flex-grow: 1;
    background-color: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.copae-quiz-progress-bar-fill {
    background: linear-gradient(90deg, #d845c4, #e2a0d8);
    height: 100%;
    width: 0%;
    transition: width 0.4s ease;
}

/* Error feedback banner */
.copae-quiz-error-feedback {
    background-color: rgba(255, 74, 74, 0.2);
    border: 1px solid #ff4a4a;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 14px;
    color: #ffd2d2;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Steps and Animation */
.copae-quiz-step {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copae-quiz-step.active {
    display: block;
    opacity: 1;
}

/* Question Header layouts */
.copae-quiz-question-row {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.copae-quiz-question-row.pos-top {
    flex-direction: column;
    align-items: flex-start;
}

.copae-quiz-question-row.pos-top .copae-quiz-image-box {
    width: 100%;
    max-width: 450px;
    height: 220px;
}

.copae-quiz-image-box {
    flex: 0 0 240px;
    height: 140px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}

.copae-quiz-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.copae-quiz-question-text {
    flex: 1;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
}

.copae-quiz-question-heading-centered {
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 35px;
    line-height: 1.4;
}

/* Options Grid layout with Answer Images support */
.copae-quiz-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.copae-quiz-option {
    border-radius: 6px;
    padding: 25px 20px;
    min-height: 150px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    text-align: center;
}

.copae-quiz-option:hover {
    transform: translateY(-3px);
}

.copae-option-img-wrapper {
    width: 110px;
    height: 110px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #ffffff;
    border-radius: 6px;
    padding: 8px;
}

.copae-option-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.copae-quiz-option .opt-num {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.15);
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 4px;
    font-weight: bold;
}

.copae-quiz-option .opt-text {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}

/* Color schemes */
.opt-yellow { background-color: #8fa300; color: #ffffff; }
.opt-violet { background-color: #925ce6; color: #ffffff; }
.opt-orange { background-color: #f26f21; color: #ffffff; }
.opt-teal { background-color: #12bca2; color: #ffffff; }

.copae-quiz-option.selected {
    box-shadow: 0 0 0 4px #ffffff, 0 8px 166px rgba(0,0,0,0.4);
}

.copae-quiz-option.incorrect-attempt {
    box-shadow: 0 0 0 4px #ff4a4a, 0 8px 166px rgba(255, 74, 74, 0.3);
    opacity: 0.6;
}

/* Helpers */
.copae-quiz-multi-helper {
    font-size: 13px;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 6px 15px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 15px;
}

/* Matching game style */
.copae-quiz-matching-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
}

.copae-matching-sources {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copae-matching-source-card {
    background-color: #ffffff;
    border-radius: 8px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    width: 250px;
    height: 120px;
    padding: 10px;
    box-sizing: border-box;
    transition: transform 0.2s;
    color: #333333;
}

.copae-matching-source-card:hover {
    transform: scale(1.03);
}

.matching-img-thumb {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.copae-matching-targets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.copae-matching-target-card {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 25px 15px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
}

.copae-matching-target-card.drag-over {
    background-color: rgba(216, 69, 196, 0.15);
    border-color: #d845c4;
}

.target-dropzone {
    font-size: 11px;
    color: #e2a0d8;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.target-title {
    font-weight: 500;
    font-size: 16px;
}

.copae-matched-item {
    background-color: #12bca2;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: bold;
}

/* Email Capture styles */
.copae-quiz-email-banner {
    text-align: center;
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.copae-quiz-email-banner h3 { margin: 0; font-size: 18px; color: #e2a0d8; }
.copae-quiz-email-banner h2 { margin: 10px 0; font-size: 28px; }
.copae-quiz-email-banner p { margin: 0; font-size: 14px; opacity: 0.8; }

.copae-quiz-input-wrapper {
    max-width: 500px;
    margin: 0 auto 30px auto;
    position: relative;
}

.copae-quiz-input-wrapper input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 15px;
    color: #ffffff;
    font-size: 16px;
    box-sizing: border-box;
}

.email-error-message,
.name-error-message {
    color: #ff4a4a;
    font-size: 12px;
    display: none;
    margin-top: 5px;
}

/* Privacy styles */
.copae-quiz-privacy-banner {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 30px;
}

.copae-quiz-privacy-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.privacy-btn {
    border: none;
    border-radius: 6px;
    padding: 30px 20px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 500;
}

/* Success */
.copae-quiz-success-message { text-align: center; padding: 50px 20px; }
.success-icon { font-size: 50px; margin-bottom: 20px; }

.copae-quiz-next-action { display: flex; justify-content: flex-end; }
.copae-btn-continue {
    background-color: #d845c4;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}
.copae-btn-continue:disabled {
    background-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.3);
    cursor: not-allowed;
}
