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

/* Performance optimizations */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

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

/* Remove all animations */
* {
    transition-duration: 0s !important;
    animation-duration: 0s !important;
    animation: none !important;
}

/* GPU acceleration for better performance */
.tool-card,
.btn-primary,
header,
.modal-content {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #1a202c;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
    contain: layout style paint;
    will-change: auto;
}

header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.08);
    overflow: visible;
    contain: layout style;
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: visible;
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 16px;
    }

    .logo-img {
        height: 36px;
    }

    .header-actions {
        gap: 8px;
    }

    .toggle-container {
        gap: 2px;
    }

    .toggle-label {
        font-size: 9px;
    }

    .dark-mode-toggle {
        width: 60px;
        height: 32px;
    }

    .toggle-slider {
        width: 26px;
        height: 26px;
    }

    .toggle-icon {
        font-size: 14px;
    }

    .toggle-icon.sun {
        left: 6px;
    }

    .toggle-icon.moon {
        right: 6px;
    }
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 0;
}

.toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.toggle-label {
    font-size: 10px;
    color: #6e6e6e;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.dark-mode-toggle:hover + .toggle-label,
.toggle-container:hover .toggle-label {
    color: #667eea;
}

/* Mobile styles for header actions */


#offlineIndicator {
    background: #10b981;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.logo-img {
    height: 45px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3)) brightness(1.1);
}

.logo:hover .logo-img {
    filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.4)) brightness(1.2);
    transform: translateY(-2px) scale(1.05);
}

.dark-mode-toggle {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e1e8ed;
    width: 70px;
    height: 36px;
    border-radius: 18px;
    cursor: pointer;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.dark-mode-toggle:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.toggle-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.toggle-icon.sun {
    left: 8px;
    opacity: 1;
}

.toggle-icon.moon {
    right: 8px;
    opacity: 0.3;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Dark mode styles */
body.dark-mode .dark-mode-toggle {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-color: #4a5568;
}

body.dark-mode .dark-mode-toggle:hover {
    border-color: #667eea;
}

body.dark-mode .toggle-icon.sun {
    opacity: 0.3;
}

body.dark-mode .toggle-icon.moon {
    opacity: 1;
}

body.dark-mode .toggle-slider {
    transform: translateX(34px);
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 32px 60px;
}

.hero {
    text-align: center;
    margin-bottom: 100px;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9) rotateX(20deg);
    }
    60% {
        opacity: 1;
        transform: translateY(-5px) scale(1.02) rotateX(-5deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

.hero h1 {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a202c;
    letter-spacing: -1.2px;
    line-height: 1.05;
}

.hero p {
    font-size: 20px;
    color: #4a5568;
    font-weight: 400;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 28px;
        letter-spacing: -0.7px;
        margin-bottom: 16px;
    }

    .hero p {
        font-size: 16px;
        line-height: 1.5;
        max-width: 90%;
    }
}

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

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .tool-card {
        padding: 20px 16px;
        border-radius: 16px;
        min-height: 160px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .tool-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .tool-icon svg {
        width: 32px;
        height: 32px;
    }

    .tool-card h3 {
        font-size: 18px;
        margin-bottom: 6px;
        line-height: 1.2;
        flex-shrink: 0;
    }

    .tool-card p {
        font-size: 14px;
        line-height: 1.4;
        margin: 0;
        flex-shrink: 0;
    }
}

.tool-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.8s ease;
    animation-fill-mode: both;
    position: relative;
    overflow: hidden;
    contain: layout style paint;
}



.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.01) 100%);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}


@keyframes professionalHover {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    100% {
        transform: translateY(-2px) scale(1.005);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    }
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }
.tool-card:nth-child(7) { animation-delay: 0.7s; }
.tool-card:nth-child(8) { animation-delay: 0.8s; }
.tool-card:nth-child(9) { animation-delay: 0.9s; }

.tool-card:hover {
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
}

.tool-card:hover::before {
    opacity: 1;
}


.tool-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.2s ease;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
}

.tool-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(102, 126, 234, 0.08) 0%,
        rgba(118, 75, 162, 0.08) 100%);
    border-radius: 20px;
    transition: all 0.3s ease;
    z-index: -1;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.tool-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle,
        rgba(102, 126, 234, 0.06) 0%,
        transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -2;
}

.tool-icon svg {
    width: 48px;
    height: 48px;
    stroke: #862a35;
    stroke-width: 2;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}



.tool-card:hover .tool-icon::before {
    background: linear-gradient(135deg,
        rgba(102, 126, 234, 0.15) 0%,
        rgba(118, 75, 162, 0.15) 100%);
    transform: scale(1.05);
}

