body {
    font-family: 'Microsoft YaHei', sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('https://img.mod.wiki/acg/') center/cover no-repeat fixed;
    background-size: cover;
    background-attachment: fixed;
    color: #333;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* 响应式背景图片 */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
        padding: 10px;
    }
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin: 0 0 8px 0;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* 响应式标题 */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
}

.container {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    justify-content: center;
    flex: 1;
    align-items: stretch;
    min-height: 0;
}

/* 自定义滚动条样式 */
.upload-section::-webkit-scrollbar,
.preview-section::-webkit-scrollbar {
    width: 8px;
}

.upload-section::-webkit-scrollbar-track,
.preview-section::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.upload-section::-webkit-scrollbar-thumb,
.preview-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    border: none;
}

.upload-section::-webkit-scrollbar-thumb:hover,
.preview-section::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Firefox 滚动条样式 */
.upload-section,
.preview-section {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.6) transparent;
}

/* 响应式容器 */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        height: calc(100vh - 100px);
    }
    
    .upload-section {
        flex: 0 0 280px;
    }
    
    #previewImage {
        max-height: 450px;
    }
}

@media (max-width: 1199px) and (min-width: 769px) {
    .container {
        flex-wrap: wrap;
        height: auto;
    }
    
    .upload-section {
        flex: 1 1 300px;
    }
    
    .preview-section {
        flex: 1 1 500px;
    }
}

@media (max-width: 1024px) {
    .container {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
    }
    
    .container {
        flex-direction: column;
        gap: 10px;
        height: auto;
    }
    
    .upload-section, .preview-section {
        flex: 1;
        height: auto;
    }
}

.upload-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.06));
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    flex: 0 0 260px;
    backdrop-filter: blur(8px) saturate(110%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1;
    height: 100%;
    box-sizing: border-box;
}

.upload-section > * {
    position: relative;
    z-index: 2;
}

.upload-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01));
    border-radius: 16px;
    pointer-events: none;
}

.preview-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.06));
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(8px) saturate(110%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 1;
    height: 100%;
    box-sizing: border-box;
}

.preview-section > * {
    position: relative;
    z-index: 2;
}

.preview-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01));
    border-radius: 16px;
    pointer-events: none;
}

/* 响应式上传和预览区域 */
@media (max-width: 768px) {
    .upload-section,
    .preview-section {
        min-width: unset;
        width: 100%;
        padding: 15px;
    }
    
    .preview-section {
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .upload-section,
    .preview-section {
        padding: 10px;
        margin: 0;
    }
}

.upload-box {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 4px;
    text-align: center;
    margin-bottom: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 10px;
}

.upload-box svg {
    width: 35px;
    height: 35px;
    margin-bottom: 5px;
    color: #666;
}

.upload-box h3 {
    margin: 5px 0 3px 0;
    font-size: 11px;
    color: #333;
}

.upload-box:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.upload-box p {
    margin: 3px 0 0;
    color: #666;
    font-size: 10px;
}

.upload-box.highlight {
    border-color: #3498db;
    background-color: #ecf0f1;
}

.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    margin-top: 5px;
    margin-bottom: 5px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 响应式按钮 */
@media (max-width: 768px) {
    .btn {
        padding: 12px 20px;
        font-size: 16px;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 14px 20px;
        font-size: 16px;
        margin-top: 10px;
    }
}

.preview-container {
    width: 100%;
    max-width: 100%;
    margin-top: 5px;
    margin-bottom: 5px;
    position: relative;
    overflow: visible;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}

#previewImage {
    max-width: 100%;
    max-height: calc(100% - 120px);
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* 响应式预览图片 */
@media (max-width: 768px) {
    #previewImage {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    #previewImage {
        max-height: 300px;
    }
}

.watermark-settings {
    margin-top: 3px;
    width: 100%;
}

.watermark-settings h3 {
    margin-bottom: 3px;
    color: #2c3e50;
    font-size: 11px;
}

.setting-group {
    margin-bottom: 3px;
}

.setting-group label {
    display: block;
    margin-bottom: 2px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 11px;
}

.setting-group input[type="range"] {
    width: 100%;
}

.setting-group .range-value {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    justify-content: center;
    max-height: 80px;
    overflow-y: auto;
    padding: 3px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: #3498db;
}

/* 响应式缩略图 */
@media (max-width: 768px) {
    .thumbnail-container {
        gap: 8px;
    }
    
    .thumbnail {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .thumbnail-container {
        gap: 5px;
    }
}

.watermark-preview {
    max-width: 60px;
    max-height: 60px;
    margin-top: 5px;
    display: none;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-info {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.download-all-btn {
    margin-top: 20px;
    background-color: #27ae60;
}

.download-all-btn:hover {
    background-color: #219653;
}

.no-images-message {
    color: #7f8c8d;
    text-align: center;
    margin: 20px 0;
    font-style: italic;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    text-align: center;
    margin: 10px auto 0 auto;
    padding: 8px 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    flex-shrink: 0;
}