:root {
    --primary: #4361ee;
    --primary-light: #e6f0ff;
    --text: #2b2d42;
    --text-light: #8d99ae;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --border: #e9ecef;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --sidebar-width: 230px;
    --sidebar-collapsed-width: 80px;

    /* Gradient variables */
    /*--gradient-from: #4361ee;*/
    /*--gradient-to: #8c00ff;*/

    --gradient-from: #5e7aff;
    --gradient-to: #8c00ff;
}

/* Dark mode variables */
[data-theme="dark"] {
    --primary: #7b9dff;
    --primary-light: rgba(123, 157, 255, 0.1);
    --text: #f8f9fa;
    --text-light: #adb5bd;
    --bg: #121212;
    --card-bg: #1e1e1e;
    --border: #2d2d2d;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);

    /* Dark mode gradients */
    --gradient-from: #7b9dff;
    --gradient-to: #4cc9f0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-bg);
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    transition: var(--transition);
    overflow-y: auto;
    position: relative;
    z-index: 20;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(0);
    opacity: 1;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    padding: 2rem 0.5rem;
    transform: translateX(0);
}

.sidebar.collapsed .sidebar-item span,
.sidebar.collapsed .sidebar-section h3 {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    display: inline-block;
    margin: 0;
    transition: opacity 0.2s ease, width 0.3s ease, height 0.3s ease;
}

.sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding: 0.75rem 0;
}

.sidebar.collapsed .sidebar-item svg {
    margin-right: 0;
}

.sidebar-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
    display: block;
    align-items: center;
    padding: 0 0.5rem;
    position: relative;
    transition: color 0.3s ease;
}

.sidebar-header svg {
    margin-right: 0.75rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section .h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 1rem;
    padding: 0 0.5rem;
    transition: var(--transition);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.sidebar-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 0.25rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.sidebar-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.sidebar-item.active {
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    color: white;
    opacity: 0.9;
}
.sidebar-item.active a{
    color: white;
}
.a{text-decoration: none;color:var(--text);}
.h1{font-size: 1.5rem;margin: 0.5rem 0.5rem 0;}
.sidebar-item svg {
    margin-right: 0.75rem;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: margin 0.3s ease;
}
.info-section p strong{
    /*display: block;*/
}
/* Toggle Button */
.toggle-sidebar {
    position: absolute;
    right: -12px;
    top: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 30;
    transition: var(--transition);
}

.toggle-sidebar:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    transform: scale(1.1);
}

.toggle-sidebar svg {
    width: 14px;
    height: 14px;
    padding-left: 10px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .toggle-sidebar {
    transform: rotate(180deg) scale(1);
    right: -12px;
}

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--text); /* 默认颜色（浅色模式） */
}

[data-theme="dark"] .theme-toggle svg {
    stroke: #fff; /* dark 模式下的颜色（白色） */
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

.mobile-menu-btn svg {
    width: 20px;
    height: 20px;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 1.2rem 3rem 0;
    overflow-y: auto;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

.search-container {
    margin-bottom: 1rem;
    position: relative;
}

.search-input {
    width: 96%;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
    background-color: var(--card-bg);
    color: var(--text);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    transform: scale(1.01);
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.section-title svg {
    margin-right: 0.75rem;
}


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

.tool-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 0.6rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    cursor: pointer;
    will-change: transform, box-shadow;
    position: relative;
    overflow: hidden;
    min-height: 208px;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gradient-from), var(--gradient-to));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

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


.tool-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.tool-desc {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.tool-meta {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-light);
}

.tool-meta span {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.tool-meta svg {
    margin-right: 0.25rem;
}

/* Overlay for mobile */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 15;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Gradient Button */
.btn-gradient {
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.2);
}

.btn-gradient:active {
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        opacity: 0;
    }

    .sidebar.active {
        transform: translateX(0);
        opacity: 1;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 1.5rem;
    }

    .sidebar-header {
        margin-bottom: 1.5rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .toggle-sidebar {
        display: none;
    }

    .theme-toggle {
        bottom: 80px;
    }
}

/* Animation Styles */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.tool-card {
    opacity: 0;
}

/* Loading spinner */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    grid-column: 1 / -1;
    color: var(--text-light);
}

