/* ================= 首页独有样式 (Index) ================= */
/* 1. 顶部搜索框 (仿原生App渐变风格) */
.header-search { 
    background: #fff; 
    padding: 10px 15px; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}

/* 外层：负责渐变边框的背景 */
.search-box-wrapper { 
    display: block;
    padding: 1px; /* 这里的1px就是边框的宽度 */
    border-radius: 30px; /* 大圆角 */
    /* 核心：使用线性渐变模拟边框颜色 (青色 -> 粉色) */
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 50%, #ff9a9e 100%);
    text-decoration: none;
}

/* 内层：纯白背景，遮住中间的内容，只露出边缘 */
.search-box-inner {
    background: #fff;
    border-radius: 29px; /* 比外层小1px */
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center; /* 居中显示 */
    color: #999;
    font-size: 14px;
}

.search-icon { margin-right: 6px; }



/* 2. Banner 轮播 */
.banner-container {
    padding: 10px 15px;
    padding-bottom: 0 !important;
}

.swiper-slide img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.swiper-pagination-bullet-active {
    background-color: #6200ea !important;
}

/* ================= 首页线上线下开关样式 (最终增强版) ================= */
.toggle-wrapper { 
    display: inline-flex; 
    align-items: center; 
    margin-left: auto; 
    margin-right: 10px; 
    font-size: 12px; 
}

/* 1. 文字标签默认样式 (灰色、不加粗) */
.toggle-label { 
    margin: 0 5px; 
    color: #ccc; 
    font-weight: normal; 
    transition: all 0.3s; 
}

/* 2. 🔥【关键】利用 :has 选择器检测开关状态 */

/* 当开关【未勾选】(线上)时 -> 让左边的 .online 文字变绿 + 加粗 */
.toggle-wrapper:has(#modeToggle:not(:checked)) .toggle-label.online { 
    color: #4CAF50; 
    font-weight: bold;
    transform: scale(1.05); /* 微微放大，强调当前选中 */
} 

/* 当开关【已勾选】(线下)时 -> 让右边的 .offline 文字变粉 + 加粗 */
.toggle-wrapper:has(#modeToggle:checked) .toggle-label.offline { 
    color: #ff4081; 
    font-weight: bold;
    transform: scale(1.05); 
}      

/* 3. 开关本体结构 */
.switch { 
    position: relative; 
    display: inline-block; 
    width: 40px; 
    height: 20px; 
    margin-bottom: 0; /* 修正可能存在的底部间距 */
}

/* 隐藏复选框原始输入框 */
.switch input { 
    opacity: 0; 
    width: 0; 
    height: 0; 
}

/* 4. 滑块条 (Slider) */
.slider { 
    position: absolute; 
    cursor: pointer; 
    top: 0; left: 0; right: 0; bottom: 0; 
    background-color: #4CAF50; /* 🟢 默认背景：绿色 */
    transition: .4s; 
    border-radius: 20px; 
}

/* 滑块里的小圆球 */
.slider:before { 
    position: absolute; 
    content: ""; 
    height: 16px; 
    width: 16px; 
    left: 2px; 
    bottom: 2px; 
    background-color: white; 
    transition: .4s; 
    border-radius: 50%; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 5. 选中状态样式 (线下) */
/* 背景变粉 */
input:checked + .slider { 
    background-color: #ff4081; /* 🌸 选中背景：粉色 */
}

/* 圆球右移 */
input:checked + .slider:before { 
    transform: translateX(20px); 
}



/* ================= 新版游戏图标 Swiper 样式 ================= */
.game-swiper {
    padding: 15px 10px 25px 10px !important; /* 底部留出空间给小圆点 */
}

.game-slide-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 60px; 
}

/* 图标容器：增加微阴影和圆角 */
.game-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08); 
    background: #fff;
}
.game-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-title {
    font-size: 12px;
    color: #333;
    margin-top: 2px;
}

/* 游戏区域的分页器颜色 */
.game-pagination .swiper-pagination-bullet-active {
    background-color: #8e2de2 !important; /* 紫色高亮 */
}


/* ================= 精修版：标题与卡片样式 ================= */

/* 1. 标题区域：左右对齐，中间留空 */
.section-title {
    display: flex;
    justify-content: space-between; /* 关键：一左一右 */
    align-items: center;            /* 垂直居中 */
    margin: 2px 15px 15px;         /* 上边距加大，下边距15px留出空间 */
}

