/* 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;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.processing-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.processing-content {
    position: relative;
    z-index: 1;
}

.processing-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
    animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

.processing-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 32px;
    position: relative;
}

.processing-spinner::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid #e2e8f0;
    border-radius: 50%;
}

.processing-spinner::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid #4299e1;
    border-right: 3px solid #4299e1;
    border-radius: 50%;
    animation: modern-spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes modern-spin {
    0% {
        transform: rotate(0deg);
        border-top-color: #4299e1;
        border-right-color: #4299e1;
    }
    25% {
        border-top-color: #3182ce;
        border-right-color: #4299e1;
    }
    50% {
        transform: rotate(180deg);
        border-top-color: #2b77cb;
        border-right-color: #3182ce;
    }
    75% {
        border-top-color: #3182ce;
        border-right-color: #4299e1;
    }
    100% {
        transform: rotate(360deg);
        border-top-color: #4299e1;
        border-right-color: #4299e1;
    }
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 25%, rgba(255, 255, 255, 0.2) 25%, rgba(255, 255, 255, 0.2) 50%, transparent 50%, transparent 75%, rgba(255, 255, 255, 0.2) 75%);
    background-size: 20px 20px;
    animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #3182ce, #2b77cb);
    background-size: 200% 100%;
    border-radius: 6px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: gradient-shift 2s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6));
    border-radius: 0 6px 6px 0;
}

.progress-percentage {
    margin-top: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4299e1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Enhanced notification styles */
.notification {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.notification button {
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.notification button:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Improved button states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    background-color: inherit !important;
}

/* 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;
}
