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

:root {
    --primary-blue: #3b82f6;
    --primary-purple: #a855f7;
    --primary-pink: #ec4899;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #a855f7 50%, #ec4899 100%);
    --gradient-soft: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(168, 85, 247, 0.1) 50%, rgba(236, 72, 153, 0.1) 100%);
    --bg-light: #fafbfc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

.app-wrapper {
    position: relative;
    min-height: 100vh;
}

.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: var(--primary-gradient);
    opacity: 0.06;
    filter: blur(60px);
}

.bg-blobs {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.04;
    filter: blur(40px);
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-blue);
    top: -150px;
    left: -150px;
    animation: blobFloat 25s infinite ease-in-out;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--primary-purple);
    top: 100px;
    right: -100px;
    animation: blobFloat 20s infinite ease-in-out reverse;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: var(--primary-pink);
    bottom: 50px;
    left: 30%;
    animation: blobFloat 22s infinite ease-in-out;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -30px) scale(1.05); }
    50% { transform: translate(-30px, 40px) scale(0.95); }
    75% { transform: translate(30px, 30px) scale(1.08); }
}

.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 32px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 56px;
    animation: fadeInDown 0.6s ease-out;
}

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

.logo-wrapper {
    max-width: 600px;
}

.model-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.model-label {
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.model-dropdown {
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.model-dropdown:hover {
    background: var(--bg-light);
}

.model-dropdown:focus {
    background: var(--gradient-soft);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.logo-icon {
    font-size: 3rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.15) rotate(5deg); }
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.function-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.function-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.function-tab:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-2px);
}

.function-tab.active {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.function-tab .tab-icon {
    font-size: 1.25rem;
}

.function-tab .tab-text {
    font-weight: 600;
}

.function-panel {
    display: none;
}

.function-panel.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

.buyer-show-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

.buyer-show-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 100%;
}

.buyer-show-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

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

.buyer-show-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.buyer-show-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.buyer-show-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    min-width: 100px;
}

.feature-icon {
    font-size: 1.5rem;
}

.feature-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.buyer-show-btn {
    width: 100%;
    padding: 14px 32px;
    font-size: 1.1rem;
}

.buyer-show-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.product-card {
    /* 继承 upload-card 样式 */
}

.product-card .preview-container {
    height: 222px;
}

.product-card .upload-area {
    height: 222px;
}

.buyer-show-options {
    margin-top: 14px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.option-section h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.group-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.group-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.group-option:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.group-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.group-option input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.group-option span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

#buyerShowContainer {
    height: 222px;
}

#buyerShowGallery {
    margin-top: 20px;
}

.buyer-show-preview {
    margin-top: 14px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.preview-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.preview-header span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.preview-grid {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.preview-item {
    width: calc(33.33% - 6px);
    aspect-ratio: 3/4;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: all var(--transition-fast);
    position: relative;
}

.preview-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.preview-item.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.preview-item .preview-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
}

.preview-item .preview-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.preview-item.selected .preview-check {
    opacity: 1;
}

.preview-item .preview-download {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.preview-item:hover .preview-download {
    opacity: 1;
}

.buyer-show-options {
    margin-top: 14px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.main-content {
    animation: fadeIn 0.6s ease-out 0.2s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 40px;
    align-items: start;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px 20px;
    background: var(--gradient-soft);
    border-radius: var(--radius-lg);
}

.section-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--shadow-sm);
}

.section-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.section-desc {
    font-size: 0.87rem;
    color: var(--text-secondary);
}

.upload-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.upload-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.upload-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.upload-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.upload-card:hover::before {
    opacity: 1;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    border-radius: var(--radius-full);
    margin-bottom: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.card-badge.purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(168, 85, 247, 0.05));
    border-color: rgba(168, 85, 247, 0.2);
}

.badge-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.card-badge.purple .badge-number {
    color: var(--primary-purple);
}

.badge-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.clothes-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: transparent;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    background: rgba(168, 85, 247, 0.04);
}

.tab-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

.tab-emoji {
    font-size: 1rem;
}

.upload-area {
    width: 100%;
    height: 500px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #fafbfc, #f8fafc);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area:hover {
    border-color: var(--primary-blue);
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
}

.upload-area.dragover {
    border-color: var(--primary-purple);
    background: linear-gradient(135deg, #f5f3ff, #faf5ff);
    transform: scale(1.02);
    box-shadow: inset 0 0 20px rgba(168, 85, 247, 0.1);
}

.clothes-upload:hover {
    border-color: var(--primary-purple);
    background: linear-gradient(135deg, #f5f3ff, #faf5ff);
}

.upload-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.upload-icon-box svg {
    width: 28px;
    height: 28px;
}

.upload-icon-box.purple {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    color: var(--primary-purple);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.15);
}

.upload-area:hover .upload-icon-box {
    transform: scale(1.15);
}

.upload-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.upload-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.preview-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: none;
    box-shadow: var(--shadow-sm);
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.preview-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.remove-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    backdrop-filter: blur(4px);
}

.remove-btn svg {
    width: 16px;
    height: 16px;
}

.remove-btn:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: scale(1.1);
}

.second-upload {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-light);
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.second-upload .upload-area {
    height: 150px;
}

.second-upload .preview-container {
    height: 150px;
}

.shot-type-selector {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    display: none;
}

.selector-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.selector-icon {
    font-size: 1.1rem;
}

