* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 顶部导航样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2196f3;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #2196f3;
}

/* 主要内容区样式 */
.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1 {
    text-align: center;
    color: #2196f3;
    margin-bottom: 1rem;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.upload-container {
    background-color: #fff;
    border: 2px dashed #2196f3;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
    margin-bottom: 2rem;
}

.upload-container:hover {
    border-color: #1976d2;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.upload-text h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 1rem;
}

.upload-text p {
    color: #666;
    margin: 0.5rem 0;
}

.upload-btn {
    background-color: #2196f3;
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.upload-btn:hover {
    background-color: #1976d2;
}

.result-container {
    margin-top: 2rem;
}

.image-preview {
    width: 100%;
    margin-bottom: 1rem;
}

.comparison-slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.original-image,
.processed-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.processed-image {
    z-index: 2;
}

.original-image {
    z-index: 1;
}

.original-image img,
.processed-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #fff;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 40px;
    height: 100%;
    transform: translateX(-50%);
    cursor: ew-resize;
    display: flex;
    justify-content: center;
    z-index: 3;
}

.slider-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    transform: translateX(-50%);
    box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-button svg {
    fill: #2196f3;
}

.download-btn {
    display: block;
    width: 200px;
    margin: 1rem auto;
    background-color: #4caf50;
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #388e3c;
}

.loading {
    text-align: center;
    margin: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 底部版权样式 */
footer {
    background-color: #fff;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    width: 100%;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer p {
    margin: 0.5rem 0;
    color: #666;
}

.footer a {
    color: #666;
    text-decoration: none;
}

.footer a:hover {
    color: #2196f3;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-preview {
        flex-direction: column;
    }
    
    .nav-links {
        display: none;
    }
}

/* 导航栏样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2196f3;
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0 1rem;
}

.nav-menu a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #2196f3;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-btn, .register-btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.login-btn {
    color: #666;
}

.register-btn {
    background-color: #2196f3;
    color: #fff;
}

.register-btn:hover {
    background-color: #1976d2;
}

/* 调整主要内容区域的上边距，为固定导航栏留出空间 */
main {
    margin-top: 60px;
    padding: 2rem 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column;
    }

    .nav-menu li {
        margin: 0.5rem 0;
    }
}

.ad-container {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 15px;
}

.ad-content {
    border: 1px dashed #ccc;
    padding: 40px;
    border-radius: 4px;
    text-align: center;
    color: #666;
    font-size: 14px;
    background-color: #fff;
} 