:root {
    /* 新的配色方案 - 简约苹果风格 */
    --accent-color: #f9ba2a; /* 主要高亮色 - 黄色 */
    --accent-hover: #e6a526; /* 黄色悬停态 */
    --black: #000000; /* 黑色 */
    --dark-gray: #1d1d1f; /* 深灰色 */
    --medium-gray: #6e6e73; /* 中等灰色 */
    --light-gray: #f5f5f7; /* 浅灰色背景 */
    --white: #ffffff; /* 纯白色 */
    --border-light: #d2d2d7; /* 浅色边框 */
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15); /* 中等阴影 */
    --radius: 12px; /* 统一圆角 */
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* 苹果风格缓动 */
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--white);
    color: var(--dark-gray);
    line-height: 1.47059;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Upload Area */
.upload-section {
    margin-bottom: 2rem;
    flex-shrink: 0;
}

/* 上传弹窗主要内容区域 */
.upload-main-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-height: 350px;
    position: relative;
}

/* 上传状态样式 */
.upload-state {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray);
    border: 1px dashed var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--accent-color);
    background-color: rgba(249, 186, 42, 0.04);
    transform: none;
}

.upload-zone.drag-over {
    border-color: var(--accent-color);
    background-color: rgba(249, 186, 42, 0.08);
    border-style: solid;
    transform: none;
}

.upload-content {
    text-align: center;
    padding: 1.5rem;
}

.upload-icon {
    margin-bottom: 12px;
}

.upload-icon .material-icons {
    font-size: 40px;
    color: var(--accent-color);
}

.upload-text h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--black);
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.upload-text p {
    font-size: 14px;
    color: var(--medium-gray);
    margin: 0;
    line-height: 1.4;
}

/* 预览状态样式 */
.preview-state {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem;
}

.image-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.image-preview img {
    max-width: 90%;
    max-height: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-info {
    display: none;
}

/* 隐藏文件输入 */
input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* 弹窗操作按钮区域 */
.modal-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px 16px;
    flex-shrink: 0;
}

.primary-btn {
    background-color: var(--accent-color);
    color: var(--black);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 6px rgba(249, 186, 42, 0.24);
    min-height: 40px;
}

.primary-btn:hover:not(:disabled) {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(249, 186, 42, 0.32);
    transform: none;
}

.primary-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 预览贴纸弹窗 */
.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 2000;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border: none;
    outline: none;
    box-shadow: none;
}

.preview-modal.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: successOverlayFadeIn 0.6s ease-out;
}

/* 制作成功蒙层出现动画 - 纯透明度渐变 */
@keyframes successOverlayFadeIn {
    0% {
        opacity: 0;
        background-color: rgba(0, 0, 0, 0);
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    100% {
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.preview-modal .close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: buttonFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.7s both;
}

.preview-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 按钮淡入动画 */
@keyframes buttonFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 次要操作组样式 */
.preview-secondary-controls {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 32px;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: controlsFadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s both;
}

/* 主操作样式 */
.preview-primary-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: controlsFadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1s both;
}

/* 控件淡入上升动画 */
@keyframes controlsFadeInUp {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 复位按钮样式 */
.reset-btn {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    letter-spacing: -0.022em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.reset-btn .material-icons {
    font-size: 16px;
}

/* 下载按钮增强样式 */
.download-btn {
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(249, 186, 42, 0.4);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 186, 42, 0.5);
}

#sticker-preview-area {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none !important;
    outline: none !important;
    animation: stickerBounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s both;
}

/* 贴纸弹性放大动画 */
@keyframes stickerBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 3D预览容器 */
.three-d-container {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    perspective: 1000px;
    z-index: 2;
    border: none;
    outline: none;
    box-shadow: none;
}

.three-d-container.active {
    display: block;
}

.css-3d-sticker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) rotateX(10deg) rotateY(0deg);
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease-out;
    animation: float 3s ease-in-out infinite;
    border: none;
    outline: none;
    box-shadow: none;
}

.css-3d-sticker img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    transform: scale(1.1);
    border-radius: 12px;
    border: none;
    outline: none;
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%) rotateX(10deg) rotateY(0deg);
    }
    50% {
        transform: translate(-50%, -52%) rotateX(10deg) rotateY(0deg);
    }
}