/* No results message */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}


.tool-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    position: relative;
    flex-wrap: wrap;
}

.tool-header-ad {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 720px;
    height: 90px;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

@media (max-width: 1024px) {
    .tool-header-ad {
        display: none;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .tool-header-ad {
        width: 600px;
        height: auto;
    }
}

.tool-icon-large {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    color: white;
}

.tool-title-large {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

.tool-description {
    color: var(--text-light);
    margin: 0.5rem;
    max-width: 700px;
}

/* Upload Area */
.upload-container {
    margin-bottom: 3rem;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1.5rem;
    background-color: var(--card-bg);
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.upload-area.drag-over {
    border-color: var(--primary);
    background-color: var(--primary-light);
    transform: scale(1.01);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    color: var(--text-light);
    font-size: 0.875rem;
}

.upload-btn {
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.2);
}

.upload-btn svg {
    margin-right: 0.5rem;
}

/* File List */
.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--card-bg);
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.file-item:hover {
    border-color: var(--primary);
}

.file-icon {
    margin-right: 1rem;
    color: var(--primary);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.file-size {
    color: var(--text-light);
    font-size: 0.875rem;
}

.file-status {
    margin-left: 1rem;
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background-color: var(--primary-light);
    color: var(--primary);
}

.file-status.converting {
    background-color: #fff3bf;
    color: #e67700;
}

.file-status.completed {
    background-color: #d3f9d8;
    color: #2b8a3e;
}

.file-remove {
    margin-left: 1rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.file-remove:hover {
    color: #ff6b6b;
}

/* Options Section */
.options-section {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.options-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.options-title svg {
    margin-right: 0.75rem;
    color: var(--primary);
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.option-input {
    width: 90%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text);
    font-family: inherit;
    transition: var(--transition);
}

.option-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.option-range {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
}

.option-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    cursor: pointer;
}

.option-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    cursor: pointer;
}

.option-value {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    /*margin-bottom: 1.5rem;*/
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.2);
}

.btn-gradient:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

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

.btn svg {
    margin-right: 0.5rem;
}

/* Info Sections */
.info-section {
    margin-bottom: 2rem;
    background-color: var(--card-bg);
    padding: 10px 20px;
    border-radius: 20px;
    clear: both;
    margin-top:2rem;
}

.info-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.info-section h2 svg {
    margin-right: 0.75rem;
    color: var(--primary);
}

.info-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

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

.info-section ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.info-section li {
    margin-bottom: 0.5rem;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        opacity: 0;
    }

    .sidebar.active {
        transform: translateX(0);
        opacity: 1;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 1.5rem;
    }

    .sidebar-header {
        margin-bottom: 1.5rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .toggle-sidebar {
        display: none;
    }

    .theme-toggle {
        bottom: 80px;
    }

    .tool-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tool-icon-large {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .search-input {
        padding: 0.875rem 1.25rem;
    }
    .upload-area {
        padding: 2rem 1rem;
    }
    .file-item{
        width: 91%;
        float: none;
    }

    .side-by-side-preview .preview-image {
        max-width: 100%;
    }

    .search-input{
        width: 76%;
    }
    .tool-container {
        flex-direction: column;
    }
    .menu_list{
        display: none!important;
    }

    .options-section {
        min-width: unset;
        max-width: 100%;
    }
}

/* Animation Styles */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 6px;
    background-color: var(--border);
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-from), var(--gradient-to));
    width: 0%;
    transition: width 0.3s ease;
}
.option-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--card-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d99ae' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px auto;
    transition: var(--transition);
    cursor: pointer;
}

.option-select:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.option-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Dark 模式适配 */
[data-theme="dark"] .option-select {
    background-color: #1e1e1e;
    color: var(--text);
    border-color: var(--border);
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23adb5bd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* 选项样式（仅支持部分浏览器） */
.option-select option {
    background-color: var(--card-bg);
    color: var(--text);
    padding: 0.5rem 1rem;
}

/* 选项悬停效果 */
.option-select option:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}
.thumbnail {
    object-fit: contain; /* 保持图片比例 */
    background-color: #f0f0f0; /* 可选：透明背景替代色 */
    border-radius: 4px; /* 可选：圆角边框 */
}
.footer_new {
    color: #020202;
    padding: 20px 0;
    margin-top: 20px;
}

