/* OCR工具样式 - 从备份源码中提取 */
.ocr-upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background-color: rgba(30, 30, 30, 0.5);
    z-index: 10;
    margin-bottom: 20px;
    display: block !important;
    pointer-events: auto !important;
}

.ocr-upload-zone:hover {
    border-color: #7b61ff;
    background: rgba(123, 97, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ocr-upload-zone.drag-active {
    border-color: #aa61ff;
    background: rgba(123, 97, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.2);
}

.ocr-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

.ocr-upload-content * {
    pointer-events: auto;
}

.ocr-upload-icon {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.ocr-upload-zone:hover .ocr-upload-icon {
    color: #7b61ff;
    transform: translateY(-5px);
}

.ocr-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    pointer-events: none;
}

.ocr-upload-text h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.ocr-upload-text p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.ocr-upload-label {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #2196F3;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.ocr-upload-label:hover {
    background-color: #0b7dda;
}

.ocr-file-details {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.ocr-alert {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.ocr-alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ocr-alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ocr-preview-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 15px;
    padding: 10px;
}

.ocr-progress {
    height: 20px;
    margin: 15px 0;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.ocr-progress-bar {
    height: 100%;
    background-color: #2196F3;
    width: 0%;
    transition: width 0.3s ease;
}

.ocr-btn {
    display: inline-block;
    padding: 8px 16px;
    margin-top: 10px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.ocr-btn:hover {
    background-color: #0b7dda;
}

.ocr-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    .ocr-upload-zone {
        padding: 10px;
    }
    
    .ocr-upload-text h3 {
        font-size: 16px;
    }
    
    .ocr-upload-text p {
        font-size: 13px;
    }
    
    .ocr-upload-label {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* OCR其他样式 */
.ocr-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.ocr-alert {
    padding: 16px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ocr-alert.alert-danger {
    background-color: rgba(255, 76, 76, 0.1);
    color: #ff4c4c;
    border: 1px solid rgba(255, 76, 76, 0.2);
}

.ocr-alert.alert-success {
    background-color: rgba(76, 217, 100, 0.1);
    color: #4cd964;
    border: 1px solid rgba(76, 217, 100, 0.2);
}

/* 修复文件选择区域的样式 */
.ocr-file-details {
    margin-top: 15px;
    padding: 12px;
    background-color: rgba(30, 30, 30, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ocr-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ocr-file-icon {
    flex: 0 0 32px;
    color: #7b61ff;
}

.ocr-file-name {
    font-weight: bold;
    margin-bottom: 4px;
    color: #ffffff;
}

.ocr-file-meta {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.6);
}

.ocr-preview-container {
    margin-top: 15px;
    text-align: center;
    background-color: rgba(30, 30, 30, 0.5);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ocr-preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
}

/* 使进度条样式更现代 */
.ocr-progress-bar-container {
    height: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.ocr-progress-bar {
    height: 100%;
    background: linear-gradient(to right, #7b61ff, #aa61ff);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* 确保提交按钮样式一致 */
.ocr-submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: #7b61ff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.ocr-submit-button:hover {
    background-color: #aa61ff;
}

.ocr-btn-icon {
    display: inline-flex;
}

/* 修复移动端上的触摸响应问题 */
@media (max-width: 768px) {
    .ocr-upload-zone {
        padding: 24px 16px;
    }
    
    .ocr-upload-zone * {
        pointer-events: auto;
    }
}

/* OCR上传内容样式 */
.ocr-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.ocr-upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.ocr-upload-text {
    text-align: center;
}

.ocr-upload-text h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
    color: rgba(255, 255, 255, 0.9);
}

.ocr-upload-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 8px;
}

.ocr-upload-text .ocr-upload-label {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 16px;
    background-color: rgba(123, 97, 255, 0.1);
    color: #7b61ff;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(123, 97, 255, 0.3);
}

.ocr-upload-text .ocr-upload-label:hover {
    background-color: rgba(123, 97, 255, 0.2);
    border-color: rgba(123, 97, 255, 0.5);
    transform: translateY(-2px);
}

/* OCR工具样式 */
.ocr-container {
    max-width: 100%;
    color: #333;
}

.ocr-alert {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.ocr-alert.ocr-alert-success {
    background-color: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
    color: #27ae60;
}

.ocr-alert.ocr-alert-error {
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.ocr-alert.ocr-alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    color: #3498db;
}

.ocr-content-fullwidth {
    width: 100%;
    margin-bottom: 30px;
}

.ocr-panel {
    margin-bottom: 30px;
}

.ocr-card {
    background-color: rgba(30, 30, 30, 0.5);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ocr-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ocr-card-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.ocr-card-body {
    padding: 20px;
}

/* 表单元素样式 */
.ocr-form-group {
    margin-bottom: 20px;
}

.ocr-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #fff;
}

.ocr-radio-group {
    display: flex;
    margin-bottom: 15px;
}

.ocr-radio {
    position: relative;
    margin-right: 20px;
    padding-left: 28px;
    cursor: pointer;
}

.ocr-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.ocr-radio-icon {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.ocr-radio input:checked ~ .ocr-radio-icon:after {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7b61ff;
}

.ocr-radio input:checked ~ .ocr-radio-icon {
    border-color: #7b61ff;
}

.ocr-radio-text {
    color: #fff;
}

.ocr-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.ocr-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.ocr-input {
    display: block;
    width: 100%;
    padding: 10px 12px 10px 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.3s;
}

.ocr-input:focus {
    outline: none;
    border-color: #7b61ff;
    box-shadow: 0 0 0 2px rgba(123, 97, 255, 0.25);
}

.ocr-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.ocr-input-help {
    margin-top: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.ocr-select-wrapper {
    position: relative;
}

.ocr-select {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.3s;
}

.ocr-select:focus {
    outline: none;
    border-color: #7b61ff;
    box-shadow: 0 0 0 2px rgba(123, 97, 255, 0.25);
}

.ocr-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.7);
}

/* 按钮样式 */
.ocr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.ocr-btn svg {
    margin-right: 8px;
}

.ocr-btn:focus {
    outline: none;
}

.ocr-btn-primary {
    background-color: #7b61ff;
    color: white;
}

.ocr-btn-primary:hover {
    background-color: #6a4fdd;
}

.ocr-btn-outline {
    background-color: transparent;
    color: #7b61ff;
    border: 1px solid #7b61ff;
}

.ocr-btn-outline:hover {
    background-color: rgba(123, 97, 255, 0.1);
}

.ocr-form-actions-container {
    margin-top: 30px;
}

/* 上传区域样式 */
.ocr-upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background-color: rgba(30, 30, 30, 0.5);
    z-index: 10;
    margin-bottom: 20px;
}

.ocr-upload-zone:hover {
    border-color: #7b61ff;
    background: rgba(123, 97, 255, 0.05);
}

.ocr-upload-zone.drag-active {
    border-color: #aa61ff;
    background: rgba(123, 97, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.2);
    transform: scale(1.01);
}

.ocr-upload-zone.drag-active .ocr-upload-icon {
    color: #aa61ff;
    transform: scale(1.1);
}

.ocr-upload-zone.drag-active .ocr-upload-text h3 {
    color: #ffffff;
}

.ocr-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.ocr-upload-icon {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.ocr-upload-text h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.ocr-upload-text p {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.ocr-file-input {
    display: none;
}

.ocr-file-details {
    background-color: rgba(40, 40, 40, 0.6);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.ocr-file-preview {
    display: flex;
    align-items: center;
}

.ocr-file-icon {
    flex-shrink: 0;
    margin-right: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.ocr-file-info {
    flex-grow: 1;
}

.ocr-file-name {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ocr-file-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* 进度条样式 */
.ocr-inline-progress {
    display: none;
    margin-top: 20px;
}

.ocr-inline-progress.active {
    display: block;
}

.ocr-inline-progress-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.ocr-inline-progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ocr-inline-progress-bar {
    height: 100%;
    background-color: #7b61ff;
    width: 0%;
    transition: width 0.5s ease;
}

.ocr-inline-progress-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}

.ocr-progress {
    width: 100%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.ocr-progress-bar {
    height: 100%;
    background-color: #7b61ff;
    transition: width 0.5s ease;
}

.ocr-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ocr-progress-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* 结果区域 */
.ocr-result-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ocr-result-item:last-child {
    border-bottom: none;
}

.ocr-result-icon {
    flex-shrink: 0;
    margin-right: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.ocr-result-details {
    flex-grow: 1;
    overflow: hidden;
}

.ocr-result-title {
    margin-bottom: 5px;
}

.ocr-result-download {
    color: #7b61ff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.ocr-result-download:hover {
    text-decoration: underline;
}

.ocr-result-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2px;
}

.ocr-result-actions {
    display: flex;
    gap: 10px;
}

/* 加载指示器 */
.ocr-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ocr-loading.active {
    display: flex;
}

.ocr-spinner {
    position: relative;
    width: 70px;
    height: 70px;
}

.ocr-spinner-ring {
    position: absolute;
    border: 4px solid transparent;
    border-top-color: #7b61ff;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.ocr-spinner-ring:nth-child(1) {
    width: 64px;
    height: 64px;
    top: 3px;
    left: 3px;
    animation-delay: -0.45s;
}

.ocr-spinner-ring:nth-child(2) {
    width: 54px;
    height: 54px;
    top: 8px;
    left: 8px;
    animation-delay: -0.3s;
}

.ocr-spinner-ring:nth-child(3) {
    width: 44px;
    height: 44px;
    top: 13px;
    left: 13px;
    animation-delay: -0.15s;
}

.ocr-loading-text {
    margin-top: 20px;
    color: white;
    font-size: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
} 