/* 메인 컨테이너 */
.main-container {
    margin-top: 70px;
    padding-bottom: 200px;
    padding-left: 20px;
    padding-right: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    min-height: calc(100vh - 270px);
}

/* 좌측 섹션 */
.left-section {
    background: white;
    color: var(--text-dark);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    border-right: 1px solid var(--border-color);
}

/* 우측 섹션 */
.right-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.intro-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.intro-content h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--primary-color);
}

.intro-content .subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #666;
    font-weight: 500;
}

/* 샘플 문제 박스 */
.sample-box-compact {
    background: var(--bg-gray);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
}

.sample-label {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color), #f4d77e);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 700;
    margin-bottom: 18px;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.sample-question {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--text-dark);
    text-align: center;
}

/* ✅ 샘플 문제 이미지 컨테이너 */
.sample-image-container {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sample-question-image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ✅ 샘플 보기 (이미지 버전) - 일렬 배치 */
.sample-options-image {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.sample-option-image {
    background: white;
    border: 2px solid var(--border-color);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.sample-option-image:hover {
    background: var(--bg-gray);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.sample-option-image .option-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

.sample-option-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.sample-option-image.correct {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.sample-option-image.correct .option-label {
    color: white;
}

.sample-option-image.wrong {
    background: #ffe5e5;
    border-color: #e74c3c;
}

.sample-option-image.wrong .option-label {
    color: #e74c3c;
}

/* 기존 텍스트 보기 스타일 (숨김 처리 - 필요시 삭제) */
.sample-sequence {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 8px;
    margin: 25px 0;
    padding: 25px;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--secondary-color);
}

.sample-options-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.sample-option-compact {
    background: white;
    border: 2px solid var(--border-color);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.sample-option-compact:hover {
    background: var(--bg-gray);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.sample-option-compact.correct {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: #28a745;
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.sample-option-compact.wrong {
    background: #ffe5e5;
    border-color: #e74c3c;
    color: #e74c3c;
}

.sample-hint-compact {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding: 15px;
    margin-top: 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
    line-height: 1.6;
    color: #1976D2;
}

.sample-hint-compact strong {
    color: #1976D2;
    display: block;
    margin-bottom: 5px;
}

/* 우측 동의 섹션 */
.consent-header-compact {
    text-align: center;
    margin-bottom: 30px;
}

.consent-header-compact h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 800;
}

.consent-header-compact p {
    color: #666;
    font-size: 1rem;
}

/* 알림 박스 */
.info-notice {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196F3;
    padding: 18px 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.info-notice strong {
    color: #1976D2;
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.info-notice ul {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.info-notice li {
    padding: 4px 0;
    padding-left: 18px;
    position: relative;
    line-height: 1.5;
}

.info-notice li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2196F3;
    font-weight: 700;
}

/* 동의 박스 */
.consent-box-compact {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.88rem;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.consent-box-compact h3 {
    margin-bottom: 12px;
    color: var(--primary-color);
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.consent-box-compact ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.consent-box-compact li {
    padding: 7px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
    color: #555;
}

.consent-box-compact li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

/* 경고 박스 */
.warning-box-compact {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe5a1 100%);
    border-left: 4px solid #ffc107;
    padding: 18px 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

.warning-box-compact strong {
    color: #856404;
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

/* 폼 그룹 */
.form-group-compact {
    margin-bottom: 18px;
}

.form-group-compact label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.required {
    color: #e74c3c;
}

/* ✅ input과 select 공통 스타일 */
.form-group-compact input,
.form-group-compact select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
    background: white;
    color: var(--text-dark);
}

/* ✅ select 전용 스타일 */
.form-group-compact select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* ✅ select 옵션 스타일 */
.form-group-compact select option {
    padding: 10px;
    font-size: 1rem;
    color: var(--text-dark);
}

/* ✅ select 기본 옵션 (placeholder 역할) */
.form-group-compact select option[value=""] {
    color: #aaa;
}

/* focus 상태 */
.form-group-compact input:focus,
.form-group-compact select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
}

/* placeholder 스타일 */
.form-group-compact input::placeholder {
    color: #aaa;
}

/* ✅ select가 선택되지 않았을 때 회색 표시 */
.form-group-compact select:invalid {
    color: #aaa;
}

.form-group-compact select:valid {
    color: var(--text-dark);
}

/* 체크박스 그룹 */
.checkbox-group-compact {
    margin: 25px 0;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
}

.checkbox-label-compact {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.93rem;
}

.checkbox-label-compact:hover {
    background: var(--bg-gray);
}

.checkbox-label-compact:last-child {
    margin-bottom: 0;
}

.checkbox-label-compact input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--secondary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

/* ========================================
   ✅ 토글 헤더 (약관 펼치기/접기)
======================================== */
.consent-toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
    transition: all 0.2s;
}

/* ✅ 토글 아이콘 (드롭다운 화살표 스타일) */
.toggle-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform 0.3s ease;
    position: relative;
}

/* ✅ CSS 화살표 삼각형 */
.toggle-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
    transition: transform 0.3s ease;
}

/* ✅ 열렸을 때 180도 회전 */
.toggle-icon.open::after {
    transform: translate(-50%, -50%) rotate(180deg);
}

/* ========================================
   ✅ 개인정보 동의 상세 박스 (토글)
======================================== */
.consent-detail-box {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
    padding: 0;
    margin: 0;
    background: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #4a5568;
    width: 100%;
}

.consent-detail-box.open {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px 20px;
    margin-top: 10px;
    margin-left: 0;
    border: 1px solid #cbd5e0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.consent-detail-box::-webkit-scrollbar {
    width: 6px;
}

.consent-detail-box::-webkit-scrollbar-track {
    background: transparent;
}

.consent-detail-box::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.consent-detail-box::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.consent-detail-box h4 {
    margin-bottom: 8px;
    margin-top: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
}

.consent-detail-box h4:first-child {
    margin-top: 0;
}

.consent-detail-box ul {
    margin-left: 18px;
    margin-bottom: 12px;
    padding-left: 0;
    list-style: disc;
}

.consent-detail-box li {
    margin-bottom: 6px;
    line-height: 1.6;
    color: #475569;
}

.consent-detail-box li:last-child {
    margin-bottom: 0;
}

/* ✅ 체크박스 라벨 내부 요소 전체 너비 */
.checkbox-label-compact > div {
    flex: 1;
    width: 100%;
}

/* 시작 버튼 */
.start-btn-compact {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary-color), #16213e);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(26, 26, 46, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

.start-btn-compact::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.start-btn-compact:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.start-btn-compact:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 26, 46, 0.4);
}

.start-btn-compact:disabled {
    background: linear-gradient(135deg, #ccc, #999);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.start-btn-compact span {
    position: relative;
    z-index: 1;
}

/* 푸터 */
#footer-placeholder {
    margin-top: 0;
    position: relative;
    z-index: 100;
}

/* ========================================
   반응형 - 태블릿 및 모바일
======================================== */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr;
        padding-bottom: 50px;
    }

    .left-section {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .sample-options-compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .sample-options-image {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-container {
        margin-top: 60px;
        padding-bottom: 30px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .left-section,
    .right-section {
        padding: 30px 20px;
    }

    .intro-content h1 {
        font-size: 1.9rem;
    }

    .sample-sequence {
        font-size: 1.5rem;
        letter-spacing: 5px;
    }

    .sample-options-compact {
        grid-template-columns: 1fr;
    }

    .sample-options-image {
        /* grid-template-columns: 1fr; */
        gap: 10px;
    }

    .consent-detail-box.open {
        max-height: 300px;
        margin-left: 0;
        padding: 12px;
    }

    /* ✅ 모바일에서 토글 아이콘 크기 조정 */
    .toggle-icon {
        width: 18px;
        height: 18px;
    }

    .toggle-icon::after {
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid #666;
    }

    /* ✅ 모바일에서 select 크기 조정 */
    .form-group-compact select {
        font-size: 16px;
        padding: 14px 16px;
        padding-right: 40px;
    }
}
