/* ===========================================
   ImageToText.is - Main Stylesheet
   Clean & Professional Color Palette
   =========================================== */
/* CSS Variables - Professional & Clean Colors */
:root {
    /* Primary Colors - Indigo (Professional & Trustworthy) */
    --primary: #5a67d8;
    --primary-dark: #434190;
    --primary-light: #7f8de6;
    
    /* Secondary Colors - Soft Teal (Fresh & Soft) */
    --secondary: #38b2ac;
    --secondary-dark: #2c8a84;
    --secondary-light: #4fd1c5;
    
    /* Accent Colors - Muted Gold (Subtle Energy) */
    --accent: #d69e2e;
    --accent-dark: #b7791f;
    --accent-light: #ecc94b;
    
    /* Fun Colors - Softer versions */
    --fun-purple: #9f7aea;
    --fun-blue: #4299e1;
    --fun-orange: #ed8936;
    --fun-green: #48bb78;
    --fun-red: #f56565;
    
    /* Background Colors - Clean & Professional */
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-light: #f1f5f9;
    --surface-hover: #e2e8f0;
    
    /* Text Colors - Better Contrast */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Border & Dividers */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Status Colors */
    --success: #48bb78;
    --error: #f56565;
    --warning: #d69e2e;
    --info: #4299e1;
    
    /* Gradients - Super Fun & Colorful */
    --gradient-joy: linear-gradient(135deg, #5a67d8 0%, #38b2ac 100%);
    --gradient-sunset: linear-gradient(135deg, #ff6b9d 0%, #ff9f43 100%);
    --gradient-ocean: linear-gradient(135deg, #54a0ff 0%, #00d2d3 100%);
    --gradient-candy: linear-gradient(135deg, #9f7aea 0%, #4299e1 50%, #38b2ac 100%);
    --gradient-rainbow: linear-gradient(135deg, #9f7aea, #4299e1, #38b2ac, #48bb78);
    --gradient-pop: linear-gradient(135deg, #9f7aea 0%, #ed8936 33%, #d69e2e 66%, #38b2ac 100%);
    
    /* Shadows - Clean & Professional */
    --shadow-sm: 0 2px 8px rgba(90, 103, 216, 0.06);
    --shadow-md: 0 4px 20px rgba(90, 103, 216, 0.08);
    --shadow-lg: 0 8px 40px rgba(90, 103, 216, 0.12);
    --shadow-glow: 0 2px 12px rgba(90, 103, 216, 0.1);
    --shadow-pop: 0 6px 24px rgba(56, 178, 172, 0.2);
    --shadow-fun: 0 8px 30px rgba(159, 122, 234, 0.15);
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 50%;
}
/* ===========================================
   Base Styles
   =========================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
/* Selection */
::selection {
    background: var(--primary);
    color: white;
}
/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary-dark);
}
/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}
/* Buttons */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}
/* Inputs */
input,
textarea {
    font-family: inherit;
    outline: none;
}
/* ===========================================
   Background Effects - Simple Version
   =========================================== */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    /* Static soft gradient, more restrained than before */
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.03) 0%, 
        rgba(0, 210, 211, 0.02) 50%,
        rgba(254, 202, 87, 0.02) 100%);
}
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}
.bg-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.1);
    top: -150px;
    right: -50px;
}
.bg-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(0, 210, 211, 0.08);
    bottom: -100px;
    left: -50px;
}
/* Grid Background - Minimal */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    opacity: 0.2;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
}
/* ===========================================
   Layout
   =========================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
/* ===========================================
   Header / Navigation
   =========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 18px 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    border-bottom: 2px solid var(--border-light);
    transition: all var(--transition-fast);
}
.header.scrolled {
    padding: 12px 0;
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.95);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}
.logo-icon {
    width: 52px;
    height: 52px;
    background: var(--gradient-joy);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-bounce);
}
.logo:hover .logo-icon {
    transform: scale(1.15) rotate(12deg);
}
.logo-text {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-joy);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-domain {
    font-size: 12px;
    font-weight: 700;
    background: var(--gradient-ocean);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: -4px;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-link {
    position: relative;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}
.nav-link:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 4px;
    background: var(--gradient-joy);
    border-radius: 2px;
    transition: width var(--transition-fast), left var(--transition-fast);
}
.nav-link:hover::after {
    width: 40px;
    left: calc(50% - 20px);
}
.nav-cta {
    padding: 10px 24px;
    background: var(--gradient-joy);
    color: white;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-cta:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.45);
    color: white;
}
.nav-cta span:last-child {
    font-size: 18px;
}
/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border-radius: var(--radius-sm);
}
.mobile-menu-toggle span {
    width: 26px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all var(--transition-fast);
}
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
/* ===========================================
   Hero Section
   =========================================== */