.footer_container .other {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.copyright {
    text-align: left;
    flex: 1;
}

.copyright .info {
    font-size: 14px;
    margin: 0;
}

.menu_list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 16px;
}

.menu_list .menu_body a {
    color: #020202;
    font-size: 14px;
    transition: color 0.3s;
}

.menu_list .menu_body a:hover {
    color: #24cd77;
}
/* Dark mode variables */
[data-theme="dark"] {
    /* ... existing dark mode variables ... */

    /* Dark mode footer styles */
    .footer_new {
        background-color: var(--bg); /* 使用 dark mode 的背景色 */
        color: var(--text); /* 使用 dark mode 的文本颜色 */
    }

    .footer_new .footer_container .other .menu_list .menu_body a {
        color: var(--text-light); /* 使用 dark mode 的浅色文本 */
    }

    .footer_new .footer_container .other .menu_list .menu_body a:hover {
        color: var(--primary); /* 使用 dark mode 的主色 */
    }

    .footer_new .other .info,
    .footer_new .other .info a {
        color: var(--text-light); /* 使用 dark mode 的浅色文本 */
    }

    .footer_new .other .info a:hover {
        color: var(--primary); /* 使用 dark mode 的主色 */
    }
}

[data-theme="dark"] .header-logo {
    content: url('/tools/resize/imgs/logo-dark.png'); /* dark mode logo */
}

.layui-field-title {
    margin: 6px 0;
    border-width: 1px 0 0;
    border-color: #e6e6e6;
    border-style: dotted;
}
.layui-breadcrumb a {
    color: #9276ce;
    line-height: 40px;
    text-decoration: none;
}

.layui-breadcrumb span[lay-separator] {
    margin: 0 8px;
    color: #999;
}
.layui-breadcrumb span[lay-separator] {
    margin: 0 8px!important
}
.layui-elem-field legend {
    margin-left: 20px;
    padding: 0 10px;
    font-size: 20px;
    font-weight: 300;
}
#breadcrumbs {
    padding-bottom: 14px;
    font-size: 12px;
    color: #a0a0a0
}

#breadcrumbs span {
    color: #a0a0a0
}
#breadcrumbs a{text-decoration: none;}
#taboola-livere { display: none;}


.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.tool-card-header {
    display: flex;
    align-items: flex-start;
}

.tool-icon {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    transition: var(--transition);
    /*box-shadow: 0 4px 12px rgba(67, 97, 238, 0.25);*/
}

.tool-card:hover .tool-icon {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 6px 16px rgba(67, 97, 238, 0.35);
}

.tool-header-text {
    margin-left: 0.6rem;
    flex: 1;
}

.tool-title {
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    color: var(--text);
}

.tool-category {
    font-size: 0.75rem;
    color: var(--primary);
    background-color: var(--primary-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
}

.tool-desc {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
}
.recent-tools-container {
    padding: 1rem;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 12px;
    display:none;
}

.tool-item {
    display: inline-block;
    margin: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border-radius: 20px;
    position: relative;
    text-decoration: none;
    color: #2b2d42;
}

.tool-item .delete-icon {
    position: absolute;
    right: -8px;
    top: -8px;
    background: #ff4d4f;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    text-align: center;
    cursor: pointer;
}

.collapsed .tuijian,.collapsed .lang{
    display: none;
}
.collapsed .header-logo{
    content: url('/tools/resize/imgs/icon.png');
    margin-left: 10px;
}
#previewContainer{
    clear: both;
}
.upload-area.drag-over {
    border-color: var(--primary);
    background-color: var(--primary-light);
    transform: scale(1.01);
}
.tool-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.option-group label{
    display: block;
}
.dimension-controls-flex{
    display: flex;
}

.option-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.option-checkbox input {
    margin-right: 0.5rem;
}
.rename-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rename-input-group {
    display: flex;
    gap: 0.5rem;
}

.rename-input-group input {
    flex: 1;
}

