/* 全局基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "Microsoft Yahei", sans-serif;
    background: #fef5f7;
    color: #333;
    line-height: 1.5;
}
a {
    text-decoration: none;
    color: inherit;
}
button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, #ff4d6d 0%, #ff8fab 100%);
    box-shadow: 0 2px 10px rgba(255, 77, 109, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}
.nav-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}
.nav-menu a {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    padding: 6px 0;
    transition: all 0.2s;
}
.nav-menu a:hover, .nav-menu a.active {
    color: #fff;
    font-weight: 500;
    border-bottom: 2px solid #fff;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* 页面头部 */
.page-header {
    margin-bottom: 30px;
    text-align: center;
}
.page-header h2 {
    color: #ff4d6d;
    font-size: 28px;
    margin-bottom: 8px;
}
.page-header p {
    color: #999;
    font-size: 14px;
}

/* 用户网格 */
.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.user-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: all 0.3s;
    position: relative;
}
.user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255,77,109,0.15);
}
.card-link {
    display: block;
}

/* 头像区域 */
.avatar-box {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}
.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.default-avatar {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    font-weight: bold;
}
.auth-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    backdrop-filter: blur(4px);
}

/* 用户信息 */
.user-info {
    padding: 16px;
}
.name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.nickname {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
.age {
    color: #ff4d6d;
    font-weight: 500;
    font-size: 16px;
}
.meta-row {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.intro {
    color: #999;
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 关注按钮 */
.follow-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: #fff;
    color: #ff4d6d;
    border: 1px solid #ff4d6d;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s;
}
.follow-btn:hover {
    background: #fff0f3;
}
.follow-btn.followed {
    background: #ff4d6d;
    color: #fff;
}

/* 空状态 */
.empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-size: 15px;
    background: #fff;
    border-radius: 16px;
}

/* 分页 */
.pagination {
    margin-top: 40px;
    text-align: center;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
}
.pagination a {
    padding: 8px 20px;
    background: #fff;
    border: 1px solid #ffccd5;
    color: #ff4d6d;
    border-radius: 8px;
    transition: all 0.2s;
}
.pagination a:hover {
    background: #ff4d6d;
    color: #fff;
}
.pagination span {
    color: #666;
    font-size: 14px;
}

/* 表单通用样式 */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #ff4d6d;
}
.btn-primary {
    width: 100%;
    padding: 14px;
    background: #ff4d6d;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    transition: background 0.2s;
}
.btn-primary:hover {
    background: #ff3355;
}
.btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
}

/* 响应式适配手机 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }
    .nav-menu {
        gap: 12px;
        font-size: 14px;
    }
    .nav-menu a {
        font-size: 13px;
    }
    .container {
        padding: 20px 16px;
    }
    .user-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
    .avatar-box {
        height: 180px;
    }
    .default-avatar {
        font-size: 50px;
    }
    .user-info {
        padding: 12px;
    }
    .nickname {
        font-size: 16px;
    }
    .meta-row {
        font-size: 12px;
    }
    .intro {
        display: none;
    }
    .follow-btn {
        padding: 4px 12px;
        font-size: 12px;
        bottom: 12px;
        right: 12px;
    }
}