.tool-card:hover .tool-icon::after {
    opacity: 1;
}


.tool-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #1a202c;
    font-weight: 600;
    transition: all 0.25s ease;
    letter-spacing: -0.4px;
}

.tool-card:hover h3 {
    color: #2d3748;
}


.tool-card p {
    color: #4a5568;
    font-size: 15px;
    line-height: 1.6;
    transition: all 0.25s ease;
    font-weight: 400;
    margin: 0;
}

.tool-card:hover p {
    color: #2d3748;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 20px;
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 48px;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .modal-content {
        max-height: 85vh;
        padding: 24px 20px 80px 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    color: #6e6e6e;
    line-height: 1;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #e1e1e1;
    transform: rotate(90deg);
}

.tool-section {
    display: none;
}

.tool-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tool-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #2c2c2c;
    font-weight: 700;
}

.dropzone {
    border: 2px dashed #cbd5e0;
    border-radius: 16px;
    padding: 60px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 30px;
    background: #f7fafc;
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
}

@media (max-width: 768px) {
    .dropzone {
        padding: 40px 20px;
        min-height: 120px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #667eea rgba(255, 255, 255, 0.3);
    }
    
    .dropzone::-webkit-scrollbar {
        height: 8px;
    }
    
    .dropzone::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 10px;
    }
    
    .dropzone::-webkit-scrollbar-thumb {
        background: #667eea;
        border-radius: 10px;
    }
    
    .dropzone::-webkit-scrollbar-thumb:hover {
        background: #764ba2;
    }
}

.dropzone:hover {
    border-color: #667eea;
    background: #f0f7ff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.dropzone.drag-over {
    border-color: #667eea;
    background: #e6f7ff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2), 0 8px 32px rgba(102, 126, 234, 0.15);
}

body.dark-mode .dropzone.drag-over {
    border-color: #667eea;
    background: linear-gradient(135deg, #4a4a6e 0%, #3a3a5e 100%);
}

.dropzone p {
    color: #6e6e6e;
    font-size: 18px;
    font-weight: 500;
}

.file-list {
    margin-bottom: 30px;
    max-height: 200px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .file-list {
        max-height: 150px;
    }
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s;
    animation: slideIn 0.3s ease;
    cursor: move;
}

.file-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.file-item.drag-over {
    border: 2px dashed #667eea;
    background: linear-gradient(135deg, #e8f4ff 0%, #d6ebff 100%);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.file-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 500;
}

.file-item button {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.file-item button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(238, 90, 111, 0.4);
}

.btn-primary {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3), 0 2px 8px rgba(102, 126, 234, 0.2);
    letter-spacing: 0.025em;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .btn-primary {
        position: sticky;
        bottom: 0;
        z-index: 10;
        margin-bottom: 0;
        border-radius: 16px;
        padding: 20px 24px;
    }
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4), 0 3px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #6e6e6e, #5a5a5a);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.input-field {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    font-family: inherit;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 2px 8px rgba(102, 126, 234, 0.08);
    transform: translateY(-1px);
}

#signCanvas {
    width: 100%;
    height: 200px;
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    background: #fff;
    cursor: crosshair;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    max-width: 100%;
}

@media (max-width: 768px) {
    #signCanvas {
        height: 250px;
        width: 100% !important;
    }
}

#signCanvas:hover {
    border-color: #667eea;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150px);
    padding: 16px 24px;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    text-align: center;
}

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

.toast.success {
    background: linear-gradient(135deg, #2d9d78, #26a69a);
}

.toast.error {
    background: linear-gradient(135deg, #eb1000, #c41e3a);
}

.loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loader.show {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    position: relative;
}

.spinner::before,
.spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.spinner::before {
    width: 60px;
    height: 60px;
    border: 4px solid transparent;
    border-top-color: #667eea;
    border-right-color: #667eea;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner::after {
    width: 40px;
    height: 40px;
    top: 10px;
    left: 10px;
    border: 4px solid transparent;
    border-bottom-color: #764ba2;
    border-left-color: #764ba2;
    animation: spin 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite reverse;
}

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

footer {
    background: #ffffff;
    margin-top: 80px;
    padding: 60px 0 20px;
    border-top: 1px solid #e2e8f0;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 48px;
    margin-bottom: 40px;
}

.feedback-section, .support-section {
    text-align: center;
}

.feedback-section h3, .support-section h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #2c2c2c;
}

.feedback-section p, .support-section p {
    color: #6e6e6e;
    margin-bottom: 20px;
}

.btn-feedback {
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3), 0 2px 8px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-feedback::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-feedback:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5), 0 6px 15px rgba(102, 126, 234, 0.3);
}

.btn-feedback:hover::before {
    left: 100%;
}