.rename-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: var(--primary-light);
    border-radius: 4px;
    font-size: 0.875rem;
}
.social-presets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.social-preset {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.75rem;
    text-align: center;
}

.social-preset:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.social-preset.active {
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    color: white;
    border-color: transparent;
}

.social-preset .platform-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.social-preset .dimensions {
    font-size: 0.7rem;
}
.tool-container {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1rem;
    flex-direction: row;
    clear: both;
}

@media (max-width: 1024px) {
    .tool-container {
        flex-direction: column;
    }
    .upload-area {
        order: 1;
        margin-bottom: 1.5rem;
    }
}

.upload-area {
    flex: 1;
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 300px;
    transition: var(--transition);
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary);
}

.upload-area.drag-over {
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.upload-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.25);
}

.batch-container {
    width: 100%;
    display: none;
}

.upload-area .btn-gradient{
    margin:16px;
}
.upload-area .btn-gradient svg{
    vertical-align: sub;
}
.batch-header{
    margin: 20px;
}
.batch-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.batch-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border);
    position: relative;
}

.batch-item-preview {
    width: 100%;
    height: auto;
    object-fit: contain;
    background-color: var(--bg);
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.batch-item-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
}

.batch-item-info {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.batch-item-info div {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
    font-style: italic;
}

.options-section {
    box-shadow: var(--shadow);
    min-width: 320px;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.dimension-controls {
    display: block;
    margin-bottom: 1rem;
}


.dimension-input {
    flex: 1;
    min-width: 120px;
}

.dimension-input input {
    max-width: 130px;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--card-bg);
    color: var(--text);
}

.preset-sizes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    /*margin-bottom: 1.5rem;*/
}

.preset-btn {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    text-align: center;
}

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

.preset-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #151414;
    border: 1px solid #4b57f0;
}

.format-options {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.format-btn {
    flex: 1;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    text-align: center;
}

.format-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #151414;
    border: 1px solid #4b57f0;
}


.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary)!important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
}

.btn-outline:hover {
    background-color: var(--primary-light);
}
.drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(67, 97, 238, 0.1);
    border: 2px dashed var(--primary);
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.upload-area.drag-over .drag-overlay {
    display: flex;
}

.conversion-complete {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 100;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.conversion-complete.show {
    transform: translateY(0);
    opacity: 1;
}

.batch-item-size-change {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    display: flex;
    justify-content: space-between;
}

.batch-item-size-change .old {
    text-decoration: line-through;
    color: var(--text-light);
}

.batch-item-size-change .new {
    color: var(--primary);
    font-weight: 500;
}
.rotation-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.rotation-btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--card-bg);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.rotation-btn:hover {
    border-color: var(--primary);
}
.rotation-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #151414;
    border: 1px solid #4b57f0;
}
.rotation-btn svg {
    display: block;
    margin: 0 auto 0.5rem;
}

.input-output-section {
    flex: 1;
}

.section-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 0.5rem 1.3rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}


.section-card:hover {
    border-color: var(--primary);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin: 0.8rem 0;
}

.section-title svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}


.input-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.upload-wrapper {
    position: relative;
    display: inline-block;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
}

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

.btn-success {
    background-color: #10b981;
    color: white;
}

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

.btn:active {
    transform: translateY(0);
}

.options-section {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.option-group {
    margin-bottom: 1.5rem;
}


.option-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
/*.file-info{*/
/*    border: 1px solid var(--border)*/
/*}*/


/*.file-info {*/
/*    margin: 1rem 0;*/
/*    padding: 1rem;*/
/*    background-color: var(--card-bg);*/
/*    border-radius: 8px*/
/*}*/
h4,h3{
    margin: 0;
}
.option-group label{
    font-size: 14px;
}
.file-info div {
    margin-bottom: .5rem;
    color: var(--text)
}
/*.file-info div:last-child,*/
/*.option-group:last-child {*/
/*    margin-bottom: 0*/
/*}*/
.hidden {
    display: none
}

.checkbox-group input {
    width: auto;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.input-actions{
    margin: 12px 0;
}
/*.file-input {*/
/*    display: none*/
/*}*/

.tab-container {
    display: flex;
    margin: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
    z-index: 999999;
}

.tab-btn {
    padding: .75rem 1.5rem;
    background: 0 0;
    border: 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 3px solid transparent
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary)
}

.url-input-container {
    width: 100%;
    margin-top: 1rem;
    display: none;
    z-index:999999;
}

.url-input-container.active {
    display: block
}

.url-input {
    width: 100%;
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 1rem;
    background-color: var(--card-bg);
    color: var(--text)
}
.progress-container {
    width: 100%;
    margin-top: 1rem;
    display: none
}


.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    width: 0%;
    transition: width .3s ease
}

