.sidebar {
    height: 100vh;
    background-color: #f8f9fa;
    padding: 20px 0;
    box-shadow: 1px 0 5px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 0 15px 20px 15px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.sidebar-header h5 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item {
    margin: 5px 15px;
}

.nav-link {
    color: #333;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background-color: #e9ecef;
    color: #0d6efd;
}

.nav-link i {
    margin-right: 10px;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.upload-area:hover {
    border-color: #0d6efd;
    background-color: #f1f5ff;
}

.upload-area p {
    color: #666;
    margin: 0;
}

.preview-area {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.preview-area img {
    max-width: 100%;
    margin-bottom: 20px;
}

.control-panel {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.size-inputs {
    margin-bottom: 15px;
}

.size-inputs input[type="number"] {
    width: 100px;
    margin-right: 10px;
}

.image-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.preset-sizes {
    max-width: 300px;
}

.input-group input[type="number"] {
    width: 100px;
}

.preview-area img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

main {
    padding: 30px;
    background-color: #fff;
}

.tool-content {
    max-width: 1000px;
    margin: 0 auto;
}

.tool-content h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.size-inputs .input-group {
    max-width: 400px;
    margin: 0 auto;
}

.form-control {
    border-radius: 8px;
    padding: 8px 12px;
}

.btn {
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0d6efd;
    border: none;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    border: none;
}

.form-select {
    border-radius: 8px;
    padding: 8px 12px;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 100;
        width: 100%;
        height: auto;
        padding: 10px;
    }
    
    main {
        margin-top: 60px;
    }
    
    .tool-content {
        padding: 15px;
    }
    
    .control-panel {
        padding: 15px;
    }
}

.image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #dc3545;
}

.gif-preview {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.compression-controls {
    margin: 20px 0;
    background: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.quality-control {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quality-value {
    font-size: 14px;
    padding: 5px 10px;
}

.preview-container {
    margin: 20px 0;
}

.preview-container img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preset-buttons {
    display: flex;
    gap: 8px;
}

.preset-buttons .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.preset-buttons .btn:hover {
    transform: translateY(-1px);
}

.preview-card {
    height: 100%;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.preview-card .card-body {
    padding: 1.5rem;
}

.preview-card img {
    width: 100%;
    border-radius: 8px;
    margin-top: 1rem;
}

.preview-card .card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.preview-card .badge {
    font-size: 13px;
    padding: 5px 10px;
    font-weight: 500;
}

.preview-card .badge.bg-secondary {
    background-color: #6c757d !important;
}

.preview-card .badge.bg-success {
    background-color: #198754 !important;
    position: relative;
    padding-left: 25px;
}

.preview-card .badge.bg-success::before {
    content: "→";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

#compressBtn {
    padding: 12px 24px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#compressBtn i {
    font-size: 20px;
}

/* 自定义滑动条样式 */
.custom-range {
    height: 6px;
    padding: 0;
    background: #e9ecef;
    border-radius: 3px;
    cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    background: #0d6efd;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    -webkit-appearance: none;
    margin-top: -6px;
}

.custom-range::-webkit-slider-runnable-track {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .compression-controls .row > div {
        margin-bottom: 1rem;
    }
    
    .preset-buttons {
        flex-direction: column;
    }
    
    .preview-container .col-md-6:first-child {
        margin-bottom: 1.5rem;
    }
}

/* 文件列表样式 */
.compression-list {
    max-height: 400px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: start;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fff;
    transition: all 0.2s ease;
}

.file-item:hover {
    border-color: #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.file-info {
    width: 200px;
    margin-right: 15px;
}

.compression-preview {
    flex: 1;
    margin-right: 15px;
}

.preview-images {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.preview-original,
.preview-compressed {
    flex: 1;
    position: relative;
}

.preview-original img,
.preview-compressed img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 4px;
    background: #f8f9fa;
}

.compression-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress {
    flex: 1;
    height: 6px;
}

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

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

.file-size {
    font-size: 12px;
    color: #6c757d;
}

.compressed-size,
.preview-card .badge.bg-success {
    color: #fff;
    background-color: #198754;
}

.batch-actions {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
    margin-top: 20px;
}

.batch-actions button {
    min-width: 160px;
}

.compression-ratio {
    font-size: 12px;
    color: #198754;
    margin-left: 8px;
}

/* 拼音转换工具样式 */
.result-area {
    min-height: 210px;
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #f8f9fa;
    font-family: "Courier New", Courier, monospace;
    cursor: text;
    overflow-y: auto;
}

#pinyinConverter .card {
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

#pinyinConverter textarea {
    resize: none;
    font-size: 16px;
    line-height: 1.6;
}

#pinyinConverter .form-select {
    cursor: pointer;
}

#copyResult {
    padding: 4px 12px;
    font-size: 14px;
}

#copyResult i {
    margin-right: 4px;
}
 