/* CBT 퀴즈 전용 스타일 - 붉은색 계열 테마 */
.quiz__wrap__cbt {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #fff;
    box-sizing: border-box;
    display: flex; /* 추가: 최상위 컨테이너를 flex로 변경 */
    gap: 20px; /* 추가: 좌우 영역 사이 간격 */
}

/* 명확한 범위 지정으로 충돌 방지 */
.quiz__wrap__cbt * {
    box-sizing: border-box;
}

.quiz__wrap__cbt .cbt__header {
    margin-bottom: 20px;
    border-bottom: 2px solid #c53030;
    padding-bottom: 10px;
    width: 100%; /* 추가: 헤더 너비 지정 */
}

.quiz__wrap__cbt .cbt__header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #b91c1c;
    margin: 0;
}

/* 좌측 문제 영역 */
.quiz__wrap__cbt .cbt__conts {
    flex: 1; /* 변경: 좌측 영역이 남은 공간을 차지하도록 */
    order: 1; /* 추가: 좌측에 배치 */
}

.quiz__wrap__cbt .cbt__quiz {
    width: 100%; /* 추가: 퀴즈 영역 너비 지정 */
}

.quiz__wrap__cbt .cbt {
    margin-bottom: 20px;
    border: 1px solid #fecaca;
    border-radius: 5px;
    padding: 20px;
    background-color: #fff;
}

.quiz__wrap__cbt .cbt__question {
    font-size: 18px;
    /*font-weight: 700;*/
    margin-bottom: 15px;
    color: #111;
}

.quiz__wrap__cbt .cbt__question span {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background-color: #000000;
    color: #fff;
    border-radius: 50%;
    margin-right: 8px;
}

.quiz__wrap__cbt .cbt__question__img {
    margin-bottom: 15px;
    text-align: center;
}

.quiz__wrap__cbt .cbt__question__img img {
    max-width: 100%;
    height: auto;
    border: 1px solid #fee2e2;
}

.quiz__wrap__cbt .cbt__question__desc {
    background-color: #fef2f2;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
}

/* 선택지 스타일 */
.quiz__wrap__cbt .cbt__selects {
    position: relative;
}

.quiz__wrap__cbt .cbt__selects input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.quiz__wrap__cbt .cbt__selects label {
    display: block;
    padding: 10px 15px 10px 40px;
    margin-bottom: 8px;
    border: 1px solid #fee2e2;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    font-size: 15px;
}

.quiz__wrap__cbt .cbt__selects label:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 1px solid #fca5a5;
    border-radius: 50%;
}

.quiz__wrap__cbt .cbt__selects input[type="radio"]:checked + label {
    background-color: #fee2e2;
    border-color: #ef4444;
}

.quiz__wrap__cbt .cbt__selects input[type="radio"]:checked + label:before {
    background-color: #ef4444;
    border-color: #ef4444;
}

.quiz__wrap__cbt .cbt__selects input[type="radio"]:checked + label:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    margin-left: 4px;
    margin-top: 0;
}

/* 우측 정보 영역 */
.quiz__wrap__cbt .cbt__aside {
    width: 280px;
    flex-shrink: 0;
    order: 2; /* 추가: 우측에 배치 */
}

.quiz__wrap__cbt .cbt__info {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}

.quiz__wrap__cbt .cbt__submit {
    background-color: #dc2626;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 8px 16px;
    font-weight: 700;
    cursor: pointer;
    margin-right: 10px;
}

.quiz__wrap__cbt .cbt__submit:hover {
    background-color: #b91c1c;
}

.quiz__wrap__cbt .cbt__time {
    font-weight: 700;
    color: #dc2626;
}

.quiz__wrap__cbt .cbt__time.warning {
    animation: cbt_blink 1s infinite;
}

@keyframes cbt_blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.quiz__wrap__cbt .cbt__title {
    font-size: 16px;
    margin: 10px 0;
}

.quiz__wrap__cbt .cbt__name {
    font-weight: 700;
    color: #b91c1c;
}

.quiz__wrap__cbt .cbt__score {
    font-size: 14px;
}

.quiz__wrap__cbt .cbt__score em {
    font-weight: 700;
    color: #b91c1c;
}

/* OMR 답안지 */
.quiz__wrap__cbt .cbt__omr {
    border: 1px solid #fecaca;
    border-radius: 5px;
    padding: 15px;
    background-color: #fff;
}

.quiz__wrap__cbt .omr {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    padding: 8px 5px;
    border-radius: 3px;
}

.quiz__wrap__cbt .omr:hover {
    background-color: #fef2f2;
}

.quiz__wrap__cbt .omr.answered {
    background-color: #fee2e2;
}

.quiz__wrap__cbt .omr strong {
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: #000000;
    color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 14px;
    cursor: pointer;
}

.quiz__wrap__cbt .omr input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.quiz__wrap__cbt .omr label {
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border: 1px solid #fca5a5;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    position: relative;
}

.quiz__wrap__cbt .omr input[type="radio"]:checked + label {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

/* 반응형 설정 */
@media (max-width: 991px) {
    .quiz__wrap__cbt {
        flex-direction: column; /* 변경: 모바일에서는 세로 배치 */
    }
    
    .quiz__wrap__cbt .cbt__conts {
        margin-bottom: 20px;
        order: 1; /* 유지: 모바일에서도 문제가 먼저 나오도록 */
    }
    
    .quiz__wrap__cbt .cbt__aside {
        width: 100%;
        order: 2; /* 유지: 모바일에서도 답안지가 나중에 나오도록 */
    }
}