.hero {
    padding: 40px 0 30px;
    text-align: center;
    position: relative;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: rgba(99, 102, 241, 0.12);
    border: 2px solid rgba(99, 102, 241, 0.25);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease backwards;
}
.hero-badge-icon {
    font-size: 20px;
}
.badge-pulse {
    width: 12px;
    height: 12px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.4);
    }
}
.hero h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    animation: fadeInUp 0.6s ease 0.1s backwards;
}
.hero h1 .gradient-text {
    background: var(--gradient-joy);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.5;
    animation: fadeInUp 0.6s ease 0.2s backwards;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 100px;
    animation: fadeInUp 0.6s ease 0.3s backwards;
}
.btn-primary {
    padding: 20px 48px;
    background: var(--gradient-joy);
    color: white;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.btn-primary:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 18px 50px rgba(99, 102, 241, 0.45);
    color: white;
}
.btn-secondary {
    padding: 20px 48px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    border: 3px solid var(--border);
    border-radius: 50px;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}
/* ===========================================
   Tool Section - Main Functionality
   =========================================== */
.tool-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 900px;
    margin: 0 auto 80px;
    animation: fadeInUp 0.6s ease 0.4s backwards;
}
.card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 3px solid var(--border-light);
    overflow: hidden;
    transition: all var(--transition-fast);
}
.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
/* Upload Area */
.upload-area {
    position: relative;
    padding: 56px 36px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.upload-area:hover {
    background: rgba(99, 102, 241, 0.03);
}
.upload-area.dragover {
    background: rgba(99, 102, 241, 0.06);
    border-color: var(--primary);
}
.upload-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 28px;
    background: var(--gradient-joy);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-bounce);
}
.upload-area:hover .upload-icon {
    transform: scale(1.15) rotate(-8deg);
}
.upload-area h3 {
    font-size: 26px;
    margin-bottom: 14px;
    color: var(--text-primary);
}
.upload-area p {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.formats {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.format-badge {
    padding: 8px 16px;
    background: var(--surface-light);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.format-badge:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}
/* Batch Upload Area */
.batch-upload-area {
    position: relative;
    padding: 56px 36px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 3px dashed var(--border-color);
}
.batch-upload-area:hover {
    background: rgba(99, 102, 241, 0.03);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.1);
}
.batch-upload-area.dragover {
    background: rgba(99, 102, 241, 0.06);
    border-color: var(--primary);
    border-style: solid;
    transform: scale(1.02);
}
/* Processing state - subtle indicator */
.batch-upload-area.processing {
    border-style: solid;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.batch-upload-area.processing .batch-upload-content,
.batch-upload-area.processing .batch-hint,
.batch-upload-area.processing .formats {
    display: none;
}
.batch-upload-area.processing .processing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 500;
}
.batch-upload-content {
    pointer-events: none;
}
.batch-upload-area h3 {
    font-size: 26px;
    margin-bottom: 14px;
    color: var(--text-primary);
}
.batch-upload-area p {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.batch-hint {
    font-size: 14px !important;
    color: var(--primary) !important;
    font-weight: 500;
}
#batchFileInput {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
/* Batch Preview Section */
.batch-preview-section {
    margin-top: 24px;
    display: none;
    animation: slideDown 0.3s ease;
}
.batch-preview-section.visible {
    display: block;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.batch-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}
.batch-preview-header h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text-primary);
}
.batch-preview-actions {
    display: flex;
    gap: 10px;
}
.btn-secondary {
    padding: 10px 20px;
    background: var(--surface-light);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-secondary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.btn-danger {
    padding: 10px 20px;
    background: rgba(255, 59, 48, 0.1);
    border: 2px solid #ff3b30;
    border-radius: var(--radius-lg);
    color: #ff3b30;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-danger:hover {
    background: #ff3b30;
    border-color: #ff3b30;
    color: white;
}
/* Batch Preview Grid */
.batch-preview-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    min-height: 100px;
    max-width: 800px;
}
/* Mobile Adaptation */
@media (max-width: 640px) {
    .batch-preview-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        max-width: 100%;
    }
    
    .batch-preview-card {
        min-height: 100px;
    }
    
    /* Upload Area Mobile */
    .batch-upload-area {
        padding: 32px 20px;
    }
    
    .batch-upload-area h3 {
        font-size: 20px;
    }
    
    .batch-upload-area p {
        font-size: 14px;
    }
    
    .batch-upload-content .formats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .format-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    /* Preview Area Header */
    .batch-preview-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .batch-preview-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .btn-secondary, .btn-danger {
        font-size: 13px;
        padding: 8px 14px;
    }
    
    /* Extract Button */
    .batch-extract-btn {
        width: 100%;
        font-size: 16px;
        padding: 16px;
    }
}
.batch-preview-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-light);
    border: 2px solid var(--border-light);
    transition: all var(--transition-fast);
    animation: fadeInUp 0.3s ease;
}
.batch-preview-card:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}
/* Add card button */
.add-card {
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    border: 3px dashed var(--border-color);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 120px;
}
.add-card:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.02);
}
.add-card-icon {
    font-size: 40px;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1;
    transition: all var(--transition-fast);
}
.add-card:hover .add-card-icon {
    color: var(--primary);
    transform: scale(1.2);
}
.add-card-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}
.add-card:hover .add-card-text {
    color: var(--primary);
}
/* Hide add card button */
.add-card.hidden {
    display: none;
}
/* General hidden utility */
.hidden {
    display: none !important;
}
.batch-preview-card.removing {
    animation: fadeOut 0.2s ease forwards;
}
.batch-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.batch-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    opacity: 0;
}
.batch-preview-card:hover .batch-remove-btn {
    opacity: 1;
}
.batch-remove-btn:hover {
    background: #ff3b30;
    transform: scale(1.1);
}
.batch-preview-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}
.batch-preview-name {
    font-size: 11px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}