.btn-feedback:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.support-email {
    display: inline-block;
    padding: 12px 24px;
    background: #f8f9fa;
    color: #667eea;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
}

.support-email:hover {
    background: #667eea;
    color: #fff;
    transform: scale(1.05);
}

.footer-content-secondary {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 48px;
    margin-bottom: 20px;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: #6e6e6e;
}

.textarea-field {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 20px;
    transition: all 0.3s;
    background: #f8f9fa;
    font-family: inherit;
    resize: vertical;
}

.textarea-field:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.tool-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e1e8e1;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    min-height: 44px;
}

@media (max-width: 768px) {
    .tool-btn {
        padding: 12px 20px;
        font-size: 16px;
        min-height: 48px;
        margin: 4px;
    }
}

.tool-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.tool-btn.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

#boldBtn {
    font-weight: bold;
    width: 40px;
}

.tooltip-popup {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 10000;
    pointer-events: none;
    white-space: nowrap;
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-text {
    text-align: center;
    font-size: 16px;
    color: #667eea;
    font-weight: 600;
    animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.progress-bar {
    width: 80%;
    max-width: 400px;
    height: 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    overflow: hidden;
    margin: 20px auto 10px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    position: relative;
    animation: shimmer 2s infinite;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: slide 1.5s infinite;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, rgba(255,255,255,0.8), transparent);
    border-radius: 50%;
    transform: translate(50%, -50%);
    animation: pulse 1s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: translate(50%, -50%) scale(1); }
    50% { opacity: 0.5; transform: translate(50%, -50%) scale(1.5); }
}

.success-animation {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.checkmark {
    display: inline-block;
    animation: checkmarkPop 0.5s ease;
}

@keyframes checkmarkPop {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(-45deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.comparison-slider {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.comparison-slider img {
    display: block;
    width: 100%;
}

.comparison-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.comparison-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #667eea;
    cursor: ew-resize;
    transform: translateX(-50%);
}

.comparison-handle::before {
    content: '⟷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #667eea;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.comparison-label {
    position: absolute;
    top: 10px;
    padding: 5px 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

.comparison-label.before {
    left: 10px;
}

.comparison-label.after {
    right: 10px;
}

/* Dark Mode Styles */
body.dark-mode {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: #e2e8f0;
}

body.dark-mode header {
    background: rgba(30, 30, 30, 0.95);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}


body.dark-mode .logo-img {
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.4)) brightness(1.3) contrast(1.1);
}

body.dark-mode .logo:hover .logo-img {
    filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.6)) brightness(1.4) contrast(1.2);
    transform: translateY(-3px) scale(1.08);
}

body.dark-mode .hero h1 {
    color: #fff;
}