/* 预览区域样式 - 与上传区域保持一致 */
.preview-area {
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background-color: var(--light-gray);
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
}

.preview-area img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: var(--transition);
    border-radius: 8px;
}

.preview-area img:hover {
    transform: scale(1.02);
}

/* 预览提示样式 */
.preview-tips {
    display: none;
    margin-top: 12px;
    color: var(--medium-gray);
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    padding: 8px;
}

.preview-tips.active {
    display: flex;
}

.preview-tips .material-icons {
    font-size: 18px;
}

/* 首页样式 */
.landing-page {
    min-height: 100vh;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 背景层 */
.landing-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/background.jpg') center/cover;
    z-index: 0;
}

/* 前景层 */
.landing-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/foreground.png.png') center/cover;
    z-index: 2;
    pointer-events: none;
}

/* 人物中景层（小狗）*/
.landing-dog-img {
    position: absolute;
    left: 50%;
    top: calc(50% + 20px);
    transform: translate3d(-50%, -50%, 0) scale3d(1.1, 1.1, 1);
    width: 60vw;
    max-width: 90vw;
    max-height: 70vh;
    object-fit: contain;
    object-position: center;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    opacity: 0.95;
    animation: dogFloat 2s ease-in-out infinite;
    transition: var(--transition);
    /* 确保图片渲染一致性 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    /* 优化渲染性能 */
    contain: layout style paint;
}

/* 制作中状态的人物图片 */
.landing-dog-img.processing-character {
    animation: processingCharacterFloat 1.6s ease-in-out infinite;
    transform: translate3d(-50%, -50%, 0) scale3d(1.05, 1.05, 1);
    will-change: transform;
}

/* 人物翻转进入动画 - 用于切换到制作中状态 */
.landing-dog-img.flip-to-processing {
    animation: flipToProcessing 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    will-change: transform, opacity;
}

/* 人物翻转退出动画 - 用于切换回初始状态 */
.landing-dog-img.flip-to-normal {
    animation: flipToNormal 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    will-change: transform, opacity;
}

/* 翻转到制作中状态的动画 */
@keyframes flipToProcessing {
    0% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.1, 1.1, 1) rotateY(0deg);
        opacity: 1;
    }
    50% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.08, 1.08, 1) rotateY(90deg);
        opacity: 0;
    }
    100% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.05, 1.05, 1) rotateY(0deg);
        opacity: 1;
    }
}

/* 翻转回普通状态的动画 */
@keyframes flipToNormal {
    0% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.05, 1.05, 1) rotateY(0deg);
        opacity: 1;
    }
    50% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.08, 1.08, 1) rotateY(-90deg);
        opacity: 0;
    }
    100% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.1, 1.1, 1) rotateY(0deg);
        opacity: 1;
    }
}

/* 制作中状态人物的专属动画 */
@keyframes processingCharacterFloat {
    0%, 100% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.05, 1.05, 1) translateY(0px) rotate(0deg);
    }
    25% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.05, 1.05, 1) translateY(-8px) rotate(-1deg);
    }
    50% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.05, 1.05, 1) translateY(-4px) rotate(0deg);
    }
    75% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.05, 1.05, 1) translateY(-6px) rotate(1deg);
    }
}

@media (max-width: 768px) {
    .landing-dog-img {
        width: 80vw;
        max-height: 40vh;
    }
}

/* 小狗浮动动画 */
@keyframes dogFloat {
    0%, 100% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.1, 1.1, 1) translateY(0px);
    }
    50% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.1, 1.1, 1) translateY(-6px);
    }
}

/* 小狗处理中翻转动画 */
@keyframes dogProcessing {
    0% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.1, 1.1, 1) rotateY(0deg);
    }
    25% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.1, 1.1, 1) rotateY(-12deg);
    }
    50% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.1, 1.1, 1) rotateY(0deg);
    }
    75% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.1, 1.1, 1) rotateY(12deg);
    }
    100% {
        transform: translate3d(-50%, -50%, 0) scale3d(1.1, 1.1, 1) rotateY(0deg);
    }
}