/* Batch Extract Action */
.batch-extract-action {
    text-align: center;
    margin-top: 20px;
}
.batch-extract-btn {
    min-width: 280px;
    font-size: 18px;
    padding: 18px 36px;
}
.batch-extract-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* Batch Result Section */
.batch-result-section {
    padding: 60px 0;
    animation: fadeInUp 0.6s ease;
}
.batch-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.batch-result-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}
.batch-result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.format-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}
.format-select-small {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}
.format-select-small:hover {
    border-color: var(--primary-color);
}
.format-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.1);
}
.batch-result-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
}
/* Compact List Card */
.batch-result-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
    overflow: hidden;
    transition: all var(--transition-fast);
    animation: fadeInUp 0.3s ease backwards;
}
.batch-result-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-md);
}
.batch-result-card.expanded {
    border-color: var(--primary);
}
/* Card Header - Always Visible */
.batch-result-header-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.batch-result-header-card:hover {
    background: var(--surface-light);
}
.batch-result-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}
.batch-result-info {
    flex: 1;
    min-width: 0;
}
.batch-result-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.batch-result-preview-text {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.batch-result-status {
    padding: 5px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    background: var(--surface-light);
    color: var(--text-muted);
    flex-shrink: 0;
}
.batch-result-status.processing {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}
.batch-result-status.success {
    background: rgba(52, 199, 89, 0.15);
    color: #34c759;
}
.batch-result-status.error {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
}
/* Action Button Group */
.batch-result-actions-group {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}
.batch-result-actions-group .action-btn {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: var(--radius-md);
}
.batch-result-actions-group .action-btn svg {
    width: 12px;
    height: 12px;
}
.batch-result-actions-group .download-format-select {
    padding: 5px 8px;
    font-size: 11px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}
.batch-result-actions-group .download-format-select:hover {
    border-color: var(--primary-color);
}
.batch-result-actions-group .download-format-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
/* Expand/Collapse Button */
.batch-expand-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    background: var(--surface-light);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.batch-expand-btn:hover {
    background: var(--primary);
    color: white;
}
.batch-expand-btn svg {
    transition: transform var(--transition-fast);
}
.batch-result-card.expanded .batch-expand-btn svg {
    transform: rotate(180deg);
}
/* Card Content Area - Visible when expanded */
.batch-result-content {
    display: none;
    border-top: 1px solid var(--border-light);
}
.batch-result-card.expanded .batch-result-content {
    display: block;
    animation: slideDown 0.2s ease;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.batch-result-text {
    width: 100%;
    min-height: 120px;
    max-height: 250px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    resize: vertical;
    font-family: 'Inter', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
}
.batch-result-text:focus {
    outline: none;
}
.batch-result-text::placeholder {
    color: var(--text-muted);
}
/* Result Bottom Action Area */
.batch-result-footer {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    background: var(--surface-light);
    border-top: 1px solid var(--border-light);
}
/* Merged duplicate rules for .batch-result-footer .action-btn */
.batch-result-footer .action-btn {
    flex: 1;
    justify-content: center;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 16px 28px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 3px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-bounce);
    z-index: 9999;
}
.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.toast.success {
    border-color: #34c759;
}
.toast.error {
    border-color: #ff3b30;
}
.toast.warning {
    border-color: #ffc107;
}
.toast-icon {
    font-size: 20px;
}
.toast.success .toast-icon {
    color: #34c759;
}
.toast.error .toast-icon {
    color: #ff3b30;
}
.toast.warning .toast-icon {
    color: #ffc107;
}
#fileInput {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
/* Preview Area */
.preview-card {
    padding: 28px;
}
.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.preview-header h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}
.status-dot {
    width: 12px;
    height: 12px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}
