/* ==========================================================================
   客户端首页（H5）样式 v2：茶韵暖色 · 适老化大字体主题
   结构：全局 → 顶部轮播 → 导航 → 各板块 → 会员卡片 → 弹窗 → 飘落爱心
   ========================================================================== */

* {
    -webkit-tap-highlight-color: transparent;
}
body {
    background: linear-gradient(135deg, #FFF5F2 0%, #FFEAE4 100%);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #2D1810;
    font-size: 16px;
}

/* 手机端自适应居中容器 */
.h5-container {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(180deg, #FFF8F5 0%, #FFF1EC 100%);
    box-shadow: 0 0 60px rgba(168, 72, 43, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ==================== 顶部导航胶囊（大字 + 高亮渐变） ==================== */
#navTabs .tab-btn {
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #5E2415;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid transparent;
    white-space: nowrap;
    transition: all 0.25s ease;
}
#navTabs .tab-btn:active { transform: scale(0.97); }
#navTabs .tab-btn:hover {
    color: #E8455F;
    background-color: #FFF1F3;
}
/* 激活态：玫红→琥珀茶棕渐变 + 立体光晕（JS 通过 text-white 标记当前项） */
#navTabs .tab-btn.text-white {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
    background-image: linear-gradient(135deg, #FF6B85 0%, #E8455F 45%, #A8482B 100%);
    box-shadow: 0 6px 16px -6px rgba(232, 69, 95, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}
#navTabs .tab-btn.text-white:hover { color: #fff; background-color: transparent; }

/* ==================== 导航响应式：6 个按钮在任何手机宽度都完整显示 ==================== */
/* 等分铺满 + 字号随视口缩放，去掉横向滚动，不再出现最后一个按钮被裁掉 */
#navTabs {
    width: 100%;
    gap: clamp(1px, 0.5vw, 3px);
}
#navTabs .tab-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: clamp(7px, 2.2vw, 10px) clamp(1px, 0.6vw, 4px);
    font-size: clamp(10.5px, 3.2vw, 14px);
    letter-spacing: 0;
    line-height: 1.2;
    white-space: nowrap;
}
/* 小屏（iPhone SE 等 320~360px）：进一步收紧边距与字距 */
@media (max-width: 360px) {
    #mainNav { padding-left: 4px; padding-right: 4px; }
    #navTabs { padding: 2px; gap: 1px; }
    #navTabs .tab-btn { font-size: 10.8px; letter-spacing: -0.02em; }
}
/* 大屏手机 / 平板：恢复大字与舒展字距 */
@media (min-width: 430px) {
    #navTabs .tab-btn { font-size: 14px; letter-spacing: 0.02em; }
}

/* 顶部轮播渐变背景 */
/* ==================== 顶部 Banner：浅色 Logo 水印背景（配色取自品牌印章） ==================== */
/* 印章红 #B5382A / 焦糖 #C97A3D / 米白 #FFF9F0 */
.banner-bg-1 {
    background:
        radial-gradient(120% 110% at 88% 8%, rgba(201, 122, 61, 0.55) 0%, rgba(201, 122, 61, 0) 52%),
        radial-gradient(90% 90% at 0% 100%, rgba(181, 56, 42, 0.55) 0%, rgba(181, 56, 42, 0) 60%),
        linear-gradient(135deg, #BA3B2B 0%, #9A3120 48%, #6E2315 100%);
}
.banner-bg-2 {
    background:
        radial-gradient(110% 110% at 12% 92%, rgba(201, 122, 61, 0.6) 0%, rgba(201, 122, 61, 0) 55%),
        radial-gradient(95% 95% at 100% 0%, rgba(255, 249, 240, 0.14) 0%, rgba(255, 249, 240, 0) 55%),
        linear-gradient(135deg, #C97A3D 0%, #A63722 52%, #6E2315 100%);
}
/* 浅色 Logo 水印：米白线条、低透明度，做背景纹样 */
.banner-wm {
    position: absolute;
    color: #FFF9F0;
    pointer-events: none;
    opacity: 0.1;
}
.banner-wm svg {
    width: 100%;
    height: 100%;
    display: block;
}
.banner-wm-lg {
    width: 240px;
    height: 240px;
    right: -60px;
    top: -52px;
    transform: rotate(-8deg);
}
.banner-wm-sm {
    width: 116px;
    height: 116px;
    left: -28px;
    bottom: -30px;
    opacity: 0.13;
    transform: rotate(9deg);
}
/* 中心柔光，让文字更清透 */
.banner-soft {
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 60% at 50% 45%, rgba(255, 249, 240, 0.16) 0%, rgba(255, 249, 240, 0) 70%);
    pointer-events: none;
}

/* 轮播轨道 */
.carousel-track {
    display: flex;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 卡片与按钮交互 */
.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -6px rgba(168, 72, 43, 0.15);
}
.btn-hover {
    transition: all 0.25s ease;
}
.btn-hover:active {
    transform: scale(0.98);
}
.ripple {
    position: relative;
    overflow: hidden;
}
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }

/* ==================== 飘落爱心层（轻量不遮挡） ==================== */
.floating-hearts-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 40;
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
}
.floating-heart {
    position: absolute;
    bottom: -28px;
    color: rgba(255, 94, 126, 0.32);
    user-select: none;
    animation: heartRise linear forwards;
}
@keyframes heartRise {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(0.85);
        opacity: 0;
    }
    15% {
        opacity: 0.55;
    }
    50% {
        transform: translateY(-48vh) translateX(12px) rotate(12deg) scale(1);
    }
    85% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-102vh) translateX(-10px) rotate(-10deg) scale(0.9);
        opacity: 0;
    }
}

