html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    background-color: #3875f6;
    /* 中国移动蓝色 */
    font-family: Arial, sans-serif;
    color: white;
    text-align: center;
    /* 与首页一致：用 CSS 抑制双击缩放，避免对 touchstart 调 preventDefault 导致无法点击跳转 */
    touch-action: manipulation;
}

.container {
    background-color: white;
    color: black;
    margin: 30px 10px;
    /* 修改：将左右边距设置为10px */
    padding: 10px 20px;
    border-radius: 10px;
    max-width: 100%;
    /* 修改：由 width: 90% 改为 max-width: 100%，避免超宽问题 */
    min-width: 280px;
    /* 新增：设置最小宽度以保证内容展示 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.container h3 {

    /* 增加标题与下方内容的距离 */

    margin: 10px;
    /* 可选：增加内边距 */
    border-bottom: 1px solid #eee;
    /* 可选：添加分割线 */
}

label {
    display: block;
    text-align: left;
    margin-top: 10px;
}

input[type="text"],
select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus {
    /* border-color: #007BFF; */
    outline: none;
    /* box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); */
}

button:not(.hf-tier):not(.rule-button) {
    position: relative;
    margin-top: 0px;
    width: 100%;
    padding: 12px;
    background-color: #ff4d4d;
    /* 红色背景 */
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 30px;
    font-size: 18px;
}

.badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #1890ff;
    /* 蓝色背景 */
    color: white;
    border-radius: 50%;
    padding: 5px 10px;
    font-size: 12px;
    z-index: 1;
}

.radio-group label {
    display: block;
    /* 修改为块级元素，使每个选项独占一行，便于点击 */
    margin-bottom: 10px;
    /* 增加选项之间的垂直间距 */

    /* 增加内边距，使点击区域更友好 */
    border-radius: 5px;
    /* 可选：添加圆角以美化外观 */
}

.radio-group img {
    width: 30px;
    height: auto;
    vertical-align: middle;
    margin-right: 8px;
    /* 增加图片与文字之间的间距 */
}

a {
    color: #666;
    /* 设置链接颜色 */
    text-decoration: underline;
    /* 添加下划线 */
}

a:hover {
    color: #666;
    /* 悬停时改变链接颜色 */
    text-decoration: none;
    /* 移除悬停时的下划线 */
}

a:visited {
    color: #666;
    /* 已访问链接的颜色 */
}

.headerImg {
    width: 100%;
}

.formheader {
    width: 95%;
    height: 30px;
    position: absolute;
    background-color: #262b3b;
    top: -30px;
    left: 0;
    z-index: -1;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 18px;
    text-align: left;
    color: white;
    display: flex;
    align-items: center;
    /* 垂直居中 */
}

.formheader p {
    margin: 0;
    display: inline-block;
}

.formheader img {
    margin-top: 5px;
    margin-left: 10px;
    display: inline-block;
    width: 25px;
    height: auto;
}

.goodsImg {
    width: 100%;
}

/* 特惠充值档位：与新版 index.css 的 hf-tier 一致 */
.legacy-tier-head {
    margin: 8px 0 14px;
    text-align: center;
}

.legacy-tier-title {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    text-align: center;
}

.legacy-tier-hint {
    margin: 8px 4px 0;
    padding: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #4b5563;
    text-align: left;
}

