:root {
    --primary-color: #007AFF;
    --background-color: #F5F5F7;
    --card-background: #FFFFFF;
    --text-color: #1D1D1F;
    --border-radius: 12px;
}

* {
    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;
    margin: 0;
    padding-top: 64px;
    padding-bottom: 60px;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

header {
    text-align: center;
    margin-bottom: 2rem;
}

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

header p {
    color: #666;
}

.upload-section {
    margin-bottom: 2rem;
}

.upload-area {
    background: var(--card-background);
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    width: 48px;
    height: 48px;
    fill: var(--primary-color);
}

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

.preview-box {
    background: var(--card-background);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.preview-box h3 {
    margin-bottom: 1rem;
    text-align: center;
}

.preview-box img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    cursor: zoom-in;
}

.preview-box::after {
    content: '点击查看大图';
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-box:hover::after {
    opacity: 1;
}

.file-info {
    margin-top: 1rem;
    text-align: center;
    color: #666;
}

.controls {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px 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: #ddd;
    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-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

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

/* 应用容器 */
.app-container {
    display: block;
    min-height: 100vh;
    background: var(--background-color);
}

/* 侧边导航栏 */
.sidebar {
    width: 200px;
    background: var(--card-background);
    border-right: 1px solid #E5E5E5;
    padding: 0;
    position: fixed;
    top: 64px;
    left: 0;
    height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 900;
}

.nav-menu {
    list-style: none;
    margin-top: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f0f7ff;
    color: #1a73e8;
    border-left-color: #1a73e8;
}

.nav-item.active {
    background: #f0f7ff;
    color: #1a73e8;
    border-left-color: #1a73e8;
    font-weight: 500;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    fill: currentColor;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 32px;
    margin-left: 200px;
    margin-top: 0;
    overflow-y: auto;
    min-height: calc(100vh - 124px);
}

.feature-section {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-section.active {
    display: block;
}

/* 预设尺寸按钮 */
.preset-sizes {
    margin-bottom: 24px;
}

.preset-buttons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.preset-btn {
    padding: 8px 24px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.preset-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.preset-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

.preset-btn:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 5px;
}

.preset-btn::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    border: 2px solid currentColor;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.preset-btn[data-size="small"]::before {
    transform: scale(0.6);
}

.preset-btn[data-size="medium"]::before {
    transform: scale(0.8);
}

.preset-btn[data-size="large"]::before {
    transform: scale(1);
}

.preset-btn.active::before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 自定义尺寸输入 */
.custom-size {
    margin-bottom: 24px;
}

.size-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

.input-group input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.checkbox-group {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 预览模态框样式 */
.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.close-modal {
    position: fixed;
    right: 32px;
    top: 32px;
    width: 32px;
    height: 32px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.8);
}

#modalImage {
    max-width: 100%;
    max-height: calc(90vh - 100px);
    object-fit: contain;
}

.modal-info {
    margin-top: 16px;
    color: #fff;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

/* 顶部导航栏样式 */
.header {
    background: linear-gradient(135deg, #1a73e8, #289cf5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 0.8rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
    display: flex;
    align-items: center;
}

.header-content {
    max-width: 1200px;
    margin: 0;
    width: 100%;
    padding-left: 20px;
    display: flex;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-image {
    width: 32px;
    height: 32px;
    margin-right: 8px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo {
    font-size: 1.5rem;
    color: #ffffff;
    margin: 0;
    font-weight: 500;
    line-height: 1.2;
}

.slogan {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
    line-height: 1.2;
}

/* 页脚样式 */
.footer {
    background-color: #f8f9fa;
    padding: 1rem;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid #eaeaea;
    z-index: 900;
}

.footer p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}
 