/* Image to Text Converter Styles */
.image-to-text-tool {
    min-height: 100vh;
    background: #f8fafc;
    padding: 20px 0;
}

.tool-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
}

.tool-description {
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Interface */
.converter-interface {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
}

/* Upload Section */
.upload-section {
    text-align: center;
}

.upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 60px 40px;
    background: #f7fafc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #4299e1;
    background: #ebf8ff;
}

.upload-area.dragover {
    border-color: #3182ce;
    background: #bee3f8;
}

.upload-icon {
    font-size: 3rem;
    color: #a0aec0;
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
}

.upload-area p {
    color: #718096;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.upload-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-primary {
    background: #4299e1;
    color: white;
}

.btn-primary:hover {
    background: #3182ce;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

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

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

.btn-outline:hover {
    background: #f7fafc;
}

.btn-link {
    background: transparent;
    color: #4299e1;
    padding: 8px;
    border-radius: 6px;
}

.btn-link:hover {
    background: #ebf8ff;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.upload-or {
    color: #a0aec0;
    font-size: 0.9rem;
}

.upload-note {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #718096;
}

/* URL Input Section */
.url-input-section {
    margin-top: 30px;
    padding: 24px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.url-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.url-input-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.url-close-btn {
    background: #fed7d7;
    color: #e53e3e;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.url-close-btn:hover {
    background: #feb2b2;
}

.url-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.url-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.url-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.url-input:disabled {
    background: #f7fafc;
    color: #a0aec0;
}

.url-note {
    font-size: 0.85rem;
    color: #718096;
    margin: 0;
}

/* File Preview Section */
.file-preview-section {
    text-align: left;
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.file-label {
    font-weight: 600;
    color: #2d3748;
}

.file-count {
    font-size: 0.9rem;
    color: #718096;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 24px;
    position: relative;
}

.file-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
}

.file-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fed7d7;
    color: #e53e3e;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.file-remove-btn:hover {
    background: #feb2b2;
}

.action-section {
    text-align: center;
}

/* Processing Section */
.processing-section {
    text-align: center;
    padding: 60px 40px;
}

.processing-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
}

.processing-content p {
    color: #718096;
    margin-bottom: 32px;
}

.processing-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

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

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #3182ce);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0%, 100% { width: 0%; }
    50% { width: 70%; }
}

/* Results Section */
.results-section {
    text-align: left;
}

.results-header {
    margin-bottom: 32px;
}

.results-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #38a169;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.text-output-wrapper {
    margin-bottom: 24px;
}

.text-output-wrapper label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.text-output {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    background: #f7fafc;
}

.text-output:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.results-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }

    .converter-interface {
        padding: 24px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .upload-actions {
        flex-direction: column;
        gap: 12px;
    }

    .file-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .file-thumbnail {
        width: 120px;
        height: 120px;
    }

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

    .results-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .url-input-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .url-input {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .tool-container {
        padding: 0 16px;
    }

    .converter-interface {
        padding: 20px;
    }

    .results-stats {
        grid-template-columns: 1fr;
    }
}

/* SEO Content */
.seo-content {
    background: white;
    padding: 60px 0;
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
}

.content-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin: 24px 0 12px;
}

.content-section p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 16px;
}

.content-section ul,
.content-section ol {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 16px;
    padding-left: 24px;
}

.content-section li {
    margin-bottom: 8px;
}
