/* ===== Theme Variables for Image-to-Text ===== */
:root {
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --bg-panel: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.04);
    --border-light: rgba(0, 0, 0, 0.12);
    --border-light-hover: rgba(138, 79, 255, 0.3);
    --bg-input: #f3f4f6;
    --glass-bg: #ffffff;
    --glass-border: rgba(0, 0, 0, 0.1);
    --dropdown-bg: #ffffff;
    --quick-action-bg: #f3f4f6;
}

body.dark-mode {
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --bg-panel: rgba(255, 255, 255, 0.07);
    --bg-overlay: rgba(255, 255, 255, 0.04);
    --border-light: rgba(255, 255, 255, 0.12);
    --border-light-hover: rgba(138, 79, 255, 0.3);
    --bg-input: rgba(0, 0, 0, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.08); /* like settings bar */
    --glass-border-color: var(--border-light);
    --dropdown-bg: #2a1f4e;
    --quick-action-bg: rgba(255, 255, 255, 0.06);
}

/* ===================================
   Image to Text (OCR) Page Styles
   =================================== */

/* Hero Section */
.ocr-hero {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
}

.ocr-hero .hero-badge {
    display: inline-block;
    background: var(--bg-overlay);
    color: var(--text-primary);
    padding: 6px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-light);
}

.ocr-hero h1 {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.7rem;
    line-height: 1.3;
}

.ocr-hero .hero-sub {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    margin-bottom: 0.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.ocr-hero .hero-sub-small {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Settings Bar */
.ocr-settings-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.setting-group label {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.ocr-select {
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--bg-overlay);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 180px;
    transition: all 0.3s ease;
}

.ocr-select:focus {
    outline: none;
    border-color: rgba(138, 79, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(138, 79, 255, 0.15);
}

.ocr-select option {
    background: var(--dropdown-bg);
    color: var(--text-primary);
}

.engine-toggle {
    display: flex;
    gap: 4px;
    background: var(--quick-action-bg);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid var(--border-light);
}

.engine-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.engine-btn.active {
    background: linear-gradient(135deg, #8a4fff, #6366f1);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(138, 79, 255, 0.25);
}

.engine-btn:hover:not(.active) {
    background: var(--glass-bg);
    color: var(--text-primary);
}

/* Main Layout */
.ocr-tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
}

.ocr-main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    min-height: 450px;
}

/* Panel Shared Styles */
.ocr-input-panel,
.ocr-output-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
    transition: border-color 0.3s ease;
}

.ocr-input-panel:hover,
.ocr-output-panel:hover {
    border-color: rgba(138, 79, 255, 0.3);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-overlay);
}

.panel-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.panel-actions {
    display: flex;
    gap: 0.4rem;
}

.ocr-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--quick-action-bg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.ocr-action-btn:hover:not(:disabled) {
    background: rgba(138, 79, 255, 0.2);
    border-color: rgba(138, 79, 255, 0.4);
    color: var(--text-primary);
}

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

/* Drop Zone */
.ocr-drop-zone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem;
    border: 2px dashed rgba(138, 79, 255, 0.3);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 300px;
    overflow: hidden;
}

.ocr-drop-zone.drag-over {
    border-color: #8a4fff;
    background: rgba(138, 79, 255, 0.08);
    transform: scale(1.01);
}

.ocr-drop-zone:hover {
    border-color: rgba(138, 79, 255, 0.5);
    background: rgba(138, 79, 255, 0.04);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    text-align: center;
}

.drop-icon {
    font-size: 3.5rem;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.drop-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.drop-subtitle {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
}

.drop-hint {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: 0;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    margin-top: 0.8rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #8a4fff, #6366f1);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(138, 79, 255, 0.35);
}

/* Image Preview */
.image-preview-container {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0.5rem;
}

.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    max-height: 350px;
    transition: transform 0.3s ease;
}

