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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

/* 在现有样式基础上添加以下样式 */

.page {
    display: none;
}

.page.active {
    display: block;
}

.image-count {
    text-align: center;
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.preview-item {
    position: relative;
    display: inline-block;
    margin: 10px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: rgba(255,255,255,1);
}

.progress-container {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin: 10px 0;
    color: #666;
}

.result-section {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.result-section h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.love-index {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hearts {
    display: flex;
    gap: 2px;
}

.heart {
    font-size: 16px;
}

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.message.show {
    transform: translateX(0);
}

.message-info {
    background: #2196F3;
}

.message-success {
    background: #4CAF50;
}

.message-error {
    background: #f44336;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn.secondary {
    background: #f0f0f0;
    color: #333;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.upload-area {
    background: white;
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 60px 20px;
    margin: 30px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.upload-area p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 0.9rem;
    color: #999;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 30px 0;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

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

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

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

.image-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,0,0,0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.analyze-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4);
    margin-top: 20px;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.6);
}

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

.loading-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
}

.loading-circle {
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
    margin: 0 5px;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loading-circle:nth-child(1) { animation-delay: -0.32s; }
.loading-circle:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.analysis-text {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
    margin: 30px 0;
}

.progress {
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.result-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.result-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.result-section:last-child {
    border-bottom: none;
}

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

.result-section h3::before {
    content: '🎯';
    margin-right: 10px;
}

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

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .image-preview {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
}