.status-dot.active {
    background: var(--success);
    animation: pulse 2s infinite;
}
.clear-btn {
    padding: 10px 20px;
    background: var(--surface-light);
    border: none;
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-fast);
}
.clear-btn:hover {
    background: var(--error);
    color: white;
    transform: scale(1.05);
}
.preview-image-container {
    width: 100%;
    height: 320px;
    background: var(--surface-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 20px;
    border: 3px dashed var(--border);
    transition: all var(--transition-fast);
}
.preview-image-container:hover {
    border-color: var(--primary);
}
.preview-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}
.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
}
.preview-placeholder svg {
    width: 80px;
    height: 80px;
    opacity: 0.25;
}
.preview-placeholder span {
    font-size: 16px;
    font-weight: 500;
}
/* Extract Button */
.extract-btn {
    width: 100%;
    padding: 22px 36px;
    background: var(--gradient-joy);
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-shadow: var(--shadow-glow);
}
.extract-btn:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.45);
}
.extract-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}
.extract-btn .spinner {
    display: none;
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.extract-btn.loading .btn-text {
    display: none;
}
.extract-btn.loading .spinner {
    display: block;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Processing state (Consolidated) */
.batch-upload-area.processing::after {
    content: "Processing...";
    color: var(--primary);
    font-weight: 500;
    animation: pulse 1.5s infinite;
}

/* Compact mode - shown when files are selected */
/* Simplified: just shows status, the + button in preview grid is used to add more */
.batch-upload-area.has-files {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all var(--transition-normal);
}
.batch-upload-area.has-files .batch-upload-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}
.batch-upload-area.has-files .upload-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
    margin: 0;
    box-shadow: none;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}
.batch-upload-area.has-files:hover .upload-icon {
    transform: scale(1.1);
}
.batch-upload-area.has-files .text-content {
    flex: 1;
}
.batch-upload-area.has-files h3 {
    font-size: 16px;
    margin: 0 0 2px 0;
    color: var(--text-primary);
}
.batch-upload-area.has-files p {
    font-size: 12px;
    margin: 0;
    color: var(--text-muted);
}
.batch-upload-area.has-files .formats,
.batch-upload-area.has-files .batch-hint {
    display: none;
}
.batch-upload-area.has-files:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.03);
}
.batch-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
    transform: scale(1.01);
}
.batch-upload-content {
    position: relative;
    z-index: 2;
}
.batch-upload-icon {
    width: 140px;
    height: 140px;
    margin: 0 auto 28px;
    background: var(--gradient-joy);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-bounce);
}
.batch-upload-area:hover .batch-upload-icon {
    transform: scale(1.15) rotate(-8deg) scaleY(1.1);
}
.batch-upload-area h3 {
    font-size: 30px;
    margin-bottom: 16px;
    color: var(--text-primary);
}
.batch-upload-area p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.upload-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.limit-badge {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 700;
    color: white;
}
.drop-hint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 1;
}
.batch-upload-area.dragover .drop-hint {
    opacity: 1;
}
/* Batch Preview Area */
.batch-preview-area {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--border-light);
}
.batch-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}
.batch-preview-header h3 {
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.file-count {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
}
.batch-actions {
    display: flex;
    gap: 12px;
}
.batch-btn {
    padding: 12px 24px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.batch-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}
.batch-btn.danger:hover {
    border-color: var(--error);
    color: var(--error);
    background: rgba(252, 92, 101, 0.1);
}
/* Batch Preview Grid (Duplicate definition removed, kept first occurrence if styles differ slightly in hover effects) */
/* Note: The second definition of .batch-preview-card had different hover effects (translateY vs scale), so it was preserved in its specific context or merged logically if possible. 
   In this cleaned version, we ensure unique definitions remain. */

.batch-preview-card {
    position: relative;
    background: var(--surface-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border);
    transition: all var(--transition-fast);
}
/* Specific hover effect for the grid view variant */
.batch-preview-grid .batch-preview-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.batch-preview-card.removing {
    opacity: 0.5;
    transform: scale(0.9);
}
.batch-preview-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}
.batch-preview-info {
    padding: 14px;
    text-align: center;
}
.batch-preview-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.batch-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(252, 92, 101, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}
.batch-preview-card:hover .batch-remove-btn {
    opacity: 1;
}
.batch-remove-btn:hover {
    background: var(--error);
    transform: scale(1.1);
}
/* Batch Extract Button */
.batch-extract-btn {
    width: 100%;
    padding: 20px 40px;
    font-size: 18px;
}
.batch-extract-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}
/* ===========================================
   Batch Result Section
   =========================================== */
