        :root {
            --primary: #4F46E5;
            --primary-dark: #4338CA;
            --primary-light: #818CF8;
            --primary-50: #EEF2FF;
            --secondary: #10B981;
            --secondary-dark: #059669;
            --accent: #F59E0B;
            --accent-dark: #D97706;
            --danger: #EF4444;
            --danger-light: #FEE2E2;
            --bg: #F8FAFC;
            --bg-elevated: #FFFFFF;
            --text-main: #0F172A;
            --text-secondary: #475569;
            --text-muted: #64748B;
            --text-light: #94A3B8;
            --border: #E2E8F0;
            --border-light: #F1F5F9;
            --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
            --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.08);
            --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.08);
            --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
            --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
            --radius-sm: 0.375rem;
            --radius-md: 0.5rem;
            --radius-lg: 0.75rem;
            --radius-xl: 1rem;
            --radius-2xl: 1.25rem;
            --radius-3xl: 1.5rem;
            --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
            --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
            --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
        }

        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html {
            scroll-behavior: smooth;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        body {
            font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: var(--bg);
            color: var(--text-main);
            line-height: 1.6;
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* Skip to content for accessibility */
        .skip-link {
            position: absolute;
            top: -40px;
            left: 0;
            background: var(--primary);
            color: white;
            padding: 8px 16px;
            z-index: 10000;
            transition: top var(--transition-fast);
            border-radius: 0 0 var(--radius-md) 0;
            font-weight: 600;
            font-size: 0.875rem;
            text-decoration: none;
        }
        .skip-link:focus { top: 0; }

        /* Layout */
        .app-wrapper {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        .main-layout {
            display: flex;
            gap: 2rem;
            max-width: 1400px;
            margin: 0 auto;
            padding: 1.5rem 1rem;
            width: 100%;
        }

        .content-area {
            flex: 1;
            min-width: 0;
        }

        .sidebar {
            width: 300px;
            flex-shrink: 0;
        }

        /* Header */
        .page-header {
            text-align: center;
            margin-bottom: 2rem;
            padding: 0 1rem;
        }

        .page-header h1 {
            font-size: clamp(1.75rem, 4vw, 2.5rem);
            font-weight: 800;
            letter-spacing: -0.025em;
            line-height: 1.2;
            margin-bottom: 0.75rem;
            background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .page-header p {
            color: var(--text-secondary);
            font-size: clamp(0.95rem, 2vw, 1.1rem);
            max-width: 600px;
            margin: 0 auto;
            line-height: 1.5;
        }

        .header-badges {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 0.5rem;
            margin-top: 1rem;
        }

        .header-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            padding: 0.375rem 0.875rem;
            background: var(--primary-50);
            color: var(--primary);
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 600;
            border: 1px solid rgba(79, 70, 229, 0.15);
        }

        .header-badge i { font-size: 0.7rem; }

        /* Tool Card */
        .tool-card {
            background: var(--bg-elevated);
            border-radius: var(--radius-2xl);
            padding: 1.5rem;
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--border-light);
        }

        /* Language Chips */
        .lang-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
            justify-content: center;
        }

        .lang-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            padding: 0.5rem 0.875rem;
            background: var(--bg);
            border: 1.5px solid var(--border);
            border-radius: 9999px;
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all var(--transition-fast);
            user-select: none;
        }

        .lang-chip:hover {
            border-color: var(--primary-light);
            background: var(--primary-50);
            color: var(--primary);
            transform: translateY(-1px);
        }

        .lang-chip.active {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            border-color: var(--primary);
            color: white;
            box-shadow: var(--shadow-sm);
        }

        .lang-chip .flag {
            font-size: 0.9rem;
            line-height: 1;
        }

        /* Upload Zone */
        .upload-zone {
            position: relative;
            border: 2px dashed var(--border);
            border-radius: var(--radius-xl);
            padding: 2.5rem 1.5rem;
            text-align: center;
            cursor: pointer;
            transition: all var(--transition-base);
            background: linear-gradient(135deg, #FAFBFC, #FFFFFF);
            margin-bottom: 1.5rem;
            overflow: hidden;
        }

        .upload-zone::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(79, 70, 229, 0.03), rgba(16, 185, 129, 0.03));
            opacity: 0;
            transition: opacity var(--transition-base);
        }

        .upload-zone:hover, .upload-zone.dragover {
            border-color: var(--primary);
            background: linear-gradient(135deg, #F5F3FF, #FFFFFF);
            transform: scale(0.995);
        }

        .upload-zone:hover::before, .upload-zone.dragover::before { opacity: 1; }

        .upload-zone input[type="file"] {
            position: absolute;
            inset: 0;
            opacity: 0;
            cursor: pointer;
            z-index: 2;
        }

        .upload-icon {
            width: 56px;
            height: 56px;
            background: var(--primary-50);
            border-radius: var(--radius-lg);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            color: var(--primary);
            font-size: 1.5rem;
            transition: transform var(--transition-base);
        }

        .upload-zone:hover .upload-icon { transform: scale(1.05); }

        .upload-zone h3 {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 0.375rem;
        }

        .upload-zone .upload-sub {
            color: var(--text-muted);
            font-size: 0.875rem;
            margin-bottom: 0.5rem;
        }

        .upload-zone .upload-meta {
            font-size: 0.75rem;
            color: var(--text-light);
        }

        .upload-preview {
            position: relative;
            max-width: 100%;
            max-height: 280px;
            border-radius: var(--radius-lg);
            margin-top: 1rem;
            display: none;
            box-shadow: var(--shadow-md);
            object-fit: contain;
        }

        .upload-preview.visible { display: block; }

        .file-info-bar {
            display: none;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            margin-top: 0.75rem;
            padding: 0.5rem 1rem;
            background: var(--bg);
            border-radius: var(--radius-lg);
            font-size: 0.8rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .file-info-bar.visible { display: inline-flex; }

        .file-info-bar i { color: var(--primary); }

        .remove-file {
            position: absolute;
            top: 0.75rem;
            right: 0.75rem;
            width: 28px;
            height: 28px;
            background: rgba(239, 68, 68, 0.9);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            z-index: 10;
            transition: all var(--transition-fast);
        }

        .remove-file:hover { background: var(--danger); transform: scale(1.1); }

        /* Controls */
        .controls-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .control-field {
            display: flex;
            flex-direction: column;
            gap: 0.375rem;
        }

        .control-field label {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-main);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            display: flex;
            align-items: center;
            gap: 0.375rem;
        }

        .control-field label i {
            color: var(--primary);
            font-size: 0.8rem;
        }

        .control-field select {
            padding: 0.75rem 1rem;
            border-radius: var(--radius-lg);
            border: 1.5px solid var(--border);
            outline: none;
            font-weight: 500;
            background: white;
            cursor: pointer;
            font-size: 0.875rem;
            color: var(--text-main);
            transition: all var(--transition-fast);
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 0.75rem center;
            padding-right: 2.5rem;
        }

        .control-field select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .control-field select:hover { border-color: var(--primary-light); }

        /* Buttons */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: var(--radius-lg);
            font-size: 0.875rem;
            font-weight: 600;
            cursor: pointer;
            transition: all var(--transition-fast);
            color: white;
            text-decoration: none;
            position: relative;
            overflow: hidden;
            white-space: nowrap;
        }

        .btn::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
            opacity: 0;
            transition: opacity var(--transition-fast);
        }

        .btn:hover::after { opacity: 1; }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
        }

        .btn-primary:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
        }

        .btn-primary:active:not(:disabled) { transform: translateY(0); }

        .btn-secondary {
            background: #334155;
            padding: 0.625rem 1rem;
            font-size: 0.8rem;
        }

        .btn-secondary:hover:not(:disabled) { background: #1e293b; }

        .btn-accent {
            background: linear-gradient(135deg, var(--accent), var(--accent-dark));
            padding: 0.625rem 1rem;
            font-size: 0.8rem;
        }

        .btn-success {
            background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
            padding: 0.625rem 1rem;
            font-size: 0.8rem;
        }

        .btn-outline {
            background: transparent;
            border: 1.5px solid var(--border);
            color: var(--text-secondary);
            padding: 0.625rem 1rem;
            font-size: 0.8rem;
        }

        .btn-outline:hover:not(:disabled) {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-50);
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
            box-shadow: none;
        }

        .btn-lg { padding: 1rem 2rem; font-size: 1rem; }
        .btn-block { width: 100%; }

        /* Spinner */
        .spinner {
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255,255,255,0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 0.7s linear infinite;
            display: inline-block;
            flex-shrink: 0;
        }

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

        /* Progress */
        .progress-track {
            width: 100%;
            height: 6px;
            background: var(--border-light);
            border-radius: 9999px;
            margin-bottom: 1rem;
            overflow: hidden;
            display: none;
        }

        .progress-track.visible { display: block; }

        .progress-fill {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
            border-radius: 9999px;
            transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
        }

        .progress-fill::after {
            content: '';
            position: absolute;
            right: 0;
            top: 0;
            bottom: 0;
            width: 20px;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
            animation: shimmer 1.5s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-20px); }
            100% { transform: translateX(20px); }
        }

        .status-bar {
            display: none;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            font-size: 0.875rem;
            color: var(--primary);
            margin-bottom: 1rem;
            font-weight: 600;
            padding: 0.5rem;
            background: var(--primary-50);
            border-radius: var(--radius-lg);
        }

        .status-bar.visible { display: flex; }
        .status-bar i { font-size: 0.8rem; }

        .status-bar.error {
            background: var(--danger-light);
            color: var(--danger);
        }

        .status-bar.success {
            background: #ECFDF5;
            color: var(--secondary-dark);
        }

        /* Result Area */
        .result-panel {
            border-radius: var(--radius-xl);
            background: var(--bg);
            border: 1.5px solid var(--border);
            overflow: hidden;
            transition: border-color var(--transition-fast);
        }

        .result-panel:focus-within { border-color: var(--primary-light); }

        .result-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1rem;
            background: white;
            border-bottom: 1.5px solid var(--border);
            flex-wrap: wrap;
            gap: 0.75rem;
        }

        .toolbar-stats {
            display: flex;
            gap: 1rem;
            font-size: 0.75rem;
            color: var(--text-muted);
        }

        .toolbar-stat {
            display: flex;
            align-items: center;
            gap: 0.375rem;
        }

        .toolbar-stat i { color: var(--primary); font-size: 0.7rem; }
        .toolbar-stat-value { font-weight: 700; color: var(--text-main); }

        .toolbar-actions {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .toolbar-btn {
            background: var(--bg);
            border: 1.5px solid var(--border);
            padding: 0.375rem 0.625rem;
            border-radius: var(--radius-md);
            font-size: 0.75rem;
            cursor: pointer;
            transition: all var(--transition-fast);
            color: var(--text-secondary);
            display: inline-flex;
            align-items: center;
            gap: 0.375rem;
            font-weight: 500;
            font-family: inherit;
        }

        .toolbar-btn:hover {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        .toolbar-btn i { font-size: 0.7rem; }

        .result-textarea {
            width: 100%;
            height: 260px;
            padding: 1rem;
            border: none;
            resize: vertical;
            font-size: 0.875rem;
            line-height: 1.7;
            outline: none;
            background: var(--bg);
            font-family: 'JetBrains Mono', 'Inter', monospace;
            color: var(--text-main);
        }

        .result-textarea::placeholder { color: var(--text-light); }

        .result-footer {
            display: flex;
            justify-content: flex-end;
            flex-wrap: wrap;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            background: white;
            border-top: 1.5px solid var(--border);
        }

        /* Find & Replace */
        .find-replace-popover {
            position: absolute;
            top: 48px;
            right: 0.5rem;
            background: white;
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-xl);
            padding: 1rem;
            z-index: 50;
            min-width: 280px;
            display: none;
            border: 1.5px solid var(--border);
        }

        .find-replace-popover.active { display: block; }

        .find-replace-popover .popover-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }

        .find-replace-popover .popover-title {
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--text-main);
        }

        .find-replace-popover .close-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 1.1rem;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: var(--radius-md);
            transition: all var(--transition-fast);
        }

        .find-replace-popover .close-btn:hover {
            background: var(--bg);
            color: var(--danger);
        }

        .find-replace-input {
            width: 100%;
            padding: 0.625rem 0.75rem;
            margin-bottom: 0.5rem;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-md);
            font-size: 0.8rem;
            font-family: inherit;
            transition: all var(--transition-fast);
        }

        .find-replace-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        }

        .find-replace-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }

        .find-replace-actions button { flex: 1; }

        /* Tool Switcher */
        .tool-nav {
            display: flex;
            gap: 0.5rem;
            justify-content: center;
            flex-wrap: wrap;
            margin: 1.5rem 0;
        }

        .tool-nav-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.625rem 1.25rem;
            background: white;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-xl);
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.875rem;
            transition: all var(--transition-fast);
        }

        .tool-nav-link:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-50);
            transform: translateY(-1px);
        }

        .tool-nav-link.active {
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            border-color: var(--primary);
            color: white;
            box-shadow: var(--shadow-md);
        }

        .tool-nav-link i { font-size: 0.875rem; }

        /* FAQ */
        .faq-section {
            margin-top: 2.5rem;
            background: var(--bg-elevated);
            border-radius: var(--radius-2xl);
            padding: 1.5rem;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border-light);
        }

        .faq-section h2 {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            text-align: center;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .faq-item {
            border-bottom: 1px solid var(--border-light);
        }

        .faq-item:last-child { border-bottom: none; }

        .faq-question {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-main);
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 0;
            transition: color var(--transition-fast);
            background: none;
            border: none;
            width: 100%;
            text-align: left;
            font-family: inherit;
        }

        .faq-question:hover { color: var(--primary); }
        .faq-question i { font-size: 0.8rem; color: var(--text-muted); transition: transform var(--transition-base); }
        .faq-item.active .faq-question i { transform: rotate(180deg); color: var(--primary); }

        .faq-answer {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.35s ease, padding 0.35s ease;
            color: var(--text-secondary);
            font-size: 0.875rem;
            line-height: 1.7;
        }

        .faq-item.active .faq-answer {
            max-height: 300px;
            padding-bottom: 1rem;
        }

        .faq-answer p { margin-bottom: 0.75rem; }
        .faq-answer ul { margin-left: 1.25rem; margin-bottom: 0.75rem; }
        .faq-answer li { margin-bottom: 0.375rem; }
        .faq-answer a { color: var(--primary); text-decoration: none; font-weight: 600; }
        .faq-answer a:hover { text-decoration: underline; }

        /* SEO Content */
        .seo-article {
            margin-top: 2.5rem;
            padding: 1.5rem;
            background: var(--bg-elevated);
            border-radius: var(--radius-2xl);
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border-light);
        }

        .seo-article h2 {
            margin-top: 1.5rem;
            margin-bottom: 0.75rem;
            font-size: 1.25rem;
            color: var(--primary);
            font-weight: 700;
        }

        .seo-article h2:first-child { margin-top: 0; }
        .seo-article p { margin-bottom: 0.875rem; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; }
        .seo-article ul { margin-left: 1.25rem; margin-bottom: 0.875rem; }
        .seo-article li { margin-bottom: 0.375rem; color: var(--text-secondary); font-size: 0.9rem; }
        .seo-article strong { color: var(--text-main); }

        /* Sidebar */
        .sidebar-card {
            background: var(--bg-elevated);
            border-radius: var(--radius-2xl);
            padding: 1.25rem;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border-light);
            margin-bottom: 1.25rem;
        }

        .sidebar-card h3 {
            font-size: 1rem;
            font-weight: 700;
            margin-bottom: 1rem;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .sidebar-card h3 i { font-size: 0.875rem; }

        .sidebar-card p {
            color: var(--text-secondary);
            font-size: 0.85rem;
            margin-bottom: 0.625rem;
            line-height: 1.6;
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
        }

        .sidebar-card p i {
            color: var(--secondary);
            font-size: 0.75rem;
            margin-top: 0.25rem;
            flex-shrink: 0;
        }

        .sidebar-card ul {
            margin-left: 1rem;
            margin-top: 0.5rem;
        }

        .sidebar-card li {
            color: var(--text-secondary);
            font-size: 0.8rem;
            margin-bottom: 0.5rem;
            line-height: 1.5;
        }

        .lang-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .lang-badge {
            background: var(--bg);
            padding: 0.375rem 0.75rem;
            border-radius: 9999px;
            font-size: 0.75rem;
            color: var(--text-secondary);
            font-weight: 500;
            border: 1px solid var(--border);
            transition: all var(--transition-fast);
        }

        .lang-badge:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-50);
        }

        /* Ad Containers */
        .ad-container {
            width: 100%;
            text-align: center;
            min-height: 90px;
            margin: 1.5rem 0;
        }

        .ad-label {
            font-size: 0.65rem;
            color: var(--text-light);
            text-transform: uppercase;
            letter-spacing: 0.1em;
            margin-bottom: 0.5rem;
            display: block;
            font-weight: 600;
        }

        .ad-placeholder {
            min-height: 90px;
            background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
            border-radius: var(--radius-lg);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-light);
            font-size: 0.8rem;
            border: 1px dashed #CBD5E1;
        }

        .sidebar-ad {
            background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
            border-radius: var(--radius-xl);
            padding: 1rem;
            margin-bottom: 1.25rem;
            text-align: center;
            min-height: 250px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-light);
            font-size: 0.875rem;
            border: 1px dashed #CBD5E1;
        }

        /* Toast */
        .toast-container {
            position: fixed;
            bottom: 1.5rem;
            right: 1.5rem;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            pointer-events: none;
        }

        .toast {
            background: var(--text-main);
            color: white;
            padding: 0.75rem 1.25rem;
            border-radius: var(--radius-lg);
            font-size: 0.875rem;
            font-weight: 500;
            box-shadow: var(--shadow-xl);
            transform: translateX(120%);
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            pointer-events: auto;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            max-width: 320px;
        }

        .toast.show { transform: translateX(0); }
        .toast.error { background: var(--danger); }
        .toast.success { background: var(--secondary-dark); }
        .toast i { font-size: 0.875rem; }

        /* Stats Badge */
        .stats-row {
            display: flex;
            justify-content: space-between;
            background: linear-gradient(135deg, #F8FAFC, #FFFFFF);
            padding: 0.75rem 1rem;
            border-radius: var(--radius-lg);
            margin-bottom: 1.25rem;
            flex-wrap: wrap;
            gap: 0.75rem;
            border: 1px solid var(--border-light);
        }

        .stats-row .stat {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .stats-row .stat i { color: var(--primary); font-size: 0.75rem; }
        .stats-row .stat strong { color: var(--text-main); font-weight: 700; }

        /* Empty State */
        .empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            color: var(--text-light);
            text-align: center;
        }

        .empty-state i {
            font-size: 2rem;
            margin-bottom: 0.75rem;
            opacity: 0.5;
        }

        .empty-state p { font-size: 0.875rem; }

        /* Footer */
        .app-footer {
            margin-top: auto;
            padding: 2rem 1rem;
            text-align: center;
            border-top: 1px solid var(--border-light);
            background: white;
        }

        .app-footer p {
            color: var(--text-muted);
            font-size: 0.8rem;
        }

        /* Responsive */
        @media (max-width: 1024px) {
            .main-layout { flex-direction: column; }
            .sidebar { width: 100%; order: 2; }
            .content-area { order: 1; }
            .sidebar-card { margin-bottom: 1rem; }
        }

        @media (max-width: 768px) {
            .main-layout { padding: 1rem 0.75rem; gap: 1rem; }
            .tool-card { padding: 1rem; border-radius: var(--radius-xl); }
            .page-header { margin-bottom: 1.5rem; }
            .page-header h1 { font-size: 1.6rem; }

            .upload-zone { padding: 2rem 1rem; }
            .upload-zone h3 { font-size: 0.95rem; }
            .upload-zone .upload-sub { font-size: 0.8rem; }

            .controls-grid { grid-template-columns: 1fr; gap: 0.75rem; }

            .result-toolbar { flex-direction: column; align-items: stretch; padding: 0.625rem 0.75rem; }
            .toolbar-stats { justify-content: center; order: 1; }
            .toolbar-actions { justify-content: center; order: 2; }

            .result-textarea { height: 220px; padding: 0.75rem; }

            .result-footer { justify-content: center; padding: 0.625rem 0.75rem; }
            .result-footer .btn { flex: 1 1 calc(33% - 0.5rem); min-width: 80px; }

            .tool-nav { gap: 0.375rem; }
            .tool-nav-link { padding: 0.5rem 1rem; font-size: 0.8rem; }

            .faq-section, .seo-article { padding: 1rem; margin-top: 1.5rem; }
            .faq-section h2 { font-size: 1.25rem; }

            .stats-row { justify-content: center; gap: 0.5rem 1rem; }
            .stats-row .stat { font-size: 0.75rem; }

            .lang-chips { gap: 0.375rem; }
            .lang-chip { padding: 0.375rem 0.625rem; font-size: 0.75rem; }

            .find-replace-popover {
                position: fixed;
                top: auto;
                bottom: 1rem;
                left: 1rem;
                right: 1rem;
                min-width: auto;
            }

            .toast-container { left: 1rem; right: 1rem; bottom: 1rem; }
            .toast { max-width: 100%; }
        }

        @media (max-width: 480px) {
            .page-header h1 { font-size: 1.4rem; }
            .page-header p { font-size: 0.85rem; }

            .upload-zone { padding: 1.5rem 1rem; }
            .upload-icon { width: 48px; height: 48px; font-size: 1.25rem; }

            .btn { padding: 0.625rem 1rem; font-size: 0.8rem; }
            .btn-lg { padding: 0.875rem 1.5rem; font-size: 0.9rem; }

            .result-footer .btn { flex: 1 1 calc(50% - 0.25rem); }

            .toolbar-btn { padding: 0.375rem 0.5rem; font-size: 0.7rem; }

            .header-badge { padding: 0.25rem 0.625rem; font-size: 0.7rem; }

            .sidebar-card { padding: 1rem; }
            .sidebar-card h3 { font-size: 0.9rem; }
            .sidebar-card p { font-size: 0.8rem; }

            .faq-question { font-size: 0.875rem; padding: 0.875rem 0; }
            .faq-answer { font-size: 0.8rem; }

            .seo-article h2 { font-size: 1.1rem; }
            .seo-article p, .seo-article li { font-size: 0.85rem; }
        }

        /* Print styles */
        @media print {
            .ad-container, .sidebar-ad, .tool-nav, .app-footer, .toast-container { display: none !important; }
            .main-layout { flex-direction: column; }
            .sidebar { width: 100%; }
            .tool-card { box-shadow: none; border: 1px solid #ddd; }
        }

        /* Reduced motion */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
        }

        /* Focus visible for accessibility */
        :focus-visible {
            outline: 2px solid var(--primary);
            outline-offset: 2px;
        }

        button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
            outline: 2px solid var(--primary);
            outline-offset: 2px;
        }