/* MergeAllPDF Custom Styles - iLovePDF Inspired */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Enhanced Button Styles */
.btn-lg {
    padding: 0.75rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-radius: var(--border-radius) !important;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-lg:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Primary Action Button */
.btn-primary.btn-lg,
.btn-success.btn-lg,
.btn-danger.btn-lg,
.btn-warning.btn-lg {
    position: relative;
    overflow: hidden;
}

.btn-primary.btn-lg::before,
.btn-success.btn-lg::before,
.btn-danger.btn-lg::before,
.btn-warning.btn-lg::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-primary.btn-lg:hover::before,
.btn-success.btn-lg:hover::before,
.btn-danger.btn-lg:hover::before,
.btn-warning.btn-lg:hover::before {
    left: 100%;
}

/* Secondary Button Styles */
.btn-outline-secondary.btn-lg {
    border-width: 2px !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
}

.btn-outline-secondary.btn-lg:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

/* Button Container */
.text-center .btn-lg + .btn-lg {
    margin-left: 1rem !important;
}

@media (max-width: 768px) {
    .text-center .btn-lg {
        display: block;
        width: 100%;
        margin: 0.5rem 0 !important;
    }
    
    .text-center .btn-lg + .btn-lg {
        margin-left: 0 !important;
    }
}

/* Tool Cards - Main Feature */
.tool-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: var(--border-radius-lg);
    background: white;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    border-color: var(--primary-color) !important;
}