.status-text {
    font-size: .875rem;
    color: var(--text-light);
    margin-top: .5rem;
    text-align: center
}

.preview-container {
    text-align: center;
    /*margin-top: 20px;*/
    border-radius: 4px;
    /*padding: 15px;*/

}
.link{
    text-decoration: none;
}
.mt20{margin-top:20px;}
#previewImage {
    max-width: 100%;
    max-height: 300px;
    /*display: none;*/
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 4px
}
.btn-fetch {
    background: var(--primary);
    color: #fff;
    border: 0;
    padding: .5rem 1rem;
    border-radius: 4px;
    cursor: pointer
}

.file-info-title {
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center
}

.file-info-title svg {
    margin-right: .5rem;
    color: var(--primary)
}
/*.output-container {*/
/*    background-color: var(--card-bg);*/
/*    border-radius: 12px;*/
/*    padding: 0.5rem 1.5rem;*/
/*    box-shadow: var(--shadow);*/
/*    border: 1px solid var(--border);*/
/*    margin: 1rem 0;*/
/*    position: relative;*/
/*}*/
.file-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border)
}

.file-info-item:last-child {
    border-bottom: none
}

.file-info-label {
    color: var(--text-light)
}

.file-info-value {
    font-weight: 500
}

.btn-copy {
    background: #6c757d;
    color: #fff;
    border: 0
}
.btn-action {
    padding: .5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}
.btn-download {
    background: #28a745;
    color: #fff;
    border: 0
}

.btn-clear {
    background: #dc3545;
    color: #fff;
    border: 0
}
.converter-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}
.editor-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.editor-column {
    flex: 1;
    min-width: 300px;
}
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.editor-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text);
}
.editor-actions {
    display: flex;
    gap: 10px;
}
.editor-wrapper {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
}
.editor-toolbar {
    background: var(--bg);
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.editor-content {
    height: 460px;
}
.converter-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 2px;
}
.editor-stats {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    display: flex;
    justify-content: space-between
}

.word-count {
    margin-right: 15px
}
.converter-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.converter-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.converter-btn:active {
    transform: scale(0.95);
}
.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}
.file-input-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.error-message {
    color: #e74c3c;
    background-color: #fdf6f6;
    border: 1px solid #fadbd8;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
}

.btn-action {
    padding: 6px 12px;
    font-size: 0.85rem;
}
.editor-container {
    display: flex;
    flex-direction: column
}

.editor-row {
    min-height: 460px;
}

@media (max-width:768px) {
    .editor-row {
        flex-direction: column;
        height: auto
    }
}

.editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    max-height: 800px;
}

.panel-header {
    background-color: var(--card-bg);
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.panel-header .actions {
    display: flex;
    gap: 8px
}

.panel-header .btn-action {
    padding: 4px 8px;
    font-size: .8rem
}

.editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden
}

#markdownInput,#htmlInput {
    flex: 1;
    width: 100%;
    padding: 15px;
    border: none;
    resize: none;
    font-family: Courier New,monospace;
    font-size: 14px;
    background-color: var(--card-bg);
    color: var(--text)
}

#markdownInput:focus,#htmlInput:focus {
    outline: none
}

#previewContainer {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    /*background-color: #fff*/
}

.tool-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 0
}



.error-message {
    color: #e74c3c;
    background-color: #fdf6f6;
    border: 1px solid #fadbd8;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    display: none
}
.stats-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px

}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center
}

.stat-value {
    font-weight: bold;
    color: var(--primary)
}