.selector-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
    min-width: 80px;
    justify-content: center;
}

.radio-option:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-option input[type="radio"]:checked + .option-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 2px var(--primary-color));
}

.radio-option input[type="radio"]:checked + .option-icon + .option-text {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-option input[type="radio"]:checked ~ .option-icon {
    transform: scale(1.1);
}

.radio-option .option-icon {
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.radio-option .option-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.radio-option input[type="radio"]:checked ~ .option-text {
    color: var(--primary-color);
}

.detected-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.detected-label {
    color: var(--text-secondary);
}

.detected-value {
    color: var(--primary-color);
    font-weight: 600;
}

.action-section {
    margin-top: 24px;
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

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

.swap-btn {
    position: relative;
    width: 100%;
    padding: 20px 40px;
    font-size: 1.15rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-xl);
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all var(--transition-normal);
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(168, 85, 247, 0.4);
}

.swap-btn:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(168, 85, 247, 0.5);
}

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

.swap-btn.processing {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 8px 28px rgba(168, 85, 247, 0.4); }
    50% { opacity: 0.9; box-shadow: 0 8px 40px rgba(168, 85, 247, 0.6); }
}

.btn-icon {
    font-size: 1.3rem;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-border {
    position: absolute;
    inset: 2px;
    border-radius: calc(var(--radius-xl) - 2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.swap-btn:hover:not(:disabled) .btn-border {
    opacity: 1;
}

.result-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-md);
}

.result-container {
    width: 100%;
    max-width: 333px;
    height: 333px;
    margin: 0 auto 24px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 2px dashed var(--border-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.result-container.has-image {
    border-style: solid;
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

.empty-state {
    text-align: center;
    padding: 40px;
    position: relative;
}

.empty-decoration {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
}

.deco-1 {
    width: 80px;
    height: 80px;
    background: var(--primary-blue);
    top: 20px;
    left: 30%;
    animation: float 4s infinite ease-in-out;
}

.deco-2 {
    width: 60px;
    height: 60px;
    background: var(--primary-purple);
    bottom: 40px;
    right: 25%;
    animation: float 4s infinite ease-in-out 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite ease-in-out;
    position: relative;
    z-index: 1;
}

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

.empty-state p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.empty-hint {
    font-size: 0.9rem;
    color: var(--text-muted) !important;
}

.result-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.pose-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.gallery-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.download-all-btn {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.download-all-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pose-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.pose-controls {
    display: flex;
    gap: 8px;
}

.pose-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.pose-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    user-select: none;
    background: var(--bg-card);
    border: 1px solid transparent;
}

.pose-checkbox:hover {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.pose-checkbox input[type="checkbox"] {
    display: none;
}

.pose-checkbox .checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.pose-checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.pose-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.pose-checkbox .pose-label {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 500;
}

.pose-checkbox input[type="checkbox"]:checked + .checkmark + .pose-label {
    color: var(--primary-blue);
    font-weight: 600;
}

.pose-checkbox input[type="checkbox"]:checked {
    background: var(--primary-blue-50);
    border-color: var(--primary-blue);
}

.pose-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.pose-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.pose-btn {
    flex-shrink: 0;
}

.download-btn {
    width: 100%;
    justify-content: center;
}

.pose-count-dropdown {
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
    min-width: 80px;
}

.pose-count-dropdown:hover {
    border-color: var(--primary-purple);
}

.pose-count-dropdown:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.secondary-btn {
    padding: 14px 36px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid var(--primary-purple);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--primary-purple);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-normal);
}

.secondary-btn:hover:not(:disabled) {
    background: rgba(168, 85, 247, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.2);
}

.secondary-btn:disabled {
    border-color: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
}

.secondary-btn.processing {
    animation: pulse 2s infinite;
}

.primary-btn {
    padding: 14px 36px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-normal);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.5);
}

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

.pose-gallery {
    display: none;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--border-light);
    animation: fadeInUp 0.4s ease-out;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.gallery-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.gallery-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 6px 12px;
    background: var(--bg-light);
    border-radius: var(--radius-full);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.gallery-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

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

.gallery-item .download-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 16px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    backdrop-filter: blur(2px);
}

.gallery-item:hover .download-overlay {
    opacity: 1;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.download-btn:hover {
    background: white;
    transform: scale(1.05);
}

.download-btn svg {
    width: 16px;
    height: 16px;
}

.footer {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
    animation: fadeIn 0.6s ease-out 0.5s both;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.87rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-purple);
}

.divider {
    color: var(--border-color);
}

@media (max-width: 1100px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .right-panel {
        order: -1;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 32px 20px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .section-header {
        padding: 14px 16px;
    }
    
    .upload-card {
        padding: 20px;
    }
    
    .upload-area {
        height: 220px;
    }
    
    .preview-container {
        height: 220px;
    }
    
    .result-container {
        height: 380px;
    }
    
    .swap-btn {
        padding: 16px 32px;
        font-size: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .secondary-btn, .primary-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 24px 16px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .logo-icon {
        font-size: 2.5rem;
    }
    
    .upload-area {
        height: 200px;
    }
    
    .preview-container {
        height: 200px;
    }
    
    .result-container {
        height: 300px;
    }
    
    .empty-icon {
        font-size: 4rem;
    }
    
    .empty-state p {
        font-size: 0.95rem;
    }
}
