/* 全局样式 */
:root {
    --primary-color: #007AFF;
    --background-color: #F5F5F7;
    --card-background: #FFFFFF;
    --text-color: #1D1D1F;
    --border-radius: 12px;
    --domain-color: #FF6B00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

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

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 2rem;
}

/* 头部顶部区域 */
.header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* 语言切换按钮 */
.language-toggle {
    display: flex;
    align-items: center;
}

.lang-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lang-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 网站品牌和域名样式 */
.site-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.domain-badge {
    background-color: var(--domain-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.2rem;
    margin-left: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    color: #86868B;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--domain-color);
    font-weight: 600;
}

/* 特点列表样式 */
.features {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1rem auto;
    max-width: 800px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.features ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    text-align: left;
}

.features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
}

.features li strong {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* 上传区域样式 */
.upload-area {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    border: 2px dashed #E5E5E5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
}

.upload-box {
    padding: 2rem;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

/* 预览区域样式 */
.preview-container {
    margin-top: 2rem;
}

/* 总大小信息样式 */
.total-size-info {
    background: #F5F5F7;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.total-size-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.total-size-item {
    padding: 0.5rem;
    text-align: center;
}

.total-size-label {
    font-weight: 600;
}

#totalSavings {
    color: #34C759; /* 绿色表示节省 */
}

/* 图片导航控件 */
.image-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    background: var(--card-background);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #0056b3;
}

.nav-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.image-counter {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.preview-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.original-image,
.compressed-image {
    background: var(--card-background);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.image-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    background: #F5F5F7;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 多图片区域样式 - 隐藏 */
.multi-images-container {
    display: none;
}

/* 控制区域样式 */
.controls {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: #E5E5E5;
    border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.download-buttons {
    display: flex;
    gap: 1rem;
}

.download-btn,
.download-all-btn,
.clear-all-btn {
    flex: 1;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover,
.download-all-btn:hover,
.clear-all-btn:hover {
    background: #0056b3;
}

/* 为清除按钮设置特殊颜色 */
.clear-all-btn {
    background: #FF3B30;
}

.clear-all-btn:hover {
    background: #E02D26;
}

.quality-note {
    font-size: 0.9rem;
    color: #86868B;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .preview-box {
        grid-template-columns: 1fr;
    }

    .quality-control {
        flex-direction: column;
        align-items: flex-start;
    }

    .download-buttons {
        flex-direction: column;
    }
    
    .total-size-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-top {
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .lang-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* 页脚样式 */
.site-footer {
    background-color: var(--card-background);
    padding: 1.5rem;
    text-align: center;
    margin-top: 3rem;
    border-top: 1px solid #E5E5E5;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.site-footer p {
    margin: 0.5rem 0;
    color: #86868B;
    text-align: center;
    width: 100%;
}

.site-footer strong {
    color: var(--domain-color);
    font-size: 1.1rem;
}

.footer-links {
    margin-top: 20px;
    font-size: 14px;
}

.footer-links a {
    color: #86868B;
    text-decoration: none;
    padding: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-links .separator {
    color: #999;
    margin: 0 5px;
} 