/* 基本样式重置和全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f7f9fc;
}

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

/* 页眉样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 标签页切换样式 */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 25px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #3498db;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    margin-bottom: 30px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #3498db;
    background-color: #f0f8ff;
}

.upload-prompt {
    position: relative;
}

.upload-icon {
    font-size: 3rem;
    color: #bdc3c7;
    margin-bottom: 10px;
    display: block;
}

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

/* 设置区域样式 */
.settings {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

input[type="range"] {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

select {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 1rem;
}

/* 批量处理进度条样式 */
.batch-progress {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 15px;
    background-color: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    width: 0;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: right;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* 批量预览区域样式 */
.batch-preview {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.batch-summary {
    margin-bottom: 20px;
}

.batch-summary h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.summary-content {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 15px;
    border: 1px solid #eee;
}

/* 文件列表样式 */
.file-list {
    margin-bottom: 20px;
}

.file-list h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.file-list-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 5px;
}

.file-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.file-name {
    font-weight: 500;
    color: #2c3e50;
    margin-right: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.file-status {
    font-size: 0.9rem;
}

.status-waiting {
    color: #7f8c8d;
}

.status-processing {
    color: #3498db;
}

.status-completed {
    color: #2ecc71;
}

.status-error {
    color: #e74c3c;
}

.file-info {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 3px;
}

/* 预览区域样式 */
.preview-area {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.preview-box {
    flex: 1;
    min-width: 300px;
}

.preview-box.full-width {
    flex: 0 0 100%;
}

.preview-box h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.img-container {
    position: relative;
    width: 100%;
    border-radius: 5px;
    overflow: hidden;
    background-color: #f5f5f5;
    margin-bottom: 10px;
}

.img-container img {
    display: block;
    max-width: 100%;
    margin: 0 auto;
}

.img-info {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 裁剪工具区域样式 */
.cropper-container {
    margin-bottom: 20px;
}

.batch-info {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-left: 3px solid #3498db;
}

.batch-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #2c3e50;
}

.batch-info p {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.img-editor {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.crop-tools {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.crop-ratio {
    margin-bottom: 15px;
}

.crop-ratio label {
    font-weight: 600;
    color: #2c3e50;
    margin-right: 10px;
}

/* 按钮样式 */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-btn {
    background-color: #f0f0f0;
    color: #333;
}

.tool-btn:hover {
    background-color: #e0e0e0;
}

.reset-btn {
    background-color: #95a5a6;
    color: white;
}

.reset-btn:hover {
    background-color: #7f8c8d;
}

.apply-btn, .download-btn {
    background-color: #3498db;
    color: white;
}

.apply-btn:hover, .download-btn:hover {
    background-color: #2980b9;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding-top: 20px;
    margin-top: 30px;
    color: #7f8c8d;
    border-top: 1px solid #eaeaea;
}

/* 响应式样式调整 */
@media (max-width: 768px) {
    .preview-container {
        flex-direction: column;
    }
    
    .preview-box {
        min-width: 100%;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-name {
        max-width: 100%;
        margin-bottom: 5px;
    }
}

/* 裁剪工具的样式修复 */
.cropper-container.cropper-bg {
    background-image: none !important;
}

.cropper-view-box {
    outline: 1px solid #3498db;
    outline-color: rgba(52, 152, 219, 0.75);
}

.cropper-point {
    background-color: #3498db;
}

/* 格式转换功能样式 */
#convert-tab {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#convert-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

#convert-upload:hover, #convert-upload.dragover {
    border-color: #007BFF;
    background-color: #f0f7ff;
}

#convert-upload i {
    font-size: 48px;
    color: #aaa;
    margin-bottom: 15px;
}

#convert-upload h3 {
    margin: 10px 0;
    color: #555;
}

#convert-upload p {
    color: #777;
    margin: 5px 0;
}

#convert-settings {
    display: none;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#convert-settings h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.format-select {
    margin: 15px 0;
}

.format-select label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.format-select select {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
}

.jpeg-settings {
    margin: 15px 0;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

#batch-convert-preview {
    display: none;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#batch-convert-preview h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

#convert-progress {
    margin: 15px 0;
}

#convert-summary {
    background-color: #f0f7ff;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

#convert-summary h4 {
    margin-top: 0;
    color: #007BFF;
}

/* 共享样式 */
.file-list-container {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

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

.file-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.file-info {
    font-size: 0.9em;
    color: #777;
}

.file-status {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
}

.status-waiting {
    background-color: #eee;
    color: #777;
}

.status-processing {
    background-color: #fff7e5;
    color: #f90;
}

.status-completed {
    background-color: #e5f7e5;
    color: #4caf50;
}

.status-error {
    background-color: #fee;
    color: #f44336;
} 