/* 会员之家页面样式 - 暗色系设计 */

/* 页面主容器 */
.members-page {
    background: #000000;
    width: 100%;
    min-width: 1200px; /* 防止浏览器窗口过小影响布局 */
    overflow-x: auto; /* 窗口小于最小宽度时显示横向滚动条 */
}

/* 搜索区域 */
.members-search {
    padding: 0.5rem 2.8rem;
    background: #000000;
    border-bottom: 1px solid #222222;
}

.members-search .search-wrapper {
    max-width: 8rem;
    margin: 0 auto;
    display: flex;
    gap: 0.15rem;
    align-items: center;
}

.members-search .search-input {
    flex: 1;
    padding: 0.14rem 0.2rem;
    border: 1px solid #333;
    border-radius: 0.06rem;
    font-size: 0.16rem;
    background: #1B1B1B;
    color: #ffffff;
    transition: all 0.3s ease;
}

.members-search .search-input:focus {
    outline: none;
    border-color: #DFA748;
    background: #2A2A2C;
}

.members-search .search-input::placeholder {
    color: #8D8D8D;
}

.members-search .search-btn {
    padding: 0.14rem 0.3rem;
    background: linear-gradient(135deg, #DFA748 0%, #C49338 100%);
    color: #000000;
    border: none;
    border-radius: 0.06rem;
    font-size: 0.16rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.members-search .search-btn:hover {
    background: linear-gradient(135deg, #E8B65A 0%, #DFA748 100%);
    transform: translateY(-1px);
}

.members-search .refresh-btn {
    padding: 0.14rem 0.3rem;
    background: transparent;
    color: #DFA748;
    border: 1px solid #DFA748;
    border-radius: 0.06rem;
    font-size: 0.16rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.members-search .refresh-btn:hover {
    background: rgba(223, 167, 72, 0.1);
}

/* 会员列表容器 */
.members-container {
    padding: 0.5rem 2.8rem 1rem;
    min-height: 60vh;
}

/* 统计信息 */
.members-stats {
    text-align: center;
    padding: 0.3rem 0 0.5rem;
    color: #8D8D8D;
    font-size: 0.18rem;
    font-family: hm;
}

.members-stats span {
    color: #DFA748;
    font-weight: 600;
    font-size: 0.24rem;
    margin: 0 0.08rem;
}

/* 会员网格 */
.members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
}

/* ==========================================
   会员名片卡片 - 精致名片设计
   ========================================== */
.member-card {
    position: relative;
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 0.1rem;
    overflow: visible;
    transition: all 0.35s ease;
    border: 1px solid rgba(223, 167, 72, 0.15);
    min-width: 0; /* 允许grid item收缩到小于内容宽度 */
}

.member-card:hover {
    transform: translateY(-4px);
    border-color: rgba(223, 167, 72, 0.4);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(223, 167, 72, 0.2);
}

/* 卡片内层 */
.card-inner {
    padding: 0.28rem 0.24rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    position: relative;
    width: 100%; /* 确保flex容器不超出父容器 */
    box-sizing: border-box; /* 确保padding包含在width内 */
}

/* 顶部金色装饰线 */
.card-inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0.24rem;
    right: 0.24rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, #DFA748, transparent);
    opacity: 0.6;
}

/* ==========================================
   头像设计
   ========================================== */
.member-avatar {
    position: relative;
    width: 0.8rem;
    height: 0.8rem;
    flex-shrink: 0;
}

/* 无头像时的外圈装饰 */
.member-avatar:not(.has-avatar)::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #DFA748 0%, #8B6914 50%, #DFA748 100%);
    opacity: 0.8;
}

/* 无头像时的内圈 */
.member-avatar:not(.has-avatar)::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: #1a1a1a;
}

/* 无头像时的占位符 */
.member-avatar .avatar-placeholder {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.28rem;
    font-weight: 600;
    color: #DFA748;
    font-family: hb;
    z-index: 1;
}

/* ==========================================
   有头像时的画框布局 - 使用绝对定位不影响布局
   ========================================== */