.hf-tier-row {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.hf-tier {
    flex: 1;
    min-width: 0;
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 4px 8px;
    background: #f9fafb;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.hf-tier:not(:disabled):active {
    transform: scale(0.98);
}

.hf-tier__top {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #6b7280;
    margin-bottom: 4px;
}

.hf-tier__btm {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.hf-tier--hot .hf-tier__ribbon,
.hf-tier--vip .hf-tier__ribbon {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    padding: 3px 8px;
    border-radius: 0 0 8px 8px;
    line-height: 1.2;
}

.hf-tier--hot .hf-tier__ribbon {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.35);
}

.hf-tier--vip .hf-tier__ribbon {
    background: linear-gradient(90deg, #a16207, #d97706);
    box-shadow: 0 2px 4px rgba(161, 98, 7, 0.35);
}

.hf-tier--vip:not(.is-active) .hf-tier__top {
    color: #dc2626;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.hf-tier--soldout:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    filter: grayscale(0.35);
    border-style: dashed;
    border-color: #d1d5db;
    background: #f3f4f6;
}

.hf-tier--soldout:disabled .hf-tier__top,
.hf-tier--soldout:disabled .hf-tier__btm {
    color: #9ca3af;
}

.hf-tier__soldout-badge {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #6b7280;
    padding: 3px 10px;
    border-radius: 0 0 8px 8px;
    line-height: 1.2;
}

.hf-tier.is-active {
    border-color: #3875f6;
    border-width: 2px;
}

.hf-tier:not(.hf-tier--hot):not(.hf-tier--vip).is-active {
    background: #eff6ff;
    box-shadow: 0 2px 10px rgba(56, 117, 246, 0.2);
}

.hf-tier:not(.hf-tier--hot):not(.hf-tier--vip).is-active .hf-tier__top {
    color: #1e40af;
}

.hf-tier:not(.hf-tier--hot):not(.hf-tier--vip).is-active .hf-tier__btm {
    color: #1d4ed8;
    font-weight: 600;
}

.hf-tier--hot.is-active,
.hf-tier--vip.is-active {
    background: #3875f6;
    box-shadow: 0 4px 14px rgba(56, 117, 246, 0.35);
}

.hf-tier--hot.is-active .hf-tier__top {
    color: #fff;
}

.hf-tier--vip.is-active .hf-tier__top {
    color: #dbeafe;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.hf-tier--hot.is-active .hf-tier__btm,
.hf-tier--vip.is-active .hf-tier__btm {
    color: #dbeafe;
    font-weight: 800;
}

/* 支付摘要：对齐新版 hf-paybox 信息结构 */
.legacy-paybox {
    background: #eff6ff;
    border-radius: 14px;
    padding: 10px 12px;
    margin: 14px 0 12px;
    border: 1px solid #dbeafe;
    text-align: left;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.legacy-paybox.is-updating {
    border-color: #93c5fd;
    background: #dbeafe;
    box-shadow: 0 0 0 3px rgba(56, 117, 246, 0.18);
}

.legacy-paybox__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
    color: #374151;
}

.legacy-paybox__row--second {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #bfdbfe;
}

.legacy-paybox__left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    min-width: 0;
}

.legacy-paybox__icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.legacy-paybox__amt b {
    font-weight: 700;
    color: #111827;
}

.legacy-paybox__credit {
    font-size: 14px;
    color: #15803d;
}

.legacy-paybox__credit strong {
    font-size: 17px;
    font-weight: 800;
}

.legacy-paybox__tag {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #ef4444;
    padding: 3px 8px;
    border-radius: 6px;
}

.formtitle {
    text-align: left;
}

.readfont {
    color: red;
}

.desc {
    margin: 10px 10px;
}

.huafeiimg {
    width: 95%;
}

.greyfont {
    color: rgb(61, 61, 61);
}

.phonebox {
    background-image: url('../images/phone-bg.png');
    background-size: 100% 100%;
    background-position: center;
    width: 100%;
    text-align: right;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.phonebox:focus-within {
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.6);
    transform: translateY(-2px);
}

#phone {
    background-image: url('../images/phone-bg.png');
    background-size: 100% 100%;
    background-position: center;
    width: 100%;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    border: none;
    height: 66px;
    padding-left: 50px;
    border-radius: 20px;
}

#phone:focus-within {
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.6);
    transform: translateY(-2px);
}


.refund-button,
.rule-button,
.claim-button {
    position: fixed;
    right: 8px;
    width: 64px;
    height: 32px;
    padding: 6px 0;
    background-color: rgba(255, 255, 255, 0.2);
    color: #e9e9e9;
    border: none;
    border-radius: 16px 0 0 16px;
    cursor: pointer;
    font-size: 11px;
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
    -webkit-tap-highlight-color: transparent;
}

.refund-button {
    top: 20px;
}

.rule-button {
    top: 65px;
}

.claim-button {
    top: 110px;
}

a.refund-button,
a.claim-button {
    text-decoration: none;
    line-height: 1.1;
    box-sizing: border-box;
    display: block;
}

/* 活动规则：白底卡片，适配蓝底页面 */
.legacy-page-rules {
    margin: 16px 10px 0;
    padding: 16px 14px 18px;
    background: #fff;
    color: #333;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    text-align: left;
    box-sizing: border-box;
}

.legacy-page-rules__title {
    margin: 0 0 12px;
    font-size: 17px;
    color: #3875f6;
    text-align: center;
    font-weight: 700;
}

.legacy-page-rules__body {
    font-size: 13px;
    line-height: 1.55;
    color: #4b5563;
}

.legacy-page-rules__h {
    margin: 14px 0 8px;
    font-size: 14px;
    color: #111827;
    font-weight: 700;
}

.legacy-page-rules__h:first-of-type {
    margin-top: 0;
}

.legacy-page-rules__body p {
    margin: 0 0 10px;
}

.legacy-page-rules__body p:last-child {
    margin-bottom: 0;
}

.legacy-page-rules__body a {
    color: #1d4ed8;
    word-break: break-all;
}

.legacy-rules-foot {
    margin: 12px 16px 8px;
    font-size: 11px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    text-align: center;
}

.legacy-rules-foot p {
    margin: 0;
}