.batch-result-section {
    max-width: 1200px;
    margin: 0 auto 100px;
    animation: fadeInUp 0.6s ease 0.5s backwards;
}
.batch-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding: 0 6px;
}
.batch-result-header h3 {
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 800;
}
.batch-result-actions {
    display: flex;
    gap: 14px;
}
.batch-result-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--border-light);
    transition: all var(--transition-fast);
}
.batch-result-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.batch-result-header-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: var(--surface-light);
    border-bottom: 2px solid var(--border-light);
}
.batch-result-thumb {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    object-fit: cover;
}
.batch-result-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.batch-result-status {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}
.batch-result-status.success {
    background: rgba(38, 222, 129, 0.15);
    color: var(--success);
}
.batch-result-status.processing {
    background: rgba(254, 202, 87, 0.15);
    color: var(--accent-dark);
}
.batch-result-status.error {
    background: rgba(252, 92, 101, 0.15);
    color: var(--error);
}
.batch-result-text {
    width: 100%;
    min-height: 180px;
    max-height: 300px;
    background: var(--surface-light);
    border: none;
    padding: 20px;
    color: var(--text-primary);
    font-family: 'Inter', 'SF Mono', Consolas, monospace;
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    outline: none;
}
.batch-result-text:focus {
    background: white;
}
.batch-result-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background: var(--surface-light);
    border-top: 2px solid var(--border-light);
}
/* Already merged above */

/* ===========================================
   Result Section
   =========================================== */
.result-section {
    max-width: 1100px;
    margin: 0 auto 100px;
    animation: fadeInUp 0.6s ease 0.5s backwards;
}
.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 6px;
}
.result-header h3 {
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 800;
}
.result-actions {
    display: flex;
    gap: 14px;
}
.action-btn {
    padding: 14px 26px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
}
.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.action-btn.primary {
    background: var(--gradient-joy);
    border: none;
    color: white;
}
.action-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}
.result-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--border-light);
}
.result-text {
    width: 100%;
    min-height: 260px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    color: var(--text-primary);
    font-family: 'Inter', 'SF Mono', Consolas, monospace;
    font-size: 16px;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    transition: all var(--transition-fast);
}
.result-text:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
    color: var(--text-muted);
}
.result-placeholder svg {
    width: 100px;
    height: 100px;
    margin-bottom: 28px;
    opacity: 0.2;
}
.result-placeholder span {
    font-size: 20px;
    font-weight: 500;
}
/* ===========================================
   Features Section
   =========================================== */
.features {
    padding: 50px 0;
    background: var(--surface);
}
.section-header {
    text-align: center;
    margin-bottom: 72px;
}
.section-header h2 {
    font-size: 52px;
    font-weight: 900;
    margin-bottom: 20px;
    background: var(--gradient-joy);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-header p {
    font-size: 22px;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.feature-card {
    background: var(--background);
    border: 3px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 44px;
    text-align: center;
    transition: all var(--transition-spring);
}
.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: var(--shadow-lg);
}
.feature-icon {
    width: 88px;
    height: 88px;
    background: var(--gradient-joy);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    margin: 0 auto 28px;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-bounce);
}
.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(10deg);
}
.feature-card:nth-child(2) .feature-icon {
    background: var(--gradient-ocean);
}
.feature-card:nth-child(3) .feature-icon {
    background: var(--gradient-sunset);
}
.feature-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    font-weight: 700;
}
.feature-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 16px;
}
/* ===========================================
   Stats Section
   =========================================== */
