/* tr-quiz/assets/css/style.css */
:root {
    --tr-primary: #3498db;
    --tr-secondary: #2c3e50;
    --tr-success: #27ae60;
    --tr-danger: #e74c3c;
    --tr-light: #ecf0f1;
    --tr-dark: #34495e;
    --tr-radius: 8px;
    --tr-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tr-quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--tr-radius);
    box-shadow: var(--tr-shadow);
    padding: 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 1px solid #e1e1e1;
}

.tr-start-screen,
.tr-result-screen {
    text-align: center;
}

.tr-btn {
    background: var(--tr-primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.tr-btn:hover {
    background: #2980b9;
}

.tr-quiz-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--tr-light);
    font-weight: bold;
    color: var(--tr-secondary);
}

.tr-question-card h4 {
    margin-top: 0;
    color: var(--tr-dark);
}

.tr-q-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--tr-radius);
    margin-bottom: 15px;
    display: block;
}

.tr-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tr-choice-item {
    background: var(--tr-light);
    padding: 12px 15px;
    border-radius: var(--tr-radius);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.tr-choice-item:hover {
    background: #dfe6e9;
}

.tr-choice-item.selected {
    background: #d6eaf8;
    border-color: var(--tr-primary);
    color: var(--tr-secondary);
    font-weight: 500;
}

.tr-quiz-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

.tr-finish-btn {
    background: var(--tr-success);
}

.tr-finish-btn:hover {
    background: #219150;
}

/* Review Area */
.tr-review-item {
    background: #f8f9fa;
    border-left: 5px solid #ccc;
    padding: 15px;
    margin-bottom: 15px;
    text-align: left;
}

.tr-review-item.correct-q {
    border-left-color: var(--tr-success);
}

.tr-review-item.wrong-q {
    border-left-color: var(--tr-danger);
}

.tr-explanation {
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border: 1px dashed #ccc;
    font-size: 0.9em;
}

.tr-result-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.tr-score-percent .value {
    font-size: 2em;
    font-weight: bold;
    color: var(--tr-primary);
}

/* Added Answer Images Style */
.tr-choice-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    /* allow wrapping on mobile */
}

.tr-choice-img-wrapper {
    margin: 5px 0;
}

.tr-choice-img-wrapper img {
    max-width: 150px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
    cursor: pointer;
}

.tr-choice-item.selected .tr-choice-img-wrapper img {
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.5);
}

/* End Answer Images Style */