/* 全局样式 */
:root {
    --primary-color: #ff6b9d;
    --primary-light: #ff9bbd;
    --primary-dark: #e54b7d;
    --secondary-color: #9d65c9;
    --secondary-light: #bd85e9;
    --secondary-dark: #7d45a9;
    --accent-color: #5d54a4;
    --accent-light: #7d74c4;
    --accent-dark: #3d3484;
    --light-color: #ffffff;
    --dark-color: #333333;
    --background-color: #ffe6f2;
    --text-color: #5a4a6f;
    --bg-color: #f8f9fa;
    --bg-gradient: linear-gradient(135deg, #f8f9fa, #e9ecef);
    --border-radius: 16px;
    --box-shadow: 0 10px 30px rgba(255, 107, 157, 0.2);
    --box-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --badge-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    --badge-reflection: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 50%);
    --gradient-primary: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    --gradient-background: linear-gradient(135deg, #ffe6f2 0%, #f9d1ff 100%);
    --gradient-shine: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    --gradient-button: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: var(--gradient-background);
    color: var(--text-color);
    line-height: 1.6;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M10 10L90 90M90 10L10 90" stroke="%23ffcce6" stroke-width="1"/></svg>');
    background-size: 20px 20px;
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(255, 230, 242, 0.8) 100%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.8s ease-out;
}

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

.container::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="20" r="1" fill="%23ffcce6"/></svg>');
    background-size: 40px 40px;
    z-index: -1;
    opacity: 0.5;
    animation: backgroundMove 60s linear infinite;
    pointer-events: none;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeIn 1s ease-in-out;
    position: relative;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(255,255,255,0.9));
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.15);
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,107,157,0.1), rgba(157,101,201,0.1), rgba(93,84,164,0.1));
    background-size: 200% 200%;
    animation: gradientBG 15s ease infinite;
    z-index: 0;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    z-index: 1;
}

.title {
    color: transparent;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.title-icon {
    margin: 0 15px;
    animation: float 3s ease-in-out infinite;
    font-size: 2.5rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.3);
}

.subtitle {
    color: var(--secondary-color);
    font-size: 1.3rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    display: inline-block;
    z-index: 1;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.8);
}

.header-decoration {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.decoration-item {
    font-size: 1.2rem;
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(255, 107, 157, 0.3));
}

.decoration-item:nth-child(2) {
    animation-delay: 0.4s;
    color: var(--secondary-color);
}

.decoration-item:nth-child(3) {
    animation-delay: 0.8s;
    color: var(--accent-color);
}

/* 主要内容区域 */
.main-content {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-primary);
    z-index: 1;
}

/* 上传区域 */
.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    border: 3px dashed var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.7);
}

.upload-area:hover {
    background-color: rgba(157, 101, 201, 0.1);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(157, 101, 201, 0.2);
    border-color: var(--primary-color);
}

.upload-area::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 300% 300%;
    animation: gradientBG 8s ease infinite;
    opacity: 0.15;
    z-index: -1;
    border-radius: var(--border-radius);
}

.upload-area::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-shine);
    animation: shine 3s infinite;
    z-index: 1;
    pointer-events: none;
}

.upload-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(1px);
    box-shadow: 0 0 10px var(--primary-color);
}

.sparkle-1 {
    top: 20%;
    left: 15%;
    animation: sparkleMove 7s linear infinite;
}

.sparkle-2 {
    top: 70%;
    left: 85%;
    animation: sparkleMove 9s linear infinite;
    animation-delay: 1s;
    background-color: var(--secondary-color);
    box-shadow: 0 0 10px var(--secondary-color);
}

.sparkle-3 {
    top: 40%;
    left: 60%;
    animation: sparkleMove 8s linear infinite;
    animation-delay: 2s;
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.upload-content {
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: white;
    animation: float 3s ease-in-out infinite;
    display: inline-block;
    filter: drop-shadow(0 10px 15px rgba(157, 101, 201, 0.3));
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(157, 101, 201, 0.4);
}

.upload-icon i {
    position: relative;
    z-index: 1;
    font-size: 3.5rem;
}

.upload-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    animation: rotate 8s linear infinite;
}

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

.upload-text {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--accent-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.upload-hint {
    color: #8a7b9d;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* 预览区域 */
.preview-section {
    animation: fadeIn 0.8s cubic-bezier(0.26, 0.53, 0.74, 1.48);
}

.image-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 30px;
}

.original-image,
.processed-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.original-image h3,
.processed-image h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--accent-color);
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.original-image h3::after,
.processed-image h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 1.5px;
}

.image-wrapper {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
    z-index: 1;
}

.image-wrapper img {
    max-width: 100%;
    max-height: 300px;
    border-radius: calc(var(--border-radius) - 5px);
    transition: transform 0.3s ease;
}

/* 胸章样式 */
.badge-wrapper {
    background-color: #f8f8f8;
    border-radius: var(--border-radius);
    padding: 40px;
    margin-top: 15px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 350px;
    background-image: radial-gradient(circle, #ffffff 0%, #f0f0f0 100%);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.badge-wrapper::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="20" r="1" fill="%23dddddd"/></svg>');
    background-size: 30px 30px;
    opacity: 0.5;
    animation: backgroundMove 30s linear infinite;
    pointer-events: none;
}

.badge-container {
    position: relative;
    display: inline-block;
    border-radius: 50%;
    box-shadow: var(--badge-shadow);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
    animation: float 5s ease-in-out infinite;
    z-index: 1;
}

.badge-container:hover {
    transform: scale(1.05) rotate(2deg);
}

.badge-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: var(--badge-reflection);
    pointer-events: none;
    z-index: 2;
}

