/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
 /* 微信浏览器提示样式 */
        #wechat-tip {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 9999;
            display: none;
            justify-content: center;
            align-items: center;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }
        
        .tip-content {
            background: white;
            border-radius: 12px;
            padding: 24px;
            margin: 20px;
            max-width: 320px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            animation: tipSlideIn 0.3s ease-out;
        }
        
        @keyframes tipSlideIn {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .tip-header {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
        }
        
        .tip-icon {
            width: 24px;
            height: 24px;
            background: #07C160;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            margin-right: 8px;
        }
        
        .tip-title {
            font-size: 18px;
            font-weight: 600;
            color: #333;
        }
        
        .tip-desc {
            font-size: 14px;
            color: #666;
            line-height: 1.4;
            margin-bottom: 20px;
        }
        
        .tip-steps {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 20px;
            text-align: left;
        }
        
        .step-item {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
        }
        
        .step-item:last-child {
            margin-bottom: 0;
        }
        
        .step-number {
            width: 20px;
            height: 20px;
            background: #07C160;
            border-radius: 50%;
            color: white;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 12px;
            flex-shrink: 0;
        }
        
        .step-text {
            font-size: 14px;
            color: #333;
            line-height: 1.4;
        }
        
        .step-text strong {
            color: #07C160;
        }
        
        
        /* 禁用页面滚动 */
        body.wechat-browser {
            overflow: hidden;
            position: fixed;
            width: 100%;
            height: 100%;
        }
        
        /* 确保弹窗在最上层 */
        #wechat-tip {
            z-index: 10000;
        }
        
body {
    font-family: 'FZYanZhenQingKai', 'Microsoft YaHei', Arial, sans-serif;
    background: hsl(0, 0%, 96%);
}

.container {
    min-height: 100vh;
    color: #fff;
    padding: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.container1{
    margin-top:30px ;
    margin-bottom: 20px;
}

.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    object-fit: cover;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: -1;
}

.header {
    margin-top: 45px;
    text-align: center;
    margin-bottom: -20px;
    padding: 0 10px;
}

.title {
    font-family: 
        /* 第一梯队：书法字体 */
        /* 'Liu Jian Mao Cao',  */
        'Ma Shan Zheng',
        
        /* 第二梯队：系统书法字体 */
        /* "STXingkai",  */
        /* "华文行楷",  */
        /* "LiSu",  */
        /* "隶书", */
        
        /* 第三梯队：备用字体 */
        "KaiTi", 
        "楷体",
        
        /* 最后回退 */
        "Microsoft YaHei", 
        "微软雅黑",
        sans-serif;
        
    font-size: clamp(27px, 5vw, 35px);
    font-weight: bold;
    line-height: 1.2;
    color: #fff;
}

.preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

.preview-title {
    font-size: clamp(16px, 4vw, 18px);
    margin-bottom: 15px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.canvas-container {
    width: min(80vw, 50vh, 200px);
    height: min(80vw, 50vh, 200px);
    aspect-ratio: 1/1;
    overflow: hidden;
    margin-bottom: 20px;
    background: #2c3e50;
    border-radius: 10px;
    border: 3px solid #fff;
    transition: all 0.3s ease;
}

.avatar-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.action-buttons {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: min(90vw, 300px);
    justify-content: center;
}

.btn {
    padding: clamp(10px, 2.5vw, 12px) clamp(20px, 5vw, 25px);
    border-radius: 30px;
    border: none;
    font-size: clamp(14px, 3.5vw, 16px);
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: clamp(80px, 20vw, 100px);
    cursor: pointer;
    /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); */
}

.upload-btn,.reset-btn {
    background: #1c8d6c;
    color: white;
}

.save-section {
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 0 10px;
    width: 100%;
    max-width: min(90vw, 400px);
}

.save-btn {
    width: 100%;
    background-color: rgb(183,4,4);
    color: white;
    padding: clamp(12px, 3vw, 15px);
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: clamp(14px, 3.5vw, 16px);
    font-weight: bold;
    transition: all 0.3s ease;
}

.avatar_choose {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 10px;
    width: 100%;
    max-width: min(100vw, 800px);
}

.section-header {
    margin-bottom: 12px;
    padding: 0;
    width: 100%;
}

.section-title {
    display: block;
    font-size: clamp(14px, 3.5vw, 16px);
    font-weight: bold;
    color: #fff;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.avatar-scroll {
    width: 100%;
    height: clamp(80px, 15vh, 95px);
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
}

.avatar-list {
    display: flex;
    flex-direction: row;
    height: 100%;
    align-items: center;
    gap: 12px;
    padding: 0 5px;
}

.avatar-item {
    width: clamp(75px, 12vw, 90px);
    height: clamp(75px, 12vw, 90px);
    flex-shrink: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #34495e;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.avatar-item:hover {
    transform: scale(0.95);
    border-color: #e74c3c;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatars, .frame-section {
    margin-bottom: 25px;
    width: 100%;
}

/* 修改头像框区域为两行同步滚动 */
.frame-section {
    margin-bottom: 30px;
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: clamp(14px, 3.5vw, 16px);
    font-weight: bold;
    color: #fff;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.frame-scroll-container {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    /* 隐藏滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.frame-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.frame-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 5px 0;
    /* 增加两行之间的间距 */
    margin-bottom: 15px;
}

.frame-item {
    flex: 0 0 auto;
    width: clamp(70px, 13vw, 85px);
    height: clamp(70px, 13vw, 85px);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    /* 添加非透明背景 */
    background: rgba(39, 41, 56, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.frame-item:hover {
    transform: scale(1.05);
    background: rgba(39, 41, 56, 1);
}

.frame-item.active {
    border-color: #e74c3c;
    box-shadow: 0 0 12px rgba(231, 76, 60, 0.6);
    background: rgba(39, 41, 56, 1);
}

.frame-item.placeholder {
    background-color: transparent;
    cursor: default;
    box-shadow: none;
    border: 2px solid transparent;
}

.frame-preview {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-text {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

.last-placeholder {
    visibility: hidden;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .frame-list {
        gap: 8px;
        padding: 0 3px;
        /* 在手机端进一步增加两行之间的间距 */
        margin-bottom: 20px;
    }
    
    .frame-item {
        width: clamp(70px, 13vw, 85px);
        height: clamp(70px, 13vw, 85px);
    }
    
    /* 在手机端增加整个头像框区域的上下间距 */
    .frame-section {
        margin-bottom: 35px;
    }
}

@media (max-width: 480px) {
    .frame-list {
        /* 在更小的屏幕上进一步增加间距 */
        margin-bottom: 25px;
    }
}

.bottom,.tips {
    display: flex;
    align-items: center;
    text-align: center;
    padding: 30px;
    color: #fff;
}

.tips{
    flex-direction: column;
    /* align-items: center; */
    text-align: left;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    margin: 10px 10px;
    /* margin: 0 10px 20px;
    backdrop-filter: blur(10px);
    max-width: min(95vw, 800px);
    align-self: flex-start; */
}

.bottom{
    justify-content: center;
}

.bottom-logo {
    width: 30px;
    height: 30px;
    margin: 20px;
}

.bottom-title {
    font-size: 14px;
    opacity: 0.8;
}