/* OCR文字识别工具样式 */
.ocr-recognizer-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    padding: 60px 20px;
}

.ocr-recognizer-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 页面头部 */
.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.header-content {
    animation: fadeInUp 0.6s ease;
}

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

.tool-title {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.tool-title i {
    font-size: 32px;
}

.tool-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.tool-badge {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #fff;
    backdrop-filter: blur(10px);
}

/* 工具主体 */
.tool-main {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 0;
}

@media (max-width: 992px) {
    .tool-main {
        grid-template-columns: 1fr;
    }
}

/* 主面板 */
.main-panel {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid #eee;
}

@media (max-width: 992px) {
    .main-panel {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
}

/* 侧边面板 */
.side-panel {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 上传区域 */
.upload-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
}

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

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #00c6fb;
    background: rgba(0, 198, 251, 0.05);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
}

.upload-text {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: #888;
}

.quick-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 198, 251, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
}

.btn-outline:hover {
    background: #f0f0f0;
    border-color: #00c6fb;
    color: #00c6fb;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* 预览区域 */
.preview-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
}

.preview-container {
    max-width: 100%;
    margin-bottom: 20px;
}

.preview-container img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 结果区域 */
.result-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
}

.result-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    flex-wrap: wrap;
}

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

.stat-item span {
    font-weight: 600;
    color: #333;
}

.result-content textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: #fff;
    font-family: inherit;
    box-sizing: border-box;
}

.result-content textarea:focus {
    outline: none;
    border-color: #00c6fb;
    box-shadow: 0 0 0 3px rgba(0, 198, 251, 0.1);
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

/* 设置卡片 */
.settings-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.settings-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-item {
    margin-bottom: 16px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.setting-item select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: #fff;
    cursor: pointer;
}

.setting-item select:focus {
    outline: none;
    border-color: #00c6fb;
    box-shadow: 0 0 0 3px rgba(0, 198, 251, 0.1);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 提示卡片 */
.tips-card {
    background: linear-gradient(135deg, #cce5ff 0%, #b8daff 100%);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #007bff;
}

.tips-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #0c63e4;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-list {
    margin: 0;
    padding-left: 20px;
}

.tips-list li {
    font-size: 14px;
    color: #0c63e4;
    margin-bottom: 8px;
    line-height: 1.5;
}

.tips-list li:last-child {
    margin-bottom: 0;
}

/* 信息卡片 */
.info-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #eee;
}

.info-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.info-icon {
    font-size: 18px;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
}

.toast-error {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
}

.toast-info {
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    color: #fff;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00c6fb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.loading-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.loading-progress {
    width: 200px;
    margin: 0 auto;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.loading-progress .progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.loading-progress span {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .ocr-recognizer-section {
        padding: 40px 15px;
    }

    .tool-title {
        font-size: 28px;
    }

    .tool-subtitle {
        font-size: 16px;
    }

    .main-panel,
    .side-panel {
        padding: 20px;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .upload-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .quick-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .result-stats {
        flex-direction: column;
        gap: 8px;
    }
}