.stat-label {
    font-size: .9em;
    color: var(--text-secondary)
}
@media (max-width: 768px) {
    .editor-row {
        flex-direction: column;
    }
    .converter-buttons {
        flex-direction: row;
        justify-content: center;
        padding: 10px 0;
    }
    .converter-btn {
        width: 40px;
        height: 40px;
    }
}
@media (max-width: 768px) {
    .tool-container {
        flex-direction: column;
    }

    .controls-section {
        width: 100%;
    }

    .input-actions {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}



.file-name {
    flex: 2;
}

/*.file-size,*/
/*.compressed-size {*/
/*    flex: 1;*/
/*    text-align: right;*/
/*}*/

.file-order,
.file-pages,
.compression-ratio {
    flex: 1;
    text-align: center;
}

.compression-ratio {
    color: #28a745;
    font-weight: bold;
}

.file-status {
    /*flex: 1;*/
    text-align: center;
}

.file-actions {
    flex: 0.5;
    text-align: center;
}

.file-item.dragging {
    opacity: 0.5;
    background-color: #f0f8ff;
}

/*.file-list {*/
/*    min-height: 100px;*/
/*}*/

.merge-options,
.remove-options,
.split-options {
    margin-top: 10px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.remove-options {
    max-height: 500px;
    overflow-y: auto;
}

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

.option-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.option-select,
.page-range-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.page-range-input {
    margin-top: 5px;
}

.page-range-info {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

.file-item-header {
    display: flex;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: bold;
}

.file-item-header .file-name {
    flex: 2;
}

/*.file-item-header .file-size,*/
/*.file-item-header .file-pages,*/
/*.file-item-header .file-actions {*/
/*    flex: 1;*/
/*    text-align: center;*/
/*}*/
.file-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--card-bg);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    width: 30%;
    float: left;
    margin-right: 12px;
}
.file-item-header .file-size {
    text-align: right;
}

.file-item-header .file-actions {
    flex: 0.5;
}

.preview-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 0;
    margin: 0 5px;
}

.preview-btn:hover {
    text-decoration: underline;
}


.preview-container.active {
    display: block;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.preview-content {
    text-align: center;
}

.preview-content iframe {
    width: 100%;
    height: 500px;
    border: 1px solid #ddd;
}

.page-info {
    font-size: 0.9em;
    color: #666;
    margin-top: 3px;
}

.remove-method-options,
.split-method-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.remove-method-option,
.split-method-option {
    display: flex;
    align-items: center;
}

.remove-method-option input,
.split-method-option input {
    margin-right: 10px;
}

.range-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.range-input-container input {
    flex: 1;
}

.range-input-container span {
    margin: 0 5px;
}

.file-item.processing {
    opacity: 0.7;
}

.file-item.error {
    background-color: #ffe6e6;
}

.status-indicator {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: #e9ecef;
}

.status-indicator.processing {
    background-color: #fff3cd;
    color: #856404;
}

.status-indicator.completed {
    background-color: #d4edda;
    color: #155724;
}

.status-indicator.error {
    background-color: #f8d7da;
    color: #721c24;
}

.page-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.page-checkbox {
    display: flex;
    align-items: center;
    width: calc(33.333% - 5px);
}

.page-checkbox input {
    margin-right: 5px;
}

#selectPagesOption {
    display: none;
}

.select-all-pages {
    margin-top: 10px;
}

