/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
 
body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}
 
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
 
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}
 
header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}
 
header h1 i {
    margin-right: 10px;
    color: #3498db;
}
 
header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}
 
/* 上传区域 */
.converter-box {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}
 
.upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
    position: relative;
}
 
.upload-area:hover {
    border-color: #3498db;
    background-color: #f8fafc;
}
 
.upload-area i {
    font-size: 48px;
    color: #3498db;
    margin-bottom: 15px;
}
 
.upload-area p {
    font-size: 1.1rem;
    color: #7f8c8d;
}
 
#imageFiles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}
 
/* 预览区域 */
.preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    display: none;
}
 
.preview.show  {
    display: flex;
}
 
.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 5px;
    overflow: hidden;
}
 
.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
 
.preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(231, 76, 60, 0.8);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
}
 
/* 选项区域 */
.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
 
.form-group {
    margin-bottom: 15px;
}
 
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}
 
.form-group label i {
    margin-right: 8px;
    color: #3498db;
}
 
.form-group select, 
.form-group input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}
 
.form-group select:focus, 
.form-group input[type="text"]:focus {
    border-color: #3498db;
    outline: none;
}
 
.form-group input[type="range"] {
    width: calc(100% - 50px);
    vertical-align: middle;
}
 
#qualityValue {
    display: inline-block;
    width: 40px;
    text-align: right;
    margin-left: 10px;
    font-weight: bold;
    color: #3498db;
}
 
/* 按钮区域 */
.actions {
    display: flex;
    gap: 15px;
}
 
.btn-convert, .btn-reset {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
 
.btn-convert i, .btn-reset i {
    margin-right: 8px;
}
 
.btn-convert {
    background-color: #3498db;
    color: white;
}
 
.btn-convert:hover {
    background-color: #2980b9;
}
 
.btn-reset {
    background-color: #e74c3c;
    color: white;
}
 
.btn-reset:hover {
    background-color: #c0392b;
}
 
/* 特性区域 */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
 
.feature {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}
 
.feature i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 15px;
}
 
.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
}
 
.feature p {
    color: #7f8c8d;
    font-size: 0.95rem;
}
 
/* 页脚 */
footer {
    text-align: center;
    padding: 20px 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}
 
/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
 
    .options {
        grid-template-columns: 1fr;
    }
 
    .features {
        grid-template-columns: 1fr;
    }
 
    .upload-area {
        padding: 30px 15px;
    }
}
 
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
 
    .converter-box {
        padding: 20px 15px;
    }
 
    .actions {
        flex-direction: column;
    }
 
    .btn-convert, .btn-reset {
        width: 100%;
    }
}


/* 结果展示样式 */
.results-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}
 
.results-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}
 
.result-item {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
 
.result-item p {
    margin: 5px 0;
}
 
.batch-results .results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}
 
.summary {
    font-weight: bold;
    text-align: right;
    margin-top: 15px;
    font-size: 1.1rem;
}
 
.btn-download {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
    text-align: center;
}
 
.btn-download:hover {
    background-color: #218838;
}
 
.btn-download i {
    margin-right: 8px;
}



/* 结果容器 */
.results-container {
    margin-top: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}
 
.results-container h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}
 
.results-container h3 i {
    margin-right: 10px;
    color: #27ae60;
}
 
/* 单文件结果 */
.result-single .size-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
 
.size-original, .size-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}
 
.size-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}
 
.size-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}
 
.compression-ratio {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 15px;
}
 
.ratio-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #27ae60;
}
 
.ratio-label {
    font-size: 0.8rem;
    color: #7f8c8d;
}
 
/* 多文件结果 */
.result-multiple .results-summary {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
 
.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}
 
.summary-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}
 
.summary-value {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}
 
.summary-item.highlight  .summary-value {
    color: #27ae60;
    font-size: 1.1rem;
}
 
/* 下载按钮 */
.btn-download {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}
 
.btn-download:hover {
    background-color: #2980b9;
}
 
.btn-download i {
    margin-right: 8px;
}
 
/* 错误提示 */
.error-message {
    margin-top: 20px;
    padding: 15px;
    background-color: #fdecea;
    border-radius: 5px;
    border-left: 4px solid #e74c3c;
}
 
.error-content {
    display: flex;
    align-items: center;
    color: #c0392b;
}
 
.error-content i {
    margin-right: 10px;
}



/* 选择按钮样式 */
.btn-select {
    display: none;
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
    text-align: center;
}
 
.btn-select:hover {
    background-color: #2980b9;
}
 
/* 有文件时的上传区域样式 */
.upload-area.has-files  {
    border-color: #27ae60;
    background-color: #e8f5e9;
}

/* 产品介绍样式 */
.product-intro {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
 
.product-intro h2 {
    color: #2c3e50;
    margin-top: 0;
    font-size: 1.8em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
 
.product-intro h3 {
    color: #3498db;
    margin: 20px 0 15px;
    font-size: 1.3em;
}
 
.intro-features, .tech-advantages {
    margin-bottom: 20px;
}
 
.intro-features ul, .tech-advantages ul {
    list-style-type: none;
    padding-left: 0;
}
 
.intro-features li, .tech-advantages li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}
 
.intro-features i.fas,  .tech-advantages i.fas  {
    color: #27ae60;
    margin-right: 10px;
} 
 
.tech-advantages i.fas  {
    color: #e74c3c;
}