/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 移除移动端点击蓝色高亮 */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* 设置根字体大小，基于视口宽度，以500px宽度为基准 */
html {
    font-size: 16px;
    /* 默认基准 */
}

/* 移动端根据视口宽度动态调整根字体大小 */
@media (max-width: 500px) {
    html {
        font-size: calc(100vw / 31.25);
        /* 500px / 16px = 31.25 */
    }
}

body {
    font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #fff;
    background: #000;
    min-height: 100vh;
    /* 性能优化：启用硬件加速 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 主容器 */
.main-container {
    max-width: 500px;
    margin: 0 auto;
    background: #ac0600;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    /* 移动端滚动优化 */
    -webkit-overflow-scrolling: touch;
}

/* 背景图层 */
.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./assets/banner-bg.png');
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

.banner-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 60%);
    pointer-events: none;
}

/* 确保所有内容在背景之上 */
.main-container>*:not(.banner-bg):not(.fixed-footer) {
    position: relative;
    z-index: 1;
}


/* PC端适配 - 保持窄屏布局 */
@media (min-width: 768px) {
    .main-container {
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    }
}

.container {
    padding: 0 1.875rem;
    /* 30px */
    padding-bottom: 4.5rem;
    /* 120px - 为固定按钮预留更多空间 */
}

