:root {
            --primary-color: #4a6fa5;
            --secondary-color: #e6e9f0;
            --accent-color: #166088;
            --success-color: #28a745;
            --warning-color: #ffc107;
            --danger-color: #dc3545;
            --light-gray: #f8f9fa;
            --border-color: #eaeaea;
            --text-color: #333;
            --text-muted: #6c757d;
            --ocr-color: #4a6fa5;
            --processing-color: #e83e8c;
        }
        .page-header {
            background: linear-gradient(135deg, rgba(230, 233, 240, 0.4) 0%, rgba(74, 111, 165, 0.4) 100%);
            padding: 1.5rem 0;
            margin-bottom: 2rem;
            border-bottom: 1px solid rgba(74, 111, 165, 0.2);
            position: relative;
            overflow: hidden;color: var(--text-color);
        }
        .breadcrumb {
            background-color: transparent;
            padding: 0.5rem 0;
            margin-bottom: 0.5rem;
        }
        .breadcrumb-item a {
            color: var(--text-muted);
            text-decoration: none;
        }
        .breadcrumb-item.active {
            color: var(--text-color);
        }
        .ocr-upload-area {
            border: 2px dashed var(--border-color);
            border-radius: 8px;
            padding: 3rem 2rem;
            text-align: center;
            background-color: var(--light-gray);
            cursor: pointer;
            transition: all 0.3s;
            margin-bottom: 1.5rem;
        }
        .ocr-upload-area:hover {
            border-color: var(--primary-color);
            background-color: rgba(74, 111, 165, 0.05);
        }
        .ocr-upload-area.dragover {
            border-color: var(--primary-color);
            background-color: rgba(74, 111, 165, 0.1);
        }
        .upload-icon {
            font-size: 3rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
        }
        .image-preview {
            max-width: 100%;
            max-height: 300px;
            border-radius: 6px;
            margin-top: 1rem;
            box-shadow: 0 3px 10px rgba(0,0,0,0.1);
            display: none;
        }
        .language-selector {
            margin: 1.5rem 0;
        }
        .language-options {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }
        .language-btn {
            padding: 0.5rem 1rem;
            background-color: white;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.9rem;
        }
        .language-btn:hover {
            background-color: var(--light-gray);
        }
        .language-btn.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        .ocr-options {
            margin: 1.5rem 0;
        }
        .option-checkbox {
            display: flex;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        .option-checkbox input {
            margin-right: 0.75rem;
        }
        .progress-container {
            margin: 1.5rem 0;
            display: none;
        }
        .progress {
            height: 10px;
            margin-bottom: 0.5rem;
        }
        .progress-info {
            display: flex;
            justify-content: space-between;
            font-size: 0.9rem;
            color: var(--text-muted);
        }
        .image-result-section {
            margin-bottom: 2rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid var(--border-color);
        }
        .image-section-label {
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--text-muted);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .image-section-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1rem;
        }
        .text-result-section {
            margin-bottom: 1.5rem;
        }
        .text-section-label {
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--text-muted);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .text-result {
            padding: 1rem;
            background-color: white;
            border-radius: 6px;
            border: 1px solid #eee;
            font-family: 'Courier New', monospace;
            margin: 0;
            max-height: 400px;
            overflow-y: auto;
            line-height: 1.8;
            white-space: pre-wrap;
            min-height: 150px;
        }
        .text-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.5rem 0;
            margin-bottom: 0.75rem;
            border-bottom: 1px solid var(--border-color);
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        .text-tools-left, .text-tools-right {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        .search-container {
            position: relative;
            flex-grow: 1;
            max-width: 300px;
        }
        .search-input {
            width: 100%;
            padding: 0.375rem 2rem 0.375rem 0.75rem;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            font-size: 0.875rem;
        }
        .search-icon {
            position: absolute;
            right: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
        }
        .text-action-btn {
            background-color: white;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            padding: 0.375rem 0.75rem;
            font-size: 0.875rem;
            color: var(--text-color);
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        .text-action-btn:hover {
            background-color: var(--light-gray);
            color: var(--primary-color);
            border-color: var(--primary-color);
        }
        .result-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 1.5rem;
            flex-wrap: wrap;
        }
        .confidence-meter {
            margin: 1rem 0;
            background: white;
            padding: 1rem;
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }
        .confidence-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }
        .confidence-value {
            font-weight: bold;
            color: var(--primary-color);
        }
        .confidence-bar {
            height: 8px;
            background-color: #e9ecef;
            border-radius: 4px;
            overflow: hidden;
        }
        .confidence-fill {
            height: 100%;
            background-color: var(--success-color);
            width: 0%;
            transition: width 0.5s ease;
        }
        .pdf-page-selector {
            margin-top: 1rem;
            padding: 1rem;
            background-color: white;
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }
        .pdf-page-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }
        .page-nav {
            display: flex;
            gap: 0.5rem;
        }
        .history-section {
            margin-top: 1.5rem;
            padding: 1rem;
            background-color: white;
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }
        .history-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        .history-list {
            max-height: 200px;
            overflow-y: auto;
        }
        .history-item {
            padding: 0.5rem;
            border-bottom: 1px solid var(--border-color);
            cursor: pointer;
            transition: background-color 0.2s;
        }
        .history-item:hover {
            background-color: var(--light-gray);
        }
        .history-item:last-child {
            border-bottom: none;
        }
        @media (max-width: 768px) {
            .text-toolbar {
                flex-direction: column;
                align-items: flex-start;
            }
            .search-container {
                max-width: 100%;
            }
            }
        .languages-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 0.5rem;
            margin-top: 1rem;
            max-height: 300px;
            overflow-y: auto;
            padding: 1rem;
            background-color: var(--light-gray);
            border-radius: 6px;
        }
        .language-item {
            padding: 0.5rem;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            background-color: white;
            cursor: pointer;
            transition: all 0.2s;
        }
        .language-item:hover {
            background-color: rgba(74, 111, 165, 0.1);
            border-color: var(--primary-color);
        }
        .language-item.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        .supported-languages-btn {
            margin-top: 0.5rem;
            color: var(--primary-color);
            text-decoration: none;
            cursor: pointer;
            font-size: 0.9rem;
        }
        .supported-languages-btn:hover {
            text-decoration: underline;
        }
        .loading-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(255, 255, 255, 0.9);
            z-index: 2000;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }
        .loading-spinner {
            width: 60px;
            height: 60px;
            border: 5px solid #f3f3f3;
            border-top: 5px solid var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        .warning-message {
            background-color: rgba(255, 193, 7, 0.1);
            border-left: 3px solid var(--warning-color);
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            margin: 1rem 0;
        }
        .file-size-warning {
            background-color: rgba(220, 53, 69, 0.1);
            border-left: 3px solid var(--danger-color);
            padding: 0.75rem;
            border-radius: 0 4px 4px 0;
            margin-top: 0.5rem;
            display: none;
        }
        .text-highlight {
            background-color: rgba(255, 193, 7, 0.5);
            border-radius: 2px;
        }