.preview-overlay {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    background: var(--bg-input);
    backdrop-filter: blur(10px);
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview-container:hover .preview-overlay {
    opacity: 1;
}

.preview-action {
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    background: var(--bg-overlay);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s ease;
}

.preview-action:hover {
    background: rgba(138, 79, 255, 0.4);
}

.image-info {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: var(--bg-input);
    backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.7rem;
}

/* Convert Button */
.ocr-convert-section {
    padding: 0.8rem 1rem;
}

.ocr-convert-btn {
    width: 100%;
    padding: 13px 24px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ocr-convert-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    transition: left 0.5s ease;
}

.ocr-convert-btn:hover:not(:disabled)::before {
    left: 100%;
}

.ocr-convert-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.ocr-convert-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #64748b, #475569);
}

.ocr-convert-btn.processing {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    animation: pulse-process 1.5s ease-in-out infinite;
}

@keyframes pulse-process {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
}

.convert-icon {
    font-size: 1.2rem;
}

/* Progress */
.progress-container {
    margin-top: 0.8rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: var(--bg-overlay);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    background: linear-gradient(90deg, #8a4fff, #10b981, #f59e0b);
    background-size: 300% 100%;
    animation: gradient-shift 2s ease infinite;
    transition: width 0.3s ease;
}

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

    50% {
        background-position: 0 0;
    }

    100% {
        background-position: 100% 0;
    }
}

.progress-text {
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-align: center;
    margin-top: 0.4rem;
}

/* Image Queue */
.image-queue {
    padding: 0.8rem 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.image-queue h4 {
    color: var(--text-primary);
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
}

.queue-list {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
}

.queue-item {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-light);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.3s ease;
}

.queue-item.active {
    border-color: #8a4fff;
}

.queue-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.queue-item .remove-queue {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.85);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.queue-item:hover .remove-queue {
    opacity: 1;
}

/* Output Area */
.ocr-output-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

#ocrOutput {
    flex: 1;
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.7;
    resize: vertical;
    font-family: 'Hind Siliguri', sans-serif;
    transition: background 0.3s ease;
}

#ocrOutput:focus {
    outline: none;
    background: var(--bg-input);
}

#ocrOutput::placeholder {
    color: var(--text-secondary);
}

.output-stats {
    display: flex;
    gap: 1rem;
    padding: 0.6rem 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.output-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--quick-action-bg);
    padding: 3px 8px;
    border-radius: 6px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 0.4rem;
    padding: 0 1rem 1rem;
    flex-wrap: wrap;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--quick-action-bg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: rgba(138, 79, 255, 0.15);
    border-color: rgba(138, 79, 255, 0.35);
    color: var(--text-primary);
}

/* Tips Section */
.ocr-tips {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.ocr-tips h2 {
    text-align: center;
    color: var(--text-primary);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 1.5rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.tip-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-4px);
    border-color: rgba(138, 79, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.tip-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.6rem;
}

.tip-card h4 {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
}

.tip-card p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0;
}

/* Internal Links */
.internal-links-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.internal-links {
    background: var(--quick-action-bg);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.internal-links h3 {
    color: var(--text-primary);
    margin: 0 0 1rem;
    font-size: 1rem;
}

.link-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.link-pills a {
    padding: 7px 16px;
    border-radius: 20px;
    background: rgba(138, 79, 255, 0.12);
    border: 1px solid rgba(138, 79, 255, 0.2);
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-pills a:hover {
    background: rgba(138, 79, 255, 0.25);
    border-color: rgba(138, 79, 255, 0.45);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* SEO Section */
.seo-ocr-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.seo-ocr-section h2 {
    text-align: center;
    color: var(--text-primary);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 0.5rem;
}

.seo-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}

.seo-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 1.8rem;
    transition: all 0.3s ease;
}

.seo-card:hover {
    border-color: rgba(138, 79, 255, 0.2);
    transform: translateY(-3px);
}

.seo-card-icon {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
}

.seo-card h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0 0 0.6rem;
}

.seo-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}

