        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: 16px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            overflow: hidden;
        }

        /* 헤더 */
        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            text-align: center;
        }

        .header h1 {
            font-size: 28px;
            margin-bottom: 10px;
        }

        .header p {
            opacity: 0.9;
            font-size: 14px;
        }

        /* 진행 단계 표시 */
        .progress-bar {
            display: flex;
            justify-content: space-between;
            padding: 30px;
            background: #f8f9fa;
            border-bottom: 1px solid #e0e0e0;
        }

        .step {
            flex: 1;
            text-align: center;
            position: relative;
        }

        .step:not(:last-child)::after {
            content: '';
            position: absolute;
            top: 20px;
            left: 50%;
            width: 100%;
            height: 2px;
            background: #ddd;
            z-index: 0;
        }

        .step.active:not(:last-child)::after {
            background: #667eea;
        }

        .step-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: white;
            border: 3px solid #ddd;
            margin: 0 auto 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: #999;
            position: relative;
            z-index: 1;
        }

        .step.active .step-circle {
            border-color: #667eea;
            color: #667eea;
            background: #f0f4ff;
        }

        .step.completed .step-circle {
            border-color: #4CAF50;
            background: #4CAF50;
            color: white;
        }

        .step-label {
            font-size: 12px;
            color: #666;
        }

        .step.active .step-label {
            color: #667eea;
            font-weight: 600;
        }

        /* 컨텐츠 영역 */
        .content {
            padding: 40px;
            min-height: 500px;
        }

        .step-content {
            display: none;
        }

        .step-content.active {
            display: block;
            animation: fadeIn 0.3s ease-in;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* 버튼 영역 */
        .actions {
            padding: 20px 40px;
            background: #f8f9fa;
            border-top: 1px solid #e0e0e0;
            display: flex;
            justify-content: space-between;
        }

        .btn {
            padding: 12px 30px;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

        .btn-primary {
            background: #667eea;
            color: white;
        }

        .btn-primary:hover {
            background: #5568d3;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        .btn-secondary {
            background: #e0e0e0;
            color: #333;
        }

        .btn-secondary:hover {
            background: #d0d0d0;
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* 드래그 앤 드롭 */
        .upload-area {
            border: 3px dashed #ddd;
            border-radius: 12px;
            padding: 60px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
        }

        .upload-area:hover {
            border-color: #667eea;
            background: #f0f4ff;
        }

        .upload-area.drag-over {
            border-color: #667eea;
            background: #e8f0ff;
        }

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

        /* 통계 카드 */
        .stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin: 20px 0;
        }

        .stat-card {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 8px;
            text-align: center;
        }

        .stat-value {
            font-size: 32px;
            font-weight: bold;
            color: #667eea;
            margin-bottom: 5px;
        }

        .stat-label {
            font-size: 14px;
            color: #666;
        }

        /* 알림 */
        .alert {
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 20px;
        }

        .alert-info {
            background: #e3f2fd;
            border-left: 4px solid #2196F3;
            color: #0d47a1;
        }

        .alert-success {
            background: #e8f5e9;
            border-left: 4px solid #4CAF50;
            color: #1b5e20;
        }

        .alert-warning {
            background: #fff3e0;
            border-left: 4px solid #FF9800;
            color: #e65100;
        }

        /* ================================================
           Ollama AI 통합 스타일
           ================================================ */

        .ollama-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 12px;
            padding: 20px;
            margin: 20px 0;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        .ollama-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .ollama-card-header h3 {
            margin: 0;
            font-size: 1.3rem;
        }

        .time-badge {
            background: rgba(255, 255, 255, 0.2);
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 0.9rem;
        }

        .metadata-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-top: 15px;
        }

        .metadata-item {
            background: rgba(255, 255, 255, 0.1);
            padding: 12px;
            border-radius: 8px;
        }

        .metadata-item strong {
            display: block;
            margin-bottom: 5px;
            opacity: 0.9;
        }

        .metadata-item span {
            font-size: 1.1rem;
        }

        .doc-type-badge {
            background: #ffd700;
            color: #333;
            padding: 4px 12px;
            border-radius: 5px;
            font-weight: bold;
        }

        .keywords-item {
            grid-column: 1 / -1;
        }

        .keywords {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 8px;
        }

        .keyword-tag {
            background: #4CAF50;
            color: white;
            padding: 5px 12px;
            border-radius: 15px;
            font-size: 0.9rem;
        }

        .no-keywords {
            opacity: 0.6;
            font-style: italic;
        }

        .model-info {
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
            opacity: 0.7;
            font-size: 0.85rem;
        }

        .loading-box {
            background: #17a2b8;
            color: white;
            padding: 20px;
            border-radius: 8px;
            text-align: center;
            font-size: 1.1rem;
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .error-box {
            background: #dc3545;
            color: white;
            padding: 15px;
            border-radius: 8px;
        }

        .comparison-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin: 20px 0;
        }

        .comparison-col {
            background: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: 8px;
        }

        .comparison-col h4 {
            margin-bottom: 10px;
        }

        .confidence-badge {
            display: inline-block;
            padding: 5px 10px;
            border-radius: 5px;
            font-size: 0.9rem;
            margin-bottom: 10px;
        }

        .confidence-badge.low {
            background: #dc3545;
        }

        .confidence-badge.medium {
            background: #ffc107;
            color: #333;
        }

        .confidence-badge.high {
            background: #28a745;
        }

        .improvement {
            margin-left: 5px;
            font-weight: bold;
        }

        .text-preview {
            background: rgba(0, 0, 0, 0.3);
            padding: 15px;
            border-radius: 5px;
            max-height: 200px;
            overflow-y: auto;
            font-family: 'Courier New', monospace;
            font-size: 0.9rem;
            line-height: 1.5;
        }

        .text-preview.cleaned {
            background: rgba(76, 175, 80, 0.2);
            border: 2px solid #4CAF50;
        }

        .clean-actions {
            margin-top: 15px;
            text-align: center;
        }

        .page-analysis-card {
            background: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .page-number {
            font-weight: bold;
            font-size: 1.1rem;
        }

        .quality-score {
            padding: 8px 15px;
            border-radius: 5px;
            font-weight: bold;
        }

        .quality-score.high {
            background: #28a745;
        }

        .quality-score.medium {
            background: #ffc107;
            color: #333;
        }

        .quality-score.low {
            background: #dc3545;
        }

        .issues {
            flex: 1;
            font-size: 0.9rem;
            opacity: 0.9;
        }

        .recommendation {
            padding: 5px 10px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 5px;
            font-size: 0.85rem;
        }

        .recommendation-box {
            background: #ffd700;
            color: #333;
            padding: 15px;
            border-radius: 8px;
            margin-top: 15px;
            font-weight: bold;
        }

        .analysis-summary {
            display: flex;
            justify-content: space-around;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
        }

        .analysis-summary > div {
            text-align: center;
        }

        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes slideOut {
            from {
                transform: translateX(0);
                opacity: 1;
            }
            to {
                transform: translateX(100%);
                opacity: 0;
            }
        }
