@font-face {
    font-family: 'SF Pro';
    src: url('../fonts/SF-Pro-Text-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro';
    src: url('../fonts/SF-Pro-Text-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro';
    src: url('../fonts/SF-Pro-Text-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap; /* 字体加载时先用兜底字体，加载完成后替换，避免闪屏 */
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased; /* 移动端 Safari 抗锯齿 */
    -moz-osx-font-smoothing: grayscale; /* Firefox 抗锯齿 */
    text-rendering: optimizeLegibility; /* 优化字体可读性 */
    font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

html {
    position: relative;
    height: 100%;
    width: 100%;
    font-size: 16px !important;
    font-weight: 400;
    line-height: 1.5; /* 统一行高 */
}

input {
    background-color: transparent;
    border: 0;
}

button {
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    outline: none;
    background-color: transparent;
}

button:active {
    opacity: 0.6;
}

.hidden {
    display: none;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.justify-start {
    display: flex;
    justify-content: flex-start;
}

.justify-center {
    display: flex;
    justify-content: center;
}

.justify-end {
    display: flex;
    justify-content: flex-end;
}

.justify-evenly {
    display: flex;
    justify-content: space-evenly;
}

.justify-around {
    display: flex;
    justify-content: space-around;
}

.justify-between {
    display: flex;
    justify-content: space-between;
}

.align-start {
    display: flex;
    align-items: flex-start;
}

.align-center {
    display: flex;
    align-items: center;
}

.align-end {
    display: flex;
    align-items: flex-end;
}

nav, header, main, footer {
    width: 100%;
}

footer {
    width: 100%;
    padding: 20px 0;
}

body.no-scroll {
    overflow: hidden !important; /* 禁止滚动 */
    height: 100vh; /* 固定 body 高度，避免移动端仍可滚动 */
}

.container {
    width: 100%;
    min-height: 100vh;
    padding: 0 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

/** 头部 **/
.header {
    max-width: 353px;
    height: 60px;
    line-height: 60px;
    position: relative;
}
.header .back-box {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 24px;
    cursor: pointer;
    border: none;
    outline: none;
    display: flex;
    align-items: stretch;
}
.header .back-box .back {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.header .logo {
    font-weight: bold;
    font-size: 24px;
    color: #000000;
    text-align: center;
}

/** 主体 **/
.main {
    width: 100%;
    max-width: 353px;
    flex-grow: 1; /* 自动占满中间剩余高度，把底部往下压 */
}

/* 进度条 */
.main .progress-box {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-sizing: border-box;
    overflow: hidden;
    margin-top: 6px;
}
.main .progress-box .progress-line {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 9px;
    height: 4px;
    background: #c6d2df;
    border-radius: 999px;
    z-index: 1;
}
.main .progress-box .progress-line-active {
    position: absolute;
    left: 10px;
    top: 9px;
    width: 0;
    height: 4px;
    background: #35a36b;
    border-radius: 999px;
    z-index: 2;
    transition: width 0.25s ease;
}
.main .progress-box .step {
    width: 21px;
    height: 21px;
    z-index: 3;
}
.main .progress-box .step img {
    width: 100%;
    height: 100%;
    display: block;
}

/* 标题 */
.main .title-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 30px;
}
.main .title-box .title {
    font-weight: bold;
    font-size: 24px;
    color: #000000;
    line-height: 34px;
}

.main .title-box .subtitle {
    font-weight: 600;
    font-size: 16px;
    color: rgba(90, 90, 90, 0.6);
    line-height: 22px;
    text-align: center;
    margin-top: 8px;
}

/* 选项 */
.main .contents {
    display: flex;
    flex-direction: column;
    margin-top: 15px;
    gap: 0.8rem;
}
.main .contents .label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 60px;
    padding: 0 15px;
    background: #F4F4F4;
    border-radius: 15px;
    border: 1px solid;
    border-image: linear-gradient(136deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3)) 1 1;
}
.main .contents .label .content-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}
.main .contents .label .content-box .icon {
    width: 24px;
}
.main .contents .label .content-box .text {
    font-weight: 500;
    font-size: 16px;
    color: #000000;
    line-height: 30px;
    margin-right: 20px;
}
.main .contents .label .content-box .ckicon {
    width: 24px;
    height: 24px;
    position: absolute;
    right: 0;
    background-image: url('../images/label_unselected.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.main .contents .label .content-box .ckicon-selected {
    background-image: url('../images/label_selected.png') !important;
}

/** 底部按钮(下一步) **/
.button-box {
    width: 100%;
    max-width: 353px;
    margin: 0 auto;
    cursor: pointer;
}
/* 默认按钮 */
.button {
    width: 100%;
    height: 60px;
    color: #FFF;
    cursor: pointer;
    border-radius: 16px;
}
/* 亮色按钮 */
.button-bright {
    background: linear-gradient(90deg, #3AA358, #69CA54);
}
/* 灰色按钮 */
.button-dusty {
    background-color: #D1D1D1;
    pointer-events: none; /* 阻止鼠标事件 */
    cursor: not-allowed; /* 显示禁止光标 */
}
/* 按钮文本 */
.button-text {
    font-weight: bold;
    font-size: 18px;
    color: #FFFFFF;
}

/*** toast样式 ***/
#toastWaka {
    position: fixed;
    display: none;
    left: 50%;
    bottom: 50%;
    z-index: 99999;
    /* margin: 0 auto; */
    -webkit-transform: translate(-50%);
    transform: translate(-50%);
    width: 70%;
    /* height: 40px; */
    line-height: 40px;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    color: #fff;
    background-color: rgba(000,000,000,0.5) !important;
}

#toastWaka .text{
    color: #fff;
    display: inline-block;
    font-size: 14px;
    position: absolute;
    top:0;
    bottom:0;
    right:0;
    left:0;
}

/* 加载转圈 */
.popup-loading {
    display: none;
    /* 默认隐藏 */
    position: fixed;
    place-items: center;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    /* 半透明背景 */
    z-index: 10;
    /* 确保在最上层 */
    pointer-events: none; /* 阻止鼠标事件 */
    cursor: not-allowed; /* 显示禁止光标 */
}

.popup-loading-spinner {
    width: 40px;
    /* 设定圆圈的大小 */
    height: 40px;
    border: 4px solid #f3f3f3;
    /* 边框颜色 */
    border-top: 4px solid #3498db;
    /* 顶部颜色 */
    border-radius: 50%;
    /* 圆形 */
    animation: spin 1s linear infinite;
    /* 添加动画 */
}

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

    /* 从0度开始 */
    100% {
        transform: rotate(360deg);
    }

    /* 旋转360度 */
}

@media (min-width: 576px) {
    .container, .page {
        max-width: 576px !important;
    }
}

@media (min-width: 768px) {
    .container, .page {
        max-width: 768px !important;
    }
}
