/* ============================================
   Listening Response Result
   #9480c5 | #77bf7e | #b9c9da | Pretendard
   Ground Rule: NO border-left anywhere
   ============================================ */

#responseExplainScreen {
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f7f6fb;
}

/* ── 결과 컨테이너 ── */
#responseExplainScreen .result-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* ── 결과 헤더 ── */
#responseExplainScreen .result-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1e1e2f;
    margin: 0 0 20px;
}

/* ── 점수 요약 ── */
#responseExplainScreen .result-summary {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(148,128,197,0.1);
    margin-bottom: 28px;
}

#responseExplainScreen .result-score-card {
    text-align: center;
    padding: 24px 32px;
    background: #faf9fd;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 130px;
}

#responseExplainScreen .result-score-card .score-label {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

#responseExplainScreen .result-score-card .score-value {
    font-size: 34px;
    font-weight: 800;
    color: #9480c5;
}

#responseExplainScreen .result-stats {
    display: flex;
    flex: 1;
}

#responseExplainScreen .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 20px 0;
    flex: 1;
    border-right: 1px solid #f0edf5;
}
#responseExplainScreen .stat-item:last-child {
    border-right: none;
}

#responseExplainScreen .stat-item .stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    letter-spacing: 0.3px;
}

#responseExplainScreen .stat-item .stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #4a4a6a;
}

#responseExplainScreen .stat-item .stat-value.correct {
    color: #4a9e52;
}

#responseExplainScreen .stat-item .stat-value.incorrect {
    color: #d94452;
}

/* ── 세트 타이틀 ── */
#responseExplainScreen .result-set-section > .result-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #9480c5;
    padding: 12px 0;
    margin-bottom: 4px;
    border: none;
    background: none;
    box-shadow: none;
}

#responseExplainScreen .result-set-section > .result-section-title i {
    font-size: 15px;
    color: #9480c5;
}

/* ── 문제 리스트 ── */
#responseExplainScreen .questions-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── 문제 카드 ── */
#responseExplainScreen .response-result-item {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    border: 1px solid #eeeaf5;
}

/* ── Q 헤더 ── */
#responseExplainScreen .question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #faf9fd;
}

#responseExplainScreen .question-number {
    font-size: 14px;
    font-weight: 700;
    color: #1e1e2f;
}

#responseExplainScreen .result-status i {
    font-size: 18px;
}

/* ── 오디오 ── */
#responseExplainScreen .audio-section {
    padding: 16px 20px;
}

#responseExplainScreen .audio-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #9480c5;
    margin-bottom: 10px;
}

#responseExplainScreen .audio-player-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

#responseExplainScreen .audio-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #9480c5;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
#responseExplainScreen .audio-play-btn:hover {
    opacity: 0.85;
}

#responseExplainScreen .audio-seek-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#responseExplainScreen .audio-seek-bar {
    width: 100%;
    height: 4px;
    background: #e8e4f0;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

#responseExplainScreen .audio-seek-progress {
    height: 100%;
    background: #9480c5;
    border-radius: 2px;
    position: relative;
}

#responseExplainScreen .audio-seek-handle {
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9480c5;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

#responseExplainScreen .audio-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #aaa;
    font-variant-numeric: tabular-nums;
}

/* 스크립트 */
#responseExplainScreen .audio-script {
    font-size: 14px;
    line-height: 1.9;
    color: #333;
}

#responseExplainScreen .audio-script strong {
    color: #7a66b0;
    font-weight: 700;
}

/* 키워드 */
#responseExplainScreen .response-keyword-highlight {
    color: #7a66b0;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(148,128,197,0.35);
    text-underline-offset: 3px;
    cursor: help;
    position: relative;
}
#responseExplainScreen .response-keyword-highlight:hover {
    text-decoration-color: rgba(148,128,197,0.7);
}
#responseExplainScreen .response-keyword-highlight:hover::after {
    content: attr(data-translation) ' — ' attr(data-explanation);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #2c2c3e;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}
#responseExplainScreen .response-keyword-highlight:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2c2c3e;
    z-index: 1000;
}

/* ── 답변 비교 ── */
#responseExplainScreen .answer-summary {
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #f0edf5;
}

#responseExplainScreen .response-answer-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

#responseExplainScreen .response-answer-label {
    font-size: 12px;
    font-weight: 700;
    color: #aaa;
    width: 56px;
    flex-shrink: 0;
    text-align: right;
}

#responseExplainScreen .response-answer-value {
    font-size: 14px;
    line-height: 1.7;
    font-weight: 500;
    padding: 0;
    border: none;
    background: none;
}

#responseExplainScreen .response-answer-value.correct {
    color: #4a9e52;
}

#responseExplainScreen .response-answer-value.incorrect {
    color: #d94452;
}

/* ── 토글 ── */
#responseExplainScreen .options-explanation-section {
    padding: 0;
}

#responseExplainScreen .toggle-explanation-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    background: #faf9fd;
    border: none;
    border-top: 1px solid #f0edf5;
    cursor: pointer;
    color: #9480c5;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
    transition: background 0.15s;
}
#responseExplainScreen .toggle-explanation-btn:hover {
    background: #f3f0fa;
}
#responseExplainScreen .toggle-explanation-btn i {
    font-size: 11px;
    transition: transform 0.25s;
}

/* ── 보기 해설 ── */
#responseExplainScreen .options-details {
    padding: 4px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

#responseExplainScreen .option-detail {
    padding: 12px 0;
    border-bottom: 1px solid #f5f3fa;
    position: relative;
}
#responseExplainScreen .option-detail:last-child {
    border-bottom: none;
}

#responseExplainScreen .option-text {
    font-size: 14px;
    font-weight: 600;
    color: #1e1e2f;
    line-height: 1.6;
    margin-bottom: 2px;
}

#responseExplainScreen .option-detail.correct .option-text {
    color: #4a9e52;
}

#responseExplainScreen .option-translation {
    font-size: 13px;
    color: #999;
    line-height: 1.5;
    margin-bottom: 6px;
}

#responseExplainScreen .option-explanation {
    font-size: 13px;
    line-height: 1.7;
    color: #666;
    padding: 0;
    border: none;
    background: none;
}

#responseExplainScreen .option-explanation strong {
    font-weight: 700;
}

#responseExplainScreen .option-explanation.correct {
    color: #4a9e52;
}

#responseExplainScreen .option-explanation.incorrect {
    color: #888;
}
#responseExplainScreen .option-explanation.incorrect strong {
    color: #d94452;
}

/* 정답 뱃지 */
#responseExplainScreen .option-detail.correct::after {
    content: '✓ 정답';
    position: absolute;
    top: 12px;
    right: 0;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #77bf7e;
    padding: 2px 10px;
    border-radius: 20px;
}

/* ── 하단 버튼 ── */
#responseExplainScreen .result-actions {
    margin-top: 32px;
    text-align: center;
}

#responseExplainScreen .result-actions .btn {
    font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

#responseExplainScreen .result-actions .btn-primary {
    background: #9480c5;
    color: #fff;
}
#responseExplainScreen .result-actions .btn-primary:hover {
    background: #7a66b0;
}

/* ── 반응형 ── */
@media (max-width: 640px) {
    #responseExplainScreen .result-summary {
        flex-direction: column;
    }
    #responseExplainScreen .result-score-card {
        padding: 18px;
        border-bottom: 1px solid #f0edf5;
    }
    #responseExplainScreen .result-stats {
        padding: 0;
    }
    #responseExplainScreen .stat-item {
        padding: 14px 0;
    }
}