.select-all-pages button {
    margin-right: 10px;
    padding: 5px 10px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.select-all-pages button:hover {
    background: #e9ecef;
}

.page-preview-container {
    margin-top: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.page-preview-container h4 {
    margin-top: 0;
}

.thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.thumbnail {
    width: 100px;
    height: 140px;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.thumbnail.selected {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,.25);
}

.thumbnail .page-number {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(0,123,255,.1);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

.thumbnail img {
    max-width: 90%;
    max-height: 90%;
}

.page-info-summary {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.action-buttons .btn {
    margin-right: 10px;
}

@media (max-width: 768px) {
    .page-checkbox {
        width: calc(50% - 5px);
    }
}
.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex
;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}


.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.operation-type-options{display:flex;flex-direction:column;gap:8px}.operation-type-option{display:flex;align-items:center;padding:8px 12px;border:1px solid#e1e5e9;border-radius:6px;cursor:pointer;transition:all 0.2s}.operation-type-option:hover{background-color:#f8f9fa}.operation-type-option input{margin-right:10px}.range-input-container{display:flex;flex-direction:column;gap:10px}.range-input-row{display:flex;align-items:center;gap:10px}.page-range-input,.option-select{width:100%;padding:8px 12px;border:1px solid#e1e5e9;border-radius:4px;font-size:14px;box-sizing:border-box}.option-select{height:40px}.page-range-info{font-size:12px;color:#6c757d;margin-top:5px}.checkbox-group{display:flex;align-items:center;gap:8px}.checkbox-group input{width:18px;height:18px}.operation-options-container{min-height:250px;position:relative}.operation-option{display:none}.operation-option.active{display:block}.options-section.option-group{margin-bottom:20px}.options-section.option-label{display:block;margin-bottom:8px;font-weight:600}
.page-selector-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
}

.page-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.page-checkbox input {
    margin-right: 8px;
}

.select-pages-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.select-pages-actions button {
    flex: 1;
    padding: 8px;
    border: 1px solid #e1e5e9;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
}

.select-pages-actions button:hover {
    background: #e9ecef;
}
.preview-modal {
    display: block;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.preview-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    text-align: center;
    position: relative;
}

.preview-content img {
    max-width: 100%;
    max-height: 70vh;
    margin: 15px 0;
}

.preview-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.preview-close:hover {
    color: #000;
}

.quality-options {
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-range.quality {
    flex: 1;
}

.option-value.quality {
    min-width: 50px;
    text-align: center;
}

#progressText {
    text-align: center;
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 5px;
    margin-top: 10px
}

.position-btn {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    transition: all .2s
}

.position-btn:hover {
    background: #f5f5f5;
    border-color: #0078ff
}

.position-btn.active {
    background: #0078ff;
    color: #fff;
    border-color: #0078ff
}
/* 批量处理样式 */
.batch-upload-section {
    margin-bottom: 20px;
}

.batch-controls {
    margin: 15px 0;
}

.batch-controls .btn {
    margin-right: 10px;
}

.batch-file-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
}

.file-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    font-weight: bold;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.batch-file-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.file-info-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-action-cell {
    text-align: center;
}

.batch-results-section {
    margin-top: 20px;
}

.batch-results-container .action-buttons {
    margin-bottom: 20px;
}

.batch-result-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    padding: 15px;
}

.batch-result-item.error {
    border-color: #f5c6cb;
    background-color: #f8d7da;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-header h3 {
    margin: 0;
    font-size: 1.1em;
}

.result-actions .btn {
    margin-left: 5px;
}

.result-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #666;
}

.result-meta.error {
    color: #721c24;
}

.result-content {
    width: 100%;
    min-height: 100px;
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
    margin-bottom: 10px;
}

.result-info {
    font-size: 0.85em;
    color: #666;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.85em;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.empty-message {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

.hidden {
    display: none;
}


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


textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}
textarea {
    width: 98%;
    min-height: 280px;
    height: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    background-color: var(--card-bg);
    color: var(--text);
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: var(--transition);
    border-radius: 8px;
}
.controls-section{max-width: 400px;}
.analysis-container {
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.analysis-label {
    font-weight: 500;
    color: var(--text);
}

.analysis-value {
    color: var(--text-light);
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analysis-value.valid {
    color: #28a745;
}

.analysis-value.invalid {
    color: #dc3545;
}

.validation-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 0.5rem;
}

.validation-indicator.valid {
    background-color: #28a745;
}

.validation-indicator.invalid {
    background-color: #dc3545;
}

.validation-indicator.pending {
    background-color: #ffc107;
}
.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 8px;
    border: 1px solid var(--border);
    right: 0;
}

.export-dropdown-content a {
    color: var(--text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.export-dropdown-content a:hover {
    background-color: var(--primary-light);
    border-radius: 4px;
    margin: 4px;
}

.export-dropdown:hover .export-dropdown-content {
    display: block;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn svg {
    transition: transform 0.3s ease;
}

.export-dropdown:hover .export-btn svg {
    transform: rotate(180deg);
}
hr {height: 1px;border: 0;background: #e9e9e9;margin: 16px 0;clear: both;}