.stats {
    padding: 100px 0;
    background: var(--gradient-joy);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    text-align: center;
}
.stat-item {
    color: white;
}
.stat-item h3 {
    font-size: 62px;
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.stat-item p {
    font-size: 18px;
    opacity: 0.95;
    font-weight: 600;
}
/* ===========================================
   Testimonials Section - Rave Reviews from Users
   =========================================== */
.testimonials {
    padding: 120px 0;
    background: #F3F7FC;
}
.testimonials .section-header h2 {
    font-size: 52px;
    font-weight: 700;
    color: #4B7CD8;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #4B7CD8;
    background-clip: unset;
}
.testimonials .section-header p {
    color: #5F6368;
    font-size: 22px;
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.testimonial-card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 38px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: none;
    transition: all var(--transition-fast);
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.testimonial-text {
    font-size: 17px;
    color: #5F6368;
    line-height: 1.85;
    margin-bottom: 24px;
}
.testimonial-stars {
    font-size: 22px;
    margin-bottom: 20px;
    letter-spacing: 4px;
    color: #E6B800;
}
.testimonial-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    background: #C4A574;
    border-radius: 8px;
    flex-shrink: 0;
}
.testimonial-name {
    font-size: 17px;
    font-weight: 600;
    color: #5F6368;
    margin-bottom: 4px;
}
.testimonial-title {
    font-size: 14px;
    color: #80868B;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}
.testimonials .author-info {
    min-width: 0;
}
.testimonials .author-info h4 {
    font-size: 17px;
    font-weight: 600;
    color: #5F6368;
    margin-bottom: 4px;
}
.testimonials .author-info p {
    font-size: 14px;
    color: #80868B;
}
/* ===========================================
   CTA Section
   =========================================== */
.cta-section {
    padding: 120px 0;
}
.cta-card {
    background: var(--gradient-joy);
    border-radius: var(--radius-xl);
    padding: 100px 60px;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: rotate 30s linear infinite;
}
@keyframes rotate {
    to { transform: rotate(360deg); }
}
.cta-card > * {
    position: relative;
    z-index: 1;
}
.cta-card h2 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 20px;
}
.cta-card p {
    font-size: 22px;
    opacity: 0.95;
    margin-bottom: 44px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}
.cta-card .btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: none;
}
.cta-card .btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
/* ===========================================
   Footer
   =========================================== */