.seo-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.seo-card ul li {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.seo-card ul li:last-child {
    border-bottom: none;
}

/* FAQ Section */
.ocr-faq {
    max-width: 900px;
    margin: 2rem auto 3rem;
    padding: 0 1.5rem;
}

.ocr-faq h2 {
    text-align: center;
    color: var(--text-primary);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 1.5rem;
}

.faq-item {
    background: var(--quick-action-bg);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 0.7rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(138, 79, 255, 0.2);
}

.faq-item summary {
    padding: 1rem 1.2rem;
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-item summary::before {
    content: '▸';
    color: #8a4fff;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::before {
    transform: rotate(90deg);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    padding: 0 1.2rem 1rem;
    margin: 0;
}

.faq-item p a {
    color: #8a4fff;
    text-decoration: underline;
}

/* Toast Notification */
.ocr-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(16, 185, 129, 0.9);
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    backdrop-filter: blur(10px);
}

.ocr-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.ocr-toast.error {
    background: rgba(239, 68, 68, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .ocr-main-layout {
        grid-template-columns: 1fr;
    }

    .ocr-settings-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }

    .setting-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .ocr-select {
        width: 100%;
    }

    .ocr-drop-zone {
        min-height: 200px;
    }

    .panel-actions {
        flex-wrap: wrap;
    }

    .seo-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ocr-hero {
        padding: 2rem 1rem 1.5rem;
    }

    .ocr-tool-container {
        padding: 0 0.8rem 2rem;
    }

    .panel-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

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

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

/* Auto-Detect Badge */
.auto-detect-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(138, 79, 255, 0.2));
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-icon {
    font-size: 1.1rem;
}

.badge-status {
    background: var(--bg-overlay);
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.lang-override-btn {
    padding: 7px 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--quick-action-bg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.lang-override-btn:hover {
    background: rgba(138, 79, 255, 0.15);
    border-color: rgba(138, 79, 255, 0.35);
    color: var(--text-primary);
}

.lang-override-panel {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.2rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-close-btn {
    padding: 4px 10px;
    border: none;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.lang-close-btn:hover {
    background: rgba(239, 68, 68, 0.35);
}

.detected-lang-chip {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #34d399 !important;
}

/* How It Works */
.ocr-howto {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    text-align: center;
}

.ocr-howto h2 {
    color: var(--text-primary);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

.howto-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.step-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: rgba(138, 79, 255, 0.25);
}

.step-num {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8a4fff, #6366f1);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 0.6rem;
}

.step-card h4 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin: 0 0 0.5rem;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0;
}

/* Supported Formats */
.ocr-formats {
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

.ocr-formats h2 {
    text-align: center;
    color: var(--text-primary);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 1.5rem;
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.format-card {
    background: var(--quick-action-bg);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1.3rem;
    text-align: center;
    transition: all 0.3s ease;
}

.format-card:hover {
    transform: translateY(-3px);
    border-color: rgba(138, 79, 255, 0.25);
}

.format-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.4rem;
}

.format-card h4 {
    color: var(--text-primary);
    font-size: 0.88rem;
    margin: 0 0 0.4rem;
}

.format-card p {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 0;
}

/* SEO Article */
.seo-article {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 2rem 2.5rem;
    margin-top: 1.5rem;
}

.seo-article h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 1.8rem 0 0.8rem;
}

.seo-article h3:first-child {
    margin-top: 0;
}

.seo-article p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    margin: 0 0 0.8rem;
}

.seo-article strong {
    color: var(--text-primary);
}

.seo-article a {
    color: #8a4fff;
    text-decoration: underline;
}

.seo-use-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.8rem;
    margin: 1rem 0;
}

.use-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.8rem 1rem;
}

.use-item span {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.use-item p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.use-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive for new sections */
@media (max-width: 768px) {
    .howto-steps {
        grid-template-columns: 1fr;
    }

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

    .seo-article {
        padding: 1.5rem 1.2rem;
    }

    .seo-use-grid {
        grid-template-columns: 1fr;
    }

    .auto-detect-badge {
        flex-wrap: wrap;
        font-size: 0.78rem;
    }

    .lang-override-panel {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .formats-grid {
        grid-template-columns: 1fr;
    }
}