/* ==================== 相亲资料：嘉宾卡片（Tailwind 为主，仅补充少量规则） ==================== */
/* 头像图片撑满圆形容器 */
.p-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
/* 卡片整体可点：打开完整资料弹窗 */
.profile-card { cursor: pointer; }
/* 复制成功提示：关闭原资料弹窗后置顶显示（层级高于 z-index:60 的资料弹窗） */
#customModal.modal-top {
    align-items: flex-start;
    padding-top: 72px;
}
/* 详细资料：卡片内不展示，供完整资料弹窗读取（同时保留给搜索引擎） */
.m-ext { display: none; }

/* ==================== 会员完整资料弹窗（适老化大字） ==================== */
.m-mask {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(45, 24, 16, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.m-mask.show {
    opacity: 1;
    pointer-events: auto;
}
.m-dialog {
    width: 100%;
    max-width: 360px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    border-radius: 20px;
    background: #fff;
    border: 2px solid #FECDD3;
    box-shadow: 0 24px 60px -12px rgba(168, 72, 43, 0.4);
    transform: scale(0.92);
    transition: transform 0.25s;
}
.m-mask.show .m-dialog { transform: scale(1); }
/* 弹窗头像：渐变描边 + 渐变色块（无头像时展示姓氏） */
.m-ring {
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(45deg, #FF5E7E, #FF7B6B);
    box-shadow: 0 6px 16px -8px rgba(232, 69, 95, 0.8);
}
.m-ring .m-av {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #FF5E7E, #FF7B6B);
}
.m-ring .m-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.m-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #FFF0F3;
    color: #A8482B;
    font-size: 14px;
    cursor: pointer;
}
.m-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 10px;
    margin-top: 12px;
    font-size: 13.5px;
    color: #5C4A3E;
}
.m-rows i {
    font-style: normal;
    margin-right: 4px;
    font-size: 11px;
    color: #B9A899;
}
.m-rows b {
    font-weight: 700;
    color: #2D1810;
}

/* 会员详情弹窗：个人照片（横向滚动，点击打开原图） */
.m-photos-box { margin-top: 12px; text-align: left; }
.m-photos-list { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; -webkit-overflow-scrolling: touch; }
.m-photos-list a { flex: 0 0 auto; display: block; border: 1px solid #FECDD3; border-radius: 10px; overflow: hidden; }
.m-photos-list img { display: block; width: 72px; height: 72px; object-fit: cover; }
.m-photos { display: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
