/*
 * High Liner Foods 主题样式
 * 主色：深紫蓝 #1B1464
 * 强调色：青绿 #00C9A7
 * 背景：浅灰 #F4F5F8
 * 卡片：#FFFFFF
 */

/* ===== CSS 变量定义 ===== */
:root {
    --primary: #1B1464;
    --primary-light: #2D2094;
    --primary-dark: #120E45;
    --accent: #00C9A7;
    --accent-light: #00E5BF;
    --accent-dark: #00A88A;
    --bg: #F4F5F8;
    --card: #FFFFFF;
    --text-dark: #1B1464;
    --text-mid: #5A5A7A;
    --text-light: #9898B2;
    --border: #E2E3EE;
    --danger: #E74C3C;
    --success: #00C9A7;
    /* 手机安全区域：状态栏高度 */
    --safe-top: env(safe-area-inset-top, 0px);
    /* 固定导航栏总高度（含状态栏）*/
    --top-bar: calc(50px + env(safe-area-inset-top, 0px));
}

/* ===== body 背景 ===== */
body,
body.huiBg {
    background-color: var(--bg) !important;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* ===== 顶部导航栏（含手机状态栏安全区域适配）===== */
.top {
    width: 100%;
    height: var(--top-bar);
    display: flex;
    padding: var(--safe-top) 4% 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    max-width: 750px;
    margin: 0 auto;
}

.top span,
.top a,
.top i {
    color: #ffffff !important;
}

/* 首页消息图标固定到右侧 */
.top .message {
    position: absolute;
    right: 12px;
    top: var(--safe-top, 0px);
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* 标题文字绝对居中，避免被返回按钮遮挡 */
.top > span {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: var(--safe-top, 0px);
    height: 50px;
    line-height: 50px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 100px);
    text-align: center;
    padding: 0;
}

.top .back {
    color: #ffffff !important;
    position: absolute;
    left: 12px;
    top: var(--safe-top, 0px);
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    z-index: 1;
}

/* ===== 顶部橙色装饰条 → 深紫色 ===== */
.topBar {
    background: var(--primary) !important;
    border-bottom-left-radius: 0 !important;
    position: relative;
}

.topBar::after {
    content: '';
    display: block;
    width: 120px;
    height: 120px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    right: -20px;
    top: -30px;
    opacity: 0.15;
}

/* ===== 首页主体 ===== */
.home-main {
    margin-top: -90px;
    padding-bottom: 70px;
}

/* ===== 视频/banner 区域 ===== */
.home-media video,
.home-media img {
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(27, 20, 100, 0.18);
}

/* ===== More functions 标题 ===== */
.home-nav-tit,
.home-news-tit,
.task-tit {
    color: var(--primary) !important;
    font-weight: 700;
    font-size: 16px !important;
    letter-spacing: 0.3px;
    padding-left: 10px;
    border-left: 3px solid var(--accent);
    margin-bottom: 14px !important;
}

/* ===== 快捷导航卡片 ===== */
.home-nav-item {
    background: var(--card) !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 10px rgba(27, 20, 100, 0.08);
    transition: transform 0.15s, box-shadow 0.15s;
}

.home-nav-item:active {
    transform: scale(0.97);
    box-shadow: 0 1px 6px rgba(27, 20, 100, 0.12);
}

.home-nav-item p {
    color: var(--text-mid) !important;
    font-size: 12px !important;
}

/* ===== My Team / Share Work 图片按钮 ===== */
.home-link {
    margin-top: 8px !important;
    gap: 8px;
}

.home-link a {
    background: transparent !important;
    color: transparent !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    transition: opacity 0.15s;
}

.home-link a img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.home-link a:active {
    background: transparent !important;
    opacity: 0.8;
}

/* ===== 新闻卡片 ===== */
.home-new-item {
    border-radius: 14px !important;
    box-shadow: 0 2px 10px rgba(27, 20, 100, 0.08);
    overflow: hidden;
}

.home-new-item h3 {
    background: linear-gradient(0deg, rgba(10, 8, 40, 0.92) 0%, rgba(10, 8, 40, 0.55) 100%) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 0 !important;
}

/* ===== 任务列表 ===== */
.home-task li {
    background: var(--card) !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(27, 20, 100, 0.07);
}

.home-task li dl dt {
    color: var(--primary) !important;
}

.home-task li dl dd {
    color: var(--text-light) !important;
}

/* ===== 底部导航栏 ===== */
.foot {
    width: 100%;
    height: 60px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--card) !important;
    border-top: 1px solid var(--border);
    max-width: 750px;
    margin: 0 auto;
    box-shadow: 0 -4px 16px rgba(27, 20, 100, 0.10);
}

.foot ul {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: space-around;
}

.foot ul li {
    flex: 1;
    text-align: center;
}

