/* General Styles */

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo img {
    height: 40px !important;
    width: auto !important;
    display: block;
}


.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #6366f1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-switcher {
    position: relative;
    display: inline-block;
}

.language-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.language-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-switcher:hover .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: block;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px;
}

.language-option:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.language-option.active {
    background: #f3f4f6;
    font-weight: 600;
}

.hero {
    text-align: center;
    padding: 80px 20px;
    color: white;
}
.hero .logo {
    display: block;       /* 让链接变成块级元素 */
    text-align: center;   /* 水平居中里面的内容 */
}

.hero .logo img {
    width: 99px;
    height: 99px;
    object-fit: contain;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tools-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.tool-category {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.tool-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.category-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
}

.tool-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8faff;
    border-radius: 10px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tool-item:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    transform: translateX(10px);
    border-color: rgba(255,255,255,0.3);
}

.tool-icon {
    font-size: 1.5rem;
    margin-right: 12px;
    min-width: 30px;
}

.tool-name {
    font-weight: 500;
    flex: 1;
}

.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.coming-soon:hover {
    background: #f8faff;
    color: #374151;
    transform: none;
}

.stats {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin: 40px auto;
    max-width: 800px;
    text-align: center;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fbbf24;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.footer {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-link {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        padding: 30px 10px;
    }

    .tool-category {
        padding: 20px;
    }

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

.search-box {
    max-width: 500px;
    margin: 0 auto 40px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 1.2rem;
}

/* Specific styles for tool pages */
.main-content {
    padding: 40px 20px;
    text-align: center;
    color: #374151;
}

.main-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.main-content .subtitle {
    font-size: 1.1rem;
    color: #e0e7ff;
    margin-bottom: 30px;
}

.upload-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.drop-area {
    border: 3px dashed #6366f1;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8faff;
}

.drop-area:hover {
    background-color: #e0e7ff;
    border-color: #4f46e5;
}

.drop-area.drag-over {
    background-color: #e0e7ff;
    border-color: #4f46e5;
}

.drop-area p {
    font-size: 1.5rem;
    color: #374151;
    margin-bottom: 10px;
    font-weight: 600;
}

.drop-area .small-text {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: #6366f1;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #5a5cd1;
}

.btn-secondary {
    background-color: #e0e7ff;
    color: #6366f1;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #c7d2fe;
}

.processing-area {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 1000px;
    margin: 30px auto;
    text-align: left;
}

.file-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f0f4f8;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 0.9rem;
    color: #6b7280;
}

.info-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #374151;
    margin-top: 5px;
}

.processing-area h2 {
    font-size: 1.8rem;
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
}

.page-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px;
    background-color: #f8faff;
    border-radius: 10px;
    margin-top: 20px;
    min-height: 200px;
    border: 2px dashed #cbd5e1;
}

.page-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: grab;
    transition: all 0.2s ease-in-out;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid transparent;
}

.page-card.sortable-chosen {
    border-color: #6366f1;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.page-card.sortable-ghost {
    opacity: 0.2;
    background-color: #e0e7ff;
}

.page-card canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 4px;
}

.page-number {
    margin-top: 10px;
    font-weight: bold;
    color: #374151;
}

.delete-page-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.delete-page-btn:hover {
    opacity: 1;
}

.action-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.result-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 30px auto;
    text-align: center;
}

.success-message {
    background-color: #d1fae5;
    color: #065f46;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.success-message svg {
    width: 24px;
    height: 24px;
}

.download-section {
    margin-top: 30px;
    text-align: center;
}

.download-link {
    background-color: #10b981;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: inline-block;
    margin-top: 20px;
}

.download-link:hover {
    background-color: #059669;
}

.reprocess-btn {
    margin-top: 15px;
    background-color: #6b7280;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.reprocess-btn:hover {
    background-color: #4b5563;
}

.hidden {
    display: none;
}

/* Specific styles for split-pdf and delete-pages */
.split-options, .delete-options {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8faff;
    border-radius: 10px;
    text-align: left;
}

.split-option-group, .delete-option-group {
    margin-bottom: 15px;
}

.split-option-group label, .delete-option-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #374151;
}

.split-option-group input[type="radio"], .delete-option-group input[type="radio"] {
    margin-right: 10px;
}

.split-option-group input[type="number"], .delete-option-group input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 0 5px;
}

.split-option-group span, .delete-option-group span {
    color: #374151;
}

.page-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px; /* For scrollbar */
}

.page-selection-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    padding: 10px;
    text-align: center;
}

.page-selection-card:hover {
    border-color: #a78bfa;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-selection-card.selected {
    border-color: #6366f1;
    background-color: #e0e7ff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.page-selection-card canvas {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 4px;
}

.page-selection-card .page-number {
    margin-top: 8px;
    font-weight: bold;
    color: #374151;
}

