/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    position: relative;
}

/* 水印样式 */
.watermark {
    position: fixed;
    top: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    pointer-events: none;
    user-select: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: #ff6b9d;
    animation: heartbeat 2s ease-in-out infinite;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.section {
    display: none;
    width: 100%;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: slideIn 0.5s ease-out;
}

.section.active {
    display: block;
}

/* 介绍页面样式 */
.intro-content {
    text-align: center;
}

.feature-icon {
    margin-bottom: 30px;
}

.feature-icon i {
    font-size: 4rem;
    color: #667eea;
    animation: float 3s ease-in-out infinite;
}

.intro-content h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #333;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.step {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

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

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 20px;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: #333;
}

.step-content p {
    color: #666;
    font-size: 1rem;
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b9d, #ff8a9b);
    color: white;
    box-shadow: 0 10px 20px rgba(255, 107, 157, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 107, 157, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: #f8f9ff;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
}

/* 上传区域样式 */
.upload-content {
    text-align: center;
}

.upload-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.upload-tip {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-area:hover {
    border-color: #ff6b9d;
    background: #fff5f8;
}

.upload-area.dragover {
    border-color: #ff6b9d;
    background: #fff5f8;
    transform: scale(1.02);
}

.upload-placeholder i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
    display: block;
}

.upload-placeholder p {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
}

.upload-format {
    font-size: 0.9rem;
    color: #999 !important;
}

/* 已上传图片样式 */
.uploaded-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.image-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.image-item:hover {
    transform: scale(1.05);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 107, 157, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.image-remove:hover {
    background: #ff6b9d;
    transform: scale(1.1);
}

.upload-status {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

#imageCount {
    color: #667eea;
    font-weight: 600;
}

#minRequirement {
    color: #999;
    margin-left: 10px;
}

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 分析页面样式 */
.analysis-content {
    text-align: center;
}

.loading-animation {
    margin-bottom: 30px;
}

.heart-loading {
    display: inline-block;
    font-size: 4rem;
    color: #ff6b9d;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.analysis-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.analysis-tip {
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #ff6b9d);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: #666;
    font-size: 1rem;
}

/* 结果页面样式 */
.result-content h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: #333;
}

.result-card {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
    line-height: 1.8;
}

.result-section {
    margin-bottom: 25px;
}

.result-section h3 {
    color: #667eea;
    font-size: 1.3rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-section p {
    color: #555;
    margin-bottom: 10px;
}

.result-section ul {
    color: #555;
    padding-left: 20px;
}

.result-section li {
    margin-bottom: 5px;
}

/* 底部样式 */
.footer {
    margin-top: 30px;
    text-align: center;
}

.privacy-notice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.privacy-notice i {
    color: #ff6b9d;
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    color: white;
}

.loading-spinner {
    font-size: 3rem;
    color: #ff6b9d;
    animation: spin 2s linear infinite;
    margin-bottom: 20px;
}

/* 动画 */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

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

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .section {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .steps {
        gap: 15px;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .uploaded-images {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        font-size: 1rem;
        padding: 12px 25px;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-placeholder i {
        font-size: 2.5rem;
    }
    
    .upload-placeholder p {
        font-size: 1rem;
    }
    
    .result-card {
        padding: 20px;
    }
}