/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "Heiti SC", "SimHei", sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

/* 顶部导航样式 */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.back-to-home {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    background-color: #f5f5f5;
    font-weight: 500;
}

.back-to-home:hover {
    background-color: #e5e5e5;
    color: #3498db;
}

.back-to-home i {
    margin-right: 5px;
}

.site-logo {
    height:58px;
    width: auto;
}

.site-title {
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-info {
    font-size: 13px;
    color: #777;
    padding: 6px 12px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

/* 顶部标题区域 */
header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.subtitle {
    font-size: 16px;
    color: #666;
}

/* 上传区域样式 */
.upload-area {
    background-color: #3498db;
    color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    border: 2px dashed #fff;
}

.upload-area h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.upload-desc {
    margin-bottom: 20px;
    font-size: 14px;
}

.dropzone {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropzone:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.dz-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dz-message i {
    font-size: 40px;
    margin-bottom: 10px;
}

.dz-message p {
    font-size: 16px;
}

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

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

.setting-group h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #444;
}

/* 单选按钮组样式 */
.radio-group {
    display: flex;
    gap: 10px;
}

.radio-btn {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background-color: #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-btn.active {
    background-color: #3498db;
    color: white;
}

.radio-btn input {
    display: none;
}

.radio-btn span {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.radio-btn.active:hover {
    background-color: #2980b9;
}

/* 尺寸选项样式 */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f0f0f0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-btn input {
    display: none;
}

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

.option-btn input:checked + span {
    font-weight: bold;
    color: #3498db;
}

/* 尺寸输入区样式 */
.dimension-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

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

.dimension-input label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    color: #444;
}

.input-group {
    position: relative;
}

.input-group input {
    width: 100px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

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

/* 图像处理选项样式 */
.image-options {
    display: flex;
    gap: 10px;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.btn-outline {
    background-color: white;
    border: 1px solid #3498db;
    color: #3498db;
}

.btn-outline:hover {
    background-color: #f0f8ff;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 图片预览区域样式 */
.preview-area {
    margin-top: 20px;
}

.preview-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 5px;
    margin-bottom: 10px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    align-items: center;
}

.preview-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
}

.preview-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
}

.file-name {
    font-weight: bold;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

.file-info {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.original-info {
    color: #777;
}

.processed-info {
    color: #3498db;
    display: block;
    margin-top: 5px;
}

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
    font-size: 12px;
}

.from-value {
    color: #777;
    margin-right: 5px;
}

.arrow {
    color: #aaa;
    margin: 0 5px;
}

.to-value {
    color: #3498db;
    font-weight: 500;
}

.size-change {
    font-size: 11px;
    padding: 1px 5px;
    margin-left: 8px;
    border-radius: 10px;
}

.size-decreased {
    background-color: #ebfbf0;
    color: #20b56e;
}

.size-increased {
    background-color: #fff5f5;
    color: #e74c3c;
}

.status-container {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
}

.preview-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    white-space: nowrap;
    min-width: 80px;
}

.preview-status i {
    font-size: 16px;
}

.status-waiting {
    color: #f39c12;
}

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

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

.status-error {
    color: #e74c3c;
}

.btn-download {
    padding: 6px 10px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    color: #3498db;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-download:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* 进度条样式 */
.progress-container {
    height: 5px;
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 20px;
    display: none;
}

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

/* 功能特点样式 */
.features {
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.feature-item i {
    color: #27ae60;
    margin-right: 10px;
    margin-top: 3px;
}

.feature-item p {
    flex: 1;
    color: #555;
}

/* 错误提示模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}

.close-btn:hover {
    color: #333;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .radio-group, .size-options, .dimension-inputs, .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .radio-btn, .option-btn, .btn {
        width: 100%;
        justify-content: center;
    }
    
    .dimension-input {
        width: 100%;
        justify-content: space-between;
    }
    
    .top-nav, .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .back-to-home, .site-info {
        width: 100%;
        justify-content: center;
    }
    
    .site-title {
        margin: 8px 0;
        justify-content: center;
    }
    
    .site-logo {
        height: 32px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .top-nav {
        padding: 10px 0;
    }
    
    .site-title {
        font-size: 16px;
    }
    
    .site-info {
        font-size: 12px;
    }
}

/* 按比例缩放滑块 */
.slider-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.slider {
    -webkit-appearance: none;
    width: 70%;
    height: 8px;
    border-radius: 5px;
    background: #d3d3d3;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

.percent-input {
    position: relative;
    width: 80px;
}

.input-suffix {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

/* 页脚样式 */
footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #777;
    font-size: 14px;
}

.footer-link {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #2980b9;
    text-decoration: underline;
}