.foot ul li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light) !important;
    font-size: 11px;
    padding: 6px 0;
}

.foot ul li a p {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-light);
}

.foot ul li.cur a p {
    color: var(--primary) !important;
    font-weight: 600;
}

/* ===== 登录页 ===== */
.login-item-send {
    color: #ffffff !important;
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* ===== Account 页 OTP 发送按钮 ===== */
.account-send {
    color: #ffffff !important;
    background: var(--primary) !important;
    border-radius: 25px !important;
}

.login-agreement.active {
    color: var(--primary) !important;
}

.login-item-btn button {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 6px 18px rgba(27, 20, 100, 0.30) !important;
    border-radius: 30px !important;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.login-item-a a {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    border-radius: 30px !important;
}

/* ===== 产品列表 ===== */
.product-item {
    background: var(--card) !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 12px rgba(27, 20, 100, 0.08);
}

.product-item-border {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

.product-tit a {
    color: var(--primary) !important;
}

.product-param p {
    background-color: #F0F1FA !important;
    color: var(--text-mid) !important;
    border-radius: 8px !important;
}

.product-param p span {
    color: var(--primary) !important;
}

.product-btn a {
    background: var(--primary) !important;
    color: #fff !important;
    border-radius: 10px !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(27, 20, 100, 0.20);
}

.product-btn a.disabled {
    background: #c8c8d8 !important;
    box-shadow: none !important;
}

/* ===== 产品详情 ===== */
.product-detail-btm button {
    background: var(--primary) !important;
    box-shadow: 0 6px 18px rgba(27, 20, 100, 0.30) !important;
    border-radius: 30px !important;
    font-weight: 600;
}

.product-detail-btm button.disabled,
.product-detail-btm button.disabled:hover,
.product-detail-btm button.disabled:active,
.product-detail-btm button[disabled] {
    background: #c8c8d8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
    color: #fff !important;
}

.product-detail-parem h3 {
    color: var(--primary) !important;
}

.product-detail-parem p {
    background-color: #F0F1FA !important;
    border-radius: 8px !important;
}

.product-detail-parem p span {
    color: var(--primary) !important;
}

/* ===== 任务页 ===== */
.task-vote-item dd.active {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background-color: #F0F1FA !important;
}

.task-dones-link a {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.task-dones-item span {
    background-color: var(--primary) !important;
}

.task-dones-btn button {
    background: var(--primary) !important;
}

.task-dones-main {
    background: linear-gradient(180deg, var(--primary) 0%, var(--bg) 30%, var(--bg) 100%) !important;
}

.task-btn a {
    background: var(--primary) !important;
}

/* ===== 团队页 ===== */
.team-total-line {
    background: var(--primary) !important;
}

.team-recharge-line {
    background: var(--accent) !important;
}

.team-circle-bar {
    background-color: var(--accent) !important;
}

.team-code {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.team-code button {
    background: var(--primary) !important;
}

.team-main-con p {
    background: var(--primary) !important;
}

/* ===== 用户页 ===== */
.user-head {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, var(--accent-dark) 100%) !important;
}

.user-info-name span,
.user-level {
    color: var(--accent-light) !important;
}

/* 通用余额/数字高亮 */
.user-wallet-num,
.wallet-num,
.recharge-num {
    color: var(--primary) !important;
}

/* ===== 通用按钮覆盖 ===== */
.layui-btn-normal,
.layui-btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.layui-btn {
    border-radius: 8px !important;
}

/* ===== 优惠券领取按钮 ===== */
.claim-btn {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
    border-radius: 20px !important;
    font-weight: 600;
}

/* ===== 弹窗/蒙层 ===== */
.z-mask .maskCon {
    border-radius: 18px !important;
    overflow: hidden;
}

.z-mask .maskTit {
    background: var(--primary) !important;
    color: #fff;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 16px;
}

.z-mask .maskBtn button {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff;
    border-radius: 25px !important;
    width: 80%;
    height: 42px;
    font-size: 15px;
    font-weight: 600;
}

/* ===== Check-in 弹窗 ===== */
.z-check .checkCon {
    border-radius: 18px !important;
    overflow: hidden;
}

.z-check .checkTit {
    background: var(--primary) !important;
    color: #fff;
    padding: 16px 16px;
    height: auto !important;
    line-height: 1.4 !important;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.z-check .checkBtn button {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff;
    border-radius: 25px !important;
    width: 100%;
    height: 42px;
    font-size: 15px;
    font-weight: 600;
}

/* ===== 充值 / 提现页 ===== */
.recharge-tab li.cur,
.recharge-tab li.active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
}

.recharge-btn button,
.withdraw-btn button {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    border-radius: 30px !important;
    box-shadow: 0 4px 14px rgba(27, 20, 100, 0.25) !important;
    font-weight: 600;
}

.recharge-item.active,
.withdraw-item.active {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: #F0F1FA !important;
}

/* ===== 记录页 ===== */
.record-item-state.done,
.state-done {
    color: var(--accent) !important;
}

/* ===== 通用标签/tab ===== */
.tab-list li.cur,
.tab-list li.active {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary) !important;
}

/* ===== 通用带颜色文字 ===== */
.orange, .text-orange {
    color: var(--primary) !important;
}

/* ===== 积分/分红数字强调 ===== */
.bonus-num,
.points-num,
.reward-num {
    color: var(--primary) !important;
    font-weight: 700;
}

/* ===== 进度条 ===== */
.bar-inner,
.progress-bar,
.task-progress {
    background: var(--accent) !important;
}

/* ===== 徽章/标签 ===== */
.badge-primary,
.tag-primary {
    background: var(--primary) !important;
    color: #fff !important;
}

/* ===== swiper 分页点 ===== */
.swiper-pagination-bullet-active {
    background: var(--primary) !important;
}

/* ===== 输入框 focus ===== */
.login-item:focus-within {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(27, 20, 100, 0.10);
}

/* ===== 通知/公告条 ===== */
.notice-bar,
.notice {
    background: rgba(27, 20, 100, 0.06) !important;
    border-radius: 8px;
}

.notice-bar i,
.notice i {
    color: var(--primary) !important;
}

/* ===== 服务页 ===== */
.service-item a {
    color: var(--primary) !important;
}
a.service-item {
    display: flex !important;
    text-decoration: none;
    color: inherit;
}

/* ===== 月度分红页 ===== */
.month-head {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

.month-btn button,
.dividends {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    border-radius: 30px !important;
}

/* ===== 分享页 ===== */
.share-btn button {
    background: var(--primary) !important;
    border-radius: 30px !important;
}

/* ===== layui 弹层主色覆盖 ===== */
.layui-layer-btn .layui-layer-btn0 {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* ===== 活动/排行页 ===== */
.reward-head,
.leaderboard-head {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

/* ===== 消息页 ===== */
.message-item-unread {
    border-left: 3px solid var(--primary) !important;
}

/* ===== 积分商城 ===== */
.points-btn a,
.points-btn button {
    background: var(--primary) !important;
    color: #fff !important;
    border-radius: 20px !important;
}

/* ===== 通用卡片圆角提升 ===== */
.task-item,
.product-item,
.home-nav-item,
.home-new-item,
.home-task li,
.teamList,
.team-lv,
.team-total {
    border-radius: 16px !important;
}

/* ===== 卡片统一阴影 ===== */
.task-item,
.product-item,
.home-task li {
    box-shadow: 0 2px 12px rgba(27, 20, 100, 0.07) !important;
}

/* ===== 输入框通用样式 ===== */
.login-item {
    border-color: var(--border) !important;
    border-radius: 14px !important;
}

/* ===== 背景辅助类 ===== */
.bg-primary { background: var(--primary) !important; }
.bg-accent  { background: var(--accent) !important; }
.text-primary { color: var(--primary) !important; }
.text-accent  { color: var(--accent) !important; }

/* ===== 用户页 My 区域 ===== */
.my-top,
.my-top-line {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    border-radius: 20px !important;
}

.my-top-right dt { color: #fff !important; }
.my-top-right dd { color: rgba(255,255,255,0.85) !important; }

/* My Link 按钮（Recharge/Withdraw） */
.my-link a {
    background: var(--accent) !important;
    color: #fff !important;
    border-radius: 30px !important;
    box-shadow: 0 4px 12px rgba(0, 201, 167, 0.30) !important;
}
.my-link a:last-child {
    background: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(27, 20, 100, 0.25) !important;
}

/* My order */
.my-order a { background: var(--primary) !important; }
.my-order li { color: var(--primary) !important; }

/* My income / balance 数字 */
.my-income-items dl dd,
.my-income-item h3,
.my-balance-item h3 { color: var(--primary) !important; }

/* ===== Account / Card 页 ===== */
.account-head,
.account-head-line { background: var(--primary) !important; }
.account-items { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important; }
.account-input span { color: var(--primary) !important; }
.account-mode-item.active { border-color: var(--primary) !important; }
.account-mode-item img { border-color: var(--primary) !important; }
.account-mode-txt p span { border-color: var(--primary) !important; color: var(--primary) !important; }
.account-tab li.active { border-color: var(--primary) !important; }
.account-tab li.active p { color: var(--primary) !important; }
.account-btn {
    background: var(--primary) !important;
    border-radius: 30px !important;
    box-shadow: 0 4px 14px rgba(27, 20, 100, 0.25) !important;
}

/* ===== Bonus 页 ===== */
.bonus-box,
.bonus-box-line {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}
.bouns-item input {
    background: rgba(255,255,255,0.10) !important;
    border-color: rgba(255,255,255,0.20) !important;
}
.bouns-item button { background: var(--accent) !important; }

/* ===== Bonus 领取记录 ===== */
.bonus-records {
    margin: 12px 15px 0;
}
.bonus-records-title {
    font-size: 16px;
    font-weight: 700;
    color: #1B1464;
    margin-bottom: 10px;
}
.bonus-record-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(27, 20, 100, 0.06);
    padding: 12px 15px;
    margin-bottom: 10px;
}
.bonus-record-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}
.bonus-record-row:last-child {
    border-bottom: none;
}
.bonus-record-label {
    color: #888;
    font-size: 14px;
}
.bonus-record-value {
    color: #333;
    font-size: 14px;
    text-align: right;
}
.bonus-record-amount {
    font-weight: 700;
    color: #1B1464;
}
.bonus-records-empty {
    text-align: center;
    color: #aaa;
    font-size: 14px;
    padding: 30px 0;
}

/* ===== inline-tab（任务/产品切换 tab）===== */
.inline-tab {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(27, 20, 100, 0.07);
}
.inline-tab a {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-mid) !important;
    font-weight: 500;
    transition: all 0.2s;
}
.inline-tab a.active {
    background: var(--primary) !important;
    color: #fff !important;
}

/* ===== 记录页卡片 ===== */
.record-item {
    background: #fff;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(27, 20, 100, 0.06) !important;
}

/* ===== layui-layer 弹窗主按钮 ===== */
.layui-layer-btn0 {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* ===== 返回按钮 ===== */
.back { color: #fff !important; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: rgba(27,20,100,0.25); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 脉冲动画（首页主按钮）===== */
@keyframes pulse-primary {
    0%   { box-shadow: 0 0 0 0 rgba(27,20,100,0.35); }
    70%  { box-shadow: 0 0 0 8px rgba(27,20,100,0); }
    100% { box-shadow: 0 0 0 0 rgba(27,20,100,0); }
}
.home-link a:first-child { animation: none; }

/* ===== 黑色按钮全局覆盖（#070709 → 深紫色）===== */
button[style*="background: #070709"],
button[style*="background:#070709"],
a[style*="background: #070709"],
a[style*="background:#070709"] {
    background: var(--primary) !important;
}

/* weeks / reward / month / points 页通用按钮 */
.weeks-btn button,
.reward-btn button,
.month-receive button,
.points-exchange button,
.week-receive-btn,
.receive-btn {
    background: var(--primary) !important;
    border-radius: 30px !important;
    box-shadow: 0 4px 14px rgba(27,20,100,0.25) !important;
}

/* 通用大黑按钮（页面底部全宽按钮）*/
button.layui-btn:not(.layui-btn-danger):not(.layui-btn-warm) {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* 所有背景为黑色的 button */
button {
    /* 仅当 background 被内联设为黑色时覆盖 */
}

/* week / reward 页头部 */
.week-head,
.weeks-head {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    color: #fff !important;
}

/* points 页星星评级保持金色，不覆盖 */
.points-star,
.star-icon { color: #F5A623; }

/* ===== 子页面所有 <button> 黑色内联背景覆盖 ===== */
/* 通过 CSS 变量无法处理 inline style，在 theme.css 末尾加一段 JS 运行时修复 */

/* account-head 黑色 → 深紫 */
.account-head,
.account-head-line,
.bonus-box,
.bonus-box-line,
.account-items {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

/* weeks/reward 页内容区大按钮 */
.week-main button,
.reward-main button,
.weeks-main button,
.month-main button,
.points-main button,
.charitable-main button,
.club-main button,
.calculator-main button,
.service-main button {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    border-radius: 25px !important;
}

/* 通用：页面内所有纯黑色背景按钮 */
button[class]:not([class*="layui-btn-danger"]):not([class*="layui-btn-warm"]):not([class*="layui-btn-normal"]) {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* topLeft / topRight 返回按钮图标确保白色 */
.topLeft,
.topLeft i,
.topLeft .layui-icon,
.topRight img {
    color: #fff !important;
}

/* 所有子页面 .top 内的图标强制白色 */
.top .layui-icon,
.top i.layui-icon {
    color: #fff !important;
}

/* ===== 黑色背景块 → 深紫（style.css 中 #070709 背景）===== */
.team-total-line,
.team-recharge,
.team-code,
.account-head,
.account-head-line,
.account-items,
.bonus-box,
.bonus-box-line {
    background: var(--primary) !important;
}

/* team-recharge 背景深紫，team-recharge-line 青绿 */
.team-recharge { background: var(--primary) !important; }
.team-recharge-line { background: var(--accent) !important; }

/* ===== 右箭头（替代 more.png）===== */
.more-arrow {
    font-size: 18px;
    color: #aaa;
    line-height: 1;
    flex-shrink: 0;
}
