        :root {
            --primary: #2563eb;
            --secondary: #f3f4f6;
            --dark: #1e293b;
            --light: #ffffff;
        }
        
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: 'Segoe UI', system-ui, sans-serif;
            line-height: 1.6;
            color: var(--dark);
            background-color: #f8fafc;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 0;
            border-bottom: 1px solid #e2e8f0;
            margin-bottom: 30px;
        }
        
        h1 {
            color: var(--primary);
            font-size: 1.8rem;
        }
        
        .stacked-container {
            display: flex;
            flex-direction: column;
            gap: 25px;
        }
        
        .stacked-panel {
            width: 100%;
        }
        
        .panel {
            background: var(--light);
            border-radius: 12px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            padding: 25px;
            margin-bottom: 20px;
        }
        
        .panel-title {
            font-size: 1.4rem;
            margin-bottom: 20px;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .form-group {
            margin-bottom: 20px;
        }

        .password-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .password-wrapper input {
            padding-right: 40px;
        }

        .toggle-password {
            position: absolute;
            right: 1px;
            top: 1px;
            bottom: 1px;
            border: none;
            background: var(--light);
            padding: 0 12px;
            cursor: pointer;
            border-radius: 0 8px 8px 0;
            color: #64748b;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .file-upload-wrapper {
            display: flex;
            align-items: center;
            gap: 15px;
            border: 2px dashed #cbd5e1;
            border-radius: 8px;
            padding: 20px;
            transition: border-color 0.2s;
        }

        .file-upload-wrapper.dragging {
            border-color: var(--primary);
        }
        
        /* Drag-over styles for DOCX drop zone */
        #docxDropZone.dragover {
            border-color: var(--primary);
            background-color: rgba(37, 99, 235, 0.1);
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
        }
        
        /* Dark mode support */
        @media (prefers-color-scheme: dark) {
            #docxDropZone.dragover {
                background-color: rgba(37, 99, 235, 0.2);
                box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4);
            }
        }

        .file-upload-label {
            display: inline-block;
            padding: 12px 20px;
            background: var(--primary);
            color: white;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 500;
            transition: background 0.2s;
        }

        .file-upload-label:hover {
            background: #1d4ed8;
        }

        .hidden-file-input {
            display: none;
        }

        .file-name-display {
            color: #475569;
            font-style: italic;
        }
        
        .checkbox-wrapper {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 15px;
        }

        .checkbox-wrapper input {
            width: auto;
        }

        input, select, textarea {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            font-size: 1rem;
            background: var(--light);
        }
        
        textarea {
            min-height: 150px;
            resize: vertical;
            font-family: inherit;
        }
        
        button {
            background: var(--primary);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 500;
            transition: background 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        
        button:hover {
            background: #1d4ed8;
        }
        
        button:disabled {
            background: #94a3b8;
            cursor: not-allowed;
        }

        .btn-group {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }
        
        .btn-group {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin: 15px 0;
        }
        
        .btn-group.right-aligned {
            justify-content: flex-end;
        }
        
        .btn-secondary {
            background: #64748b;
        }
        
        .btn-secondary:hover {
            background: #475569;
        }
        
        .action-result {
            margin-top: 20px;
            padding: 15px;
            background: var(--secondary);
            border-radius: 8px;
            min-height: 100px;
        }
        
        .status {
            padding: 10px;
            border-radius: 6px;
            margin: 10px 0;
            display: none;
        }
        
        .status.success {
            background: #dcfce7;
            color: #166534;
            display: block;
        }
        
        .status.error {
            background: #fee2e2;
            color: #b91c1c;
            display: block;
        }
        
        .status.processing {
            background: #dbeafe;
            color: #1e40af;
            display: block;
        }
        
        .hidden {
            display: none;
        }
        
        /* Test Mode Indicator */
        .test-mode-indicator {
            background-color: #dc2626;
            color: white;
            padding: 8px 16px;
            border-radius: 6px;
            font-weight: 600;
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0%, 100% {
                opacity: 1;
                box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
            }
            50% {
                opacity: 0.8;
                box-shadow: 0 2px 8px rgba(220, 38, 38, 0.5);
            }
        }
        
        .test-mode-indicator.hidden {
            display: none;
        }
        

        
        footer {
            text-align: center;
            margin-top: 40px;
            padding: 20px;
            color: #64748b;
            font-size: 0.9rem;
        }
        .markdown-viewer {
            min-height: 150px;
            padding: 12px 15px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background: var(--light);
            overflow: auto;
        }
        
        .markdown-viewer h1, .markdown-viewer h2, .markdown-viewer h3, .markdown-viewer h4, .markdown-viewer h5, .markdown-viewer h6 {
            margin-top: 1em;
            margin-bottom: 0.5em;
            font-weight: bold;
        }
        
        .markdown-viewer h1 { font-size: 1.5em; }
        .markdown-viewer h2 { font-size: 1.4em; }
        .markdown-viewer h3 { font-size: 1.3em; }
        .markdown-viewer h4 { font-size: 1.2em; }
        .markdown-viewer h5 { font-size: 1.1em; }
        .markdown-viewer h6 { font-size: 1em; }
        
        .markdown-viewer p {
            margin-bottom: 1em;
        }
        
        .markdown-viewer ul, .markdown-viewer ol {
            margin-left: 20px;
            margin-bottom: 1em;
        }
        
        .markdown-viewer li {
            margin-bottom: 0.5em;
        }
        
        .markdown-viewer strong {
            font-weight: bold;
        }
        
        .markdown-viewer em {
            font-style: italic;
        }
        
        .markdown-viewer .placeholder {
            color: #999;
            font-style: italic;
        }
        
        .hidden {
            display: none;
        }
nav {
            display: flex;
            gap: 20px;
        }
        
        nav a {
            text-decoration: none;
            color: var(--dark);
            font-weight: 500;
            padding: 8px 12px;
            border-radius: 6px;
            transition: background 0.2s;
        }
        
        nav a:hover {
            background: var(--secondary);
        }
        
        nav a.active {
            background: var(--primary);
            color: white;
        }
        
        .about-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
        }
        
        .about-section {
            background: var(--light);
            border-radius: 12px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            padding: 30px;
            margin-bottom: 30px;
        }
        
        .about-title {
            font-size: 1.5rem;
            margin-bottom: 20px;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .feature-list {
            list-style-type: none;
            margin: 20px 0;
        }
        
        .feature-list li {
            padding: 12px 0;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .feature-list li:last-child {
            border-bottom: none;
        }
        
        .icon {
            font-size: 1.2rem;
            color: var(--primary);
        }
        
        .tech-stack {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin: 20px 0;
        }
        
        .tech-item {
            background: var(--secondary);
            padding: 10px 15px;
            border-radius: 20px;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .privacy-policy {
            font-size: 0.9rem;
            line-height: 1.7;
        }
        
        .privacy-policy h3 {
            margin: 15px 0 10px;
            color: var(--primary);
        }
        
        footer {
            text-align: center;
            margin-top: 40px;
            padding: 20px;
            color: #64748b;
            font-size: 0.9rem;
            border-top: 1px solid #e2e8f0;
        }
        
        .version {
            background: var(--secondary);
            padding: 4px 10px;
            border-radius: 10px;
            font-size: 0.8rem;
            display: inline-block;
            margin-left: 10px;
        }

        .back-button {
            background: #64748b;
            margin-bottom: 20px;
        }
        
        .back-button:hover {
            background: #475569;
        }

        /* Screen reader only content */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* Focus indicators for better accessibility */
        button:focus,
        input:focus,
        select:focus,
        textarea:focus,
        .file-upload-wrapper:focus {
            outline: 2px solid var(--primary);
            outline-offset: 2px;
        }

        /* High contrast mode support */
        @media (prefers-contrast: high) {
            :root {
                --primary: #000080;
                --secondary: #f0f0f0;
                --dark: #000000;
                --light: #ffffff;
            }
        }

        /* Reduced motion support */
        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }
        /* Form validation styles */
        .form-group.error input,
        .form-group.error textarea,
        .form-group.error select {
            border-color: #ef4444;
            background-color: #fef2f2;
        }

        .error-message {
            color: #ef4444;
            font-size: 0.875rem;
            margin-top: 0.25rem;
            display: flex;
            align-items: center;
        }

        .error-message::before {
            content: "⚠️";
            margin-right: 0.25rem;
        }

        /* Help text styles */
        .help-text {
            color: #6b7280;
            font-size: 0.875rem;
            margin-top: 0.25rem;
            line-height: 1.4;
        }

        /* Required field indicator */
        .required {
            color: #ef4444;
            font-weight: bold;
        }

        /* Fieldset styles */
        fieldset {
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            background: #fafafa;
        }

        fieldset legend {
            font-weight: 600;
            color: var(--dark);
            padding: 0 0.5rem;
            font-size: 1.1rem;
        }

        /* Form actions */
        .form-actions {
            margin-top: 2rem;
            padding-top: 1rem;
            border-top: 1px solid #e5e7eb;
        }

        .primary-button {
            background: var(--primary);
            color: white;
            border: none;
            padding: 0.75rem 2rem;
            border-radius: 6px;
            font-size: 1rem;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .primary-button:hover {
            background: #1d4ed8;
        }

        .primary-button:disabled {
            background: #9ca3af;
            cursor: not-allowed;
        }

        /* Enhanced password wrapper */
        .password-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .password-wrapper input {
            flex: 1;
            padding-right: 3rem;
        }

        .toggle-password {
            position: absolute;
            right: 0.5rem;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0.25rem;
            border-radius: 4px;
            font-size: 1.2rem;
            transition: background-color 0.2s;
        }

        .toggle-password:hover {
            background: #f3f4f6;
        }

        .toggle-password:focus {
            outline: 2px solid var(--primary);
            outline-offset: 2px;
        }

        /* Dark mode support for new elements */
        @media (prefers-color-scheme: dark) {
            fieldset {
                border-color: #374151;
                background: #1f2937;
            }

            fieldset legend {
                color: #f9fafb;
            }

            .help-text {
                color: #9ca3af;
            }

            .form-group.error input,
            .form-group.error textarea,
            .form-group.error select {
                background-color: #7f1d1d;
                border-color: #dc2626;
            }

            .toggle-password:hover {
                background: #374151;
            }

            .form-actions {
                border-top-color: #374151;
            }
        }
        /* About page specific styles */
        .version-badge {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: white;
            padding: 0.25rem 0.75rem;
            border-radius: 1rem;
            font-size: 0.75rem;
            font-weight: 600;
            margin-left: 0.5rem;
            display: inline-block;
        }

        .content-section {
            margin-bottom: 1.5rem;
        }

        .content-section p {
            margin-bottom: 1rem;
            line-height: 1.7;
        }

        .feature-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1.5rem;
            margin-top: 1.5rem;
        }

        .feature-card {
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            padding: 1.5rem;
            border-radius: 12px;
            border: 1px solid var(--secondary);
            transition: all 0.3s ease;
            text-align: center;
        }

        .feature-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
            border-color: var(--primary);
        }

        .feature-icon {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            display: block;
        }

        .feature-title {
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 0.75rem;
            font-size: 1.1rem;
        }

        .feature-description {
            color: var(--text);
            font-size: 0.9rem;
            line-height: 1.5;
        }

        .tech-stack {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin: 1.5rem 0;
        }

        .tech-badge {
            background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.875rem;
            font-weight: 500;
            white-space: nowrap;
        }

        .info-box {
            padding: 1.5rem;
            border-radius: 12px;
            margin: 1rem 0;
            border-left: 4px solid;
        }

        .info-box.success {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            border-left-color: #2563eb;
        }

        .info-box.warning {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            border-left-color: #d97706;
        }

        .info-box h4 {
            margin-bottom: 0.75rem;
            color: var(--dark);
            font-weight: 600;
        }

        .info-box ul {
            margin-left: 1.25rem;
            margin-top: 0.5rem;
        }

        .info-box li {
            margin-bottom: 0.5rem;
            line-height: 1.5;
        }

        .privacy-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.5rem;
            margin-top: 1.5rem;
        }

        .privacy-item {
            background: var(--light);
            padding: 1.5rem;
            border-radius: 8px;
            border-left: 3px solid var(--primary);
            transition: transform 0.2s ease;
        }

        .privacy-item:hover {
            transform: translateX(5px);
        }

        .privacy-item h3 {
            color: var(--primary);
            margin-bottom: 0.75rem;
            font-size: 1.1rem;
        }

        .privacy-item p {
            color: var(--text);
            line-height: 1.6;
        }

        .privacy-item a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 500;
        }

        .privacy-item a:hover {
            text-decoration: underline;
        }

        .contact-info {
            background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
            color: white;
            padding: 2rem;
            border-radius: 12px;
            text-align: center;
        }

        .contact-info p {
            margin-bottom: 1rem;
        }

        .contact-link {
            color: white;
            text-decoration: none;
            font-weight: 600;
            padding: 0.75rem 1.5rem;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 25px;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            margin: 1rem 0;
            transition: background 0.3s ease;
        }

        .contact-link:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .contact-note {
            font-size: 0.9rem;
            opacity: 0.9;
            margin-top: 1rem;
        }

        /* Dark mode support for about page elements */
        @media (prefers-color-scheme: dark) {
            .feature-card {
                background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
                border-color: #374151;
            }

            .feature-card:hover {
                border-color: var(--primary);
                box-shadow: 0 8px 25px rgba(37, 99, 235, 0.25);
            }

            .feature-title {
                color: #60a5fa;
            }

            .feature-description {
                color: #d1d5db;
            }

            .info-box.success {
                background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
                border-left-color: #10b981;
            }

            .info-box.warning {
                background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
                border-left-color: #f59e0b;
            }

            .info-box h4 {
                color: #f9fafb;
            }

            .privacy-item {
                background: #1f2937;
                border-left-color: #60a5fa;
            }

            .privacy-item h3 {
                color: #60a5fa;
            }

            .privacy-item p {
                color: #d1d5db;
            }

            .privacy-item a {
                color: #60a5fa;
            }
        }

        /* Mobile responsiveness for about page */
        @media (max-width: 768px) {
            .feature-grid {
                grid-template-columns: 1fr;
                gap: 1rem;
            }

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

            .tech-stack {
                gap: 0.5rem;
            }

            .tech-badge {
                font-size: 0.8rem;
                padding: 0.4rem 0.8rem;
            }

            .version-badge {
                display: block;
                margin-left: 0;
                margin-top: 0.5rem;
                width: fit-content;
            }

            .contact-info {
                padding: 1.5rem;
            }

            /* Two-column layout for controls */
            .two-column-layout {
                display: flex;
                flex-wrap: wrap;
                gap: 20px;
                margin-bottom: 20px;
            }
            
            .control-panel {
                flex: 1;
                min-width: 300px;
                background: #f8fafc;
                border-radius: 8px;
                padding: 15px;
                border: 1px solid #e2e8f0;
            }
            
            @media (max-width: 768px) {
                .two-column-layout {
                    flex-direction: column;
                }
                .control-panel {
                    min-width: 100%;
                }
            }

            .contact-link {
                padding: 0.6rem 1.2rem;
                font-size: 0.9rem;
            }
        }
        /* Two-column layout for controls */
        .two-column-layout {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            margin-bottom: 20px;
        }
        
        .control-panel {
            flex: 1;
            min-width: 300px;
            background: #f8fafc;
            border-radius: 8px;
            padding: 15px;
            border: 1px solid #e2e8f0;
        }
        
        @media (max-width: 768px) {
            .two-column-layout {
                flex-direction: column;
            }
            .control-panel {
                min-width: 100%;
            }
        }