/* 画框容器 - 绝对定位向外扩展 */
.member-avatar .avatar-frame {
    position: absolute;
    width: 1.3rem;
    height: 1.3rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    background-image: url('https://haowebsite.oss-cn-hongkong.aliyuncs.com/uploads/images/member/1.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* 画框内的头像图片 */
.member-avatar .avatar-frame .avatar-img {
    width: 50%;
    height: 50%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    top: -10%;
}

/* ==========================================
   会员信息区域 - 高端设计
   ========================================== */
.member-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

/* 姓名 - 大气醒目 */
.member-name {
    font-size: 0.2rem;
    font-weight: 700;
    color: #ffffff;
    font-family: hb;
    letter-spacing: 0.02rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    margin-bottom: 0.08rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 职称标签 - 金色徽章风格 */
.member-title {
    display: inline-flex;
    align-items: center;
    font-size: 0.11rem;
    color: #1a1a1a;
    font-family: hm;
    font-weight: 500;
    background: linear-gradient(135deg, #DFA748 0%, #F5D998 50%, #DFA748 100%);
    padding: 0.04rem 0.1rem;
    border-radius: 0.03rem;
    max-width: fit-content;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.12rem;
    box-shadow: 0 2px 6px rgba(223, 167, 72, 0.25);
    letter-spacing: 0.005rem;
}

/* 会员元信息 - 精致分割 */
.member-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    padding-top: 0.1rem;
    border-top: 1px solid rgba(223, 167, 72, 0.12);
    position: relative;
    width: 100%;
}

/* 装饰小点 */
.member-meta::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 0.2rem;
    height: 2px;
    background: linear-gradient(90deg, #DFA748, transparent);
}

.member-no {
    font-size: 0.11rem;
    color: #888;
    font-family: hm;
    display: flex;
    align-items: center;
    gap: 0.06rem;
    letter-spacing: 0.01rem;
}

/* 编号前的小图标 */
.member-no::before {
    content: "";
    display: inline-block;
    width: 0.1rem;
    height: 0.1rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23DFA748'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    opacity: 0.8;
}

.member-region {
    font-size: 0.1rem;
    color: #666;
    font-family: hm;
    display: flex;
    align-items: center;
    gap: 0.06rem;
}

/* 地区前的小图标 */
.member-region::before {
    content: "";
    display: inline-block;
    width: 0.09rem;
    height: 0.09rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    opacity: 0.7;
}

/* ==========================================
   操作按钮区域
   ========================================== */
.members-actions {
    text-align: center;
    padding: 0.5rem 0 0.3rem;
}

.members-actions .refresh-all-btn {
    padding: 0.14rem 0.5rem;
    background: transparent;
    color: #DFA748;
    border: 1px solid #DFA748;
    border-radius: 0.06rem;
    font-size: 0.16rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: hm;
}

.members-actions .refresh-all-btn:hover {
    background: linear-gradient(135deg, #DFA748 0%, #C49338 100%);
    color: #000000;
    border-color: transparent;
}

/* 无数据提示 */
.no-members {
    text-align: center;
    padding: 1.5rem;
    color: #8D8D8D;
    font-size: 0.18rem;
    grid-column: 1 / -1;
    font-family: hm;
}

.no-members .icon {
    font-size: 0.6rem;
    margin-bottom: 0.2rem;
    opacity: 0.4;
    display: block;
}

/* ==========================================
   响应式设计 - 1024px以下
   ========================================== */
@media screen and (max-width: 1024px) {
    /* 移除桌面端的最小宽度限制 */
    .members-page {
        min-width: auto;
        overflow-x: visible;
    }

    .members-search {
        padding: 30px 15px;
    }

    .members-search .search-wrapper {
        flex-wrap: wrap;
        gap: 10px;
    }

    .members-search .search-input {
        width: 100%;
        flex: none;
        padding: 14px 16px;
        font-size: 16px;
    }

    .members-search .search-btn,
    .members-search .refresh-btn {
        flex: 1;
        padding: 14px 20px;
        font-size: 16px;
    }

    .members-container {
        padding: 30px 15px 60px;
    }

    .members-stats {
        font-size: 16px;
        padding: 20px 0 25px;
    }

    .members-stats span {
        font-size: 22px;
    }

    .members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .card-inner {
        padding: 20px 16px;
        gap: 14px;
    }

    .card-inner::before {
        left: 16px;
        right: 16px;
    }

    .member-avatar {
        width: 72px;
        height: 72px;
    }

    .member-avatar:not(.has-avatar)::before {
        top: -3px;
        left: -3px;
        right: -3px;
        bottom: -3px;
    }

    .member-avatar .avatar-placeholder {
        font-size: 28px;
    }

    .member-avatar .avatar-frame {
        width: 110px;
        height: 110px;
    }

    .member-name {
        font-size: 17px;
        margin-bottom: 6px;
    }

    .member-title {
        font-size: 12px;
        padding: 4px 10px;
        margin-bottom: 10px;
    }

    .member-meta {
        gap: 5px;
        padding-top: 10px;
    }

    .member-meta::before {
        width: 20px;
    }

    .member-no {
        font-size: 13px;
    }

    .member-no::before {
        width: 12px;
        height: 12px;
    }

    .member-region {
        font-size: 12px;
    }

    .member-region::before {
        width: 10px;
        height: 10px;
    }

    .members-actions .refresh-all-btn {
        padding: 14px 40px;
        font-size: 16px;
    }
}

/* 小屏移动端 */
@media screen and (max-width: 668px) {
    .members-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-inner {
        padding: 18px 16px;
        gap: 14px;
    }

    .member-avatar {
        width: 68px;
        height: 68px;
    }

    .member-avatar .avatar-placeholder {
        font-size: 26px;
    }

    .member-avatar .avatar-frame {
        width: 100px;
        height: 100px;
    }

    .member-name {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .member-title {
        font-size: 12px;
        padding: 4px 10px;
        margin-bottom: 8px;
    }

    .member-meta {
        gap: 4px;
        padding-top: 8px;
    }

    .member-no {
        font-size: 13px;
    }

    .member-region {
        font-size: 12px;
    }
}

/* 加载动画 */
.members-loading {
    text-align: center;
    padding: 1.5rem;
    grid-column: 1 / -1;
}

.members-loading .spinner {
    width: 0.5rem;
    height: 0.5rem;
    border: 2px solid rgba(223, 167, 72, 0.2);
    border-top-color: #DFA748;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 0.2rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