.tool-card .tool-icon {
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon i {
    transform: scale(1.15) rotate(5deg);
}

.tool-card .card-title {
    color: #1f2937;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Clickable Card Styles */
.clickable-card {
    cursor: pointer;
    text-decoration: none !important;
}

.clickable-card:hover {
    text-decoration: none !important;
}

.clickable-card .card-title {
    transition: color 0.3s ease;
}

.clickable-card:hover .card-title {
    color: var(--primary-color) !important;
}

.tool-card .card-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: #6b7280;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-card .btn {
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: none;
}

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

.tool-card .btn-outline-success:hover {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.tool-card .btn-outline-info:hover {
    background-color: var(--info-color);
    border-color: var(--info-color);
}

.tool-card .btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.tool-card .btn-outline-warning:hover {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.tool-card .btn-outline-danger:hover {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

/* Navigation Enhancements */
.navbar {
    background: white !important;
    padding: 1rem 0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    color: #4b5563 !important;
}

.nav-link:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border-radius: var(--border-radius);
    padding: 0.75rem 0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: none;
    margin-top: 0.5rem;
    min-width: 220px; /* Ensure minimum width for content */
    width: max-content; /* Auto-adjust width based on content */
    max-width: 300px; /* Prevent excessive width */
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: var(--border-radius-sm);
    margin: 0 0.5rem;
    color: #374151;
    white-space: nowrap; /* Prevent text wrapping */
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    transform: scale(1.02); /* Subtle scale effect that stays within bounds */
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.dropdown-menu-lg {
    min-width: 500px;
    width: max-content; /* Auto-adjust width based on content */
    max-width: 600px; /* Prevent excessive width */
}

.dropdown-header {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero Section */
.badge {
    border-radius: 25px;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
}

/* Tab Pills */
.nav-pills .nav-link {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    margin: 0 0.25rem;
    font-weight: 600;
    color: #6b7280;
    background: transparent;
    border: 2px solid transparent;
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
    box-shadow: 0 4px 14px 0 rgba(13, 110, 253, 0.25);
}

.nav-pills .nav-link:hover:not(.active) {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

/* File Drop Area */
.file-drop-area {
    border: 3px dashed #d1d5db;
    border-radius: var(--border-radius-lg);
    background-color: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-drop-area:hover {
    border-color: var(--primary-color);
    background-color: #eff6ff;
    transform: scale(1.01);
}

.file-drop-area.dragover,
.file-drop-area.drag-over {
    border-color: var(--success-color);
    background-color: #ecfdf5;
    transform: scale(1.02);
}

.file-drop-area.drag-over::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(34, 197, 94, 0.1);
    z-index: 1;
}

/* File List Items */
.file-item {
    transition: all 0.3s ease;
    cursor: grab;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
    background: white;
}

.file-item:hover {
    background-color: #f8fafc;
    transform: translateX(8px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.file-item.dragging {
    opacity: 0.6;
    transform: rotate(2deg);
    cursor: grabbing;
}

.file-info {
    flex-grow: 1;
}

.file-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.875rem;
    color: #6b7280;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.drag-handle {
    color: #9ca3af;
    cursor: grab;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.drag-handle:hover {
    color: var(--primary-color);
}

.remove-file {
    color: var(--danger-color);
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background-color: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* Button Enhancements */
.btn {
    transition: all 0.3s ease;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    border-width: 2px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #3b82f6;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    border-color: #10b981;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
}

.card.shadow-lg {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

/* Progress Animations */
.progress {
    overflow: hidden;
    border-radius: 10px;
    height: 12px;
    background-color: #f3f4f6;
}

.progress-bar {
    transition: width 0.6s ease;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

/* Features Section */
.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* How to Use Steps */
.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.25);
}

.step-number:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.4);
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

.processing {
    pointer-events: none;
    opacity: 0.7;
}

.processing .btn {
    cursor: not-allowed;
}

/* File Size Badge */
.file-size-badge,
.file-size {
    font-size: 0.75rem;
    background-color: #f3f4f6;
    color: #6b7280;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up,
.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Drag and Drop */
.sortable-ghost {
    opacity: 0.4;
    background-color: #f3f4f6;
}

.sortable-chosen {
    background-color: #dbeafe;
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .file-drop-area {
        padding: 2rem 1rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.875rem 1.75rem;
    }
    
    .tool-card {
        margin-bottom: 1rem;
    }
    
    .tool-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .tool-card .tool-icon i {
        font-size: 2.5rem;
    }
    
    .nav-pills .nav-link {
        padding: 0.5rem 1rem;
        margin: 0.125rem;
        font-size: 0.9rem;
    }
    
    .dropdown-menu-lg {
        min-width: 100%;
        max-width: 100vw; /* Prevent overflow on small screens */
        width: max-content;
    }
    
    .dropdown-menu {
        max-width: 95vw; /* Prevent overflow on small screens */
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .file-actions {
        margin-top: 0.5rem;
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .tool-card .card-body {
        padding: 1.25rem 0.75rem;
    }
    
    .tool-card .tool-icon i {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Tooltip Enhancements */
.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
}

/* Language Selector Styles */
.language-selector .flag-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
    display: inline-block;
}

.language-dropdown {
    min-width: 200px;
    width: max-content; /* Auto-adjust width based on content */
    max-width: 280px; /* Prevent excessive width */
    padding: 0.5rem 0;
}

.language-dropdown .dropdown-item {
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap; /* Prevent text wrapping */
}

.language-dropdown .dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    transform: scale(1.01); /* Subtle scale effect */
}

.language-dropdown .dropdown-item.active {
    background-color: rgba(13, 110, 253, 0.05);
    color: var(--primary-color);
}

.language-dropdown .flag-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.language-dropdown .dropdown-item span:not(.flag-icon) {
    flex-grow: 1;
}

.language-dropdown .dropdown-item i.fa-check {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.language-dropdown .dropdown-item.active i.fa-check {
    opacity: 1;
}

/* Tab Content Transitions */
.tab-pane {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tab-pane.active {
    opacity: 1;
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    outline: none;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .file-drop-area,
    .progress,
    footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* Footer Styles */
footer {
    background-color: #2c3e50 !important;
}

footer h6 {
    color: #ecf0f1;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

footer .hover-link {
    transition: color 0.3s ease;
    font-size: 0.9rem;
    text-decoration: none;
    color: #bdc3c7 !important;
}

footer .hover-link:hover {
    color: #3498db !important;
}

footer .hover-social {
    transition: color 0.3s ease;
    text-decoration: none;
}

footer .hover-social:hover {
    color: #3498db !important;
}

footer .app-download-btn {
    min-width: 140px;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 0.8rem;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

footer .app-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

footer .app-download-btn i {
    font-size: 1.2rem;
}

footer .border-secondary {
    border-color: #4a5f7a !important;
}

footer .btn-outline-light {
    border-color: #4a5f7a;
    color: #bdc3c7;
    font-size: 0.9rem;
}

footer .btn-outline-light:hover {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
}

footer ul {
    margin-bottom: 0;
}

footer ul li {
    line-height: 1.8;
}

footer .small {
    font-size: 0.85rem !important;
}

@media (max-width: 768px) {
    footer {
        text-align: center;
    }
    
    footer .row {
        text-align: center;
    }
    
    footer .app-download-btn {
        min-width: 120px;
        margin: 0.25rem;
        font-size: 0.75rem;
    }
    
    footer .d-flex {
        justify-content: center !important;
    }
}

/* Success Result Styles */
#resultContainer .alert-success {
    border: none;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 3rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

#resultContainer .btn-lg {
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    min-width: 200px;
    padding: 1rem 2rem;
}

#resultContainer .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
}

#resultContainer .btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

#resultContainer .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #6f42c1 100%);
    border: none;
}

#resultContainer .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #59359a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

#resultContainer .fas.fa-check-circle {
    animation: successPulse 2s ease-in-out infinite;
}

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

/* Success page responsiveness */
@media (max-width: 768px) {
    #resultContainer .alert-success {
        padding: 2rem 1.5rem;
    }
    
    #resultContainer h2 {
        font-size: 1.5rem;
    }
    
    #resultContainer .btn-lg {
        min-width: 160px;
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
    
    #resultContainer .d-flex.gap-3 {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    #resultContainer .fas.fa-check-circle {
        font-size: 3rem;
    }
}

/* Merge Button Centering */
#mergeBtn {
    display: block;
    margin: 0 auto;
}

/* Ensure button container is properly centered */
.text-center {
    text-align: center !important;
}

/* Additional button center styling for file list container */
#fileListContainer .text-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Compression Options */
.btn-check:checked + .btn-outline-success {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.btn-check:checked + .btn-outline-success i {
    color: white !important;
}

.btn-check:checked + .btn-outline-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: black;
}

.btn-check:checked + .btn-outline-warning i {
    color: black !important;
}

.btn-check:checked + .btn-outline-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-check:checked + .btn-outline-danger i {
    color: white !important;
}

/* Mobile Responsive Adaptations */
@media (max-width: 768px) {
    /* 1. 隐藏介绍描述内容 */
    .lead.d-none.d-md-block {
        display: none !important;
    }
    
    /* 2. 三个特性标签一行展示 */
    #feature-badges {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
        width: 100%;
    }
    
    #feature-badges .badge {
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.8rem !important;
        padding: 0.4rem 0.6rem !important;
        text-align: center;
    }
    
    /* 3. 首页分类tab一行展示，超出部分左右滑动 */
    .nav-scroll-container {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        position: relative;
        cursor: grab;
    }
    
    .nav-scroll-container:active {
        cursor: grabbing;
    }
    
    .nav-scroll-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .nav-scroll-container .nav {
        flex-wrap: nowrap !important;
        min-width: max-content;
        padding-bottom: 5px; /* 为滚动条留出空间 */
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
    
    .nav-scroll-container .nav-item {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .nav-scroll-container .nav-link {
        white-space: nowrap;
        padding: 0.5rem 1rem;
        margin: 0 0.25rem;
        font-size: 0.9rem;
        min-width: max-content;
        transition: all 0.2s ease;
    }
    
    /* 添加滚动提示 */
    .nav-scroll-container::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.8));
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .nav-scroll-container.has-overflow::after {
        opacity: 1;
    }
    
    /* 4. 功能入口区域1行2列效果 */
    .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* 移动端工具卡片样式优化 */
    .tool-card .card-body {
        padding: 1rem 0.75rem !important;
    }
    
    .tool-card .tool-icon i {
        font-size: 2rem !important;
    }
    
    .tool-card .card-title {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* 移动端间距调整 */
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    
    /* 移动端容器内边距调整 */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 576px) {
    .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .tool-card .card-body {
        padding: 0.75rem 0.5rem !important;
    }
    
    .tool-card .tool-icon i {
        font-size: 1.75rem !important;
    }
    
    .tool-card .card-title {
        font-size: 0.9rem !important;
    }
    
    .nav-scroll-container .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    #feature-badges {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.3rem !important;
    }
    
    #feature-badges .badge {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.5rem !important;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}