.footer {
    padding: 140px 0 50px;
    background: var(--surface);
    border-top: 3px solid var(--border-light);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-top: 20px;
    margin-bottom: 70px;
}
.footer-brand .logo {
    margin-bottom: 20px;
}
.footer-brand p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 16px;
    max-width: 300px;
}
.footer-social {
    display: flex;
    gap: 14px;
    margin-top: 28px;
}
.social-link {
    width: 50px;
    height: 50px;
    background: var(--surface-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 20px;
    transition: all var(--transition-fast);
}
.social-link:hover {
    background: var(--gradient-joy);
    color: white;
    transform: translateY(-5px) rotate(5deg);
    box-shadow: var(--shadow-glow);
}
.footer-column h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 28px;
    font-weight: 700;
}
.footer-column ul {
    list-style: none;
}
.footer-column li {
    margin-bottom: 16px;
}
.footer-column a {
    color: var(--text-secondary);
    font-size: 16px;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.footer-column a:hover {
    color: var(--primary);
    transform: translateX(6px);
}
.footer-bottom {
    padding-top: 50px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 15px;
}
.footer-legal {
    display: flex;
    gap: 28px;
}
.footer-legal a {
    color: var(--text-muted);
    font-size: 14px;
}
.footer-legal a:hover {
    color: var(--primary);
}
/* ===========================================
   Loading Skeleton
   =========================================== */
.skeleton {
    background: linear-gradient(90deg, var(--surface-light) 25%, var(--border) 50%, var(--surface-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text {
    height: 18px;
    margin-bottom: 14px;
}
.skeleton-text:last-child {
    width: 65%;
}
/* ===========================================
   Responsive Design
   =========================================== */
@media (max-width: 1024px) {
    .tool-section {
        grid-template-columns: 1fr;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}
@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }
    .hero p {
        font-size: 16px;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 24px;
        gap: 10px;
        box-shadow: var(--shadow-lg);
    }
    .nav-menu.active {
        display: flex;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 28px;
        text-align: center;
    }
    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }
    .stat-item h3 {
        font-size: 48px;
    }
    .cta-card {
        padding: 70px 36px;
    }
    .cta-card h2 {
        font-size: 36px;
    }
    .section-header h2 {
        font-size: 40px;
    }
}
@media (max-width: 480px) {
    .container {
        padding: 0 18px;
    }
    .hero {
        padding: 30px 0 20px;
    }
    .hero h1 {
        font-size: 24px;
    }
    .hero-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    .btn-primary,
    .btn-secondary {
        padding: 14px 24px;
        font-size: 15px;
    }
    .upload-area,
    .preview-card {
        padding: 40px 24px;
    }
    .upload-icon {
        width: 100px;
        height: 100px;
        font-size: 44px;
    }
    .preview-image-container {
        height: 220px;
    }
}
/* ===========================================
   How It Works Section
   =========================================== */
.how-it-works {
    padding: 120px 0;
    background: var(--surface);
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    margin-top: 60px;
}
.step-item {
    text-align: center;
    position: relative;
}
.step-item:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 32px;
    color: var(--primary);
    opacity: 0.5;
}
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--gradient-joy);
    color: white;
    font-size: 24px;
    font-weight: 800;
    border-radius: 50%;
    margin-bottom: 24px;
}
.step-icon {
    font-size: 56px;
    margin-bottom: 20px;
}
.step-item h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
}
.step-item p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 16px;
}
/* ===========================================
   Format Cards
   =========================================== */
.format-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}
.format-card {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 32px;
}
.format-card.full-width {
    grid-column: 1 / -1;
}
.format-card h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}
.format-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.format-tag {
    padding: 10px 18px;
    background: var(--surface-light);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.format-tag:hover {
    background: var(--primary);
    color: white;
}
/* ===========================================
   FAQ Section
   =========================================== */
.faq {
    padding: 120px 0;
    background: var(--surface);
}
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 60px;
}
.faq-item {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 2px solid var(--border-light);
    transition: all var(--transition-fast);
}
.faq-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}
.faq-item h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}
.faq-item p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 15px;
}
/* ===========================================
   Compare Table
   =========================================== */
.compare {
    padding: 120px 0;
    background: var(--surface-light);
}
.compare-table {
    margin-top: 60px;
    overflow-x: auto;
}
.compare-table table {
    width: 100%;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.compare-table th,
.compare-table td {
    padding: 20px 28px;
    text-align: center;
    font-size: 16px;
}
.compare-table th {
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 18px;
}
.compare-table th:first-child {
    text-align: left;
}
.compare-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
}
.compare-table .highlight {
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
}
.compare-table tr:nth-child(even) {
    background: var(--surface-light);
}
.brand-name {
    color: white;
    font-weight: 800;
}
/* ===========================================
   SEO Content
   =========================================== */
.seo-content {
    padding: 120px 0;
    background: var(--surface);
}
.seo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}
.seo-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 28px;
    border: 2px solid var(--border-light);
    transition: all var(--transition-fast);
}
.seo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.seo-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.seo-card p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 14px;
}
/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 1024px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .step-item:not(:last-child)::after {
        display: none;
    }
    .format-cards {
        grid-template-columns: 1fr;
    }
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    .faq-grid {
        grid-template-columns: 1fr;
    }
    .seo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .seo-grid {
        grid-template-columns: 1fr;
    }
    .how-it-works,
    .testimonials,
    .faq,
    .compare,
    .seo-content {
        padding: 80px 0;
    }
}
/* ===========================================
   Knowledge Section
   =========================================== */
.knowledge {
    padding: 120px 0;
    background: var(--surface);
}
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}
.knowledge-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 2px solid var(--border-light);
    transition: all var(--transition-fast);
}
.knowledge-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.knowledge-icon {
    font-size: 40px;
    margin-bottom: 20px;
}
.knowledge-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}
.knowledge-card p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 14px;
}
/* ===========================================
   Tips Section
   =========================================== */