.badge-container canvas {
    display: block;
    border-radius: 50%;
    max-width: 100%;
    max-height: 300px;
}

/* 不同形状的胸章 */
.badge-shape-circle {
    border-radius: 50%;
}

.badge-shape-circle canvas {
    border-radius: 50%;
}

.badge-shape-square {
    border-radius: 10%;
}

.badge-shape-square canvas {
    border-radius: 10%;
}

.badge-shape-heart {
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.badge-shape-heart canvas {
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.badge-shape-hexagon {
    border-radius: 15%;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.badge-shape-hexagon canvas {
    border-radius: 0;
}

.arrow {
    font-size: 2rem;
    color: white;
    margin: 0 20px;
    animation: pulse 1.5s infinite;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(255, 107, 157, 0.3);
    position: relative;
    overflow: hidden;
}

.arrow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    animation: rotate 8s linear infinite;
}

.arrow i {
    position: relative;
    z-index: 1;
    font-size: 1.8rem;
}

/* 控制区域 */
.controls {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.05) 0%, rgba(157, 101, 201, 0.05) 100%);
    z-index: -1;
}

.controls::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-button);
    background-size: 200% 200%;
    animation: gradientBG 8s ease infinite;
}

.control-group {
    margin-bottom: 25px;
    position: relative;
    transition: all 0.3s ease;
}

.control-group:hover {
    transform: translateX(5px);
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--accent-color);
    position: relative;
    padding-left: 15px;
    transition: all 0.3s ease;
}

.control-group label::before {
    content: '❖';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-size: 0.8em;
}

select,
input[type="range"] {
    width: 100%;
    padding: 10px;
    border-radius: var(--border-radius);
    border: 2px solid #e0d5eb;
    background-color: white;
    color: var(--text-color);
    font-family: inherit;
    transition: all 0.3s ease;
}

select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%235a4a6f" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}

select:focus,
input[type="range"]:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(157, 101, 201, 0.2);
}

input[type="range"] {
    -webkit-appearance: none;
    height: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--secondary-color);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input[type="color"] {
    -webkit-appearance: none;
    width: 100%;
    height: 40px;
    border: none;
    border-radius: var(--border-radius);
    padding: 0;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.1);
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    justify-content: center;
}

.color-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    justify-content: center;
}

.color-preset {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.color-preset:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.btn {
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-shine);
    transition: 0.5s;
    z-index: 1;
}

.btn:hover::before {
    left: 100%;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn:hover::after {
    transform: translateX(0);
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.btn i {
    position: relative;
    z-index: 2;
    margin-right: 5px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    background-size: 200% 200%;
    animation: gradientBG 8s ease infinite;
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    background-size: 200% 200%;
    animation: gradientBG 8s ease infinite;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    box-shadow: 0 4px 8px rgba(157, 101, 201, 0.2);
}

.btn-outline:hover {
    background-color: rgba(157, 101, 201, 0.1);
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--secondary-color);
    font-size: 1rem;
    position: relative;
    margin-top: 40px;
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.95));
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px 20px;
}

.footer::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(255, 107, 157, 0.4);
}

.footer p {
    margin: 5px 0;
}

.footer i {
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

.footer-note {
    font-size: 0.9rem;
    margin-top: 10px;
    color: var(--accent-color);
    opacity: 0.8;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 8px 18px;
    border-radius: 20px;
    display: inline-block;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.footer-decoration {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.decoration-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.6;
    animation: pulse 2s infinite;
}

.decoration-dot:nth-child(2) {
    animation-delay: 0.4s;
    background: var(--secondary-color);
}

.decoration-dot:nth-child(3) {
    animation-delay: 0.8s;
    background: var(--primary-color);
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(10px) rotate(-2deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50%, -50%); }
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes sparkleMove {
    0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    25% { transform: translate(20px, 15px) scale(1.5); opacity: 0.8; }
    50% { transform: translate(40px, 0) scale(1); opacity: 0.6; }
    75% { transform: translate(20px, -15px) scale(1.5); opacity: 0.8; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .image-container {
        flex-direction: column;
    }
    
    .original-image,
    .processed-image {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }
    
    .btn {
        padding: 10px 20px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.loading div {
    position: absolute;
    top: 33px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--primary-color);
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.loading div:nth-child(1) {
    left: 8px;
    animation: loading1 0.6s infinite;
}

.loading div:nth-child(2) {
    left: 8px;
    animation: loading2 0.6s infinite;
}

.loading div:nth-child(3) {
    left: 32px;
    animation: loading2 0.6s infinite;
}

.loading div:nth-child(4) {
    left: 56px;
    animation: loading3 0.6s infinite;
}

@keyframes loading1 {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

@keyframes loading3 {
    0% { transform: scale(1); }
    100% { transform: scale(0); }
}

@keyframes loading2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(24px, 0); }
}