: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: 280px;
    --sidebar-collapsed-width: 80px;

    /* Gradient variables */
    --gradient-from: #4361ee;
    --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: 1.2rem;
    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: 1.125rem;
}

.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);
}


/* detail css */
/* Tool Header */
.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 {
    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);
    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.5rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    width: 30%;
    float: left;
    margin-right: 12px;
}

.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: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    min-width: 320px;
    max-width: 400px;
}

.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.2rem;*/
/*}*/

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

.option-input {
    width: 86%;
    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: 1rem;
}

.btn {
    padding: 0.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;
}
.tool-container {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1rem;
    flex-direction: row;
}
/* Info Sections */
.info-section {
    margin-bottom: 2rem;
    background-color: var(--card-bg);
    padding: 10px 20px;
    border-radius: 20px;
    clear: both;
}

.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;
    }
}

/* 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 的主色 */
    }
}

.header-logo {
    content: url('/tools/conv/imgs/logo3.png'); /* 默认 logo */
}

[data-theme="dark"] .header-logo {
    content: url('/tools/conv/imgs/logo3-dark.png?v=1'); /* 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: 66px;
    height: 66px;
    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: 1rem;
    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/conv/imgs/icon.png');
}

.options-title{
    margin: 0 0 10px;
}
.option-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.option-section-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
}

.option-section-header svg {
    transition: transform 0.3s ease;
}

.option-section-header.collapsed svg {
    transform: rotate(180deg);
}

.option-section-content {
    display: block;
}

.option-section-content.collapsed {
    display: none;
}
.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
}
.thumbnail {
    object-fit: contain; /* 保持图片比例 */
    background-color: #f0f0f0; /* 可选：透明背景替代色 */
    border-radius: 4px; /* 可选：圆角边框 */
}

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

.preview-container h3 {
    margin-top: 0;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 600;
}

.option-group{
    margin-bottom: 10px;
}
.gray{
    color:gray;
}
ul,ol{
    padding:0;
    margin:0;
    list-style: none;
}
.file-item.active {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

[data-theme="dark"] .preview-container {
    background-color: #1e1e1e;
}

[data-theme="dark"] #previewText {
    background-color: #2d2d2d;
    color: #f8f9fa;
}
.mb20{
    margin-bottom: 20px;
}
.output-container{
    clear:both;
}

.dimension-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.dimension-separator {
    font-weight: bold;
    color: var(--text);
}

/* Preview Container */
.preview-container {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.preview-container h3 {
    margin-top: 0;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 600;
}

.preview-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.preview-item {
    flex: 1;
    min-width: 300px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    background-color: var(--bg);
}

.preview-item-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    display: flex;
    align-items: center;
}

.preview-item-header svg {
    margin-right: 0.5rem;
}

.preview-image-container {
    text-align: center;
    margin: 1rem 0;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: white;
}

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

.preview-info strong {
    color: var(--text);
}

.side-by-side-preview {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

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

/* Preview Button */

.preview-btn{
    margin-left: 10px;
}
/* Responsive adjustments for file items */
@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%;
    }
}
.preset-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preset-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    flex: 1;
    min-width: 120px;
}

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

.preset-btn.active {
    background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
    color: white;
    border-color: transparent;
}
.w46{width: 46%;}

/*.trim-section {*/
/*    margin-top: 1rem;*/
/*    padding-top: 1rem;*/
/*    border-top: 1px solid var(--border);*/
/*}*/

.trim-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.trim-inputs {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

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

.trim-label {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.trim-input {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    background-color: var(--card-bg);
    color: var(--text);
}