.download-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.download-list li {
    background-color: #f0f4f8;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-list li a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.download-list li a:hover {
    text-decoration: underline;
}

.download-all-btn {
    background-color: #10b981;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: inline-block;
    margin-top: 20px;
    border: none;
    cursor: pointer;
}

.download-all-btn:hover {
    background-color: #059669;
}

.processing-section {
    text-align: center;
    margin-top: 30px;
}

.progress-bar-container {
    width: 80%;
    background-color: #e0e7ff;
    border-radius: 5px;
    margin: 20px auto;
    height: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: #6366f1;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.status-message {
    font-size: 1.1rem;
    color: #374151;
    margin-top: 10px;
}




/* Features Section Styles */
.features-section {
    margin: 40px auto;
    max-width: 1200px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: #1f2937;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-card p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
    }
}

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


/* Extract Pages Specific Styles */
.extract-options {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8faff;
    border-radius: 10px;
    text-align: left;
}

.extract-option-group {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: white;
}

.extract-option-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: bold;
    color: #374151;
    cursor: pointer;
}

.extract-option-group input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.range-inputs input[type="number"] {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
}

.range-inputs span {
    color: #374151;
    font-weight: 500;
}

.page-selection-container {
    margin-top: 15px;
}

.selection-hint {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-align: center;
    font-style: italic;
}

/* Responsive adjustments for extract pages */
@media (max-width: 768px) {
    .range-inputs {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .range-inputs input[type="number"] {
        width: 100px;
    }
    
    .extract-option-group {
        padding: 12px;
    }
}


/* Scan to PDF Styles */
.camera-section {
    margin: 2rem 0;
}

.camera-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#cameraVideo {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.camera-controls {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scan-info {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.image-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.2s ease;
}

.image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.image-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.image-info {
    text-align: center;
}

.image-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.image-size {
    font-size: 0.8rem;
    color: #666;
}

.delete-image-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.delete-image-btn:hover {
    background: #ff3742;
}

.scan-options {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scan-options h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

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

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.option-group select {
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease;
}

.option-group select:focus {
    outline: none;
    border-color: #007bff;
}

/* Mobile responsiveness for scan to PDF */
@media (max-width: 768px) {
    .camera-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .scan-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .image-preview-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .image-card img {
        height: 120px;
    }
}


/* PDF Compression Styles */
.compression-options {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.compression-options h2 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.5rem;
}

.compression-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.compression-mode {
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8faff;
}

.compression-mode:hover {
    border-color: #007bff;
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.15);
}

.compression-mode.selected {
    border-color: #007bff;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.mode-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.mode-header input[type="radio"] {
    margin-right: 0.5rem;
    transform: scale(1.2);
}

.mode-header label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
}

.mode-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.mode-description p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.compression-ratio {
    font-weight: 500;
    color: #007bff;
}

.compression-mode.selected .compression-ratio {
    color: #ffd700;
}

.advanced-options {
    border-top: 1px solid #e1e8ed;
    padding-top: 1.5rem;
}

.advanced-options h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

.advanced-options .option-group {
    margin-bottom: 1rem;
}

.advanced-options .option-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

.advanced-options .option-group input[type="checkbox"] {
    margin-right: 0.5rem;
    transform: scale(1.1);
}

.advanced-options .option-group select {
    padding: 0.5rem;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    min-width: 120px;
}

.compression-progress {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e1e8ed;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.compression-results {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
    background: #f8faff;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007bff;
}

/* Mobile responsiveness for PDF compression */
@media (max-width: 768px) {
    .compression-modes {
        grid-template-columns: 1fr;
    }
    
    .compression-mode {
        padding: 1rem;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .advanced-options .option-group {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .compression-options {
        padding: 1.5rem;
    }
    
    .compression-results {
        padding: 1.5rem;
    }
    
    .mode-header label {
        font-size: 1rem;
    }
    
    .mode-icon {
        font-size: 1.3rem;
    }
}



/* Word to PDF Conversion Styles */
.conversion-options {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.conversion-options h2 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.5rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.option-group select,
.option-group input[type="number"] {
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.3s ease;
}

.option-group select:focus,
.option-group input[type="number"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.custom-margin {
    transition: all 0.3s ease;
}

.custom-margin.hidden {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
}

.advanced-options {
    border-top: 1px solid #e1e8ed;
    padding-top: 1.5rem;
}

.advanced-options h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
}

.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    padding: 0.5rem 0;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.2);
    accent-color: #007bff;
}

.conversion-progress {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.conversion-results {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mobile responsiveness for Word to PDF conversion */
@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .conversion-options {
        padding: 1.5rem;
    }
    
    .conversion-results {
        padding: 1.5rem;
    }
    
    .checkbox-group label {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .conversion-options {
        padding: 1rem;
    }
    
    .options-grid {
        gap: 0.75rem;
    }
    
    .option-group select,
    .option-group input[type="number"] {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

}





