/* =====================================================================
   交友盲盒 · 统一响应式样式 app.css
   移动端优先；桌面端（>=520px）内容居中为 480px 手机宽，两侧留白。
   同时实现模板使用到的 Bootstrap 子集（btn/form/label/pager/alert）
   与 AUI 子集（aui-content / aui-col / aui-card-list / aui-footer）。
   ===================================================================== */

:root{
    --brand:#ff6b9d;
    --brand-2:#ff9b6a;
    --brand-grad:linear-gradient(135deg,#ff7eb3 0%,#ff6b9d 55%,#ff8f6b 100%);
    --male:#4a90ff;
    --male-grad:linear-gradient(135deg,#5aa9ff,#3d7dff);
    --female:#ff5c8d;
    --female-grad:linear-gradient(135deg,#ff8ab0,#ff5c8d);
    --bg:#f4f5f8;
    --card:#ffffff;
    --ink:#2b2f36;
    --ink-2:#8a909c;
    --line:#ececf1;
    --radius:16px;
    --shadow:0 6px 18px rgba(31,35,48,.06);
    --shadow-pink:0 10px 24px rgba(255,107,157,.20);
    --tabbar-h:60px;
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
html{background:#e7e9ef;-webkit-text-size-adjust:100%;}
body{
    margin:0 auto;
    width:100%;
    max-width:480px;
    min-height:100vh;
    background:var(--bg);
    color:var(--ink);
    font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue","Microsoft YaHei",sans-serif;
    font-size:15px;
    line-height:1.55;
    overflow-x:hidden;
    box-shadow:0 0 28px rgba(20,24,40,.10);
    -webkit-font-smoothing:antialiased;
}
a{color:var(--brand);text-decoration:none;}
img{max-width:100%;}
ul,ol{margin:0;}
hr{border:0;border-top:1px solid var(--line);margin:16px 0;}
small{font-size:.85em;}
h1,h2,h3,h4,h5{line-height:1.4;}

/* 页面容器：底部为固定 tabbar 预留空间（含 iOS 安全区） */
.contain{padding-bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);min-height:100vh;}

/* ============ 通用工具类 ============ */
.text-center{text-align:center;}
.text-muted{color:var(--ink-2)!important;}
.text-primary{color:var(--male)!important;}
.text-danger{color:#ff4d6d!important;}
.text-success{color:#2fbf71!important;}
.text-warning{color:#ff9f43!important;}
.text-info{color:#3bb6c9!important;}
.center-block{margin-left:auto;margin-right:auto;}
.clearfix::after{content:"";display:block;clear:both;}
.xc1,.xc2,.xc3{background:none;font-size:.85rem;font-weight:400;border-radius:20px;padding:.1rem .6rem;}
.xc1{border:1px solid #51e091;color:#51e091;}
.xc2{border:1px solid #fdca17;color:#fdca17;}
.xc3{border:1px solid #c1c0bc;color:#c1c0bc;}

/* ============ AUI 内容与栅格（flex 实现） ============ */
.aui-content-padded{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    padding:12px;
}
.aui-content-padded > *{flex:0 0 100%;min-width:0;}
.aui-col-xs-6{flex:0 0 calc(50% - 6px)!important;min-width:0;}
.aui-col-xs-4{flex:0 0 calc(33.333% - 8px)!important;min-width:0;}
.aui-col-xs-6 > *,
.aui-col-xs-4 > *{width:100%;}
.aui-border-b{border-bottom:1px solid var(--line);}
.aui-margin-b-15{margin-bottom:0;}
.aui-margin-b-10{margin-bottom:0;}
.aui-tips{border-radius:12px;font-size:.86rem;}

/* ============ 卡片 ============ */
.aui-card-list{
    background:var(--card);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    overflow:hidden;
    height:100%;
}
.aui-card-list-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    padding:13px 15px;
    font-weight:600;
    font-size:.95rem;
    border-bottom:1px solid #f6f6f8;
}
.aui-card-list-content-padded{padding:15px;}
.aui-card-list-footer{
    padding:11px 15px;
    border-top:1px solid #f6f6f8;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}

/* ============ 轮播 ============ */
.slider{
    position:relative;
    margin:12px 12px 4px;
    border-radius:var(--radius);
    overflow:hidden;
    background:#ffd9e6;
    box-shadow:var(--shadow-pink);
}
.slider-main{
    list-style:none;
    padding:0;
    display:flex;
    transition:transform .42s cubic-bezier(.33,.1,.2,1);
    will-change:transform;
    touch-action:pan-y;
}
.slider-panel{flex:0 0 100%;width:100%;}
.slider-panel a{display:block;}
.slider-img{display:block;width:100%;height:auto;object-fit:contain;background:#fff;}
.slider-extra{
    position:absolute;
    left:0;right:0;bottom:0;
    padding:12px 14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:linear-gradient(to top,rgba(0,0,0,.35),transparent);
    pointer-events:none;
}
.slider-nav{display:flex;gap:6px;list-style:none;padding:0;}
.slider-nav .slider-item{
    width:7px;height:7px;border-radius:50%;
    background:rgba(255,255,255,.55);
    transition:all .25s;
}
.slider-nav .slider-item.active{width:20px;border-radius:4px;background:#fff;}
.slider-page{
    color:#fff;font-size:12px;
    background:rgba(0,0,0,.30);
    padding:2px 10px;border-radius:20px;
}
.slider-page a{color:#fff;}
/* 首页轮播：移动端固定高度铺满（高度适中，避免过度拉伸） */
.slider-lg{margin:12px 12px 6px;}
.slider-lg .slider-img{height:160px;object-fit:cover;background:#fff;}

/* ============ 男女盲盒入口卡 ============ */
.mh-grid{display:flex;gap:12px;padding:12px 12px 0;}
.mh-entry{
    flex:1;
    position:relative;
    border-radius:var(--radius);
    padding:20px 12px 16px;
    color:#fff;
    text-align:center;
    cursor:pointer;
    overflow:hidden;
    box-shadow:var(--shadow);
    transition:transform .14s;
    user-select:none;
}
.mh-entry:active{transform:scale(.96);}
.mh-nan{background:var(--male-grad);}
.mh-nv{background:var(--female-grad);}
.mh-entry .mh-num{
    position:absolute;top:10px;right:10px;
    background:rgba(255,255,255,.28);
    border-radius:20px;padding:2px 10px;font-size:11px;
}
.mh-entry .mh-ico{font-size:38px;line-height:1;}
.mh-entry .mh-t{font-size:17px;font-weight:700;margin-top:8px;}
.mh-entry .mh-s{font-size:12px;opacity:.92;margin-top:2px;}

/* ============ 投递主入口横条 ============ */
.toudi-banner{
    display:flex;align-items:center;gap:13px;
    margin:12px 12px 0;
    padding:15px 16px;
    border-radius:var(--radius);
    color:#fff;
    background:var(--brand-grad);
    box-shadow:var(--shadow-pink);
    cursor:pointer;
    transition:transform .14s;
    user-select:none;
}
.toudi-banner:active{transform:scale(.98);}
.toudi-ico{
    width:46px;height:46px;border-radius:14px;flex:0 0 46px;
    background:rgba(255,255,255,.22);
    display:flex;align-items:center;justify-content:center;
    font-size:22px;
}
.toudi-txt{flex:1;min-width:0;}
.toudi-txt .t{font-size:16px;font-weight:700;}
.toudi-txt .s{font-size:12px;opacity:.92;margin-top:2px;}
.toudi-arrow{font-size:24px;opacity:.9;}

/* ============ 诚信提示条 ============ */
.honest-tip{
    margin:12px 12px 0;
    display:flex;align-items:flex-start;gap:9px;
    padding:12px 14px;
    border-radius:13px;
    background:linear-gradient(135deg,#fff4ec,#ffeef4);
    border:1px solid #ffd9c4;
    color:#b5523a;
    font-size:13px;line-height:1.6;
}
.honest-tip .mdi,.honest-tip .fa{font-size:18px;color:#ff7a59;flex:0 0 18px;margin-top:1px;}

/* ============ 性格单选标签（chip） ============ */
.chip-group{display:flex;flex-wrap:wrap;gap:9px;}
.chip{
    min-width:64px;
    text-align:center;
    padding:8px 16px;
    border-radius:22px;
    border:1.5px solid var(--line);
    background:#fafafc;
    color:var(--ink);
    font-size:14px;
    cursor:pointer;
    user-select:none;
    transition:all .14s;
}
.chip:active{transform:scale(.95);}
.chip input{display:none;}
.chip.on,.chip input:checked + .chip-lab{ }
.chip.on{
    border-color:var(--brand);
    background:var(--brand-grad);
    color:#fff;
    box-shadow:0 5px 14px rgba(255,107,157,.25);
}

/* ============ 功能宫格 ============ */
.grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    padding:12px;
}
.grid-cell{
    background:var(--card);
    border-radius:14px;
    padding:16px 6px 14px;
    text-align:center;
    box-shadow:var(--shadow);
    cursor:pointer;
    transition:transform .14s;
    user-select:none;
}
.grid-cell:active{transform:scale(.94);}
.grid-ico{
    width:48px;height:48px;
    border-radius:15px;
    display:flex;align-items:center;justify-content:center;
    margin:0 auto 9px;
    font-size:21px;
}
.grid-t{font-size:13px;color:var(--ink);}
/* 首页三宫格（删除客服入口后仅余三项，放大留白保持视觉平衡） */
.grid-3{padding-top:14px;}
.grid-3 .grid-cell{padding:22px 6px 19px;}
.grid-3 .grid-ico{width:52px;height:52px;border-radius:16px;font-size:23px;margin-bottom:10px;}
.grid-3 .grid-t{font-size:13.5px;}

/* 必填项红星 */
.req{color:#ff4d6d;margin-left:2px;font-weight:700;}

/* ============ 表单（Bootstrap 子集） ============ */
.form-group{margin-bottom:15px;}
.form-group > label{
    display:block;
    margin-bottom:7px;
    font-size:13.5px;
    font-weight:600;
    color:#555b66;
}
.form-control{
    display:block;
    width:100%;
    height:45px;
    padding:0 13px;
    font-size:15px;
    color:var(--ink);
    background:#fafafc;
    border:1.5px solid var(--line);
    border-radius:12px;
    outline:none;
    transition:border-color .15s,box-shadow .15s,background .15s;
    font-family:inherit;
}
textarea.form-control{height:auto;min-height:96px;padding:11px 13px;line-height:1.6;resize:vertical;}
select.form-control{padding:0 10px;}
.form-control:focus{
    background:#fff;
    border-color:var(--brand);
    box-shadow:0 0 0 3px rgba(255,107,157,.14);
}
.form-control::placeholder{color:#b7bcc6;}
.radio-inline{
    display:inline-flex;align-items:center;gap:5px;
    margin:0 22px 0 0;font-size:15px;cursor:pointer;color:var(--ink);
}
.radio-inline input[type=radio],
input[type=radio]{width:18px;height:18px;accent-color:var(--brand);margin:0;cursor:pointer;}
input[type=checkbox]{accent-color:var(--brand);}
.img-circle{border-radius:50%;object-fit:cover;background:#f0f0f3;}
.form-group.text-center img.img-circle{border:3px solid #fff;box-shadow:0 4px 14px rgba(31,35,48,.12);}

/* ============ 按钮（Bootstrap 子集） ============ */
.btn{
    display:inline-flex;
    align-items:center;justify-content:center;gap:6px;
    border:0;
    border-radius:12px;
    padding:0 18px;
    height:42px;
    font-size:15px;
    font-weight:600;
    line-height:1;
    color:#3a3f49;
    background:#eef0f4;
    cursor:pointer;
    transition:transform .12s,filter .15s,box-shadow .15s;
    font-family:inherit;
    text-decoration:none;
    white-space:nowrap;
}
.btn:active{transform:scale(.97);}
.btn[disabled],.btn.disabled{opacity:.55;cursor:not-allowed;}
.btn-block{display:flex;width:100%;height:47px;margin-top:11px;}
.btn-sm{height:34px;padding:0 14px;font-size:13.5px;border-radius:10px;}
.btn-xs{height:27px;padding:0 11px;font-size:12px;border-radius:8px;}
.btn-default{background:#eef0f4;color:#3a3f49;}
.btn-primary{background:var(--male-grad);color:#fff;box-shadow:0 6px 14px rgba(74,144,255,.26);}
.btn-success{background:linear-gradient(135deg,#46d688,#2fbf71);color:#fff;box-shadow:0 6px 14px rgba(47,191,113,.26);}
.btn-info{background:linear-gradient(135deg,#45c4d6,#2fa8bd);color:#fff;box-shadow:0 6px 14px rgba(47,168,189,.24);}
.btn-warning{background:linear-gradient(135deg,#ffb454,#ff9f43);color:#fff;box-shadow:0 6px 14px rgba(255,159,67,.26);}
.btn-danger{background:var(--brand-grad);color:#fff;box-shadow:var(--shadow-pink);}
.btn .fa{line-height:1;}

/* ============ 标签（Bootstrap 子集） ============ */
.label{
    display:inline-block;
    padding:3px 9px;
    border-radius:20px;
    font-size:11.5px;
    font-weight:500;
    color:#fff;
    line-height:1.4;
    white-space:nowrap;
}
.label-default{background:#b6bac3;}
.label-primary{background:var(--male);}
.label-success{background:#2fbf71;}
.label-info{background:#3bb6c9;}
.label-warning{background:#ff9f43;}
.label-danger{background:#ff4d6d;}

/* ============ 分页 ============ */
.pager{
    display:flex;gap:10px;justify-content:center;align-items:center;
    list-style:none;padding:0;margin:18px 0 4px;
}
.pager li{margin:0;}
.pager a,.pager li > a{
    display:inline-block;
    padding:8px 16px;
    background:#fff;
    border-radius:10px;
    color:var(--ink);
    box-shadow:var(--shadow);
    font-size:13.5px;
}
.pager .disabled a{color:#b6bac3;}

/* ============ 提示条 ============ */
.aui-tips,
.tip-ok,.tip-warn{border-radius:12px;padding:11px 14px;font-size:.86rem;}
.tip-ok{background:#e8f7ee;color:#1a7f37;}
.tip-warn{background:#fffbe6;border:1px solid #ffe58f;color:#8a6d3b;}

/* ============ 底部固定导航 ============ */
.aui-footer{display:flex;justify-content:center;}
.aui-footer-fixed{
    position:fixed;
    bottom:0;left:50%;transform:translateX(-50%);
    width:100%;max-width:480px;
    z-index:60;
    background:rgba(255,255,255,.96);
    backdrop-filter:saturate(180%) blur(12px);
    -webkit-backdrop-filter:saturate(180%) blur(12px);
    border-top:1px solid var(--line);
    padding-bottom:env(safe-area-inset-bottom);
    box-shadow:0 -4px 18px rgba(31,35,48,.06);
}
.aui-tabBar-item{
    flex:1;
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:3px;
    padding:8px 0;
    color:#9aa0a6;
    font-size:12px;
    text-decoration:none;
    transition:color .15s;
}
.aui-tabBar-item-icon{font-size:21px;line-height:1;}
.aui-tabBar-item-active{color:var(--brand);}
.aui-tabBar-item-active .aui-tabBar-item-icon{transform:translateY(-1px);}

/* single nav: centered raised brand button */
.aui-footer .aui-tabBar-item:only-child{
    flex:0 0 auto;
    min-width:140px;
    color:var(--brand);
    font-weight:600;
}
.aui-footer .aui-tabBar-item:only-child .aui-tabBar-item-icon{
    width:44px;height:44px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    font-size:22px;color:#fff;line-height:1;
    margin:-15px 0 2px;
    background:linear-gradient(135deg,var(--brand),var(--brand-2));
    border:3px solid #fff;
    box-shadow:0 8px 18px rgba(255,107,157,.38);
    transform:none;
}

/* read-only sex display bar */
.sex-static{
    display:flex;align-items:center;gap:6px;
    background:#fafafc;color:#2b2f38;
    font-size:15px;
}

/* ============ 登录/注册页（layer iframe 内） ============ */
.login-wrap{padding:22px 20px;max-width:420px;margin:0 auto;}
.login-wrap h4{text-align:center;font-size:19px;margin:4px 0 20px;}
.login-logo{
    width:64px;height:64px;border-radius:20px;margin:0 auto 12px;
    display:flex;align-items:center;justify-content:center;
    font-size:30px;color:#fff;background:var(--brand-grad);
    box-shadow:var(--shadow-pink);
}
.input-group{
    display:flex;align-items:stretch;
    margin-bottom:14px;
}
.input-group-addon{
    display:flex;align-items:center;justify-content:center;
    width:52px;flex:0 0 52px;
    background:#fafafc;border:1.5px solid var(--line);border-right:0;
    border-radius:12px 0 0 12px;
    color:var(--ink-2);font-size:14px;
}
.input-group .form-control{border-radius:0 12px 12px 0;}
.alert{border-radius:12px;padding:11px 14px;font-size:13px;line-height:1.6;}
.alert-info{background:#eef5ff;color:#3569b3;border:1px solid #d6e6ff;}
.alert-success{background:#e8f7ee;color:#1a7f37;border:1px solid #cdeed9;}

/* ============ layer 弹层移动端适配 ============ */
.layui-layer{
    max-width:calc(100vw - 24px)!important;
    border-radius:16px!important;
    box-shadow:0 16px 50px rgba(20,24,40,.22)!important;
    overflow:hidden;
}
.layui-layer-title{
    border:0!important;
    background:#fff!important;
    font-weight:600!important;
    height:48px!important;line-height:48px!important;
    padding:0 18px!important;
}
.layui-layer-setwin{top:15px!important;right:14px!important;}
.layui-layer-content{font-family:inherit;}
.layui-layer-page .layui-layer-content{padding:18px;}
.layui-layer-btn{padding:12px 18px 18px!important;text-align:center;}
.layui-layer-btn a{
    height:42px!important;line-height:42px!important;
    padding:0 22px!important;
    border-radius:11px!important;
    border:0!important;
    font-size:15px!important;
    margin:0 6px!important;
}
.layui-layer-btn .layui-layer-btn0{background:var(--brand-grad)!important;color:#fff!important;}
.layui-layer-btn .layui-layer-btn1{background:#eef0f4!important;color:#555b66!important;}
.layui-layer-iframe iframe{display:block;width:100%!important;}
.pay-options{display:flex;flex-direction:column;gap:12px;padding:4px 2px;}
.pay-opt{
    display:flex;align-items:center;gap:12px;
    padding:13px 15px;border-radius:13px;
    border:1.5px solid var(--line);background:#fafafc;
    font-size:15px;font-weight:600;color:var(--ink);
    cursor:pointer;transition:.14s;text-align:left;
}
.pay-opt:active{transform:scale(.98);}
.pay-opt .pay-ico{
    width:38px;height:38px;border-radius:11px;flex:0 0 38px;
    display:flex;align-items:center;justify-content:center;
    font-size:20px;color:#fff;
}
.pay-opt .pay-sub{margin-left:auto;font-size:12px;color:var(--ink-2);font-weight:400;}
.ico-wechat{background:#2fbf71;}
.ico-alipay{background:#1677ff;}
.ico-yue{background:linear-gradient(135deg,#ffb454,#ff9f43);}

/* ============ 空状态 ============ */
.empty-state{text-align:center;color:#b3b8c2;padding:56px 0;}
.empty-state .fa{font-size:52px;opacity:.55;}
.empty-state p{margin:12px 0 0;font-size:14px;}

/* ============ 桌面端：手机列居中，两侧留白 ============ */
@media (min-width:520px){
    html{background:linear-gradient(135deg,#eef0f6,#e6e9f2);}
    body{border-radius:0;}
    /* 轮播图按原始比例完整显示，桌面端不再固定高度裁切 */
    .slider-img{height:auto;}
    .slider-lg .slider-img{height:auto;object-fit:contain;}
}
/* 超宽屏给一点呼吸空间 */
@media (min-width:900px){
    body{margin-top:0;}
}