.tips {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-light) 100%);
}
.tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 60px;
}
.tip-item {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    display: flex;
    gap: 24px;
    border: 2px solid var(--border-light);
    transition: all var(--transition-fast);
}
.tip-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}
.tip-number {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.3;
    min-width: 60px;
}
.tip-item h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.tip-item p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 14px;
}
/* ===========================================
   Applications Section
   =========================================== */
.applications {
    padding: 120px 0;
    background: var(--surface);
}
.app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}
.app-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    border: 2px solid var(--border-light);
    transition: all var(--transition-fast);
}
.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.app-icon {
    font-size: 48px;
    margin-bottom: 20px;
}
.app-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.app-card p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 14px;
}
/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 1024px) {
    .knowledge-grid,
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .seo-keywords-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .knowledge-grid,
    .app-grid {
        grid-template-columns: 1fr;
    }
    .tips-grid {
        grid-template-columns: 1fr;
    }
    .knowledge,
    .tips,
    .applications {
        padding: 80px 0;
    }
    .seo-keywords-grid {
        grid-template-columns: 1fr;
    }
    .seo-content-block {
        padding: 30px;
    }
    .seo-content-block h3 {
        font-size: 22px;
    }
}
@media (max-width: 480px) {
    .seo-keyword-card {
        background: var(--surface-light);
        padding: 20px;
        border-radius: var(--radius-lg);
        transition: all var(--transition-fast);
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
        min-width: 0;
    }
    
    .seo-keyword-card h4 {
        font-size: 15px;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 8px;
        overflow-wrap: break-word;
        word-break: break-word;
        line-height: 1.3;
    }
    
    .seo-keyword-card p {
        font-size: 13px;
        color: var(--text-muted);
        line-height: 1.5;
        margin: 0;
        overflow-wrap: break-word;
        word-break: break-word;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}
/* Ultra small screens (<360px) - fix character-by-character wrapping */
@media (max-width: 360px) {
    .seo-keywords-grid {
        gap: 8px;
    }
    .seo-keyword-card {
        padding: 10px;
        min-width: 0;
    }
    .seo-keyword-card h4 {
        font-size: 14px;
        line-height: 1.3;
        overflow-wrap: break-word;
        word-break: break-word;
        white-space: normal;
    }
    .seo-keyword-card p {
        font-size: 12px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}
/* ===========================================
   English SEO Section
   =========================================== */
.seo-english {
    padding: 120px 0;
    background: var(--surface);
}
.seo-content-block {
    margin-top: 60px;
    background: white;
    border-radius: var(--radius-xl);
    padding: 50px;
    border: 2px solid var(--border-light);
}
.seo-content-block h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 40px 0 20px;
}
.seo-content-block h3:first-child {
    margin-top: 0;
}
.seo-content-block p {
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 16px;
    margin-bottom: 20px;
}
.seo-content-block ul {
    list-style: none;
    margin: 20px 0;
}
.seo-content-block ul li {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 15px;
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}
.seo-content-block ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}
.seo-keywords-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}
.seo-keyword-card {
    background: var(--surface-light);
    padding: 20px;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    min-width: 0;
}
.seo-keyword-card:hover {
    background: var(--primary);
    transform: translateY(-2px);
}
.seo-keyword-card:hover h4,
.seo-keyword-card:hover p {
    color: white;
}
.seo-keyword-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.seo-keyword-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}
/* ===========================================
   FAQ English
   =========================================== */
.faq-english {
    background: linear-gradient(180deg, var(--surface-light) 0%, var(--surface) 100%);
}
/* ===========================================
   Contact Modal
   =========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: white;
    padding: 40px 50px;
    border-radius: var(--radius-xl);
    text-align: center;
    max-width: 450px;
    margin: 20px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover {
    color: var(--text-primary);
}
.modal-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-primary);
}
.modal-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}
.contact-email {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.contact-email:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}
.modal-note {
    font-size: 13px !important;
    margin-top: 20px !important;
    color: var(--text-muted) !important;
}
/* Legal Modal (Privacy & Terms) */
.legal-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}
.legal-text {
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}
.legal-text h4 {
    font-size: 16px;
    color: var(--text-primary);
    margin: 20px 0 10px;
}
.legal-text h4:first-child {
    margin-top: 0;
}
.legal-text p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 12px;
}
/* Legal Sections (Privacy & Terms) - Full Page (unused now) */