* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    min-height: 100vh;
    padding-top: 70px; /* 为固定导航栏留出空间 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-blog-link {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.nav-blog-link:hover {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
    transform: translateY(-2px);
}



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

/* Header */
header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

header p {
    color: #6b7280;
    font-size: 1.2rem;
}

/* Upload Section */
.upload-section {
    margin-bottom: 3rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.upload-section.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.upload-area {
    border: 3px dashed #d1d5db;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    background: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: #9ca3af;
    background: #f3f4f6;
    transform: translateY(-5px);
}

.upload-area.dragover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    transform: scale(1.02);
}

.upload-content {
    position: relative;
    z-index: 2;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: grayscale(1);
    transition: filter 0.3s ease;
}

.upload-area:hover .upload-icon {
    filter: grayscale(0);
}

.upload-area h2 {
    color: #374151;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.upload-area p {
    color: #6b7280;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.browse-text {
    color: #4CAF50;
    font-weight: 600;
    text-decoration: underline;
}

.file-types {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Processing Section */
.processing-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.image-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.image-box {
    flex: 1;
    text-align: center;
    min-width: 400px;
    max-width: 600px;
    padding: 1rem;
}

.image-box h3 {
    color: #374151;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.image-box canvas {
    max-width: 100%;
    max-height: 800px;
    min-height: 400px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: white;
    border: 2px solid #ddd;
}

/* Remove background and borders when canvas is empty */
.image-box canvas[width="0"] {
    background: transparent;
    border: none;
    box-shadow: none;
    min-height: 0;
}

.arrow {
    font-size: 2rem;
    color: #6b7280;
    font-weight: bold;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 150px;
}

.btn-primary {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.3);
}

.btn-success {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(33, 150, 243, 0.3);
}

.btn-secondary {
    background: #ffffff;
    color: #374151;
    border: 2px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-2px);
}

/* Features Section */
.features-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
}

.features-section h2 {
    text-align: center;
    color: #374151;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    color: #374151;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* How to Use Section */
.how-to-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
}

.how-to-section h2 {
    text-align: center;
    color: #374151;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step h3 {
    color: #374151;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.step p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0 1rem 0;
    color: #6b7280;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    text-align: left;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #374151;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.footer-section li:before {
    content: "•";
    color: #2563eb;
    position: absolute;
    left: 0;
}

.footer-bottom {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    text-align: center;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    .nav-container {
        height: 60px;
    }
    
    .nav-links {
        margin-left: 1rem;
    }
    
    .nav-blog-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    

    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-area h2 {
        font-size: 1.5rem;
    }
    
    .image-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .arrow {
        transform: rotate(90deg);
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .features-section h2,
    .how-to-section h2 {
        font-size: 2rem;
    }
    
    .btn {
        min-width: 200px;
    }
    
    .image-box canvas {
        max-height: 500px;
        min-height: 300px;
    }
    
    .image-box canvas[width="0"] {
        min-height: 0;
    }
    
    .image-box {
        min-width: 280px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 60px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-logo {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    header {
        padding: 1rem 0;
    }
    
    .upload-area {
        padding: 1.5rem 0.5rem;
    }
    
    .features-section,
    .how-to-section {
        padding: 2rem 1rem;
    }
    
    .image-box canvas {
        max-height: 400px;
        min-height: 250px;
    }
    
    .image-box canvas[width="0"] {
        min-height: 0;
    }
    
    .image-box {
        min-width: 250px;
        max-width: 100%;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
} 