:root {
    --h5-width: 450px; 
    --safe-bottom: env(safe-area-inset-bottom);
}

body {
    background-color: #f0f2f5; 
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    display: flex; justify-content: center;
}

.h5-container {
    width: 100%;
    max-width: var(--h5-width);
    background-image: url('../images/bg_main.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
    padding-bottom: calc(65px + var(--safe-bottom));
}

/* 轮播图视口 */
.swiper-viewport {
    width: 96%; 
    margin: 15px auto 0; 
    height: 200px;
    overflow: hidden; 
    position: relative; 
    z-index: 1;
    border-radius: 12px;
}

/* 轮播容器：设置 transition-timing-function 为 linear 或 ease-in-out */
.swiper-container { 
    display: flex; 
    transition: transform 0.5s ease-in-out; 
    height: 100%; 
    will-change: transform;
}

.swiper-slide { 
    min-width: 100%; 
    height: 100%; 
}

.swiper-slide img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.dots-container {
    position: absolute; 
    bottom: 10px; 
    width: 100%;
    display: flex; 
    justify-content: center; 
    gap: 5px;
}

.dot { 
    width: 6px; 
    height: 6px; 
    background: rgba(255,255,255,0.4); 
    border-radius: 50%; 
    transition: all 0.3s ease;
}

.dot.active { 
    background: #fff; 
    width: 15px; 
    border-radius: 3px; 
}

.overlap-card { 
    width: 100%; 
    margin-top: -100px; 
    position: relative; 
    z-index: 5; 
}

.overlap-card img { 
    width: 100%; 
    display: block; 
}

.brand-list { 
    padding: 0 12px; 
    margin-top: -30px; 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    position: relative; 
    z-index: 10; 
}

.brand-item {    /* 主体品牌边框 */
    background: rgba(255, 255, 255, 0.7);
    border-radius: 25px; 
    padding: 12px; 
    display: flex; 
    align-items: center;
    text-decoration: none; 
    border: 2px solid rgba(175, 175, 175, 0.3);  /* 半透明白色边框 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    backdrop-filter: blur(5px);  /* 毛玻璃效果 */
    -webkit-backdrop-filter: blur(8px);  /* Safari 兼容性 */
}

.brand-logo { 
    width: 64px; 
    height: 64px; 
    position: relative; 
    margin-right: 15px; 
    flex-shrink: 0; 
}

.brand-logo img { 
    width: 100%; 
    height: 100%; 
    border-radius: 14px; 
    object-fit: cover; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tag {
    position: absolute; 
    top: -5px; 
    left: -12px; 
    background: #0055ff; 
    color: #fff; 
    font-size: 10px;
    padding: 2px 6px; 
    border-radius: 15px; 
    font-weight: bold; 
    transform: rotate(-35deg);
}

/* --- 核心笔刷样式 --- */
.brand-name { 
    font-size: 19px; 
    font-weight: 800; 
    color: #1e293b; 
    margin-right: auto; 
    position: relative; 
}

.brand-name span {
    position: relative;
    z-index: 2;
    padding: 0 4px;
}

.brand-name span::after {
    content: '';
    position: absolute;
    left: -5%;
    bottom: 2px; 
    width: 110%;
    height: 10px; 
    background: #ff9d00; 
    z-index: -1;
    opacity: 0.8;
    border-radius: 100% 15% 85% 15% / 60% 15% 55% 15%;
    transform: rotate(-1.5deg);
    filter: blur(0.5px);
}

.reg-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff; 
    padding: 8px 18px; 
    border-radius: 50px; 
    font-size: 13px; 
    font-weight: bold;
}

.bottom-nav {
    position: fixed; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%);
    width: 100%; 
    max-width: var(--h5-width); 
    height: calc(65px + var(--safe-bottom));
    background: rgba(255, 255, 255, 0.8);  /* 修改为半透明白色 */
    display: flex; 
    z-index: 1000; 
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
    backdrop-filter: blur(5px);  /* 毛玻璃效果 */
    -webkit-backdrop-filter: blur(10px);  /* Safari 兼容性 */
}

.nav-item { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    color: #94a3b8; 
    transition: color 0.3s ease; 
    cursor: pointer;
}

.nav-item.active { 
    color: #2563eb !important; 
}

.nav-item i, .nav-item span { 
    color: inherit; 
    font-size: 11px; 
    margin-top: 3px; 
    font-weight: bold; 
}

.modal { 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.6); 
    display: none; 
    align-items: center; 
    justify-content: center; 
    z-index: 2000; 
    backdrop-filter: blur(4px); 
}

.modal.open { 
    display: flex; 
}

.modal-content { 
    width: 92%; 
    max-width: 400px; 
    background: #fff; 
    border-radius: 24px; 
    overflow: hidden; 
}

.modal-header { 
    padding: 15px 20px; 
    background: #2563eb; 
    color: #fff; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-weight: bold; 
}

.modal-body { 
    padding: 15px; 
    max-height: 65vh; 
    overflow-y: auto; 
    background: #f8fafc; 
}

/* 帮助中心/优惠活动文字大小修正 */
#helpBody .text-xs {
    font-size: 16px !important; 
    line-height: 1.6 !important; 
}

#helpBody .text-\[11px\] {
    font-size: 15px !important; 
    line-height: 1.6 !important;
}

#promoBody .text-sm {
    font-size: 15px !important; 
    line-height: 1.5 !important;
}

#promoBody .text-xs {
    font-size: 14px !important; 
}