body.dark-mode .hero p {
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .tool-card {
    background: rgba(40, 40, 60, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

body.dark-mode .tool-card h3 {
    color: #fff;
}

body.dark-mode .tool-card:hover h3 {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .tool-card p {
    color: #b0b0b0;
}

body.dark-mode .tool-card:hover p {
    color: #e0e0e0;
}

body.dark-mode .tool-card {
    background: linear-gradient(135deg,
        rgba(45, 55, 72, 0.95) 0%,
        rgba(26, 32, 44, 0.98) 100%);
    border-color: rgba(139, 156, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 4px 16px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark-mode .tool-icon::before {
    background: linear-gradient(135deg, 
        rgba(139, 156, 255, 0.2) 0%, 
        rgba(167, 139, 250, 0.2) 50%,
        rgba(236, 72, 153, 0.2) 100%);
    border-color: rgba(139, 156, 255, 0.3);
}

body.dark-mode .tool-icon::after {
    background: radial-gradient(circle, 
        rgba(139, 156, 255, 0.5) 0%, 
        rgba(167, 139, 250, 0.4) 50%,
        transparent 70%);
}

body.dark-mode .tool-icon svg {
    filter: drop-shadow(0 4px 12px rgba(139, 156, 255, 0.4));
}

body.dark-mode .tool-card:hover .tool-icon::before {
    background: linear-gradient(135deg,
        rgba(107, 114, 128, 0.95) 0%,
        rgba(75, 85, 99, 0.95) 50%,
        rgba(55, 65, 81, 0.95) 100%);
    box-shadow: 0 15px 40px rgba(107, 114, 128, 0.6),
                0 0 60px rgba(75, 85, 99, 0.4),
                inset 0 0 20px rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .tool-card:hover .tool-icon svg {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.9))
            drop-shadow(0 0 40px rgba(139, 156, 255, 0.7));
}

body.dark-mode .tool-card::before {
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(139, 156, 255, 0.2) 50%, 
        transparent 70%);
}

body.dark-mode .tool-card::after {
    background: radial-gradient(circle at 50% 0%, 
        rgba(139, 156, 255, 0.15) 0%,
        transparent 70%);
}

body.dark-mode .tool-card:hover {
    background: linear-gradient(135deg,
        rgba(45, 55, 72, 0.98) 0%,
        rgba(139, 156, 255, 0.08) 100%);
    box-shadow: 0 16px 48px rgba(139, 156, 255, 0.25),
                0 8px 24px rgba(167, 139, 250, 0.2),
                0 0 0 2px rgba(139, 156, 255, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(139, 156, 255, 0.5);
}

body.dark-mode .modal-content {
    background: #2a2a3e;
    color: #e0e0e0;
}

body.dark-mode .tool-section h2 {
    color: #fff;
}

body.dark-mode .dropzone {
    background: linear-gradient(135deg, #3a3a4e 0%, #2a2a3e 100%);
    border-color: #555;
}

body.dark-mode .dropzone:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #4a4a5e 0%, #3a3a5e 100%);
}

body.dark-mode .dropzone p {
    color: #b0b0b0;
}

body.dark-mode .file-item {
    background: linear-gradient(135deg, #3a3a4e 0%, #2a2a3e 100%);
    color: #e0e0e0;
}

body.dark-mode .input-field,
body.dark-mode .textarea-field {
    background: #3a3a4e;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .input-field:focus,
body.dark-mode .textarea-field:focus {
    background: #4a4a5e;
    border-color: #667eea;
}

body.dark-mode .tool-btn {
    background: #3a3a4e;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .tool-btn:hover,
body.dark-mode .tool-btn.active {
    background: #667eea;
    color: #fff;
}

body.dark-mode .edit-toolbar {
    background: #3a3a4e;
}

body.dark-mode footer {
    background: rgba(30, 30, 30, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .feedback-section h3,
body.dark-mode .support-section h3 {
    color: #fff;
}

body.dark-mode .feedback-section p,
body.dark-mode .support-section p {
    color: #b0b0b0;
}

body.dark-mode .support-email {
    background: #3a3a4e;
    color: #667eea;
}

body.dark-mode .footer-bottom {
    color: #b0b0b0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .btn-feedback {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: #fff;
    border: 1px solid rgba(139, 156, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

body.dark-mode .btn-feedback::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 156, 255, 0.2), transparent);
    transition: left 0.5s;
}

body.dark-mode .btn-feedback:hover {
    border-color: rgba(139, 156, 255, 0.5);
    box-shadow: 0 12px 30px rgba(139, 156, 255, 0.3), 0 6px 15px rgba(139, 156, 255, 0.2);
    transform: translateY(-4px);
}

body.dark-mode .btn-feedback:hover::before {
    left: 100%;
}

body.dark-mode .btn-feedback:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 156, 255, 0.3);
}

body.dark-mode .modal-close {
    background: #3a3a4e;
    color: #b0b0b0;
}

body.dark-mode .dark-mode-toggle:hover {
    border-color: #ffd700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

body.dark-mode .modal-close:hover {
    background: #4a4a5e;
}

body.dark-mode .progress-bar {
    background: rgba(102, 126, 234, 0.2);
}

body.dark-mode .progress-fill {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.7);
}

body.dark-mode .loader {
    background: rgba(30, 30, 30, 0.95);
}

body.dark-mode .progress-text {
    color: #8b9cff;
}

body.dark-mode #signCanvas,
body.dark-mode #editCanvas,
body.dark-mode #signPreview {
    background: #fff;
}

body.dark-mode .spinner::before {
    border-top-color: #8b9cff;
    border-right-color: #8b9cff;
}

body.dark-mode .spinner::after {
    border-bottom-color: #a78bfa;
    border-left-color: #a78bfa;
}

.edit-toolbar {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
}

#cameraPreview {
    border: 2px solid #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

#capturedImages {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    #cameraPreview {
        width: 100%;
        height: auto;
    }
    
    #capturedImages {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #667eea rgba(255, 255, 255, 0.3);
        padding-bottom: 10px;
    }
    
    #capturedImages::-webkit-scrollbar {
        height: 8px;
    }
    
    #capturedImages::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 10px;
    }
    
    #capturedImages::-webkit-scrollbar-thumb {
        background: #667eea;
        border-radius: 10px;
    }
    
    #capturedImages::-webkit-scrollbar-thumb:hover {
        background: #764ba2;
    }
}

#capturedImages > div {
    position: relative;
    transition: transform 0.2s;
    flex-shrink: 0;
}

#capturedImages > div:hover {
    transform: scale(1.05);
}

#capturedImages img {
    display: block;
}