/* 2. 标题文字美化 (图2 风格：粗斜体 + 底部高光) */
.section-title .title-text {
    font-size: 20px;
    font-weight: 900;           /* 极粗 */
    font-style: italic;         /* 斜体 */
    color: #222;
    position: relative;
    z-index: 1;
    padding-right: 5px;
    letter-spacing: -1px;       /* 紧凑一点更像Logo */
    transform: skewX(-5deg);    /* 微微倾斜 */
}

/* 标题底部的淡紫色高光条 */
.section-title .title-text::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(180, 130, 255, 0.3); /* 淡紫色半透明 */
    z-index: -1;
    border-radius: 4px;
}

/* ================= 卡片精修 V2 (增高 + 标签美化 + 字体加深) ================= */

.companion-card-wrapper {
    display: block;
    text-decoration: none;
    margin-bottom: 16px;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 40%, #ff9a9e 100%);
    box-shadow: 0 6px 15px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}



/* === 新增以下样式代码到文件末尾 === */

/* 状态标签通用样式 */
.status-badge {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    padding: 4px 10px;
    font-size: 11px;
    color: #fff;
    font-weight: bold;
    border-bottom-left-radius: 12px; /* 左下角圆角 */
    box-shadow: -2px 2px 5px rgba(0,0,0,0.1);
}

/* 三种状态的背景色 */
.status-free {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); /* 绿色渐变 */
}

.status-serving {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); /* 配合首页风格的粉红/橙色 */
    background: #ff7043; /* 或者用纯橙色更醒目 */
}

.status-offline {
    background: #bdc3c7; /* 灰色 */
}






.companion-card-wrapper:active {
    transform: scale(0.98);
}

.companion-card-inner {
    background: #fff;
    border-radius: 15px;
    display: flex;
    /* 1. 【修改点】高度增加，让卡片看起来更像APP大图模式 */
    height: 140px; 
    overflow: hidden;
    position: relative; 
}

/* 左侧：头像 (保持正方形，跟随高度) */
.card-left {
    /* 【修改点】宽度必须等于上面的 height，保持正方形 */
    width: 140px; 
    flex-shrink: 0;
    height: 100%;
    position: relative;
}

.card-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 右侧：内容区 */
.card-right {
    flex: 1;
    padding: 12px 14px; /* 内边距稍微加大一点 */
    display: flex;
    flex-direction: column;
    /* 让内容垂直分布：头部顶天，价格立地，中间简介居中 */
    justify-content: space-between; 
    min-width: 0;
}

/* 名字行 */
.card-header {
    display: flex;
    align-items: center;
}
.card-name {
    font-size: 17px; /* 字体稍微加大 */
    font-weight: 700;
    color: #222;
    margin-right: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gender-badge {
    font-size: 10px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    color: #fff;
    flex-shrink: 0;
}
.gender-badge.male { background: #55aaff; }
.gender-badge.female { background: #ff6699; }

/* 标签行 */
.card-tags-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.game-pill {
    background: linear-gradient(90deg, #7F00FF, #E100FF);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* 2. 【修改点】特色标签美化 (淡紫背景 + 描边) */
.feature-tag {
    font-size: 11px;
    color: #8e24aa;           /* 深紫色文字 */
    background-color: #f3e5f5;/* 淡紫色背景 */
    border: 1px solid #e1bee7;/* 浅紫色描边 */
    padding: 1px 8px;
    border-radius: 6px;       /* 小圆角 */
    font-weight: 500;
}

/* 3. 【修改点】简介文字加深 + 允许显示两行 */
.card-desc {
    font-size: 13px;
    color: #333; /* 【修改点】改成深黑色，不再是浅灰 */
    line-height: 1.5;
    
    /* 多行省略写法 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* 允许显示2行 */
    overflow: hidden;
    white-space: normal;   /* 允许换行 */
    
    margin: 4px 0; /* 上下留点缝隙 */
}

/* 底部价格 */
.card-footer {
    display: flex;
    justify-content: flex-end;
}

.card-price {
    color: #ff3d00;
    font-weight: bold;
    display: flex;
    align-items: baseline;
}
.card-price .currency { font-size: 13px; margin-right: 1px; font-weight: 600;}
.card-price .amount { font-size: 22px; line-height: 1; }
.card-price .unit { font-size: 11px; color: #999; font-weight: normal; margin-left: 2px;}



/* ================= 游戏图标选中状态 ================= */

/* 选中时的图标容器：增加紫色边框 */
.game-icon-box.active {
    border: 2px solid #8e2de2; /* 紫色边框 */
    transform: scale(1.05);    /* 微微放大 */
    transition: all 0.2s;
}
/* 选中时的文字：变紫色加粗 */
.game-title.active-text {
    color: #8e2de2;
    font-weight: bold;
}