/* 按钮容器 */
.landing-page .hero-section {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    padding: 0 0 50px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 主按钮 - 苹果风格 */
.start-btn {
    background: var(--black);
    color: var(--accent-color);
    border: none;
    padding: 18px 48px;
    font-size: 19px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    letter-spacing: -0.022em;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.start-btn:hover {
    transform: translateY(-2px);
    background: var(--dark-gray);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* 处理中的按钮状态 */
.start-btn.processing {
    background: #ff3b30;
    color: var(--white);
    box-shadow: 0 4px 14px rgba(255, 59, 48, 0.3);
    animation: processingPulse 2s ease-in-out infinite;
}

.start-btn.processing:hover {
    background: #ff2d55;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
}

/* 处理中按钮脉动动画 */
@keyframes processingPulse {
    0%, 100% {
        box-shadow: 0 4px 14px rgba(255, 59, 48, 0.3);
    }
    50% {
        box-shadow: 0 4px 14px rgba(255, 59, 48, 0.6);
    }
}

@media (max-width: 768px) {
    .landing-page .hero-section {
        padding: 0 0 40px 0;
    }
    
    .start-btn {
        padding: 16px 40px;
        font-size: 17px;
    }
}

/* 弹窗样式 - 苹果风格 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    background-color: var(--white);
    width: 90%;
    max-width: 520px;
    height: auto;
    min-height: 380px;
    max-height: 580px;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 20px;
    color: var(--black);
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0;
}

.modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px 12px;
    min-height: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--black);
}

.close-btn .material-icons {
    font-size: 18px;
}

/* 扫描动画 */
@keyframes scan {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

.scan-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(249, 186, 42, 0.3) 50%,
        transparent 100%
    );
    animation: scan 2s linear infinite;
    pointer-events: none;
    z-index: 2;
    border-radius: var(--radius);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: 400px;
        margin: 20px;
        border-radius: 16px;
        min-height: 360px;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 16px 20px 12px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 16px 20px 10px;
    }
    
    .modal-actions {
        padding: 10px 20px 14px;
    }
    
    .upload-main-area {
        min-height: 260px;
        max-height: 260px;
    }
    
    .upload-content {
        padding: 1.2rem;
    }
    
    .upload-icon .material-icons {
        font-size: 36px;
    }
    
    .upload-text h3 {
        font-size: 15px;
    }
    
    .upload-text p {
        font-size: 13px;
    }
    
    .image-preview img {
        max-width: 90%;
        max-height: 90%;
    }
    
    .primary-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-height: 36px;
    }
    
    .close-btn {
        width: 28px;
        height: 28px;
        padding: 4px;
    }
    
    .close-btn .material-icons {
        font-size: 16px;
    }
    
    .preview-secondary-controls {
        bottom: 100px;
        gap: 20px;
        padding: 12px 20px;
        flex-direction: column;
        border-radius: 20px;
    }
    
    .preview-primary-controls {
        bottom: 30px;
    }
    
    .download-btn {
        padding: 14px 32px;
        font-size: 16px;
    }
    
    .toggle-switch-container {
        gap: 10px;
    }
    
    .toggle-switch {
        width: 46px;
        height: 24px;
    }
    
    .slider:before {
        height: 16px;
        width: 16px;
        left: 3px;
        top: 3px;
    }
    
    input:checked + .slider:before {
        transform: translateX(20px);
    }
    
    .preview-modal .close-btn {
        top: 20px;
        right: 20px;
    }
}

/* 处理中状态 - 隐藏，因为我们现在使用首页动画 */
.processing-state {
    display: none !important;
}

.processing-images {
    display: none;
}

.processing-img {
    display: none;
}

.stop-btn {
    display: none;
}

/* 加载覆盖层 */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(249, 186, 42, 0.3);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--white);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.022em;
}

/* 按钮加载器 */
.button-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top: 2px solid var(--black);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

/* 预览标题样式 */
.preview-header {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    animation: titleSlideIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s both;
}

.preview-header h2 {
    color: var(--white);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.022em;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 标题滑入动画 */
@keyframes titleSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 开关按钮样式 */
.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background-color: var(--white);
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: var(--black);
}

.slider:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

input:checked + .slider:hover {
    background-color: var(--accent-hover);
}

.toggle-label {
    color: var(--white);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.022em;
}

/* 礼花容器 */
.confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2001;
} 