.header-logo img {
    max-width: 21.875rem;
    /* 350px */
    width: 72%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 顶部标题区域 */
.banner-section {
    text-align: center;
    margin-top: 2rem;
    /* 20px */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    /* 10px */
}

.banner-main {
    width: 95%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.main-title {
    /* SEO 友好的隐藏方式：保留给搜索引擎，但不显示不占位 */
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}


/* 产品展示区 */
.products-section {
    margin-bottom: 0.7rem;
    /* 30px */
    position: relative;
    /* 移动端优化：创建新的层叠上下文，稳定子元素定位 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* 产品列表装饰 */
.list-deco-1 {
    width: 15% !important;
    top: 5%;
    left: -7%;
    z-index: 10 !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.list-deco-2 {
    width: 15% !important;
    top: 54%;
    right: -9%;
    z-index: 10 !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.list-deco-3 {
    width: 34% !important;
    top: 27%;
    left: -18%;
    filter: blur(0.5px);
    z-index: 1;
    /* 移动端优化：GPU加速，减少重排 */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.list-deco-4 {
    width: 34% !important;
    bottom: 18%;
    right: -23%;
    filter: blur(0.5px);
    z-index: 1;
    /* 移动端优化：GPU加速*/
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.list-deco-5 {
    width: 15% !important;
    bottom: -4.2%;
    left: -9%;
    z-index: 10 !important;
    /* 移动端优化：GPU加速 */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.section-header {
    text-align: center;
    /* 20px */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.merchandise {
    width: 80%;
    height: auto;
    margin: 2.6rem auto;
    /* 10px */
    position: relative;
    z-index: 5;
}

/* 装饰元素样式 */
.decoration {
    position: absolute;
    width: auto;
    height: auto;
    pointer-events: none;
    z-index: 3;
    /* 性能优化：GPU加速 */
    will-change: transform;
}


.join-button {
    margin-top: 14.7rem;
}


.join-button:active {
    transform: translateY(0.0625rem);
}

/* 性能优化：减少重绘 */
.join-button,
.fixed-footer-btn,
.discount-badge {
    will-change: transform;
}

.join-button .banner-btn {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9375rem;
    /* 15px */
    margin: 1rem auto 0;
    /* 35px */
    min-height: 18.75rem;
    /* 300px - 至少一行产品的高度，防止加载前布局跳动 */
    position: relative;
}

/* 产品加载提示 */
.products-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

/* 加载动画 - 旋转的圆圈 */
.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid rgba(255, 255, 255, 0.2);
    border-top: 0.25rem solid #fd4b46;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 加载文字 */
.loading-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fd4b46;
    text-align: center;
    text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
}

.product-card {
    background-color: transparent;
    background-image: url('./assets/flow-bg.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0;
    /* 移除圆角，使用图片自带的圆角 */
    padding: 1.125rem 0.5rem;
    /* 18px 8px */
    position: relative;
    z-index: 5;
    box-shadow: none;
    /* 移除阴影，使用图片自带的设计 */
    cursor: pointer;
}

.product-image {
    display: block;
    width: 100%;
    height: 10.625rem;
    /* 170px */
    object-fit: contain;
    /* 改为contain以完整显示图片 */
    border-radius: 0.9375rem;
    /* 15px */
    margin: 0 auto 0.625rem;
    /* 10px */
}

.badge-top-right {
    position: absolute;
    top: 0.75rem;
    /* 12px */
    right: 0.75rem;
    /* 12px */
    width: 3.75rem;
    /* 60px */
    height: 3.75rem;
    /* 60px */
    object-fit: contain;
}

.product-info {
    text-align: center;
}

.product-info h3 {
    font-size: 1rem;
    /* 16px */
    color: #333;
    margin-bottom: 0.1875rem;
    /* 3px */
    font-weight: 700;
}

/* 有多名称的产品，缩小字号 */
.product-card.has-multiline .product-info h3 {
    font-size: 0.88rem;
}

.discount-badge {
    background-color: transparent;
    background-image: url('./assets/flow-btn.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    font-size: 0.75rem;
    /* 12px */
    font-weight: 700;
    padding: 0.375rem 0.9375rem;
    /* 6px 15px */
    border-radius: 0;
    /* 移除圆角，使用图片自带的圆角 */
    display: inline-block;
    cursor: pointer;
}

/* CTA区域 */
.cta-section {
    overflow: visible;
    z-index: 5 !important;
}

/* entrance 容器 */
.entrance-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* entrance 主图 */
.entrance {
    width: 105%;
    height: auto;
    display: block;
    margin-left: -2.5%;
    margin-right: -2.5%;
}

/* entrance 按钮 - 定位在右侧 */
.entrance-btn {
    position: absolute;
    right: 0.7rem;
    top: 5.55rem;
    width: 17%;
    height: auto;
    animation: pulse 1.5s ease-in-out infinite;
    cursor: pointer;
    z-index: 2;
}

/* entrance 灯笼装饰 - 显示在最上层 */
.list-deco-6 {
    position: absolute;
    width: 16.5%;
    height: auto;
    top: -21%;
    right: -10%;
    z-index: 15;
    pointer-events: none;
}

/* 忽大忽小的动画效果 */
@keyframes pulse {
    0%, 100% {
        transform: translateY(-50%) scale(0.85);
    }
    50% {
        transform: translateY(-50%) scale(1.15);
    }
}


/* 底部奖励 */
/* 固定底部按钮 */
.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    max-width: 31.25rem;
    /* 500px */
    width: 100%;
    /* display: flex; */
    display: block;
    /* align-items: flex-end; */
    /* 底部对齐 */
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    pointer-events: none;
    /* 容器不阻挡点击 */
    background: #3df4ee;
    box-shadow: 0 -0.125rem 0.625rem rgba(0, 0, 0, 0.1);
}

.fixed-footer-left {
    width: 100% !important;
    /* background: #3df4ee; */
    background-color: #ffe9b9;
    background-image: url('./assets/bottom-fixed.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* flex: 1; */
    display: flex;
    align-items: center;
    padding: 0.9375rem 12rem 0.9375rem 1.25rem;
    /* 15px 10px 15px 20px */
    height: 3.75rem;
    /* 60px */
    pointer-events: auto;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    /* box-shadow: 0 -0.125rem 0.625rem rgba(0, 0, 0, 0.1); */
    /* 0 -2px 10px */
}

.footer-text {
    font-size: 1.1rem;
    /* 16px */
    font-weight: 700;
    color: #000;
    margin: 0;
    white-space: nowrap;
}

.footer-text .highlight-number {
    font-size: 1.375rem;
    /* 22px */
    font-weight: 900;
    color: #ff1655;
}

.fixed-footer-btn {
    width: 14rem;
    height: 5rem;
    /* 80px */
    background-image: url('./assets/fixed-btn.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    padding: 0.6rem 0 0.15rem 2.5rem;
    /* 顶部增加padding使文字下移，对齐左侧文字 */
    font-size: 1.33rem;
    /* 20px */
    font-weight: 900;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    /* margin-left: -1.5625rem; */
    /* -25px */
    position: absolute;
    right: 0;
    bottom: env(safe-area-inset-bottom);
    z-index: 2;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.fixed-footer-btn:active {
    transform: translateY(0.0625rem);
}

/* ==========================================
   复制提示框样式
   ========================================== */

.copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.2);
    animation: toastSlideIn 0.3s ease-out;
    max-width: 90%;
    word-wrap: break-word;
}

.copy-toast.success {
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
}

.copy-toast.error {
    background-color: #ef4444;
    color: white;
}

.copy-toast.loading {
    background-color: rgba(61, 244, 238, 0.9);
    color: #000;
}

.copy-toast.fade-out {
    animation: toastFadeOut 0.3s ease-out forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
}

/* 移动端适配 */
@media (max-width: 48rem) {
    .copy-toast {
        font-size: 0.875rem;
        padding: 0.875rem 1.5rem;
        max-width: 85%;
    }
}

/* ==========================================
   模态弹窗样式
   ========================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease-out;
    overflow-y: auto;
    padding: 1rem;
}

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

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-container {
    max-width: 30rem;
    width: 100%;
    margin: auto;
    background: #2f2f2f;
    border-radius: 1.25rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s ease-out;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-1.25rem) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: #2f2f2f;
    padding: 1.25rem;
    border-radius: 1.25rem 1.25rem 0 0;
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 0.9375rem;
    right: 0.9375rem;
    width: 1.875rem;
    height: 1.875rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #ffd36d;
    margin-bottom: 0.3125rem;
}

.modal-subtitle {
    font-size: 1.25rem;
    font-weight: bold;
    color: #ffd36d;
    margin-bottom: 1rem;
}

.modal-description {
    font-size: 0.975rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    padding: 0;
}

.modal-body {
    padding: 1.5625rem 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 0.375rem;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.1875rem;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.1875rem;
}

.form-field {
    margin-bottom: 1.5625rem;
}

.field-label {
    font-size: 1.0375rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.field-label .required {
    color: #fd4b46;
    margin-left: 0.125rem;
}

.field-input {
    width: calc(100% - 1.25rem);
    margin-left: 1.25rem;
    padding: 0.75rem 0.9375rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.625rem;
    color: #ffffff;
    font-size: 0.975rem;
    transition: all 0.3s;
    font-family: inherit;
}

/* 非textarea的input增加圆角 */
input.field-input {
    border-radius: 1.25rem;
}

.field-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.field-input:focus {
    outline: none;
    border-color: #ffd36d;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 0.1875rem rgba(0, 217, 255, 0.1);
}

textarea.field-input {
    min-height: 5rem;
    resize: vertical;
}

/* 商品选择下拉框样式 */
select.field-input {
    border-radius: 1.25rem;
    cursor: pointer;
    appearance: none;
    background: rgba(255, 255, 255, 0.05) url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 0.9375rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

select.field-input option {
    background: #1a1a2e;
    color: #ffffff;
    padding: 0.625rem;
}

select.field-input:hover {
    outline: none;
    border-color: #ffd36d;
    background: rgba(255, 255, 255, 0.12) url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 0.9375rem center !important;
    background-size: 1.25rem !important;
}

select.field-input:focus {
    outline: none;
    border-color: #ffd36d;
    background: rgba(255, 255, 255, 0.12) url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 0.9375rem center !important;
    background-size: 1.25rem !important;
    box-shadow: 0 0 0 0.1875rem rgba(0, 217, 255, 0.1);
}

select.field-input:active {
    background: rgba(255, 255, 255, 0.12) url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 0.9375rem center !important;
    background-size: 1.25rem !important;
}

/* 自定义下拉框样式 */
.custom-select-wrapper {
    width: calc(100% - 1.25rem);
    margin-left: 1.25rem;
    position: relative;
    user-select: none;
}

.custom-select-trigger {
    width: 100%;
    padding: 0.55rem 2.5rem 0.55rem 0.9375rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.25rem;
    color: #ffffff;
    font-size: 0.975rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    min-height: 2.75rem;
}

.custom-select-trigger:hover {
    border-color: #ffd36d;
    background: rgba(255, 255, 255, 0.12);
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: #ffd36d;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 0.1875rem rgba(0, 217, 255, 0.1);
}

.custom-select-trigger.field-error {
    border-color: #ff4757 !important;
    animation: shake 0.3s ease-in-out;
}

.custom-select-text {
    flex: 1;
    color: #ffffff;
    line-height: 1.5;
}

.custom-select-arrow {
    position: absolute;
    right: 0.9375rem;
    top: 0.75rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s;
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    right: 0;
    background: #595858;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.625rem;
    max-height: 15rem;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: all 0.3s;
}

.custom-select-wrapper.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-options::-webkit-scrollbar {
    width: 0.375rem;
}

.custom-select-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.1875rem;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.1875rem;
}

.custom-option {
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.custom-option.selected {
    background: #ffd36d;
}

.custom-option.selected .option-text{
    color: #2f2f2f !important;
}

.option-image {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 0.375rem;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    color: #ffffff;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-option-loading {
    padding: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9125rem;
}

.file-upload-area {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin-left: 1.25rem;
}

.file-upload-box {
    width: 7.5rem;
    height: 7.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.file-upload-box:hover {
    border-color: #ffd36d;
    background: rgba(0, 217, 255, 0.05);
}

.file-upload-box input[type="file"] {
    display: none;
}

.upload-icon {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.4);
}

/* 预览图片样式 */
.file-preview-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.625rem;
}

/* 删除按钮 */
.remove-file {
    position: absolute;
    top: 0.3125rem;
    right: 0.3125rem;
    width: 1.75rem;
    height: 1.75rem;
    background: rgba(255, 71, 87, 0.95);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: none;
    z-index: 12;
}

.remove-file:hover {
    background: rgba(255, 71, 87, 1);
}

/* 预览按钮 */
.preview-file {
    position: absolute;
    bottom: 0.3125rem;
    right: 0.3125rem;
    width: 1.75rem;
    height: 1.75rem;
    background: rgba(0, 217, 255, 0.95);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    font-size: 0.875rem;
    cursor: pointer;
    display: none;
    z-index: 11;
}

.preview-file:hover {
    background: rgba(0, 217, 255, 1);
}

.file-upload-box.has-file .remove-file,
.file-upload-box.has-file .preview-file {
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-box.has-file .upload-icon {
    display: none;
}

/* 图片预览弹窗 */
.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

.image-preview-modal.active {
    display: flex;
}

.image-preview-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.5);
}

.image-preview-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.image-preview-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.terms-content {
    padding: 0.5rem 0;
    margin-left: 1.25rem;
    font-size: 0.9125rem;
    line-height: 1.4;
}

.terms-section {
    margin-bottom: 0.875rem;
}

.terms-section-title {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.4rem;
}

.terms-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    color: rgba(255, 255, 255, 0.6);
}

.terms-icon {
    flex-shrink: 0;
    width: 1.5rem;
    font-size: 1rem;
    color: initial;
    opacity: 1;
}

.terms-text {
    flex: 1;
    line-height: 1.4;
}

.terms-item-detail {
    margin-top: 0.2rem;
    padding-left: 0;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-top: 0.9375rem;
    margin-left: 1.25rem;
}

.checkbox-field input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    cursor: pointer;
    accent-color: #ffd36d;
}

.checkbox-field label {
    flex: 1;
    font-size: 0.975rem;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
}

.submit-btn {
    width: 100%;
    padding: 0.9375rem;
    background: #fd4b46;
    border: none;
    border-radius: 1.5625rem;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
    margin-top: 1.25rem;
}

.submit-btn:disabled {
    cursor: not-allowed;
}

.error-message {
    color: #ff4757;
    font-size: 0.85rem;
    margin-top: 0.3125rem;
    margin-left: 1rem;
    display: none;
}

.field-input.error,
.field-input.field-error,
.field-select.field-error {
    border-color: #ff4757 !important;
    animation: shake 0.3s ease-in-out;
}

.field-input.error~.error-message {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.file-error {
    margin-top: 0.5rem;
}

.file-upload-box.error-box {
    border-color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

.field-hint {
    font-size: 0.9125rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
    margin-left: 1.25rem;
    line-height: 1.5;
    white-space: pre-line;
}

/* 移动端适配 */
@media (max-width: 48rem) {
    .modal-overlay {
        padding: 0;
        align-items: flex-start;
    }

    .modal-container {
        border-radius: 0;
        max-height: 100vh;
    }

    .modal-header {
        padding: 1rem;
        border-radius: 0;
    }

    .modal-body {
        padding: 1.25rem 1rem;
    }

    .field-label {
        font-size: 0.975rem;
    }

    .field-input {
        font-size: 0.9125rem;
        padding: 0.625rem 0.75rem;
    }

    .file-upload-box {
        width: 6.25rem;
        height: 6.25rem;
    }
    
    /* 移动端按钮优化 */
    .remove-file,
    .preview-file {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.875rem;
    }
    
    /* 移动端图片预览 */
    .image-preview-close {
        top: 1rem;
        right: 1rem;
    }
    
    /* 移动端自定义下拉框 */
    .option-image {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .option-text {
        font-size: 0.875rem;
    }
    
    .custom-option {
        padding: 0.625rem 0.75rem;
    }
}

/* ==========================================
   提交成功弹窗样式
   ========================================== */

.success-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    animation: modalFadeIn 0.3s ease-out;
    overflow-y: auto;
    padding: 0;
    cursor: pointer;
}

/* 第二屏时，外部不可点击 */
.success-dialog-overlay[data-stage="groups"] {
    cursor: default;
}

.success-dialog-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
}

.success-dialog-container {
    max-width: 31.25rem;
    /* 500px - 最大宽度保持在移动端合理范围 */
    width: 100%;
    max-height: 80vh;
    /* 最大高度为屏幕的 80% */
    margin: auto;
    position: relative;
    cursor: default;
}

.success-dialog-content {
    width: 100%;
    min-height: 27rem;
    max-height: 80vh;
    /* 最大高度为屏幕的 80% */
    /* 500px - 基本高度 */
    border-radius: 1.25rem;
    padding: 4.5rem 4.5rem;
    animation: modalSlideIn 0.4s ease-out;
    position: relative;
    /* 确保背景图随内容拉伸 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 背景图片 */
.success-dialog-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: 1.25rem;
    z-index: 0;
    pointer-events: none;
}

/* 确保内容在背景图之上 */
.success-dialog-content > *:not(.success-dialog-bg) {
    position: relative;
    z-index: 1;
}

/* 成功弹窗关闭按钮 - 放在弹窗下方，透明简洁样式 */
.success-dialog-close-bottom {
    position: absolute;
    bottom: -3.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.success-dialog-close-bottom:active {
    transform: translateX(-50%) scale(0.95);
}

/* 移动端优化 */
@media (max-width: 48rem) {
    .success-dialog-close-bottom {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.3rem;
        bottom: -3rem;
    }
}

/* 第一阶段：商品展示 */
.success-stage-product {
    margin-top: 1rem;
    color: #fff;
    animation: fadeIn 0.4s ease-in;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 第二阶段淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(0.625rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-title {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0.5rem 0;
    background: linear-gradient(90deg, #fff0a9 10%, #ffffff 35%, #ffe64e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.5));
    flex-shrink: 0;
    /* 防止被压缩 */
}

/* 产品区域 - 左右布局 */
.success-product-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.success-product-box {
    width: 10rem;
    height: 10rem;
    flex-shrink: 0;
    background-image: url('./assets/dialog-prod.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.success-product-info {
    flex: 1;
    text-align: left;
}

.success-subtitle {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.125rem;
    text-align: left;
}

.success-notice {
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
    line-height: 1.6;
    text-align: left;
}

.highlight-text {
    color: #ffd700;
    font-weight: 700;
}

/* 底部红色横幅 */
.success-bottom-banner {
    margin: 1.25rem auto 0;
    text-align: center;
    font-size: 2.125rem;
    font-weight: 900;
    background: linear-gradient(90deg, #fff0a9 15%, #ffffff 45%, #ffe64e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.5));
    white-space: nowrap;
    animation: pulse-scale 1.5s ease-in-out infinite;
}

/* 第二阶段：群组列表 */
.success-stage-groups {
    text-align: center;
    color: #fff;
    animation: fadeIn 0.4s ease-in;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
    /* 允许动画显示完整 */
    min-height: 0;
    /* 确保 flex 子元素可以正确收缩 */
}

.groups-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    padding: 0.5rem 0.5rem 1rem;
    flex: 1;
    max-height: 26vh;
    overflow-y: auto;
    overflow-x: visible;
    min-height: 0;
    /* 确保可以滚动 */
    -webkit-overflow-scrolling: touch;
    /* iOS 平滑滚动 */
}

/* 滚动条样式 */
.groups-list::-webkit-scrollbar {
    width: 0.375rem;
}

.groups-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.1875rem;
}

.groups-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0.1875rem;
}

.groups-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.group-item {
    border-radius: 0.8rem;
    padding: 0.6rem 1rem;
    margin: 0 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* 不同状态的群组背景 */
.group-item.full {
    background: #cbcbcb;
}

.group-item.available {
    background: linear-gradient(180deg, #ffffff 0%, #ffd2da 100%);
    animation: pulse-scale 1.5s ease-in-out infinite;
}

.group-item.online {
    background: linear-gradient(180deg, #ffffff 0%, #cfffba 100%);
}

.group-item:active {
    transform: translateY(0.125rem);
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.2);
}

.group-icon {
    width: 2.8rem;
    height: 2.8rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-icon svg,
.group-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.group-info {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.group-name {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 群名称根据状态显示不同颜色 */
.group-item.full .group-name {
    color: #656565;
    text-decoration: line-through;
}

.group-item.available .group-name {
    color: #f1261a;
}

.group-item.online .group-name {
    color: #28af12;
}

.group-status-indicator {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-left: 0.3rem;
    vertical-align: middle;
}

.group-status-indicator.full {
    background: #656565;
}

.group-status-indicator.available {
    background: #f1261a;
}

.group-status-indicator.online {
    background: #28af12;
}

.group-button {
    padding: 0.15rem 1.2rem;
    border-radius: 1.875rem;
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    white-space: nowrap;
}

.group-button.full {
    background: #656565;
    color: #fff;
    cursor: not-allowed;
}

.group-button.available {
    background: #f1261a;
    color: #fff;
}

.group-button.online {
    background: #28af12;
    color: #fff;
}

.group-button:not(.full):active {
    transform: scale(0.95);
}

.success-footer-notice {
    font-size: 0.8rem;
    color: #fff;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
    flex-shrink: 0;
    /* 防止被压缩 */
    padding-top: 1rem;
    white-space: nowrap;
}

/* 即将满员的呼吸动画 - 忽大忽小效果 */
@keyframes pulse-scale {
    0%, 100% {
        transform: scale(0.95);
    }
    50% {
        transform: scale(1.06);
    }
}