.ocr-container {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 600px;
}

.ocr-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ocr-main {
    flex: 1;
    min-width: 0;
    position: relative;
}

.ocr-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.ocr-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ocr-upload {
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: #f7fafc;
}

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

.ocr-upload i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 8px;
    display: block;
}

.ocr-upload p {
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 4px;
}

.ocr-hint {
    font-size: 12px;
    color: #a0aec0;
}

.ocr-paste-hint {
    margin-top: 10px;
    padding: 8px 12px;
    background: #edf2f7;
    border-radius: 8px;
    font-size: 12px;
    color: #4a5568;
    text-align: center;
}

.ocr-paste-hint i {
    color: #667eea;
    margin-right: 4px;
}

.ocr-form-row {
    margin-bottom: 14px;
}

.ocr-form-row:last-child {
    margin-bottom: 0;
}

.ocr-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 6px;
}

.ocr-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #2d3748;
    cursor: pointer;
}

.ocr-mode-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ocr-mode-btn {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}

.ocr-mode-btn:hover {
    border-color: #667eea;
}

.ocr-mode-btn.active {
    border-color: #667eea;
    background: #eef2ff;
    box-shadow: 0 0 0 2px rgba(102,126,234,.15);
}

.ocr-mode-btn .mode-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}

.ocr-mode-btn .mode-desc {
    display: block;
    font-size: 11px;
    color: #a0aec0;
    margin-top: 2px;
}

.ocr-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ocr-btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .2s;
}

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

.ocr-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.ocr-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,.3);
}

.ocr-btn-success {
    background: #48bb78;
    color: #fff;
}

.ocr-btn-success:hover {
    background: #38a169;
}

.ocr-btn-outline {
    background: #fff;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.ocr-btn-outline:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.ocr-usage-info {
    padding: 10px 12px;
    background: #edf2f7;
    border-radius: 8px;
    font-size: 12px;
    color: #4a5568;
    text-align: center;
}

.ocr-usage-info i {
    color: #667eea;
    margin-right: 4px;
}

/* Main area */
.ocr-workspace {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    min-height: 400px;
    overflow: hidden;
}

.ocr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #a0aec0;
    text-align: center;
    padding: 40px;
}

.ocr-placeholder i {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: .5;
}

.ocr-placeholder p {
    font-size: 15px;
}

.ocr-preview-wrap {
    display: flex;
    min-height: 400px;
}

.ocr-image-area {
    width: 50%;
    padding: 16px;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    position: relative;
}

.ocr-image-area img {
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.ocr-image-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 4px;
}

.ocr-result-area {
    width: 50%;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.ocr-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.ocr-confidence {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #c6f6d5;
    color: #22543d;
    font-weight: 600;
}

.ocr-result-text {
    flex: 1;
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.7;
    color: #2d3748;
    resize: vertical;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", monospace;
    background: #fff;
}

.ocr-result-text:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,.1);
}

.ocr-result-meta {
    margin-top: 10px;
    font-size: 12px;
    color: #a0aec0;
    display: flex;
    gap: 16px;
}

/* VIP mask */
.ocr-vip-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,.92);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.ocr-vip-mask-inner {
    text-align: center;
    padding: 40px;
}

.ocr-vip-mask-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ocr-vip-mask-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.ocr-vip-mask-desc {
    font-size: 14px;
    color: #718096;
    margin-bottom: 20px;
}

.ocr-vip-mask-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.ocr-vip-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
}

.ocr-vip-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,.3);
}

.ocr-vip-btn-single {
    padding: 10px 24px;
    background: #fff;
    color: #667eea;
    border: 1px solid #667eea;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.ocr-vip-btn-single:hover {
    background: #eef2ff;
}

/* Tips */
.ocr-tips {
    margin-top: 20px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.ocr-tips h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ocr-tip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.ocr-tip-item {
    padding: 12px;
    background: #f7fafc;
    border-radius: 8px;
}

.ocr-tip-item strong {
    display: block;
    font-size: 13px;
    color: #2d3748;
    margin-bottom: 4px;
}

.ocr-tip-item p {
    font-size: 12px;
    color: #718096;
    line-height: 1.5;
}

/* Loading */
.ocr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 16px;
}

.ocr-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: ocr-spin 1s linear infinite;
}

@keyframes ocr-spin {
    to { transform: rotate(360deg); }
}

.ocr-loading p {
    font-size: 14px;
    color: #718096;
}

/* Responsive */
@media (max-width: 900px) {
    .ocr-container {
        flex-direction: column;
    }
    .ocr-sidebar {
        width: 100%;
    }
    .ocr-preview-wrap {
        flex-direction: column;
    }
    .ocr-image-area,
    .ocr-result-area {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .ocr-result-area {
        border-bottom: none;
        min-height: 250px;
    }
    .ocr-tip-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ocr-tip-grid {
        grid-template-columns: 1fr;
    }
    .ocr-mode-options {
        grid-template-columns: 1fr;
    }
}
