/* PDF 분할기 전용 스타일 */

.upload-area {
    border: 3px dashed #c5cae9;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    background: #f8f9ff;
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background: #f0f2ff;
}

.upload-area.has-file {
    border-color: #11998e;
    background: #f0fff8;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 0.85rem;
    color: #888;
}

.file-info {
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.file-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.file-info-row:last-child {
    border-bottom: none;
}

.file-info-label {
    color: #666;
    font-size: 0.9rem;
}

.file-info-value {
    font-weight: 600;
    color: #333;
}

/* 옵션 패널 */
.options-panel {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-bottom: 20px;
}

.option-group {
    margin-bottom: 24px;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.option-description {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
    white-space: nowrap;
}

/* 옵션 헤더 (레이블 + 설명 가로 배치) */
.option-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.option-header .option-label {
    margin-bottom: 0;
}

/* 체크박스 행 */
.checkbox-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.inline-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-input-group label {
    font-size: 14px;
    color: #555;
    white-space: nowrap;
}

.inline-input-group input[type="text"] {
    width: 120px;
    padding: 6px 10px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.inline-input-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

/* 자동 체크 라벨은 클릭/호버 효과 제거 */
.inline-input-group .checkbox-label {
    cursor: default;
    pointer-events: none;
}

.inline-input-group .checkbox-label:hover .checkmark {
    border-color: #ccc;
}

/* 라디오 버튼 */
.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 140px;
}

.radio-label:hover {
    border-color: #667eea;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-label input[type="radio"]:checked + .radio-mark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.radio-label input[type="radio"]:checked + .radio-mark::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-label input[type="radio"]:checked ~ .radio-text {
    color: #667eea;
    font-weight: 600;
}

.radio-mark {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.radio-text {
    font-size: 0.95rem;
    color: #555;
}

/* 슬라이더 입력 */
.slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.slider-input {
    flex: 1;
    -webkit-appearance: none;
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    outline: none;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.slider-value {
    min-width: 60px;
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

.number-input {
    width: 80px;
    padding: 10px 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
    transition: border-color 0.2s;
}

.number-input:focus {
    outline: none;
    border-color: #667eea;
}

/* 미리보기 */
.preview-panel {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-bottom: 20px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.preview-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.preview-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.preview-nav-btn:hover {
    opacity: 0.9;
}

.preview-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.preview-page-info {
    font-size: 0.9rem;
    color: #555;
    min-width: 60px;
    text-align: center;
}

.preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.preview-page {
    position: relative;
    background: #f8f9fa;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.preview-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.preview-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    pointer-events: none;
}

.preview-overlay.left {
    left: 0;
    background: rgba(52, 152, 219, 0.25);
    border: 2px dashed #3498db;
    border-left: none;
}

.preview-overlay.right {
    right: 0;
    background: rgba(231, 76, 60, 0.25);
    border: 2px dashed #e74c3c;
    border-right: none;
}

.preview-arrow {
    font-size: 2rem;
    color: #667eea;
}

.preview-result {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.preview-result-page {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.preview-result-page.left-page {
    border: 3px solid #3498db;
}

.preview-result-page.right-page {
    border: 3px solid #e74c3c;
}

.preview-result-page canvas {
    max-width: 100%;
    height: auto;
}

.preview-result-label {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #11998e;
    font-weight: 600;
}

/* 진행 상태 */
.progress-container {
    display: none;
    margin: 20px 0;
}

.progress-container.show {
    display: block;
}

.progress-bar {
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

/* 경고 메시지 */
.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.warning-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.warning-content {
    flex: 1;
}

.warning-title {
    font-weight: 600;
    color: #856404;
    margin-bottom: 4px;
}

.warning-text {
    font-size: 0.9rem;
    color: #856404;
}

/* 2컬럼 레이아웃 */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
    min-height: 480px;
}

@media (max-width: 1024px) {
    .split-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .option-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.right-column {
    display: flex;
    flex-direction: column;
}

/* 왼쪽 컬럼 패널들 여백 조정 */
.left-column .panel,
.left-column .options-panel {
    margin-bottom: 0;
}

/* 미리보기 패널 */
.right-column .preview-panel {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.right-column .preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 미리보기 가로 배치 (아이콘과 동일) */
.preview-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 100%;
    max-height: 100%;
}

.preview-horizontal .preview-page {
    flex-shrink: 1;
    min-width: 0;
}

.preview-horizontal .preview-page canvas {
    display: block;
    max-width: 100%;
    max-height: 350px;
    width: auto;
    height: auto;
}

.preview-horizontal .preview-arrow {
    font-size: 1.5rem;
    flex-shrink: 0;
    color: #667eea;
}

.preview-horizontal .preview-result {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
}

.preview-horizontal .preview-result-page {
    padding: 6px;
}

.preview-horizontal .preview-result-page canvas {
    display: block;
    max-width: 100%;
    max-height: 160px;
    width: auto;
    height: auto;
}

/* 업로드 영역 컴팩트 */
.upload-area-compact {
    padding: 40px 30px;
}

.upload-area-compact .upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.upload-area-compact .upload-text {
    font-size: 1rem;
}

/* 플레이스홀더 미리보기 */
.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    color: #888;
    text-align: center;
}

.preview-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.preview-placeholder-text {
    font-size: 1rem;
}
